pax_global_header00006660000000000000000000000064126211313460014511gustar00rootroot0000000000000052 comment=fed64ee5710255714de00ba99d45594402ddd964 pd-iemmatrix-0.3/000077500000000000000000000000001262113134600137535ustar00rootroot00000000000000pd-iemmatrix-0.3/AUTHORS.txt000066400000000000000000000001671262113134600156450ustar00rootroot00000000000000IOhannes m zmoelnig thomas musil franz zotter pd-iemmatrix-0.3/BUGS.txt000066400000000000000000000003311262113134600152510ustar00rootroot00000000000000mtx_diegg: initial values are used for [mtx_diag]! mtx_diegg: getting dieggonally of a matrix does not work mtx_min2, mtx_max2: doesn't work with scalar mtx_r(i)fft: likes crashing lots of help-patches are missing pd-iemmatrix-0.3/CHANGES.txt000066400000000000000000000000541262113134600155630ustar00rootroot000000000000000.1: (jmz, 21.03.2005) * forked from zexy pd-iemmatrix-0.3/GnuGPL.txt000066400000000000000000000431101262113134600156070ustar00rootroot00000000000000 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. Copyright (C) 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) year 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. , 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. pd-iemmatrix-0.3/INSTALL.txt000066400000000000000000000366051262113134600156340ustar00rootroot00000000000000Installation Instructions ************************* Copyright (C) 1994-1996, 1999-2002, 2004-2012 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without warranty of any kind. Basic Installation ================== Briefly, the shell commands './configure; make; make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the 'README' file for instructions specific to this package. Some packages provide this 'INSTALL' file but do not implement all of the features documented below. The lack of an optional feature in a given package is not necessarily a bug. More recommendations for GNU packages can be found in *note Makefile Conventions: (standards)Makefile Conventions. The 'configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a 'Makefile' in each directory of the package. It may also create one or more '.h' files containing system-dependent definitions. Finally, it creates a shell script 'config.status' that you can run in the future to recreate the current configuration, and a file 'config.log' containing compiler output (useful mainly for debugging 'configure'). It can also use an optional file (typically called 'config.cache' and enabled with '--cache-file=config.cache' or simply '-C') that saves the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale cache files. If you need to do unusual things to compile the package, please try to figure out how 'configure' could check whether to do them, and mail diffs or instructions to the address given in the 'README' so they can be considered for the next release. If you are using the cache, and at some point 'config.cache' contains results you don't want to keep, you may remove or edit it. The file 'configure.ac' (or 'configure.in') is used to create 'configure' by a program called 'autoconf'. You need 'configure.ac' if you want to change it or regenerate 'configure' using a newer version of 'autoconf'. The simplest way to compile this package is: 1. 'cd' to the directory containing the package's source code and type './configure' to configure the package for your system. Running 'configure' might take a while. While running, it prints some messages telling which features it is checking for. 2. Type 'make' to compile the package. 3. Optionally, type 'make check' to run any self-tests that come with the package, generally using the just-built uninstalled binaries. 4. Type 'make install' to install the programs and any data files and documentation. When installing into a prefix owned by root, it is recommended that the package be configured and built as a regular user, and only the 'make install' phase executed with root privileges. 5. Optionally, type 'make installcheck' to repeat any self-tests, but this time using the binaries in their final installed location. This target does not install anything. Running this target as a regular user, particularly if the prior 'make install' required root privileges, verifies that the installation completed correctly. 6. You can remove the program binaries and object files from the source code directory by typing 'make clean'. To also remove the files that 'configure' created (so you can compile the package for a different kind of computer), type 'make distclean'. There is also a 'make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. 7. Often, you can also type 'make uninstall' to remove the installed files again. In practice, not all packages have tested that uninstallation works correctly, even though it is required by the GNU Coding Standards. 8. Some packages, particularly those that use Automake, provide `make distcheck', which can by used by developers to test that all other targets like 'make install' and 'make uninstall' work correctly. This target is generally not run by end users. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the 'configure' script does not know about. Run './configure --help' for details on some of the pertinent environment variables. You can give 'configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you can use GNU 'make'. 'cd' to the directory where you want the object files and executables to go and run the 'configure' script. 'configure' automatically checks for the source code in the directory that 'configure' is in and in '..'. This is known as a "VPATH" build. With a non-GNU 'make', it is safer to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use 'make distclean' before reconfiguring for another architecture. On MacOS X 10.5 and later systems, you can create libraries and executables that work on multiple system types--known as "fat" or "universal" binaries--by specifying multiple '-arch' options to the compiler but only a single '-arch' option to the preprocessor. Like this: ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CPP="gcc -E" CXXCPP="g++ -E" This is not guaranteed to produce working output in all cases, you may have to build one architecture at a time and combine the results using the 'lipo' tool if you have problems. Installation Names ================== By default, 'make install' installs the package's commands under '/usr/local/bin', include files under '/usr/local/include', etc. You can specify an installation prefix other than '/usr/local' by giving 'configure' the option '--prefix=PREFIX', where PREFIX must be an absolute file name. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option '--exec-prefix=PREFIX' to 'configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like '--bindir=DIR' to specify different values for particular kinds of files. Run 'configure --help' for a list of the directories you can set and what kinds of files go in them. In general, the default for these options is expressed in terms of '${prefix}', so that specifying just '--prefix' will affect all of the other directory specifications that were not explicitly provided. The most portable way to affect installation locations is to pass the correct locations to 'configure'; however, many packages provide one or both of the following shortcuts of passing variable assignments to the 'make install' command line to change installation locations without having to reconfigure or recompile. The first method involves providing an override variable for each affected directory. For example, `make install prefix=/alternate/directory' will choose an alternate location for all directory configuration variables that were expressed in terms of '${prefix}'. Any directories that were specified during 'configure', but not in terms of '${prefix}', must each be overridden at install time for the entire installation to be relocated. The approach of makefile variable overrides for each directory variable is required by the GNU Coding Standards, and ideally causes no recompilation. However, some platforms have known limitations with the semantics of shared libraries that end up requiring recompilation when using this method, particularly noticeable in packages that use GNU Libtool. The second method involves providing the 'DESTDIR' variable. For example, 'make install DESTDIR=/alternate/directory' will prepend '/alternate/directory' before all installation names. The approach of 'DESTDIR' overrides is not required by the GNU Coding Standards, and does not work on platforms that have drive letters. On the other hand, it does better at avoiding recompilation issues, and works well even when some directory options were not specified in terms of '${prefix}' at 'configure' time. Optional Features ================= If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving 'configure' the option '--program-prefix=PREFIX' or '--program-suffix=SUFFIX'. Some packages pay attention to '--enable-FEATURE' options to 'configure', where FEATURE indicates an optional part of the package. They may also pay attention to '--with-PACKAGE' options, where PACKAGE is something like 'gnu-as' or 'x' (for the X Window System). The 'README' should mention any '--enable-' and '--with-' options that the package recognizes. For packages that use the X Window System, 'configure' can usually find the X include and library files automatically, but if it doesn't, you can use the 'configure' options '--x-includes=DIR' and '--x-libraries=DIR' to specify their locations. Some packages offer the ability to configure how verbose the execution of 'make' will be. For these packages, running `./configure --enable-silent-rules' sets the default to minimal output, which can be overridden with 'make V=1'; while running `./configure --disable-silent-rules' sets the default to verbose, which can be overridden with 'make V=0'. Particular systems ================== On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC is not installed, it is recommended to use the following options in order to use an ANSI C compiler: ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" and if that doesn't work, install pre-built binaries of GCC for HP-UX. HP-UX 'make' updates targets which have the same time stamps as their prerequisites, which makes it generally unusable when shipped generated files such as 'configure' are involved. Use GNU 'make' instead. On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot parse its '' header file. The option '-nodtk' can be used as a workaround. If GNU CC is not installed, it is therefore recommended to try ./configure CC="cc" and if that doesn't work, try ./configure CC="cc -nodtk" On Solaris, don't put '/usr/ucb' early in your 'PATH'. This directory contains several dysfunctional programs; working variants of these programs are available in '/usr/bin'. So, if you need '/usr/ucb' in your 'PATH', put it _after_ '/usr/bin'. On Haiku, software installed for all users goes in '/boot/common', not '/usr/local'. It is recommended to use the following options: ./configure --prefix=/boot/common Specifying the System Type ========================== There may be some features 'configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, 'configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the '--build=TYPE' option. TYPE can either be a short name for the system type, such as 'sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file 'config.sub' for the possible values of each field. If 'config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option '--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with '--host=TYPE'. Sharing Defaults ================ If you want to set default values for 'configure' scripts to share, you can create a site shell script called 'config.site' that gives default values for variables like 'CC', 'cache_file', and 'prefix'. 'configure' looks for 'PREFIX/share/config.site' if it exists, then 'PREFIX/etc/config.site' if it exists. Or, you can set the 'CONFIG_SITE' environment variable to the location of the site script. A warning: not all 'configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to 'configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the 'configure' command line, using 'VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified 'gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for 'CONFIG_SHELL' due to an Autoconf limitation. Until the limitation is lifted, you can use this workaround: CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash 'configure' Invocation ====================== 'configure' recognizes the following options to control how it operates. '--help' '-h' Print a summary of all of the options to 'configure', and exit. '--help=short' '--help=recursive' Print a summary of the options unique to this package's 'configure', and exit. The 'short' variant lists options used only in the top level, while the 'recursive' variant lists options also present in any nested packages. '--version' '-V' Print the version of Autoconf used to generate the 'configure' script, and exit. '--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally 'config.cache'. FILE defaults to '/dev/null' to disable caching. '--config-cache' '-C' Alias for '--cache-file=config.cache'. '--quiet' '--silent' '-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to '/dev/null' (any error messages will still be shown). '--srcdir=DIR' Look for the package's source code in directory DIR. Usually 'configure' can determine that directory automatically. '--prefix=DIR' Use DIR as the installation prefix. *note Installation Names:: for more details, including other options available for fine-tuning the installation locations. '--no-create' '-n' Run the configure checks, but stop before creating any output files. 'configure' also accepts some other, not widely useful, options. Run 'configure --help' for more details. pd-iemmatrix-0.3/LICENSE.txt000066400000000000000000000017701262113134600156030ustar00rootroot00000000000000iemmatrix - pd-objects for simple matrix operations Copyright (C) 2001-2006 IOhannes m zmoelnig (zmoelnig AT iem DOT at) Copyright (C) 2004-2006 thomas musil (musil AT iem DOT at) Copyright (C) 2005-2006 franz zotter (zotter AT iem DOT at) 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. In the official flext distribution, the GNU General Public License is in the file GnuGPL.txt pd-iemmatrix-0.3/Makefile.am000066400000000000000000000345301262113134600160140ustar00rootroot00000000000000AUTOMAKE_OPTIONS = foreign subdir-objects ACLOCAL_AMFLAGS = -I m4 SUBDIRS = abs doc iemmatrixdir=$(pkglibdir) dist_iemmatrix_DATA = \ AUTHORS.txt BUGS.txt CHANGES.txt GnuGPL.txt INSTALL.txt LICENSE.txt VERSION.txt \ iemmatrix-meta.pd pkglib_LTLIBRARIES= AM_CPPFLAGS=-I$(top_srcdir)/src AM_CFLAGS = AM_LDFLAGS= -module -avoid-version -shared -shrext .@EXTENSION@ if WINDOWS AM_LDFLAGS+= -no-undefined endif AM_LDFLAGS+= @EXTRA_LTFLAGS@ # RTE AM_CFLAGS += AM_LDFLAGS+= noinst_LTLIBRARIES = libiemmatrixCore.la libiemmatrixCore_la_SOURCES=\ src/iemmatrix.h \ src/iemmatrix_sources.h src/mtx_binop_generic.h \ src/iemmatrix_binops.c \ src/iemmatrix_utility.c ## qhull-stuff libiemmatrixCore_la_SOURCES+=\ src/mtx_qhull/entry.h \ src/mtx_qhull/list.h \ src/mtx_qhull/list.c \ src/mtx_qhull/vectors.h \ src/mtx_qhull/vectors.c \ src/mtx_qhull/zhull.h \ src/mtx_qhull/zhull.c iemmatrix_la_CPPFLAGS=-DIEMMATRIX_LIBRARY $(AM_CPPFLAGS) ### BEGIN GENERATED CONTENT ################################################### ############################################################################### # this has been generated by ./src4make.sh # ANY CHANGES made in this section (till the end of the file) # WILL BE LOST!!! if LIBRARY pkglib_LTLIBRARIES+=iemmatrix.la endif LIBRARY if SINGLEOBJECTS pkglib_LTLIBRARIES += \ matrix.la mtx_abs.la mtx_add.la \ mtx_and.la mtx_atan.la mtx_atan2.la \ mtx_bessel.la mtx_bitand.la mtx_bitleft.la \ mtx_bitor.la mtx_bitright.la mtx_bspline.la \ mtx_check.la mtx_cholesky.la mtx_col.la \ mtx_colon.la mtx_concat.la mtx_conv.la \ mtx_cos.la mtx_cumprod.la mtx_cumsum.la \ mtx_dbtopow.la mtx_dbtorms.la mtx_decay.la \ mtx_diag.la mtx_diegg.la mtx_diff.la \ mtx_dispersive_dline.la mtx_distance2.la mtx_egg.la \ mtx_eig.la mtx_ei~.la mtx_element.la \ mtx_eq.la mtx_exp.la mtx_eye.la \ mtx_fft.la mtx_fill.la mtx_find.la \ mtx_gauss.la mtx_ge.la mtx_gt.la \ mtx_ifft.la mtx_index.la mtx_int.la \ mtx_inverse.la mtx_isequal.la mtx_le.la \ mtx_log.la mtx_lt.la mtx_max2.la \ mtx_mean.la mtx_min2.la mtx_minmax.la \ mtx_mul.la mtx_mul~.la mtx_neq.la \ mtx_not.la mtx_ones.la mtx_or.la \ mtx_pack~.la mtx_pivot.la mtx_pow.la \ mtx_powtodb.la mtx_print.la mtx_prod.la \ mtx_qhull.la mtx_qr.la mtx_rand.la \ mtx_repmat.la mtx_resize.la mtx_reverse.la \ mtx_rfft.la mtx_rifft.la mtx_rmstodb.la \ mtx_roll.la mtx_row.la mtx_scroll.la \ mtx_sin.la mtx_size.la mtx_slice.la \ mtx_sndfileread.la mtx_sort.la mtx_spherical_harmonics.la \ mtx_spherical_radial.la mtx_sub.la mtx_sum.la \ mtx_svd.la mtx_trace.la mtx_transpose.la \ mtx_unpack~.la mtx_zeros.la matrix_mul_line~.la \ matrix_mul~.la matrix~.la mtx.la \ mtx_0x21.la mtx_0x210x3d.la mtx_0x26.la \ mtx_0x260x26.la mtx_0x2a.la mtx_0x2a0x7e.la \ mtx_0x2b.la mtx_0x2d.la mtx_0x2e0x2a.la \ mtx_0x2e0x2f.la mtx_0x2e0x5e.la mtx_0x2f.la \ mtx_0x3a.la mtx_0x3c.la mtx_0x3c0x3c.la \ mtx_0x3c0x3d.la mtx_0x3d0x3d.la mtx_0x3e.la \ mtx_0x3e0x3d.la mtx_0x3e0x3e.la mtx_0x7c.la \ mtx_0x7c0x7c.la mtx_div.la endif SINGLEOBJECTS iemmatrix_la_LIBADD = libiemmatrixCore.la iemmatrix_la_SOURCES = \ src/iemmatrix.c src/iemmatrix_sources.c iemmatrix_la_SOURCES += \ src/matrix.c src/mtx_abs.c src/mtx_add.c \ src/mtx_and.c src/mtx_atan.c src/mtx_atan2.c \ src/mtx_bessel.c src/mtx_bitand.c src/mtx_bitleft.c \ src/mtx_bitor.c src/mtx_bitright.c src/mtx_bspline.c \ src/mtx_check.c src/mtx_cholesky.c src/mtx_col.c \ src/mtx_colon.c src/mtx_concat.c src/mtx_conv.c \ src/mtx_cos.c src/mtx_cumprod.c src/mtx_cumsum.c \ src/mtx_dbtopow.c src/mtx_dbtorms.c src/mtx_decay.c \ src/mtx_diag.c src/mtx_diegg.c src/mtx_diff.c \ src/mtx_dispersive_dline.c src/mtx_distance2.c src/mtx_egg.c \ src/mtx_eig.c src/mtx_ei~.c src/mtx_element.c \ src/mtx_eq.c src/mtx_exp.c src/mtx_eye.c \ src/mtx_fft.c src/mtx_fill.c src/mtx_find.c \ src/mtx_gauss.c src/mtx_ge.c src/mtx_gt.c \ src/mtx_ifft.c src/mtx_index.c src/mtx_int.c \ src/mtx_inverse.c src/mtx_isequal.c src/mtx_le.c \ src/mtx_log.c src/mtx_lt.c src/mtx_max2.c \ src/mtx_mean.c src/mtx_min2.c src/mtx_minmax.c \ src/mtx_mul.c src/mtx_mul~.c src/mtx_neq.c \ src/mtx_not.c src/mtx_ones.c src/mtx_or.c \ src/mtx_pack~.c src/mtx_pivot.c src/mtx_pow.c \ src/mtx_powtodb.c src/mtx_print.c src/mtx_prod.c \ src/mtx_qhull.c src/mtx_qr.c src/mtx_rand.c \ src/mtx_repmat.c src/mtx_resize.c src/mtx_reverse.c \ src/mtx_rfft.c src/mtx_rifft.c src/mtx_rmstodb.c \ src/mtx_roll.c src/mtx_row.c src/mtx_scroll.c \ src/mtx_sin.c src/mtx_size.c src/mtx_slice.c \ src/mtx_sndfileread.c src/mtx_sort.c src/mtx_spherical_harmonics.c \ src/mtx_spherical_radial.c src/mtx_sub.c src/mtx_sum.c \ src/mtx_svd.c src/mtx_trace.c src/mtx_transpose.c \ src/mtx_unpack~.c src/mtx_zeros.c matrix_la_SOURCES=src/matrix.c matrix_la_LIBADD =libiemmatrixCore.la mtx_abs_la_SOURCES=src/mtx_abs.c mtx_abs_la_LIBADD =libiemmatrixCore.la mtx_add_la_SOURCES=src/mtx_add.c mtx_add_la_LIBADD =libiemmatrixCore.la mtx_and_la_SOURCES=src/mtx_and.c mtx_and_la_LIBADD =libiemmatrixCore.la mtx_atan_la_SOURCES=src/mtx_atan.c mtx_atan_la_LIBADD =libiemmatrixCore.la mtx_atan2_la_SOURCES=src/mtx_atan2.c mtx_atan2_la_LIBADD =libiemmatrixCore.la mtx_bessel_la_SOURCES=src/mtx_bessel.c mtx_bessel_la_LIBADD =libiemmatrixCore.la mtx_bitand_la_SOURCES=src/mtx_bitand.c mtx_bitand_la_LIBADD =libiemmatrixCore.la mtx_bitleft_la_SOURCES=src/mtx_bitleft.c mtx_bitleft_la_LIBADD =libiemmatrixCore.la mtx_bitor_la_SOURCES=src/mtx_bitor.c mtx_bitor_la_LIBADD =libiemmatrixCore.la mtx_bitright_la_SOURCES=src/mtx_bitright.c mtx_bitright_la_LIBADD =libiemmatrixCore.la mtx_bspline_la_SOURCES=src/mtx_bspline.c mtx_bspline_la_LIBADD =libiemmatrixCore.la mtx_check_la_SOURCES=src/mtx_check.c mtx_check_la_LIBADD =libiemmatrixCore.la mtx_cholesky_la_SOURCES=src/mtx_cholesky.c mtx_cholesky_la_LIBADD =libiemmatrixCore.la mtx_col_la_SOURCES=src/mtx_col.c mtx_col_la_LIBADD =libiemmatrixCore.la mtx_colon_la_SOURCES=src/mtx_colon.c mtx_colon_la_LIBADD =libiemmatrixCore.la mtx_concat_la_SOURCES=src/mtx_concat.c mtx_concat_la_LIBADD =libiemmatrixCore.la mtx_conv_la_SOURCES=src/mtx_conv.c mtx_conv_la_LIBADD =libiemmatrixCore.la mtx_cos_la_SOURCES=src/mtx_cos.c mtx_cos_la_LIBADD =libiemmatrixCore.la mtx_cumprod_la_SOURCES=src/mtx_cumprod.c mtx_cumprod_la_LIBADD =libiemmatrixCore.la mtx_cumsum_la_SOURCES=src/mtx_cumsum.c mtx_cumsum_la_LIBADD =libiemmatrixCore.la mtx_dbtopow_la_SOURCES=src/mtx_dbtopow.c mtx_dbtopow_la_LIBADD =libiemmatrixCore.la mtx_dbtorms_la_SOURCES=src/mtx_dbtorms.c mtx_dbtorms_la_LIBADD =libiemmatrixCore.la mtx_decay_la_SOURCES=src/mtx_decay.c mtx_decay_la_LIBADD =libiemmatrixCore.la mtx_diag_la_SOURCES=src/mtx_diag.c mtx_diag_la_LIBADD =libiemmatrixCore.la mtx_diegg_la_SOURCES=src/mtx_diegg.c mtx_diegg_la_LIBADD =libiemmatrixCore.la mtx_diff_la_SOURCES=src/mtx_diff.c mtx_diff_la_LIBADD =libiemmatrixCore.la mtx_dispersive_dline_la_SOURCES=src/mtx_dispersive_dline.c mtx_dispersive_dline_la_LIBADD =libiemmatrixCore.la mtx_distance2_la_SOURCES=src/mtx_distance2.c mtx_distance2_la_LIBADD =libiemmatrixCore.la mtx_egg_la_SOURCES=src/mtx_egg.c mtx_egg_la_LIBADD =libiemmatrixCore.la mtx_eig_la_SOURCES=src/mtx_eig.c mtx_eig_la_LIBADD =libiemmatrixCore.la mtx_ei__la_SOURCES=src/mtx_ei~.c mtx_ei__la_LIBADD =libiemmatrixCore.la mtx_element_la_SOURCES=src/mtx_element.c mtx_element_la_LIBADD =libiemmatrixCore.la mtx_eq_la_SOURCES=src/mtx_eq.c mtx_eq_la_LIBADD =libiemmatrixCore.la mtx_exp_la_SOURCES=src/mtx_exp.c mtx_exp_la_LIBADD =libiemmatrixCore.la mtx_eye_la_SOURCES=src/mtx_eye.c mtx_eye_la_LIBADD =libiemmatrixCore.la mtx_fft_la_SOURCES=src/mtx_fft.c mtx_fft_la_LIBADD =libiemmatrixCore.la mtx_fill_la_SOURCES=src/mtx_fill.c mtx_fill_la_LIBADD =libiemmatrixCore.la mtx_find_la_SOURCES=src/mtx_find.c mtx_find_la_LIBADD =libiemmatrixCore.la mtx_gauss_la_SOURCES=src/mtx_gauss.c mtx_gauss_la_LIBADD =libiemmatrixCore.la mtx_ge_la_SOURCES=src/mtx_ge.c mtx_ge_la_LIBADD =libiemmatrixCore.la mtx_gt_la_SOURCES=src/mtx_gt.c mtx_gt_la_LIBADD =libiemmatrixCore.la mtx_ifft_la_SOURCES=src/mtx_ifft.c mtx_ifft_la_LIBADD =libiemmatrixCore.la mtx_index_la_SOURCES=src/mtx_index.c mtx_index_la_LIBADD =libiemmatrixCore.la mtx_int_la_SOURCES=src/mtx_int.c mtx_int_la_LIBADD =libiemmatrixCore.la mtx_inverse_la_SOURCES=src/mtx_inverse.c mtx_inverse_la_LIBADD =libiemmatrixCore.la mtx_isequal_la_SOURCES=src/mtx_isequal.c mtx_isequal_la_LIBADD =libiemmatrixCore.la mtx_le_la_SOURCES=src/mtx_le.c mtx_le_la_LIBADD =libiemmatrixCore.la mtx_log_la_SOURCES=src/mtx_log.c mtx_log_la_LIBADD =libiemmatrixCore.la mtx_lt_la_SOURCES=src/mtx_lt.c mtx_lt_la_LIBADD =libiemmatrixCore.la mtx_max2_la_SOURCES=src/mtx_max2.c mtx_max2_la_LIBADD =libiemmatrixCore.la mtx_mean_la_SOURCES=src/mtx_mean.c mtx_mean_la_LIBADD =libiemmatrixCore.la mtx_min2_la_SOURCES=src/mtx_min2.c mtx_min2_la_LIBADD =libiemmatrixCore.la mtx_minmax_la_SOURCES=src/mtx_minmax.c mtx_minmax_la_LIBADD =libiemmatrixCore.la mtx_mul_la_SOURCES=src/mtx_mul.c mtx_mul_la_LIBADD =libiemmatrixCore.la mtx_mul__la_SOURCES=src/mtx_mul~.c mtx_mul__la_LIBADD =libiemmatrixCore.la mtx_neq_la_SOURCES=src/mtx_neq.c mtx_neq_la_LIBADD =libiemmatrixCore.la mtx_not_la_SOURCES=src/mtx_not.c mtx_not_la_LIBADD =libiemmatrixCore.la mtx_ones_la_SOURCES=src/mtx_ones.c mtx_ones_la_LIBADD =libiemmatrixCore.la mtx_or_la_SOURCES=src/mtx_or.c mtx_or_la_LIBADD =libiemmatrixCore.la mtx_pack__la_SOURCES=src/mtx_pack~.c mtx_pack__la_LIBADD =libiemmatrixCore.la mtx_pivot_la_SOURCES=src/mtx_pivot.c mtx_pivot_la_LIBADD =libiemmatrixCore.la mtx_pow_la_SOURCES=src/mtx_pow.c mtx_pow_la_LIBADD =libiemmatrixCore.la mtx_powtodb_la_SOURCES=src/mtx_powtodb.c mtx_powtodb_la_LIBADD =libiemmatrixCore.la mtx_print_la_SOURCES=src/mtx_print.c mtx_print_la_LIBADD =libiemmatrixCore.la mtx_prod_la_SOURCES=src/mtx_prod.c mtx_prod_la_LIBADD =libiemmatrixCore.la mtx_qhull_la_SOURCES=src/mtx_qhull.c mtx_qhull_la_LIBADD =libiemmatrixCore.la mtx_qr_la_SOURCES=src/mtx_qr.c mtx_qr_la_LIBADD =libiemmatrixCore.la mtx_rand_la_SOURCES=src/mtx_rand.c mtx_rand_la_LIBADD =libiemmatrixCore.la mtx_repmat_la_SOURCES=src/mtx_repmat.c mtx_repmat_la_LIBADD =libiemmatrixCore.la mtx_resize_la_SOURCES=src/mtx_resize.c mtx_resize_la_LIBADD =libiemmatrixCore.la mtx_reverse_la_SOURCES=src/mtx_reverse.c mtx_reverse_la_LIBADD =libiemmatrixCore.la mtx_rfft_la_SOURCES=src/mtx_rfft.c mtx_rfft_la_LIBADD =libiemmatrixCore.la mtx_rifft_la_SOURCES=src/mtx_rifft.c mtx_rifft_la_LIBADD =libiemmatrixCore.la mtx_rmstodb_la_SOURCES=src/mtx_rmstodb.c mtx_rmstodb_la_LIBADD =libiemmatrixCore.la mtx_roll_la_SOURCES=src/mtx_roll.c mtx_roll_la_LIBADD =libiemmatrixCore.la mtx_row_la_SOURCES=src/mtx_row.c mtx_row_la_LIBADD =libiemmatrixCore.la mtx_scroll_la_SOURCES=src/mtx_scroll.c mtx_scroll_la_LIBADD =libiemmatrixCore.la mtx_sin_la_SOURCES=src/mtx_sin.c mtx_sin_la_LIBADD =libiemmatrixCore.la mtx_size_la_SOURCES=src/mtx_size.c mtx_size_la_LIBADD =libiemmatrixCore.la mtx_slice_la_SOURCES=src/mtx_slice.c mtx_slice_la_LIBADD =libiemmatrixCore.la mtx_sndfileread_la_SOURCES=src/mtx_sndfileread.c mtx_sndfileread_la_LIBADD =libiemmatrixCore.la mtx_sort_la_SOURCES=src/mtx_sort.c mtx_sort_la_LIBADD =libiemmatrixCore.la mtx_spherical_harmonics_la_SOURCES=src/mtx_spherical_harmonics.c mtx_spherical_harmonics_la_SOURCES+= \ src/mtx_spherical_harmonics/chebyshev12.c src/mtx_spherical_harmonics/chebyshev12.h \ src/mtx_spherical_harmonics/legendre_a.c src/mtx_spherical_harmonics/legendre_a.h \ src/mtx_spherical_harmonics/sharmonics.c src/mtx_spherical_harmonics/sharmonics.h \ src/mtx_spherical_harmonics/sharmonics_normalization.c src/mtx_spherical_harmonics/sharmonics_normalization.h \ src/mtx_spherical_harmonics/sph_radial.c src/mtx_spherical_harmonics/sph_radial.h mtx_spherical_harmonics_la_LIBADD =libiemmatrixCore.la mtx_spherical_radial_la_SOURCES=src/mtx_spherical_radial.c mtx_spherical_radial_la_LIBADD =libiemmatrixCore.la mtx_sub_la_SOURCES=src/mtx_sub.c mtx_sub_la_LIBADD =libiemmatrixCore.la mtx_sum_la_SOURCES=src/mtx_sum.c mtx_sum_la_LIBADD =libiemmatrixCore.la mtx_svd_la_SOURCES=src/mtx_svd.c mtx_svd_la_LIBADD =libiemmatrixCore.la mtx_trace_la_SOURCES=src/mtx_trace.c mtx_trace_la_LIBADD =libiemmatrixCore.la mtx_transpose_la_SOURCES=src/mtx_transpose.c mtx_transpose_la_LIBADD =libiemmatrixCore.la mtx_unpack__la_SOURCES=src/mtx_unpack~.c mtx_unpack__la_LIBADD =libiemmatrixCore.la mtx_zeros_la_SOURCES=src/mtx_zeros.c mtx_zeros_la_LIBADD =libiemmatrixCore.la matrix_mul_line__la_SOURCES=alias/matrix_mul_line~.c matrix_mul_line__la_LIBADD =libiemmatrixCore.la matrix_mul__la_SOURCES=alias/matrix_mul~.c matrix_mul__la_LIBADD =libiemmatrixCore.la matrix__la_SOURCES=alias/matrix~.c matrix__la_LIBADD =libiemmatrixCore.la mtx_la_SOURCES=alias/mtx.c mtx_la_LIBADD =libiemmatrixCore.la mtx_0x21_la_SOURCES=alias/mtx_0x21.c mtx_0x21_la_LIBADD =libiemmatrixCore.la mtx_0x210x3d_la_SOURCES=alias/mtx_0x210x3d.c mtx_0x210x3d_la_LIBADD =libiemmatrixCore.la mtx_0x26_la_SOURCES=alias/mtx_0x26.c mtx_0x26_la_LIBADD =libiemmatrixCore.la mtx_0x260x26_la_SOURCES=alias/mtx_0x260x26.c mtx_0x260x26_la_LIBADD =libiemmatrixCore.la mtx_0x2a_la_SOURCES=alias/mtx_0x2a.c mtx_0x2a_la_LIBADD =libiemmatrixCore.la mtx_0x2a0x7e_la_SOURCES=alias/mtx_0x2a0x7e.c mtx_0x2a0x7e_la_LIBADD =libiemmatrixCore.la mtx_0x2b_la_SOURCES=alias/mtx_0x2b.c mtx_0x2b_la_LIBADD =libiemmatrixCore.la mtx_0x2d_la_SOURCES=alias/mtx_0x2d.c mtx_0x2d_la_LIBADD =libiemmatrixCore.la mtx_0x2e0x2a_la_SOURCES=alias/mtx_0x2e0x2a.c mtx_0x2e0x2a_la_LIBADD =libiemmatrixCore.la mtx_0x2e0x2f_la_SOURCES=alias/mtx_0x2e0x2f.c mtx_0x2e0x2f_la_LIBADD =libiemmatrixCore.la mtx_0x2e0x5e_la_SOURCES=alias/mtx_0x2e0x5e.c mtx_0x2e0x5e_la_LIBADD =libiemmatrixCore.la mtx_0x2f_la_SOURCES=alias/mtx_0x2f.c mtx_0x2f_la_LIBADD =libiemmatrixCore.la mtx_0x3a_la_SOURCES=alias/mtx_0x3a.c mtx_0x3a_la_LIBADD =libiemmatrixCore.la mtx_0x3c_la_SOURCES=alias/mtx_0x3c.c mtx_0x3c_la_LIBADD =libiemmatrixCore.la mtx_0x3c0x3c_la_SOURCES=alias/mtx_0x3c0x3c.c mtx_0x3c0x3c_la_LIBADD =libiemmatrixCore.la mtx_0x3c0x3d_la_SOURCES=alias/mtx_0x3c0x3d.c mtx_0x3c0x3d_la_LIBADD =libiemmatrixCore.la mtx_0x3d0x3d_la_SOURCES=alias/mtx_0x3d0x3d.c mtx_0x3d0x3d_la_LIBADD =libiemmatrixCore.la mtx_0x3e_la_SOURCES=alias/mtx_0x3e.c mtx_0x3e_la_LIBADD =libiemmatrixCore.la mtx_0x3e0x3d_la_SOURCES=alias/mtx_0x3e0x3d.c mtx_0x3e0x3d_la_LIBADD =libiemmatrixCore.la mtx_0x3e0x3e_la_SOURCES=alias/mtx_0x3e0x3e.c mtx_0x3e0x3e_la_LIBADD =libiemmatrixCore.la mtx_0x7c_la_SOURCES=alias/mtx_0x7c.c mtx_0x7c_la_LIBADD =libiemmatrixCore.la mtx_0x7c0x7c_la_SOURCES=alias/mtx_0x7c0x7c.c mtx_0x7c0x7c_la_LIBADD =libiemmatrixCore.la mtx_div_la_SOURCES=alias/mtx_div.c mtx_div_la_LIBADD =libiemmatrixCore.la pd-iemmatrix-0.3/README.txt000066400000000000000000000116751262113134600154630ustar00rootroot00000000000000Installation/Compilation instructions for "iemmatrix" ===================================================== iemmatrix uses the *autoconf* build system. For generic build instructions, please see INSTALL.txt Dependencies ============ in order to compile iemmatrix, you will need some libraries/applications installed. Some of these dependencies are optional. If they are present during compilation, iemmatrix will have certain functionality enabled, which might be missing otherwise. - puredata http://puredata.info/downloads make sure you also have the development files (headers) - GNU scientific library (aka gsl) [optional] http://www.gnu.org/software/gsl needed for higher maths, including eigenvalues and singular-value decomposition - FFTW (Fast Fourier Transform) [optional] http://www.fftw.org fast, high-precision FFTs; if not present, iemmatrix will use Pd's internal FFT - sndfile (reading/writing audio files) [optional] http://www.mega-nerd.com/libsndfile/ for reading soundfiles into matrices (many soundfiles are supported) - autotools, libtool, gettext thats the basic build-system - a compiler, linker,... tested with - GCC (the GNU compiler collection) - Clang Building ======== Make sure that each step succeeds, before proceeding to the next one! $ ./autogen.sh $ ./configure $ make ./configure will need to find the Pd-headers (and on some platforms the Pd-library). If these files are in a non-standard location (e.g. on W32 and OSX), you have to manually tell it where to look for them, using the `--with-pd` flag and pointing it to the directory that contains the 'bin/' and 'src/' (or 'include/') folders of your Pd-distribution. E.g. $ ./configure --with-pd=/Applications/Pd-0.45-4.app/Contents/Resources Once `make` has succeeded, you will have a `iemmatrix` binary in the (hidden) `.libs` folder. Installing ========== The ordinary way to install, is by running the following with the proper priviliges (e.g. as root): # make install This will install the entire iemmatrix into /usr/local/lib/pd/extra/iemmatrix. On systems that have no standard filesystem layout for Pd-externals (e.g. W32 and OSX), this is not exactly what you want. Instead, you can use the following to collect all installation data into a single directory: $ make install DESTDIR=$(pwd)/ pkglibdir=iemmatrix This will create a new directory `iemmatrix` (in your current directory), containing all binaries and abstractions needed. You can then take this directory, and put it into a place, where Pd will look for it: E.g. - linux: `~/pd-externals` (e.g. `/home/frodo/pd-externals`) - OSX : `~/Library/Pd` (e.g. `/Users/frodo/Pd`) - W32 : `%AppData%\Pd` (e.g. `C:\Documents and Settings\frodo\Application Data\Pd`) A full list of default search paths for externals, can be found at https://puredata.info/docs/faq/how-do-i-install-externals-and-help-files/ System-specific instructions ============================ linux (Debian-based) -------------------- `iemmatrix` is available as Debian package # aptitude install pd-iemmatrix To install all dependencies for compiling iemmatrix yourself, use: # apt-get build-dep pd-iemmatrix or # aptitude install automake1.11 autoconf puredata libfftw3-dev libsndfile1-dev libgsl0-dev mac OS-X -------- Most dependencies are available via `brew` http://brew.sh Install them using $ brew install gsl --universal $ brew install fftw --universal $ brew install libsndfile --universal When running iemmatrix' configure, make sure to specify the path to Pd. If you want to build universal binaries (e.g. both 32bit (i386) and 64bit (x86_64)), you can specify the `--enable-fat-binary` flag. E.g. $ ./configure --with-pd=/Applications/Pd-0.45-4.app/Contents/Resources --enable-fat-binary=i386,x86_64 Note: when building fat binaries, all dependencies must be fat too. Microsoft W32 ------------- The only sane way to build iemmatrix for W32 using autotools, is currently by using `MinGW-w64` as a cross-compilation environment on linux. Debian (and derivates) provides packages for this: # aptitude install mingw-w64 mingw-w64-i686-dev mingw-w64-tools binutils-mingw-w64 Run "./configure" and specify the path to your W32 installation of Pd (where you unzipped the W32 package of Pd) using the `--with-pd` flag. Make sure that the Pd-sources are in PDPATH/src and the compiled pd-binaries in PDPATH/bin. If they are scattered across you filesystem you can alternatively give explicitely the paths to your "m_pd.h" (with `--includedir`) and to your "pd.lib" (with `--libdir`). Don't forget to override the default extension ("pd_linux" on linux-systems) with the more appropriate "dll". On bash this looks like: $ ./configure --with-extension=dll --host=i686-w64-mingw32 --with-pd=/home/frodo/W32/pd-0.46-6 Now run "make" and enjoy. W32 using VisualStudio ---------------------- There are outdated VisualStudio project files in src/ Use them at your own risk. pd-iemmatrix-0.3/VERSION.txt.in000066400000000000000000000000221262113134600162400ustar00rootroot00000000000000@PACKAGE_VERSION@ pd-iemmatrix-0.3/abs/000077500000000000000000000000001262113134600145205ustar00rootroot00000000000000pd-iemmatrix-0.3/abs/Makefile.am000066400000000000000000000042741262113134600165630ustar00rootroot00000000000000AUTOMAKE_OPTIONS = foreign SUFFIXES = .pd iemmatrixdir=$(pkglibdir) dist_iemmatrix_DATA= \ mtx_.cabs2-help.pd \ mtx_.cabs2.pd \ mtx_.cdiv-help.pd \ mtx_.cdiv.pd \ mtx_.cmul-help.pd \ mtx_.cmul.pd \ mtx_atan2-help.pd \ mtx_atan2.pd \ mtx_cabs2-help.pd \ mtx_cabs2.pd \ mtx_cart2sph-help.pd \ mtx_cart2sph.pd \ mtx_cinverse-help.pd \ mtx_cinverse.pd \ mtx_cmul-help.pd \ mtx_cmul.pd \ mtx_distance-help.pd \ mtx_distance.pd \ mtx_fill_col_grid-help.pd \ mtx_fill_col_grid.pd \ mtx_fill_row_grid-help.pd \ mtx_fill_row_grid.pd \ mtx_fill_rowcol-help.pd \ mtx_fill_rowcol.pd \ mtx_fill_rowcol_grid-help.pd \ mtx_fill_rowcol_grid.pd \ mtx_find_rowcol-help.pd \ mtx_find_rowcol.pd \ mtx_index2rowcol-help.pd \ mtx_index2rowcol.pd \ mtx_index_col_grid-help.pd \ mtx_index_col_grid.pd \ mtx_index_row_grid-help.pd \ mtx_index_row_grid.pd \ mtx_index_rowcol-help.pd \ mtx_index_rowcol.pd \ mtx_index_rowcol_grid-help.pd \ mtx_index_rowcol_grid.pd \ mtx_interpol.pd \ mtx_ispeak-help.pd \ mtx_ispeak.pd \ mtx_ispeakb-help.pd \ mtx_ispeakb.pd \ mtx_linspace-help.pd \ mtx_linspace.pd \ mtx_linsweep-help.pd \ mtx_linsweep.pd \ mtx_logspace-help.pd \ mtx_logspace.pd \ mtx_logsweep-help.pd \ mtx_logsweep.pd \ mtx_matcher-help.pd \ mtx_matcher.pd \ mtx_max.pd \ mtx_meshgrid-help.pd \ mtx_meshgrid.pd \ mtx_min.pd \ mtx_mod.pd \ mtx_phon_curve-help.pd \ mtx_phon_curve.pd \ mtx_pinverse-help.pd \ mtx_pinverse.pd \ mtx_polyval-help.pd \ mtx_polyval.pd \ mtx_pseudoinverse.pd \ mtx_randperm-help.pd \ mtx_randperm.pd \ mtx_roots-help.pd \ mtx_roots.pd \ mtx_rot-help.pd \ mtx_rot.pd \ mtx_rotx-help.pd \ mtx_rotx.pd \ mtx_rotxyz.pd \ mtx_roty-help.pd \ mtx_roty.pd \ mtx_rotz-help.pd \ mtx_rotz.pd \ mtx_rotzyz.pd \ mtx_rowcol2index.pd \ mtx_rowrfft.pd \ mtx_rowrifft.pd \ mtx_sfread-help.pd \ mtx_sfread.pd \ mtx_sfwrite-help.pd \ mtx_sfwrite.pd \ mtx_sph2cart-help.pd \ mtx_sph2cart.pd \ mtx_spivot-help.pd \ mtx_spivot.pd \ mtx_symasym-help.pd \ mtx_symasym.pd \ mtx_tab-help.pd \ mtx_tab.pd \ mtx_win_besseli0.pd \ mtx_window-help.pd \ mtx_window.pd pd-iemmatrix-0.3/abs/mtx_.cabs2-help.pd000066400000000000000000000014151262113134600177340ustar00rootroot00000000000000#N canvas 88 457 841 379 10; #X text 482 28 part of iemmatrix; #X msg 33 172 matrix 1 2 1 2; #X msg 49 193 matrix 1 2 0 1; #X obj 33 124 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 33 148 t b b b b; #X obj 33 216 t a a; #X text 441 116 inletA: real part of matrix; #X text 440 135 inletB: imaginary part of matrix; #X text 439 157 outletA: real valued output; #X obj 165 216 mtx_print realA; #X obj 165 195 mtx_print imagA; #X obj 33 280 mtx_print cabs2; #X obj 33 242 mtx_.cabs2; #X text 44 34 [mtx_.cabs2]; #X text 166 69 complex valued element wise matrix absolute value; #X connect 1 0 5 0; #X connect 2 0 12 1; #X connect 2 0 10 0; #X connect 3 0 4 0; #X connect 4 0 1 0; #X connect 4 1 2 0; #X connect 5 0 12 0; #X connect 5 1 9 0; #X connect 12 0 11 0; pd-iemmatrix-0.3/abs/mtx_.cabs2.pd000066400000000000000000000006731262113134600170130ustar00rootroot00000000000000#N canvas 0 0 450 300 10; #X obj 71 39 inlet realA; #X obj 152 39 inlet imagA; #X obj 71 256 outlet real; #X obj 71 204 mtx_+; #X obj 71 110 t a a; #X obj 125 110 t a a; #X obj 125 135 mtx_.*; #X obj 71 135 mtx_.*; #X text 175 79 complex squared absolute values; #X connect 0 0 4 0; #X connect 1 0 5 0; #X connect 3 0 2 0; #X connect 4 0 7 0; #X connect 4 1 7 1; #X connect 5 0 6 0; #X connect 5 1 6 1; #X connect 6 0 3 1; #X connect 7 0 3 0; pd-iemmatrix-0.3/abs/mtx_.cdiv-help.pd000066400000000000000000000022211262113134600176630ustar00rootroot00000000000000#N canvas 83 338 841 379 10; #X text 482 28 part of iemmatrix; #X text 441 116 inletA: real part of first matrix; #X text 440 135 inletB: imaginary part of first matrix; #X text 441 164 inletC: real part of second matrix; #X text 440 183 inletB: imaginary part of second matrix; #X msg 33 172 matrix 1 2 1 2; #X msg 49 193 matrix 1 2 0 1; #X obj 33 124 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 33 148 t b b b b; #X obj 236 222 mtx_print realY; #X obj 240 248 mtx_print imagY; #X obj 119 222 mtx_print realX; #X obj 123 248 mtx_print imagX; #X obj 33 216 t a a; #X msg 168 175 matrix 1 2 1 2; #X msg 184 196 matrix 1 2 0 -1; #X text 44 34 [mtx_.cdiv]; #X text 166 69 complex valued element wise matrix division; #X obj 33 242 mtx_.cdiv; #X obj 165 280 mtx_print imagcdiv; #X obj 33 280 mtx_print realcdiv; #X connect 5 0 13 0; #X connect 6 0 12 0; #X connect 6 0 18 1; #X connect 7 0 8 0; #X connect 8 0 5 0; #X connect 8 1 6 0; #X connect 8 2 14 0; #X connect 8 3 15 0; #X connect 13 0 18 0; #X connect 13 1 11 0; #X connect 14 0 9 0; #X connect 14 0 18 2; #X connect 15 0 10 0; #X connect 15 0 18 3; #X connect 18 0 20 0; #X connect 18 1 19 0; pd-iemmatrix-0.3/abs/mtx_.cdiv.pd000066400000000000000000000013241262113134600167400ustar00rootroot00000000000000#N canvas 184 200 688 404 10; #X obj 403 118 t a a; #X obj 331 118 t a a; #X obj 144 257 mtx_./; #X obj 202 256 mtx_./; #X obj 144 19 inlet realA; #X obj 226 19 inlet imagA; #X obj 335 19 inlet realB; #X obj 417 19 inlet imagB; #X obj 361 181 mtx_.cabs2; #X obj 403 141 mtx_* -1; #X obj 144 182 mtx_.cmul; #X obj 144 294 outlet real; #X obj 227 294 outlet imag; #X text 344 234 element wise complex matrix division; #X connect 0 0 9 0; #X connect 0 1 8 1; #X connect 1 0 10 2; #X connect 1 1 8 0; #X connect 2 0 11 0; #X connect 3 0 12 0; #X connect 4 0 10 0; #X connect 5 0 10 1; #X connect 6 0 1 0; #X connect 7 0 0 0; #X connect 8 0 3 1; #X connect 8 0 2 1; #X connect 9 0 10 3; #X connect 10 0 2 0; #X connect 10 1 3 0; pd-iemmatrix-0.3/abs/mtx_.cmul-help.pd000066400000000000000000000022271262113134600177040ustar00rootroot00000000000000#N canvas 83 338 841 379 10; #X text 482 28 part of iemmatrix; #X text 441 116 inletA: real part of first matrix; #X text 440 135 inletB: imaginary part of first matrix; #X text 441 164 inletC: real part of second matrix; #X text 440 183 inletB: imaginary part of second matrix; #X msg 33 172 matrix 1 2 1 2; #X msg 49 193 matrix 1 2 0 1; #X obj 33 124 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 33 148 t b b b b; #X obj 236 222 mtx_print realY; #X obj 240 248 mtx_print imagY; #X obj 119 222 mtx_print realX; #X obj 123 248 mtx_print imagX; #X obj 33 216 t a a; #X text 44 34 [mtx_.cmul]; #X msg 168 175 matrix 1 2 1 2; #X msg 184 196 matrix 1 2 0 -1; #X obj 33 242 mtx_.cmul; #X obj 33 280 mtx_print realcmul; #X obj 163 280 mtx_print imagcmul; #X text 166 69 complex valued element wise matrix multiplication; #X connect 5 0 13 0; #X connect 6 0 17 1; #X connect 6 0 12 0; #X connect 7 0 8 0; #X connect 8 0 5 0; #X connect 8 1 6 0; #X connect 8 2 15 0; #X connect 8 3 16 0; #X connect 13 0 17 0; #X connect 13 1 11 0; #X connect 15 0 9 0; #X connect 15 0 17 2; #X connect 16 0 10 0; #X connect 16 0 17 3; #X connect 17 0 18 0; #X connect 17 1 19 0; pd-iemmatrix-0.3/abs/mtx_.cmul.pd000066400000000000000000000013651262113134600167600ustar00rootroot00000000000000#N canvas 0 0 555 380 10; #X obj 129 110 mtx_.*; #X obj 212 108 mtx_.*; #X obj 397 125 mtx_.*; #X obj 349 126 mtx_.*; #X obj 129 136 mtx_-; #X obj 349 149 mtx_+; #X text 184 2 complex matrix multiplication (component wise); #X obj 211 52 t a a; #X obj 129 54 t a a; #X obj 129 30 inlet realA; #X obj 211 30 inlet imagA; #X obj 344 30 inlet realB; #X obj 426 30 inlet imagB; #X obj 129 182 outlet real; #X obj 349 180 outlet imag; #X connect 0 0 4 0; #X connect 1 0 4 1; #X connect 2 0 5 1; #X connect 3 0 5 0; #X connect 4 0 13 0; #X connect 5 0 14 0; #X connect 7 0 1 0; #X connect 7 1 2 0; #X connect 8 0 0 0; #X connect 8 1 3 0; #X connect 9 0 8 0; #X connect 10 0 7 0; #X connect 11 0 2 1; #X connect 11 0 0 1; #X connect 12 0 3 1; #X connect 12 0 1 1; pd-iemmatrix-0.3/abs/mtx_atan2-help.pd000066400000000000000000000013701262113134600176710ustar00rootroot00000000000000#N canvas 579 0 622 300 10; #X obj 164 270 mtx_print; #X text 368 248 Franz Zotter 2007; #X text 133 15 arcus tangent with range from -pi...+pi; #X obj 164 108 t a a; #X obj 194 129 mtx_print y; #X obj 383 111 t a a; #X obj 413 132 mtx_print x; #X obj 164 237 mtx_* 0; #X obj 334 200 atan; #X msg 334 181 1; #X msg 334 219 45 \$1; #X obj 334 239 /; #X obj 334 161 loadbang; #X obj 164 182 mtx_atan2; #X msg 383 52 matrix 1 8 1 1 0 -1 -1 -1 0 1; #X msg 164 52 matrix 1 8 0 1 1 1 0 -1 -1 -1; #X connect 3 0 13 0; #X connect 3 1 4 0; #X connect 5 0 13 1; #X connect 5 1 6 0; #X connect 7 0 0 0; #X connect 8 0 10 0; #X connect 9 0 8 0; #X connect 10 0 11 0; #X connect 11 0 7 1; #X connect 12 0 9 0; #X connect 13 0 7 0; #X connect 14 0 5 0; #X connect 15 0 3 0; pd-iemmatrix-0.3/abs/mtx_atan2.pd000066400000000000000000000041421262113134600167430ustar00rootroot00000000000000#N canvas 0 0 977 625 10; #X obj 142 6 inlet mtx_im/y; #X obj 432 7 inlet mtx_re/x; #X obj 295 558 outlet; #X text 598 442 Franz Zotter 2007; #X obj 360 427 atan2; #X obj 182 46 mtx_size; #X obj 416 409 mtx; #X obj 244 46 mtx_size; #X obj 182 79 ==; #X obj 182 100 &&; #X obj 211 80 ==; #X obj 142 131 spigot; #X obj 195 132 sel 0; #X obj 195 173 print mtx_atan2; #X msg 195 152 matrix dimensions do not match!; #X obj 142 231 f; #X obj 142 209 t b b; #X msg 184 209 0; #X obj 142 46 t b a; #X obj 360 407 mtx; #X obj 169 231 until; #X obj 209 231 f; #X obj 236 231 + 1; #X obj 236 250 t b f; #X obj 330 314 pack; #X obj 236 293 f; #X obj 236 271 t b b; #X msg 278 271 0; #X obj 263 293 until; #X obj 303 293 f; #X obj 330 293 + 1; #X msg 360 360 element \$1 \$2; #X obj 360 385 t a a; #X obj 295 534 mtx; #X msg 311 513 size \$1 \$2; #X obj 311 493 pack; #X obj 330 335 t l l; #X obj 295 450 pack f f f; #X msg 295 471 element \$1 \$2 \$3; #X obj 112 184 t b b; #X connect 0 0 18 0; #X connect 1 0 6 1; #X connect 1 0 7 0; #X connect 4 0 37 2; #X connect 5 0 8 0; #X connect 5 0 25 1; #X connect 5 0 35 0; #X connect 5 1 10 0; #X connect 5 1 15 1; #X connect 5 1 35 1; #X connect 6 0 4 1; #X connect 7 0 8 1; #X connect 7 1 10 1; #X connect 8 0 9 0; #X connect 9 0 11 1; #X connect 9 0 12 0; #X connect 10 0 9 1; #X connect 11 0 39 0; #X connect 12 0 14 0; #X connect 14 0 13 0; #X connect 15 0 20 0; #X connect 16 0 15 0; #X connect 16 1 17 0; #X connect 17 0 21 1; #X connect 18 0 11 0; #X connect 18 1 5 0; #X connect 18 1 19 1; #X connect 19 0 4 0; #X connect 20 0 21 0; #X connect 21 0 22 0; #X connect 22 0 21 1; #X connect 22 0 23 0; #X connect 23 0 26 0; #X connect 23 1 24 1; #X connect 24 0 36 0; #X connect 25 0 28 0; #X connect 26 0 25 0; #X connect 26 1 27 0; #X connect 27 0 29 1; #X connect 28 0 29 0; #X connect 29 0 30 0; #X connect 30 0 29 1; #X connect 30 0 24 0; #X connect 31 0 32 0; #X connect 32 0 19 0; #X connect 32 1 6 0; #X connect 33 0 2 0; #X connect 34 0 33 0; #X connect 35 0 34 0; #X connect 36 0 37 0; #X connect 36 1 31 0; #X connect 37 0 38 0; #X connect 38 0 33 0; #X connect 39 0 33 0; #X connect 39 1 16 0; pd-iemmatrix-0.3/abs/mtx_cabs2-help.pd000066400000000000000000000014011262113134600176510ustar00rootroot00000000000000#N canvas 88 457 841 379 10; #X text 482 28 part of iemmatrix; #X obj 33 124 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 33 148 t b b b b; #X obj 33 216 t a a; #X text 441 116 inletA: real part of matrix; #X text 440 135 inletB: imaginary part of matrix; #X text 439 157 outletA: real valued output; #X obj 165 216 mtx_print realA; #X obj 165 195 mtx_print imagA; #X obj 33 280 mtx_print cabs2; #X text 44 34 [mtx_cabs2]; #X text 166 69 complex valued matrix absolute value; #X obj 33 242 mtx_cabs2; #X msg 33 172 matrix 2 1 1 2; #X msg 49 193 matrix 2 1 0 1; #X connect 1 0 2 0; #X connect 2 0 13 0; #X connect 2 1 14 0; #X connect 3 0 12 0; #X connect 3 1 7 0; #X connect 12 0 9 0; #X connect 13 0 3 0; #X connect 14 0 8 0; #X connect 14 0 12 1; pd-iemmatrix-0.3/abs/mtx_cabs2.pd000066400000000000000000000011131262113134600167230ustar00rootroot00000000000000#N canvas 0 0 450 300 10; #X obj 71 135 mtx_*; #X obj 71 39 inlet realA; #X obj 152 39 inlet imagA; #X obj 71 256 outlet real; #X obj 71 204 mtx_+; #X obj 71 82 t a a; #X obj 152 83 t a a; #X text 175 66 complex squared absolute value; #X obj 71 109 mtx_transpose; #X obj 152 131 mtx_transpose; #X obj 152 155 mtx_* -1; #X obj 152 175 mtx_*; #X connect 0 0 4 0; #X connect 1 0 5 0; #X connect 2 0 6 0; #X connect 4 0 3 0; #X connect 5 0 8 0; #X connect 5 1 0 1; #X connect 6 0 9 0; #X connect 6 1 11 1; #X connect 8 0 0 0; #X connect 9 0 10 0; #X connect 10 0 11 0; #X connect 11 0 4 1; pd-iemmatrix-0.3/abs/mtx_cart2sph-help.pd000066400000000000000000000010561262113134600204130ustar00rootroot00000000000000#N canvas 0 0 450 300 10; #X obj 69 114 mtx 3 1; #X text 126 70 2 ey; #X text 144 94 3 ez; #X text 264 202 Franz Zotter \, 2009; #X text 19 11 converting cartersian to spherical coordinates; #X msg 26 49 1 0 0; #X text 81 47 1 ex; #X obj 69 147 mtx_cart2sph; #X msg 69 71 0 2 0; #X msg 97 91 0 0 3; #X text 219 62 input matrices have the shape 3xL; #X text 221 76 and may contain L points; #X text 219 93 [ x \; y \; z ]; #X obj 69 191 mtx_print rphitheta; #X connect 0 0 7 0; #X connect 5 0 0 0; #X connect 7 0 13 0; #X connect 8 0 0 0; #X connect 9 0 0 0; pd-iemmatrix-0.3/abs/mtx_cart2sph.pd000066400000000000000000000025201262113134600174620ustar00rootroot00000000000000#N canvas 612 222 562 551 10; #X obj 101 377 mtx_concat; #X obj 205 141 mtx_slice 1 1 1 end; #X obj 44 398 mtx_concat; #X text 229 451 Franz Zotter \, 2009; #X text 231 428 [iemmatrix]; #X obj 44 17 inlet \; [x \; y \; z]; #X obj 44 467 outlet \; [r \; phi \; theta]; #X obj 44 280 mtx_+; #X obj 44 261 mtx_.^ 2; #X obj 178 261 mtx_+; #X obj 178 212 mtx_.^ 2; #X obj 205 239 mtx_.^ 2; #X text 188 306 rxy; #X obj 178 350 mtx_atan2; #X obj 151 173 mtx_slice 2 1 2 end; #X obj 333 140 mtx_slice 3 1 3 end; #X obj 44 239 mtx; #X obj 44 93 t b a a a; #X obj 44 299 mtx_.^ 0.5; #X obj 151 192 t a a; #X text 229 309 z; #X obj 101 350 mtx_atan2; #X obj 192 388 mtx_size; #X floatatom 192 409 5 0 0 0 - - -; #X floatatom 241 410 5 0 0 0 - - -; #X obj 178 328 mtx_.^ 0.5; #X connect 0 0 2 1; #X connect 1 0 11 0; #X connect 1 0 21 1; #X connect 2 0 6 0; #X connect 5 0 17 0; #X connect 7 0 18 0; #X connect 8 0 7 0; #X connect 9 0 7 1; #X connect 9 0 25 0; #X connect 10 0 9 0; #X connect 11 0 9 1; #X connect 13 0 0 1; #X connect 13 0 22 0; #X connect 14 0 19 0; #X connect 15 0 16 1; #X connect 15 0 13 1; #X connect 16 0 8 0; #X connect 17 0 16 0; #X connect 17 1 14 0; #X connect 17 2 1 0; #X connect 17 3 15 0; #X connect 18 0 2 0; #X connect 19 0 21 0; #X connect 19 1 10 0; #X connect 21 0 0 0; #X connect 22 0 23 0; #X connect 22 1 24 0; #X connect 25 0 13 0; pd-iemmatrix-0.3/abs/mtx_cinverse-help.pd000066400000000000000000000021531262113134600205020ustar00rootroot00000000000000#N canvas 210 487 841 379 10; #X text 482 28 part of iemmatrix; #X obj 36 61 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 76 153 mtx_print realX; #X obj 186 154 mtx_print imagX; #X obj 36 153 t a a; #X text 44 34 [mtx_cinverse]; #X text 166 69 complex valued matrix inverse; #X text 441 116 inletA: real part of matrix; #X text 440 135 inletB: imaginary part of matrix; #X obj 36 179 mtx_cinverse; #X obj 36 218 mtx_print realcinv; #X obj 167 218 mtx_print imagcinv; #X obj 36 85 t b b; #X obj 300 217 print instability_detected; #X obj 139 276 mtx_cmul; #X msg 37 104 2 2; #X msg 66 104 2 2; #X obj 36 129 mtx_rand; #X obj 96 129 mtx_rand; #X obj 139 296 mtx_print eye_re; #X obj 256 296 mtx_print eye_im; #X connect 1 0 12 0; #X connect 4 0 9 0; #X connect 4 1 3 0; #X connect 4 1 14 2; #X connect 9 0 10 0; #X connect 9 0 14 0; #X connect 9 1 11 0; #X connect 9 1 14 1; #X connect 9 2 13 0; #X connect 12 0 15 0; #X connect 12 1 16 0; #X connect 14 0 19 0; #X connect 14 1 20 0; #X connect 15 0 17 0; #X connect 16 0 18 0; #X connect 17 0 4 0; #X connect 18 0 2 0; #X connect 18 0 9 1; #X connect 18 0 14 3; pd-iemmatrix-0.3/abs/mtx_cinverse.pd000066400000000000000000000050001262113134600175460ustar00rootroot00000000000000#N canvas 544 483 588 201 10; #X obj 83 28 inlet realA; #X obj 168 28 inlet imagA; #X obj 83 93 mtx_inverse; #X obj 369 164 outlet instability_detection; #X obj 83 165 outlet real; #X obj 281 164 outlet imag; #N canvas 0 0 652 418 mtx_cplx_to_real_hermitian 0; #X obj 351 32 inlet imag; #X obj 87 35 inlet real; #X obj 101 364 outlet; #X obj 351 52 t a a; #X obj 418 52 mtx_size; #X obj 418 72 * 2; #X obj 469 72 * 2; #X obj 418 92 pack; #X obj 418 113 mtx_zeros; #X obj 117 318 mtx_fill; #X obj 87 55 t b a; #X msg 175 141 matrix 1 1; #X obj 117 119 t a b a b; #X obj 136 189 pack 1 f f; #X msg 136 209 matrix \$2 \$3; #X obj 101 344 mtx; #X obj 480 52 + 1; #X obj 391 52 + 1; #X obj 269 147 t a b a b; #X obj 327 168 f; #X obj 288 189 f; #X msg 327 189 matrix \$1 1; #X msg 288 209 matrix 1 \$1; #X obj 226 209 mtx_* -1; #X connect 0 0 3 0; #X connect 1 0 10 0; #X connect 3 0 18 0; #X connect 3 1 4 0; #X connect 4 0 5 0; #X connect 4 0 17 0; #X connect 4 1 6 0; #X connect 4 1 16 0; #X connect 5 0 7 0; #X connect 6 0 7 1; #X connect 7 0 8 0; #X connect 8 0 9 1; #X connect 9 0 15 1; #X connect 10 0 15 0; #X connect 10 1 12 0; #X connect 11 0 9 2; #X connect 12 0 9 0; #X connect 12 1 13 0; #X connect 12 2 9 0; #X connect 12 3 11 0; #X connect 13 0 14 0; #X connect 14 0 9 2; #X connect 15 0 2 0; #X connect 16 0 13 2; #X connect 16 0 19 1; #X connect 17 0 13 1; #X connect 17 0 20 1; #X connect 18 0 23 0; #X connect 18 1 20 0; #X connect 18 2 9 0; #X connect 18 3 19 0; #X connect 19 0 21 0; #X connect 20 0 22 0; #X connect 21 0 9 2; #X connect 22 0 9 2; #X connect 23 0 9 0; #X restore 83 59 pd mtx_cplx_to_real_hermitian; #N canvas 0 0 450 300 mtx_real_hermitian_to_cplx 0; #X obj 170 18 inlet; #X obj 170 272 outlet real; #X obj 253 272 outlet imag; #X obj 226 47 mtx_size; #X obj 277 68 / 2; #X obj 226 69 / 2; #X obj 254 112 + 1; #X obj 254 132 pack; #X msg 254 163 \$1 1 end \$2; #X obj 253 191 mtx_slice; #X obj 170 47 t a a a; #X obj 170 189 mtx_slice; #X msg 176 163 1 1 \$1 \$2; #X obj 176 142 pack; #X connect 0 0 10 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 1; #X connect 4 0 13 1; #X connect 5 0 6 0; #X connect 5 0 13 0; #X connect 6 0 7 0; #X connect 7 0 8 0; #X connect 8 0 9 1; #X connect 9 0 2 0; #X connect 10 0 11 0; #X connect 10 1 9 0; #X connect 10 2 3 0; #X connect 11 0 1 0; #X connect 12 0 11 1; #X connect 13 0 12 0; #X restore 83 122 pd mtx_real_hermitian_to_cplx; #X connect 0 0 6 0; #X connect 1 0 6 1; #X connect 2 0 7 0; #X connect 2 1 3 0; #X connect 6 0 2 0; #X connect 7 0 4 0; #X connect 7 1 5 0; pd-iemmatrix-0.3/abs/mtx_cmul-help.pd000066400000000000000000000022111262113134600176170ustar00rootroot00000000000000#N canvas 83 338 841 379 10; #X text 482 28 part of iemmatrix; #X text 44 34 [mtx_cmul]; #X text 166 69 complex valued matrix multiplication; #X text 441 116 inletA: real part of first matrix; #X text 440 135 inletB: imaginary part of first matrix; #X text 441 164 inletC: real part of second matrix; #X text 440 183 inletB: imaginary part of second matrix; #X obj 33 242 mtx_cmul; #X msg 33 172 matrix 1 2 1 2; #X msg 49 193 matrix 1 2 0 1; #X obj 33 124 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 33 148 t b b b b; #X obj 236 222 mtx_print realY; #X obj 240 248 mtx_print imagY; #X obj 119 222 mtx_print realX; #X obj 123 248 mtx_print imagX; #X msg 168 175 matrix 2 1 1 2; #X msg 184 196 matrix 2 1 0 -1; #X obj 33 216 t a a; #X obj 33 281 mtx_print realcmul; #X obj 164 281 mtx_print imagcmul; #X connect 7 0 19 0; #X connect 7 1 20 0; #X connect 8 0 18 0; #X connect 9 0 7 1; #X connect 9 0 14 0; #X connect 10 0 11 0; #X connect 11 0 8 0; #X connect 11 1 9 0; #X connect 11 2 16 0; #X connect 11 3 17 0; #X connect 16 0 12 0; #X connect 16 0 7 2; #X connect 17 0 13 0; #X connect 17 0 7 3; #X connect 18 0 7 0; #X connect 18 1 15 0; pd-iemmatrix-0.3/abs/mtx_cmul.pd000066400000000000000000000012611262113134600166750ustar00rootroot00000000000000#N canvas 429 314 450 300 10; #X obj 71 135 mtx_*; #X obj 152 135 mtx_*; #X obj 71 81 t a a; #X obj 235 137 mtx_*; #X obj 235 215 mtx_+; #X obj 298 137 mtx_*; #X obj 152 81 t a a; #X obj 71 204 mtx_-; #X obj 71 39 inlet realA; #X obj 152 39 inlet imagA; #X obj 236 39 inlet realB; #X obj 318 39 inlet imagB; #X obj 71 256 outlet real; #X obj 235 256 outlet imag; #X connect 0 0 7 0; #X connect 1 0 7 1; #X connect 2 0 0 0; #X connect 2 1 3 0; #X connect 3 0 4 0; #X connect 4 0 13 0; #X connect 5 0 4 1; #X connect 6 0 1 0; #X connect 6 1 5 0; #X connect 7 0 12 0; #X connect 8 0 2 0; #X connect 9 0 6 0; #X connect 10 0 0 1; #X connect 10 0 5 1; #X connect 11 0 1 1; #X connect 11 0 3 1; pd-iemmatrix-0.3/abs/mtx_distance-help.pd000066400000000000000000000020521262113134600204540ustar00rootroot00000000000000#N canvas 83 338 841 379 10; #X obj 33 267 mtx_print distances; #X obj 119 179 t a a; #X obj 157 198 mtx_print B; #X obj 33 179 t a a; #X obj 63 198 mtx_print A; #X obj 33 106 t b b; #X msg 33 85 bang; #X obj 33 132 mtx_rand 4 3; #X obj 119 154 mtx_rand 2 3; #X text 482 28 part of iemmatrix; #X text 268 138 inletA: a matrix defining vectors of dimension ; #X text 268 158 inletB: a matrix defining vectors of dimension ; #X obj 33 242 mtx_distance; #X text 166 69 calculate the euclidian distance between two sets of vectors.; #X text 267 179 outlet: distance matrix (i \, j) \, where each element Y(i \, j)=sqrt((A(i)-B(i)).(A(i)-B(i)))=|A(i)-B(i)|; #X text 269 240 there is also a faster version of this object [mtx_distance2] which does not calculate the square-root of the in-product \; use that one if possible; #X text 44 34 [mtx_distance]; #X connect 1 0 12 1; #X connect 1 1 2 0; #X connect 3 0 12 0; #X connect 3 1 4 0; #X connect 5 0 7 0; #X connect 5 1 8 0; #X connect 6 0 5 0; #X connect 7 0 3 0; #X connect 8 0 1 0; #X connect 12 0 0 0; pd-iemmatrix-0.3/abs/mtx_distance.pd000066400000000000000000000011631262113134600175300ustar00rootroot00000000000000#N canvas 323 233 661 451 10; #X text 72 316 (c) 2005 by IOhannes m zmoelnig \, IEM KUG \, graz austria ; #X text 72 333 for license-details see LICENSE.txt that must come with iemmatrix.; #X obj 115 164 mtx_distance2; #X obj 115 78 inlet matrix1; #X obj 264 78 inlet matrix2; #X obj 115 209 mtx_.^ 0.5; #X text 73 41 calculate the euclidian distance between to sets of vectors ; #X text 229 162 for performance reasons this does not calculate the square-root; #X text 229 206 so here we do the square-root; #X obj 115 240 outlet distance-matrix; #X connect 2 0 5 0; #X connect 3 0 2 0; #X connect 4 0 2 1; #X connect 5 0 9 0; pd-iemmatrix-0.3/abs/mtx_fill_col_grid-help.pd000066400000000000000000000017771262113134600214670ustar00rootroot00000000000000#N canvas 162 457 841 379 10; #X msg 33 59 bang; #X text 482 28 part of iemmatrix; #X obj 33 132 t a a; #X obj 33 85 t b b b; #X text 43 34 [mtx_fill_col_grid]; #X text 166 69 fills values into to the col indices of given matrix. ; #X text 424 184 inletA: matrix/vector values for fill; #X text 424 197 inletB: matrix/vector to fill values into; #X text 424 211 inletC: matrix/vector indices for filling; #X text 422 231 outleA: matrix containing the inserted values; #X msg 193 111 3 4; #X obj 193 133 mtx_zeros; #X msg 33 112 matrix 1 6 1 2 3 4 5 6; #X msg 310 107 matrix 1 2 4 2; #X obj 75 133 mtx_print A_fill; #X obj 33 232 mtx_print output; #X obj 193 158 mtx_print B_orig; #X obj 310 158 mtx_print C_col; #X obj 33 194 mtx_fill_col_grid; #X connect 0 0 3 0; #X connect 2 0 18 0; #X connect 2 1 14 0; #X connect 3 0 12 0; #X connect 3 1 10 0; #X connect 3 2 13 0; #X connect 10 0 11 0; #X connect 11 0 16 0; #X connect 11 0 18 1; #X connect 12 0 2 0; #X connect 13 0 17 0; #X connect 13 0 18 2; #X connect 18 0 15 0; pd-iemmatrix-0.3/abs/mtx_fill_col_grid.pd000066400000000000000000000026711262113134600205330ustar00rootroot00000000000000#N canvas 657 553 516 388 10; #X obj 70 20 inlet; #X obj 70 41 t a a; #X obj 119 87 mtx_size; #X obj 200 20 inlet; #X text 68 4 matrix; #X obj 200 40 mtx_:; #X obj 184 86 mtx; #X obj 184 106 mtx_repmat; #X obj 184 129 t a a; #X obj 223 129 mtx_size; #X obj 223 170 mtx_:; #X obj 223 250 mtx_repmat; #X obj 184 271 mtx_+; #X obj 15 328 outlet; #X text 246 20 col_idcs; #X obj 119 107 t b f; #X obj 223 190 mtx_transpose; #X obj 223 210 mtx_- 1; #X obj 223 230 mtx_* 1; #X msg 274 149 1 \$1; #X msg 249 84 \$1 1; #X msg 223 150 1 \$1; #X obj 15 19 inlet; #X text 18 4 matrix; #X text 75 -10 orig; #X text 13 -9 fill; #X obj 15 304 mtx_fill; #X text 291 98 fills in elements into; #X text 302 120 the given columns; #X text 331 145 of a matrix; #X obj 139 60 spigot 0; #X obj 200 60 t a a; #X obj 173 40 > 0; #X connect 0 0 1 0; #X connect 1 0 2 0; #X connect 1 1 26 1; #X connect 2 0 15 0; #X connect 2 1 18 1; #X connect 3 0 5 0; #X connect 5 0 31 0; #X connect 6 0 7 0; #X connect 7 0 8 0; #X connect 8 0 12 0; #X connect 8 1 9 0; #X connect 9 0 21 0; #X connect 9 1 19 0; #X connect 10 0 16 0; #X connect 11 0 12 1; #X connect 12 0 26 2; #X connect 15 0 6 0; #X connect 15 1 20 0; #X connect 15 1 32 0; #X connect 16 0 17 0; #X connect 17 0 18 0; #X connect 18 0 11 0; #X connect 19 0 11 1; #X connect 20 0 7 1; #X connect 21 0 10 0; #X connect 22 0 26 0; #X connect 26 0 13 0; #X connect 30 0 6 0; #X connect 31 0 30 0; #X connect 31 1 6 1; #X connect 32 0 30 1; pd-iemmatrix-0.3/abs/mtx_fill_row_grid-help.pd000066400000000000000000000017761262113134600215200ustar00rootroot00000000000000#N canvas 377 497 841 379 10; #X msg 33 59 bang; #X text 482 28 part of iemmatrix; #X obj 33 132 t a a; #X obj 33 85 t b b b; #X text 424 184 inletA: matrix/vector values for fill; #X text 424 197 inletB: matrix/vector to fill values into; #X text 424 211 inletC: matrix/vector indices for filling; #X text 422 231 outleA: matrix containing the inserted values; #X msg 224 112 3 4; #X obj 224 134 mtx_zeros; #X obj 75 133 mtx_print A_fill; #X obj 33 232 mtx_print output; #X obj 224 159 mtx_print B_orig; #X text 43 34 [mtx_fill_row_grid]; #X text 166 69 fills values into to the row indices of given matrix. ; #X obj 341 159 mtx_print C_row; #X obj 33 201 mtx_fill_row_grid; #X msg 341 108 matrix 1 2 3 1; #X msg 33 112 matrix 1 8 1 2 3 4 5 6 7 8; #X connect 0 0 3 0; #X connect 2 0 16 0; #X connect 2 1 10 0; #X connect 3 0 18 0; #X connect 3 1 8 0; #X connect 3 2 17 0; #X connect 8 0 9 0; #X connect 9 0 12 0; #X connect 9 0 16 1; #X connect 16 0 11 0; #X connect 17 0 15 0; #X connect 17 0 16 2; #X connect 18 0 2 0; pd-iemmatrix-0.3/abs/mtx_fill_row_grid.pd000066400000000000000000000027731262113134600205700ustar00rootroot00000000000000#N canvas 191 265 450 388 10; #X obj 70 20 inlet; #X obj 70 41 t a a; #X obj 100 61 mtx_size; #X obj 200 20 inlet; #X text 246 20 row_idcs; #X text 74 3 matrix; #X obj 200 40 mtx_:; #X obj 200 78 mtx_- 1; #X obj 184 141 mtx; #X obj 184 161 mtx_* 1; #X obj 184 181 mtx_repmat; #X msg 249 159 1 \$1; #X obj 200 59 mtx_transpose; #X obj 184 200 t a a; #X obj 223 200 mtx_size; #X obj 223 259 mtx_:; #X obj 223 279 mtx_repmat; #X obj 223 239 pack 1 f; #X obj 222 219 t b f; #X msg 262 219 \$1 1; #X obj 151 81 t b f; #X obj 184 307 mtx_+; #X obj 9 369 outlet; #X text 73 -9 orig; #X obj 9 19 inlet; #X text 11 -10 fill; #X text 13 1 matrix; #X obj 9 345 mtx_fill; #X text 293 139 fills in elements; #X text 302 161 into given rows; #X text 310 183 of a matrix; #X obj 184 121 spigot 0; #X obj 240 100 > 0; #X obj 200 98 t a a; #X connect 0 0 1 0; #X connect 1 0 27 1; #X connect 1 1 2 0; #X connect 2 1 20 0; #X connect 3 0 6 0; #X connect 6 0 12 0; #X connect 7 0 33 0; #X connect 8 0 9 0; #X connect 9 0 10 0; #X connect 10 0 13 0; #X connect 11 0 10 1; #X connect 12 0 7 0; #X connect 13 0 21 0; #X connect 13 1 14 0; #X connect 14 0 18 0; #X connect 14 1 17 1; #X connect 15 0 16 0; #X connect 16 0 21 1; #X connect 17 0 15 0; #X connect 18 0 17 0; #X connect 18 1 19 0; #X connect 19 0 16 1; #X connect 20 0 8 0; #X connect 20 1 11 0; #X connect 20 1 9 1; #X connect 20 1 32 0; #X connect 21 0 27 2; #X connect 24 0 27 0; #X connect 27 0 22 0; #X connect 31 0 8 0; #X connect 32 0 31 1; #X connect 33 0 31 0; #X connect 33 1 8 1; pd-iemmatrix-0.3/abs/mtx_fill_rowcol-help.pd000066400000000000000000000022361262113134600212010ustar00rootroot00000000000000#N canvas 133 130 841 379 10; #X msg 33 59 bang; #X text 482 28 part of iemmatrix; #X obj 33 132 t a a; #X obj 33 232 mtx_print output; #X msg 323 112 matrix 1 4 1 2 2 2; #X msg 464 112 matrix 1 4 2 3 1 2 3; #X text 43 34 [mtx_fill_rowcol]; #X text 166 69 fillss values into to the given row/col indices of a given matrix.; #X text 481 186 inletA: matrix/vector with fill values; #X text 479 247 outleA: matrix containing the fill values; #X text 481 199 inletB: matrix/vector to be filled; #X text 481 213 inletC: row matrix/vector; #X text 481 227 inletD: col matrix/vector; #X obj 33 194 mtx_fill_rowcol; #X obj 456 134 mtx_print D_col; #X obj 297 139 mtx_print C_row; #X obj 33 83 t b b b b; #X msg 198 112 2 3; #X obj 199 133 mtx_zeros; #X obj 165 155 mtx_print B_orig; #X obj 75 133 mtx_print A_fill; #X msg 33 112 matrix 1 4 1 2 3 4; #X connect 0 0 16 0; #X connect 2 0 13 0; #X connect 2 1 20 0; #X connect 4 0 15 0; #X connect 4 0 13 2; #X connect 5 0 14 0; #X connect 5 0 13 3; #X connect 13 0 3 0; #X connect 16 0 21 0; #X connect 16 1 17 0; #X connect 16 2 4 0; #X connect 16 3 5 0; #X connect 17 0 18 0; #X connect 18 0 13 1; #X connect 18 0 19 0; #X connect 21 0 2 0; pd-iemmatrix-0.3/abs/mtx_fill_rowcol.pd000066400000000000000000000012671262113134600202560ustar00rootroot00000000000000#N canvas 344 107 450 300 10; #X obj 88 36 inlet; #X text 16 15 matrix; #X text 255 19 row idcs; #X text 356 19 col idcs; #X text 258 4 from mtx_find_rowcol:; #X obj 258 37 inlet; #X obj 361 37 inlet; #X obj 146 118 mtx_rowcol2index; #X obj 189 93 mtx; #X obj 88 55 t a a; #X obj 128 55 mtx_size; #X obj 189 55 t b f; #X obj 63 160 outlet; #X obj 11 35 inlet; #X text 91 15 matrix; #X text 90 4 orig; #X text 14 5 fill; #X obj 63 140 mtx_fill; #X connect 0 0 9 0; #X connect 5 0 8 1; #X connect 6 0 7 1; #X connect 7 0 17 2; #X connect 8 0 7 0; #X connect 9 0 17 1; #X connect 9 1 10 0; #X connect 10 1 11 0; #X connect 11 0 8 0; #X connect 11 1 7 2; #X connect 13 0 17 0; #X connect 17 0 12 0; pd-iemmatrix-0.3/abs/mtx_fill_rowcol_grid-help.pd000066400000000000000000000023221262113134600222020ustar00rootroot00000000000000#N canvas 377 497 841 379 10; #X msg 33 59 bang; #X text 482 28 part of iemmatrix; #X obj 33 132 t a a; #X text 424 206 inletA: matrix/vector values for fill; #X text 424 219 inletB: matrix/vector to fill values into; #X text 424 233 inletC: matrix/vector indices for filling; #X text 422 278 outleA: matrix containing the inserted values; #X obj 224 134 mtx_zeros; #X obj 75 133 mtx_print A_fill; #X obj 33 232 mtx_print output; #X obj 224 159 mtx_print B_orig; #X obj 341 159 mtx_print C_row; #X msg 33 112 matrix 1 8 1 2 3 4 5 6 7 8; #X text 31 31 [mtx_fill_rowcol_grid]; #X obj 33 201 mtx_fill_rowcol_grid; #X text 425 247 inletD: matrix/vector indices for filling; #X text 166 69 fills values into to the row and col grid indices of given matrix.; #X msg 450 108 matrix 1 2 2 4; #X obj 33 85 t b b b b; #X obj 450 159 mtx_print D_col; #X msg 224 113 6 5; #X msg 341 108 matrix 1 2 2 5; #X connect 0 0 18 0; #X connect 2 0 14 0; #X connect 2 1 8 0; #X connect 7 0 10 0; #X connect 7 0 14 1; #X connect 12 0 2 0; #X connect 14 0 9 0; #X connect 17 0 19 0; #X connect 17 0 14 3; #X connect 18 0 12 0; #X connect 18 1 20 0; #X connect 18 2 21 0; #X connect 18 3 17 0; #X connect 20 0 7 0; #X connect 21 0 11 0; #X connect 21 0 14 2; pd-iemmatrix-0.3/abs/mtx_fill_rowcol_grid.pd000066400000000000000000000025521262113134600212610ustar00rootroot00000000000000#N canvas 200 516 575 378 10; #X text 92 2 matrix; #X obj 35 335 outlet; #X text 381 153 at the given row and col; #X text 381 179 grid indices; #X obj 35 311 mtx_fill; #X obj 35 21 inlet; #X text 29 1 matrix; #X text 31 -10 fill; #X text 89 -10 orig; #X text 383 98 fills in elements; #X text 384 124 into a matrix; #X obj 274 20 inlet; #X text 320 20 row_idcs; #X obj 274 40 mtx_:; #X obj 274 78 mtx_- 1; #X obj 258 159 mtx; #X obj 258 179 mtx_* 1; #X obj 258 199 mtx_repmat; #X msg 323 177 1 \$1; #X obj 274 59 mtx_transpose; #X obj 400 20 inlet; #X obj 400 40 mtx_:; #X obj 145 182 mtx; #X obj 145 203 mtx_repmat; #X msg 210 180 \$1 1; #X obj 87 20 inlet; #X obj 145 283 mtx_+; #X obj 400 63 mtx_size; #X obj 274 99 mtx_size; #X obj 87 63 t a a; #X obj 117 89 mtx_size; #X obj 168 110 t b b f; #X connect 4 0 1 0; #X connect 5 0 4 0; #X connect 11 0 13 0; #X connect 13 0 19 0; #X connect 14 0 28 0; #X connect 14 0 15 1; #X connect 15 0 16 0; #X connect 16 0 17 0; #X connect 17 0 26 1; #X connect 18 0 17 1; #X connect 19 0 14 0; #X connect 20 0 21 0; #X connect 21 0 22 1; #X connect 21 0 27 0; #X connect 22 0 23 0; #X connect 23 0 26 0; #X connect 24 0 23 1; #X connect 25 0 29 0; #X connect 26 0 4 2; #X connect 27 0 18 0; #X connect 28 0 24 0; #X connect 29 0 4 1; #X connect 29 1 30 0; #X connect 30 1 31 0; #X connect 31 0 22 0; #X connect 31 1 15 0; #X connect 31 2 16 1; pd-iemmatrix-0.3/abs/mtx_find_rowcol-help.pd000066400000000000000000000012071262113134600211700ustar00rootroot00000000000000#N canvas 83 338 841 379 10; #X obj 111 142 mtx_print A; #X msg 33 88 bang; #X text 482 28 part of iemmatrix; #X text 267 190 outleA: matrix containing row indices; #X text 269 209 outletB: matrix containing col indices; #X obj 33 132 t a a; #X obj 33 201 mtx_print row; #X obj 140 200 mtx_print col; #X obj 33 163 mtx_find_rowcol; #X text 265 149 inletA: matrix/vector; #X text 166 69 calculates the row/col indices of the nonzero elements in a matrix; #X msg 33 112 matrix 2 3 1 0 1 0 1 1; #X text 43 34 [mtx_find_rowcol]; #X connect 1 0 11 0; #X connect 5 0 8 0; #X connect 5 1 0 0; #X connect 8 0 6 0; #X connect 8 1 7 0; #X connect 11 0 5 0; pd-iemmatrix-0.3/abs/mtx_find_rowcol.pd000066400000000000000000000007271262113134600202500ustar00rootroot00000000000000#N canvas 0 0 450 300 10; #X obj 141 13 inlet; #X obj 141 212 outlet; #X obj 141 35 t a a; #X obj 171 56 mtx_size; #X obj 248 212 outlet; #X text 280 74 comment; #X text 256 27 finds the non-zero; #X text 260 58 column and row indices; #X text 308 89 of a matrix; #X obj 141 111 mtx_index2rowcol; #X obj 141 76 mtx_find \$1 \$2; #X connect 0 0 2 0; #X connect 2 0 10 0; #X connect 2 1 3 0; #X connect 3 1 9 1; #X connect 9 0 1 0; #X connect 9 1 4 0; #X connect 10 0 9 0; pd-iemmatrix-0.3/abs/mtx_index2rowcol-help.pd000066400000000000000000000020461262113134600213040ustar00rootroot00000000000000#N canvas 83 338 841 379 10; #X obj 152 214 mtx_print A; #X msg 33 88 bang; #X text 482 28 part of iemmatrix; #X text 43 34 [mtx_index2rowcol]; #X text 166 69 calculate the row and column indices w.r.t. the linear matrix indices used by the standard objects (e.g. mtx_find \, mtx_index \, mtx_fill \, ...); #X text 268 138 inletA: matrix/vector containing linear indices of a matrix; #X text 268 158 inletB: integer describing the number of columns of the indexed matrix; #X text 267 190 outleA: matrix containing row indices; #X text 269 209 outletB: matrix containing col indices; #X obj 33 242 mtx_index2rowcol; #X msg 33 112 matrix 2 3 1 1 1 1 1 1; #X obj 33 163 mtx_find; #X obj 156 160 print B; #X obj 90 133 mtx_size; #X obj 33 132 t a a; #X obj 33 184 t a a; #X obj 33 267 mtx_print row; #X obj 140 266 mtx_print col; #X connect 1 0 10 0; #X connect 9 0 16 0; #X connect 9 1 17 0; #X connect 10 0 14 0; #X connect 11 0 15 0; #X connect 13 1 12 0; #X connect 13 1 9 1; #X connect 14 0 11 0; #X connect 14 1 13 0; #X connect 15 0 9 0; #X connect 15 1 0 0; pd-iemmatrix-0.3/abs/mtx_index2rowcol.pd000066400000000000000000000015071262113134600203570ustar00rootroot00000000000000#N canvas 304 424 484 300 10; #X obj 87 17 inlet; #X obj 87 247 outlet; #X obj 141 122 t a a; #X obj 141 167 mtx_int; #X obj 208 242 outlet; #X obj 208 216 mtx_+ 1; #X obj 141 100 mtx_- 1; #X text 260 58 column and row indices; #X obj 242 11 inlet; #X text 285 10 columns; #X text 255 40 calculates; #X text 280 76 for a given index vector; #X text 308 93 and given column size; #X obj 208 146 mtx_mod \$1; #X obj 141 146 mtx_./ \$1; #X obj 87 213 mtx_.*; #X obj 141 189 mtx_+ 1; #X obj 87 40 t a a; #X obj 87 100 mtx_> 0; #X connect 0 0 17 0; #X connect 2 0 14 0; #X connect 2 1 13 0; #X connect 3 0 16 0; #X connect 5 0 4 0; #X connect 6 0 2 0; #X connect 8 0 14 1; #X connect 8 0 13 1; #X connect 13 0 5 0; #X connect 14 0 3 0; #X connect 15 0 1 0; #X connect 16 0 15 1; #X connect 17 0 18 0; #X connect 17 1 6 0; #X connect 18 0 15 0; pd-iemmatrix-0.3/abs/mtx_index_col_grid-help.pd000066400000000000000000000013751262113134600216420ustar00rootroot00000000000000#N canvas 133 130 841 379 10; #X obj 75 133 mtx_print A; #X msg 33 59 bang; #X text 482 28 part of iemmatrix; #X obj 33 132 t a a; #X text 384 152 inletA: matrix/vector; #X obj 33 232 mtx_print output; #X obj 33 83 t b b b; #X obj 242 135 mtx_print B_row; #X msg 241 110 matrix 1 2 3 1; #X text 43 34 [mtx_index_col_grid]; #X text 166 69 finds the values to the col grid indices in a given matrix.; #X text 384 165 inletB: col matrix/vector; #X text 382 199 outleA: matrix containing the indexed cols; #X obj 33 194 mtx_index_col_grid; #X msg 33 112 matrix 3 3 1 2 3 1 2 3 1 2 3; #X connect 1 0 6 0; #X connect 3 0 13 0; #X connect 3 1 0 0; #X connect 6 0 14 0; #X connect 6 1 8 0; #X connect 8 0 7 0; #X connect 8 0 13 1; #X connect 13 0 5 0; #X connect 14 0 3 0; pd-iemmatrix-0.3/abs/mtx_index_col_grid.pd000066400000000000000000000023021262113134600207030ustar00rootroot00000000000000#N canvas 597 0 450 388 10; #X obj 70 20 inlet; #X obj 70 41 t a a; #X obj 100 61 mtx_size; #X obj 200 20 inlet; #X text 68 4 matrix; #X obj 200 40 mtx_:; #X obj 184 86 mtx; #X obj 184 106 mtx_repmat; #X obj 184 129 t a a; #X obj 223 129 mtx_size; #X obj 223 170 mtx_:; #X obj 223 250 mtx_repmat; #X obj 184 271 mtx_+; #X obj 70 329 outlet; #X text 293 98 slices out given; #X text 310 142 writing them into; #X text 318 165 a new matrix; #X text 246 20 col_idcs; #X text 302 120 columns of a matrix; #X obj 100 81 t b f; #X obj 223 190 mtx_transpose; #X obj 223 210 mtx_- 1; #X obj 223 230 mtx_* 1; #X msg 274 149 1 \$1; #X msg 249 84 \$1 1; #X msg 223 150 1 \$1; #X obj 70 305 mtx_index; #X connect 0 0 1 0; #X connect 1 0 26 0; #X connect 1 1 2 0; #X connect 2 0 19 0; #X connect 2 1 22 1; #X connect 3 0 5 0; #X connect 5 0 6 1; #X connect 6 0 7 0; #X connect 7 0 8 0; #X connect 8 0 12 0; #X connect 8 1 9 0; #X connect 9 0 25 0; #X connect 9 1 23 0; #X connect 10 0 20 0; #X connect 11 0 12 1; #X connect 12 0 26 1; #X connect 19 0 6 0; #X connect 19 1 24 0; #X connect 20 0 21 0; #X connect 21 0 22 0; #X connect 22 0 11 0; #X connect 23 0 11 1; #X connect 24 0 7 1; #X connect 25 0 10 0; #X connect 26 0 13 0; pd-iemmatrix-0.3/abs/mtx_index_row_grid-help.pd000066400000000000000000000014001262113134600216610ustar00rootroot00000000000000#N canvas 133 130 841 379 10; #X obj 75 133 mtx_print A; #X msg 33 59 bang; #X text 482 28 part of iemmatrix; #X obj 33 132 t a a; #X text 384 152 inletA: matrix/vector; #X text 384 165 inletB: row matrix/vector; #X obj 33 232 mtx_print output; #X obj 33 83 t b b b; #X obj 242 135 mtx_print B_row; #X text 43 34 [mtx_index_row_grid]; #X text 166 69 finds the values to the row grid indices in a given matrix.; #X obj 33 194 mtx_index_row_grid; #X text 382 199 outleA: matrix containing the indexed rows; #X msg 33 112 matrix 3 3 1 1 1 2 2 2 3 3 3; #X msg 241 110 matrix 1 2 3 1; #X connect 1 0 7 0; #X connect 3 0 11 0; #X connect 3 1 0 0; #X connect 7 0 13 0; #X connect 7 1 14 0; #X connect 11 0 6 0; #X connect 13 0 3 0; #X connect 14 0 8 0; #X connect 14 0 11 1; pd-iemmatrix-0.3/abs/mtx_index_row_grid.pd000066400000000000000000000024131262113134600207400ustar00rootroot00000000000000#N canvas 116 0 450 388 10; #X obj 70 20 inlet; #X obj 70 41 t a a; #X obj 100 61 mtx_size; #X obj 200 20 inlet; #X text 246 20 row_idcs; #X text 113 21 matrix; #X obj 200 40 mtx_:; #X obj 200 78 mtx_- 1; #X obj 184 100 mtx; #X obj 184 120 mtx_* 1; #X obj 184 140 mtx_repmat; #X msg 249 118 1 \$1; #X obj 200 59 mtx_transpose; #X obj 184 159 t a a; #X obj 223 159 mtx_size; #X obj 223 218 mtx_:; #X obj 223 238 mtx_repmat; #X obj 223 198 pack 1 f; #X obj 222 178 t b f; #X msg 262 178 \$1 1; #X obj 151 81 t b f; #X obj 184 266 mtx_+; #X obj 70 304 mtx_index; #X obj 70 328 outlet; #X text 293 98 slices out given; #X text 302 120 rows of a matrix; #X text 310 142 writing them into; #X text 318 165 a new matrix; #X connect 0 0 1 0; #X connect 1 0 22 0; #X connect 1 1 2 0; #X connect 2 1 20 0; #X connect 3 0 6 0; #X connect 6 0 12 0; #X connect 7 0 8 1; #X connect 8 0 9 0; #X connect 9 0 10 0; #X connect 10 0 13 0; #X connect 11 0 10 1; #X connect 12 0 7 0; #X connect 13 0 21 0; #X connect 13 1 14 0; #X connect 14 0 18 0; #X connect 14 1 17 1; #X connect 15 0 16 0; #X connect 16 0 21 1; #X connect 17 0 15 0; #X connect 18 0 17 0; #X connect 18 1 19 0; #X connect 19 0 16 1; #X connect 20 0 8 0; #X connect 20 1 11 0; #X connect 20 1 9 1; #X connect 21 0 22 1; #X connect 22 0 23 0; pd-iemmatrix-0.3/abs/mtx_index_rowcol-help.pd000066400000000000000000000016671262113134600213710ustar00rootroot00000000000000#N canvas 133 130 841 379 10; #X obj 75 133 mtx_print A; #X msg 33 59 bang; #X text 482 28 part of iemmatrix; #X obj 33 132 t a a; #X text 481 154 inletA: matrix/vector; #X text 481 167 inletB: row matrix/vector; #X text 481 180 inletC: col matrix/vector; #X text 479 201 outleA: matrix containing the indexed values; #X obj 33 232 mtx_print output; #X text 43 34 [mtx_index_rowcol]; #X text 166 69 finds the values to the given row/col indices in a given matrix.; #X obj 33 194 mtx_index_rowcol; #X msg 33 112 matrix 2 3 1 2 3 4 5 6; #X obj 33 83 t b b b; #X msg 205 111 matrix 1 4 1 2 2 2; #X msg 381 108 matrix 1 4 2 3 1 2 3; #X obj 373 130 mtx_print C_col; #X obj 179 138 mtx_print B_row; #X connect 1 0 13 0; #X connect 3 0 11 0; #X connect 3 1 0 0; #X connect 11 0 8 0; #X connect 12 0 3 0; #X connect 13 0 12 0; #X connect 13 1 14 0; #X connect 13 2 15 0; #X connect 14 0 11 1; #X connect 14 0 17 0; #X connect 15 0 11 2; #X connect 15 0 16 0; pd-iemmatrix-0.3/abs/mtx_index_rowcol.pd000066400000000000000000000011221262113134600204250ustar00rootroot00000000000000#N canvas 344 107 450 300 10; #X obj 63 36 inlet; #X text 65 15 matrix; #X text 230 19 row idcs; #X text 331 19 col idcs; #X text 233 4 from mtx_find_rowcol:; #X obj 233 37 inlet; #X obj 336 37 inlet; #X obj 121 118 mtx_rowcol2index; #X obj 164 93 mtx; #X obj 63 55 t a a; #X obj 103 55 mtx_size; #X obj 164 55 t b f; #X obj 63 140 mtx_index; #X obj 63 160 outlet; #X connect 0 0 9 0; #X connect 5 0 8 1; #X connect 6 0 7 1; #X connect 7 0 12 1; #X connect 8 0 7 0; #X connect 9 0 12 0; #X connect 9 1 10 0; #X connect 10 1 11 0; #X connect 11 0 8 0; #X connect 11 1 7 2; #X connect 12 0 13 0; pd-iemmatrix-0.3/abs/mtx_index_rowcol_grid-help.pd000066400000000000000000000017141262113134600223670ustar00rootroot00000000000000#N canvas 91 491 841 379 10; #X obj 75 133 mtx_print A; #X msg 33 59 bang; #X text 482 28 part of iemmatrix; #X obj 33 132 t a a; #X text 384 169 inletA: matrix/vector; #X obj 33 232 mtx_print output; #X obj 33 83 t b b b; #X obj 305 136 mtx_print B_row; #X msg 304 111 matrix 1 2 3 1; #X text 43 34 [mtx_index_rowcol_grid]; #X text 166 69 finds the values to the row and col grid indices in a given matrix.; #X text 383 195 inletB: col matrix/vector; #X text 384 181 inletB: row matrix/vector; #X msg 33 112 matrix 3 3 11 12 13 21 22 23 31 32 33; #X obj 33 194 mtx_index_rowcol_grid; #X msg 416 111 matrix 1 2 2 1; #X obj 417 137 mtx_print B_col; #X text 382 216 outleA: matrix containing the grid-indexed rows and cols; #X connect 1 0 6 0; #X connect 3 0 14 0; #X connect 3 1 0 0; #X connect 6 0 13 0; #X connect 6 1 8 0; #X connect 6 2 15 0; #X connect 8 0 7 0; #X connect 8 0 14 1; #X connect 13 0 3 0; #X connect 14 0 5 0; #X connect 15 0 14 2; #X connect 15 0 16 0; pd-iemmatrix-0.3/abs/mtx_index_rowcol_grid.pd000066400000000000000000000024241262113134600214400ustar00rootroot00000000000000#N canvas -44 0 575 378 10; #X obj 257 20 inlet; #X text 303 20 row_idcs; #X obj 257 40 mtx_:; #X obj 257 78 mtx_- 1; #X obj 241 159 mtx; #X obj 241 179 mtx_* 1; #X obj 241 199 mtx_repmat; #X msg 306 177 1 \$1; #X obj 257 59 mtx_transpose; #X obj 383 20 inlet; #X obj 383 40 mtx_:; #X obj 128 182 mtx; #X obj 128 203 mtx_repmat; #X text 429 20 col_idcs; #X msg 193 180 \$1 1; #X obj 70 20 inlet; #X text 68 4 matrix; #X obj 128 283 mtx_+; #X obj 70 329 outlet; #X obj 70 305 mtx_index; #X text 358 98 slices out given; #X text 360 124 matrix rows and columns; #X text 356 153 at the given row and col; #X text 356 179 grid indices; #X obj 383 63 mtx_size; #X obj 257 99 mtx_size; #X obj 70 63 t a a; #X obj 100 89 mtx_size; #X obj 151 110 t b b f; #X connect 0 0 2 0; #X connect 2 0 8 0; #X connect 3 0 25 0; #X connect 3 0 4 1; #X connect 4 0 5 0; #X connect 5 0 6 0; #X connect 6 0 17 1; #X connect 7 0 6 1; #X connect 8 0 3 0; #X connect 9 0 10 0; #X connect 10 0 11 1; #X connect 10 0 24 0; #X connect 11 0 12 0; #X connect 12 0 17 0; #X connect 14 0 12 1; #X connect 15 0 26 0; #X connect 17 0 19 1; #X connect 19 0 18 0; #X connect 24 0 7 0; #X connect 25 0 14 0; #X connect 26 0 19 0; #X connect 26 1 27 0; #X connect 27 1 28 0; #X connect 28 0 11 0; #X connect 28 1 4 0; #X connect 28 2 5 1; pd-iemmatrix-0.3/abs/mtx_interpol.pd000066400000000000000000000013571262113134600175770ustar00rootroot00000000000000#N canvas 441 152 835 656 10; #X obj 264 225 inlet mtx2; #X obj 167 393 outlet mtx; #X obj 182 216 inlet mtx1; #X obj 167 364 mtx_+; #X obj 67 33 inlet alpha beta; #X obj 67 53 t l f; #X obj 67 113 pack; #X msg 94 72 1 \$1; #X obj 94 92 -; #X obj 67 133 unpack; #X obj 67 153 t b b f; #X obj 167 284 mtx_.* 1; #X obj 264 284 mtx_.* 0; #X obj 264 245 mtx; #X obj 167 244 mtx; #X connect 0 0 13 0; #X connect 2 0 14 1; #X connect 3 0 1 0; #X connect 4 0 5 0; #X connect 5 0 6 0; #X connect 5 1 7 0; #X connect 6 0 9 0; #X connect 7 0 8 0; #X connect 8 0 6 1; #X connect 9 0 10 0; #X connect 9 1 12 1; #X connect 10 0 14 0; #X connect 10 1 13 0; #X connect 10 2 11 1; #X connect 11 0 3 0; #X connect 12 0 3 1; #X connect 13 0 12 0; #X connect 14 0 11 0; pd-iemmatrix-0.3/abs/mtx_ispeak-help.pd000066400000000000000000000037561262113134600201520ustar00rootroot00000000000000#N canvas 553 163 841 379 10; #X text 482 28 part of iemmatrix; #X text 43 34 [mtx_ispeak]; #X text 166 69 searches for peaks in the rows of a matrix. peak locations are set to 1 \, others to 0; #N canvas 0 0 450 300 convert2tablemsg 0; #X obj 130 35 inlet; #X obj 169 216 outlet; #X obj 130 60 t a a; #X obj 160 82 mtx_size; #X obj 130 107 list split 3; #X obj 220 107 change; #X msg 220 129 resize \$1; #X obj 169 154 list prepend 0; #X connect 0 0 2 0; #X connect 2 0 4 0; #X connect 2 1 3 0; #X connect 3 1 5 0; #X connect 4 1 7 0; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 1 0; #X restore 33 284 pd convert2tablemsg; #X obj 33 306 s view_peaks; #N canvas 0 0 450 300 graph1 0; #X array view_peaks 20 float 1; #A 0 0 1 1 0 1 1 1 0 1 1 0 0 1 0 1 1 1 0 0 1; #X coords 0 1 19 0 200 20 1; #X restore 327 192 graph; #N canvas 0 0 450 300 graph1 0; #X array view_landscape 20 float 1; #A 0 0 0 0 0 2 2 2 0 0 0 0 2 3 1 3 3 3 0 0 3; #X coords 0 3 19 0 200 50 1; #X restore 326 228 graph; #N canvas 0 0 450 300 convert2tablemsg 0; #X obj 130 35 inlet; #X obj 169 216 outlet; #X obj 130 60 t a a; #X obj 160 82 mtx_size; #X obj 130 107 list split 3; #X msg 220 129 resize \$1; #X obj 169 154 list prepend 0; #X obj 220 107 change; #X connect 0 0 2 0; #X connect 2 0 4 0; #X connect 2 1 3 0; #X connect 3 1 7 0; #X connect 4 1 6 0; #X connect 5 0 1 0; #X connect 6 0 1 0; #X connect 7 0 5 0; #X restore 172 284 pd convert2tablemsg; #X obj 33 165 mtx_rand; #X obj 172 306 s view_landscape; #X text 268 138 inletA: matrix/vector containing values (landscape) ; #X text 268 157 outletB: matrix/vector logical 1 at peaks; #X obj 33 205 mtx_int; #X obj 33 185 mtx_* 4; #X msg 33 143 1 20; #X obj 33 242 mtx_ispeak; #X obj 535 325 mtx_ispeakb; #X text 304 306 (note: bad performance at borders and larger peaks) ; #X text 308 326 for improved version see also:; #X connect 3 0 4 0; #X connect 7 0 9 0; #X connect 8 0 13 0; #X connect 12 0 7 0; #X connect 12 0 15 0; #X connect 13 0 12 0; #X connect 14 0 8 0; #X connect 15 0 3 0; pd-iemmatrix-0.3/abs/mtx_ispeak.pd000066400000000000000000000010311262113134600172040ustar00rootroot00000000000000#N canvas 0 0 540 300 10; #X obj 162 43 inlet; #X obj 162 218 outlet; #X obj 162 119 t a a; #X obj 162 160 mtx_&&; #X obj 222 140 mtx_<= 0; #X obj 162 140 mtx_>= 0; #X obj 162 98 mtx_diff row -1; #X obj 222 121 mtx_roll 1; #X text 319 77 searches; #X text 312 102 matrix rows; #X text 310 128 for peaks; #X text 290 163 returns 1 at peak location; #X text 339 185 0 elsewhere; #X connect 0 0 6 0; #X connect 2 0 5 0; #X connect 2 1 7 0; #X connect 3 0 1 0; #X connect 4 0 3 1; #X connect 5 0 3 0; #X connect 6 0 2 0; #X connect 7 0 4 0; pd-iemmatrix-0.3/abs/mtx_ispeakb-help.pd000066400000000000000000000037461262113134600203130ustar00rootroot00000000000000#N canvas 83 338 841 379 10; #X text 482 28 part of iemmatrix; #X text 166 69 searches for peaks in the rows of a matrix. peak locations are set to 1 \, others to 0; #N canvas 0 0 450 300 convert2tablemsg 0; #X obj 130 35 inlet; #X obj 169 216 outlet; #X obj 130 60 t a a; #X obj 160 82 mtx_size; #X obj 130 107 list split 3; #X obj 220 107 change; #X msg 220 129 resize \$1; #X obj 169 154 list prepend 0; #X connect 0 0 2 0; #X connect 2 0 4 0; #X connect 2 1 3 0; #X connect 3 1 5 0; #X connect 4 1 7 0; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 1 0; #X restore 33 284 pd convert2tablemsg; #X obj 33 306 s view_peaks; #N canvas 0 0 450 300 graph1 0; #X array view_peaks 20 float 1; #A 0 0 1 1 0 1 1 1 0 1 1 0 0 1 0 1 1 1 0 0 1; #X coords 0 1 19 0 200 20 1; #X restore 327 192 graph; #N canvas 0 0 450 300 graph1 0; #X array view_landscape 20 float 1; #A 0 0 0 0 0 2 2 2 0 0 0 0 2 3 1 3 3 3 0 0 3; #X coords 0 3 19 0 200 50 1; #X restore 326 228 graph; #N canvas 0 0 450 300 convert2tablemsg 0; #X obj 130 35 inlet; #X obj 169 216 outlet; #X obj 130 60 t a a; #X obj 160 82 mtx_size; #X obj 130 107 list split 3; #X msg 220 129 resize \$1; #X obj 169 154 list prepend 0; #X obj 220 107 change; #X connect 0 0 2 0; #X connect 2 0 4 0; #X connect 2 1 3 0; #X connect 3 1 7 0; #X connect 4 1 6 0; #X connect 5 0 1 0; #X connect 6 0 1 0; #X connect 7 0 5 0; #X restore 172 284 pd convert2tablemsg; #X obj 33 165 mtx_rand; #X obj 172 306 s view_landscape; #X text 268 138 inletA: matrix/vector containing values (landscape) ; #X text 268 157 outletB: matrix/vector logical 1 at peaks; #X obj 33 205 mtx_int; #X obj 33 185 mtx_* 4; #X msg 33 143 1 20; #X text 43 34 [mtx_ispeakb]; #X text 301 307 (note: this is the improved version to [mtx_ispeak]) ; #X obj 33 242 mtx_ispeakb; #X text 300 325 (better performance at the borders of the array); #X connect 2 0 3 0; #X connect 6 0 8 0; #X connect 7 0 12 0; #X connect 11 0 6 0; #X connect 11 0 16 0; #X connect 12 0 11 0; #X connect 13 0 7 0; #X connect 16 0 2 0; pd-iemmatrix-0.3/abs/mtx_ispeakb.pd000066400000000000000000000023531262113134600173560ustar00rootroot00000000000000#N canvas 639 183 450 611 10; #X obj 120 32 inlet; #X obj 120 566 outlet; #X obj 120 301 t a a; #X obj 120 342 mtx_&&; #X obj 180 322 mtx_<= 0; #X obj 120 322 mtx_>= 0; #X obj 120 280 mtx_diff row -1; #X obj 180 303 mtx_roll 1; #X text 277 252 searches; #X text 270 277 matrix rows; #X text 268 303 for peaks; #X text 248 338 returns 1 at peak location; #X text 297 360 0 elsewhere; #X obj 120 75 t a a a a; #X obj 188 75 mtx_size; #X obj 249 75 - 1; #X obj 232 123 mtx_slice; #X msg 249 95 1 \$1 end \$1; #X obj 139 147 mtx_concat row; #X obj 120 174 mtx_slice 1 2 end 2; #X obj 120 197 mtx_concat row; #X obj 120 414 t a a; #X obj 149 436 mtx_size; #X obj 120 509 mtx_slice; #X msg 200 477 1 2 end \$1; #X obj 200 457 - 1; #X connect 0 0 13 0; #X connect 2 0 5 0; #X connect 2 1 7 0; #X connect 3 0 21 0; #X connect 4 0 3 1; #X connect 5 0 3 0; #X connect 6 0 2 0; #X connect 7 0 4 0; #X connect 13 0 19 0; #X connect 13 1 18 0; #X connect 13 2 16 0; #X connect 13 3 14 0; #X connect 14 1 15 0; #X connect 15 0 17 0; #X connect 16 0 18 1; #X connect 17 0 16 1; #X connect 18 0 20 1; #X connect 19 0 20 0; #X connect 20 0 6 0; #X connect 21 0 23 0; #X connect 21 1 22 0; #X connect 22 1 25 0; #X connect 23 0 1 0; #X connect 24 0 23 1; #X connect 25 0 24 0; pd-iemmatrix-0.3/abs/mtx_linspace-help.pd000066400000000000000000000006761262113134600204720ustar00rootroot00000000000000#N canvas 439 163 841 379 10; #X text 482 28 part of iemmatrix; #X text 43 34 [mtx_linspace]; #X text 166 69 creates a linearly spaced vector from a startvalue to a stopvalue with n entries; #X text 268 138 inlet: [startval stopval n(; #X text 268 157 outlet: matrix/vector; #X text 465 324 see also:; #X obj 535 325 mtx_logspace; #X obj 33 165 mtx_linspace; #X obj 33 187 mtx_print; #X msg 33 143 1 4 10; #X connect 7 0 8 0; #X connect 9 0 7 0; pd-iemmatrix-0.3/abs/mtx_linspace.pd000066400000000000000000000020421262113134600175310ustar00rootroot00000000000000#N canvas 661 125 619 626 10; #X obj 88 95 inlet; #X obj 88 370 outlet; #X text 85 50 linspace creates a linear scale between the start and end point with N points; #X text 239 128 arg1: startval; #X text 236 144 arg2: stopval; #X text 232 159 arg3: N; #X obj 188 168 - 1; #X obj 140 251 /; #X obj 140 231 pack f f; #X obj 88 292 mtx_* 0; #X obj 88 230 f; #X obj 126 188 f; #X obj 126 208 -; #X msg 88 249 0 \$1; #X obj 88 270 mtx_:; #X obj 88 167 t b b f; #X obj 88 313 mtx_+ \$1; #X obj 88 126 pack \$1 \$2 \$3; #X obj 88 147 unpack f f f; #X text 169 92 inlet is a 3 argument list; #X text 201 112 optional creation arguments:; #X connect 0 0 17 0; #X connect 6 0 8 1; #X connect 6 0 10 1; #X connect 7 0 9 1; #X connect 8 0 7 0; #X connect 9 0 16 0; #X connect 10 0 13 0; #X connect 11 0 12 0; #X connect 12 0 8 0; #X connect 13 0 14 0; #X connect 14 0 9 0; #X connect 15 0 10 0; #X connect 15 1 11 0; #X connect 15 2 12 1; #X connect 15 2 16 1; #X connect 16 0 1 0; #X connect 17 0 18 0; #X connect 18 0 15 0; #X connect 18 1 11 1; #X connect 18 2 6 0; pd-iemmatrix-0.3/abs/mtx_linsweep-help.pd000066400000000000000000000055351262113134600205210ustar00rootroot00000000000000#N canvas 439 163 841 379 10; #X text 482 28 part of iemmatrix; #N canvas 0 0 450 300 convert2tablemsg 0; #X obj 130 35 inlet; #X obj 169 216 outlet; #X obj 130 60 t a a; #X obj 160 82 mtx_size; #X obj 130 107 list split 3; #X obj 220 107 change; #X msg 220 129 resize \$1; #X obj 169 154 list prepend 0; #X connect 0 0 2 0; #X connect 2 0 4 0; #X connect 2 1 3 0; #X connect 3 1 5 0; #X connect 4 1 7 0; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 1 0; #X restore 33 284 pd convert2tablemsg; #N canvas 0 0 450 300 (subpatch) 0; #X array view_sweep 200 float 1; #A 0 0 1.32248e-06 0.0157889 0.0473469 0.094585 0.15722 0.234604 0.325494 0.427787 0.538234 0.652155 0.763227 0.86339 0.942954 0.991013 0.996231 0.948081 0.838516 0.664015 0.427757 0.141581 -0.172809 -0.483988 -0.752941 -0.937585 -0.999719 -0.913747 -0.675729 -0.310488 0.125992 0.55149 0.871257 0.99972 0.886284 0.538192 0.0315308 -0.497753 -0.88632 -0.994736 -0.763191 -0.249872 0.369925 0.855333 0.992993 0.698652 0.0788055 -0.590375 -0.977385 -0.863358 -0.280308 0.470134 0.957668 0.871215 0.234547 -0.564605 -0.993005 -0.731736 0.0631605 0.82094 0.952972 0.325434 -0.577567 -0.999968 -0.551413 0.399083 0.988783 0.640052 -0.340429 -0.986303 -0.615477 0.413512 0.999224 0.470037 -0.603052 -0.9739 -0.172722 0.847058 0.802436 -0.280414 -0.998477 -0.369825 0.773364 0.829785 -0.310579 -0.99847 -0.188251 0.913786 0.590284 -0.675799 -0.84699 0.384568 0.970194 -0.110352 -0.999969 -0.110213 0.980607 0.265104 -0.94811 -0.355108 0.926156 0.384445 -0.926154 -0.355112 0.948106 0.265106 -0.980605 -0.110221 0.999969 -0.110347 -0.970195 0.384566 0.84699 -0.675802 -0.590286 0.913785 0.18825 -0.99847 0.310578 0.829785 -0.773365 -0.369826 0.998478 -0.280408 -0.802439 0.847054 0.172725 -0.973901 0.603052 0.470039 -0.999224 0.413512 0.615466 -0.986302 0.340433 0.640048 -0.988782 0.399086 0.551423 -0.999968 0.577561 0.325436 -0.952975 0.820944 -0.0631564 -0.73173 0.993005 -0.564609 -0.234557 0.87121 -0.957665 0.470142 0.280307 -0.863358 0.977386 -0.590374 -0.0788057 0.698658 -0.992993 0.85533 -0.36993 -0.249882 0.763194 -0.994736 0.886318 -0.497746 -0.031524 0.538195 -0.88628 0.99972 -0.871259 0.551493 -0.126001 -0.310483 0.675724 -0.913747 0.999719 -0.937586 0.752949 -0.483987 0.172799 0.141593 -0.427737 0.664025 -0.838515 0.948078 -0.996231 0.991012 -0.942955 0.863391 -0.763242 0.652158 -0.538239 0.427787 -0.325507 0.234592 -0.157235 0.0945857 -0.0473552 0.0157955 3.02766e-06; #X coords 0 1 199 -1 200 50 1; #X restore 326 228 graph; #X obj 33 306 s view_sweep; #X text 268 138 list inlet: [omega_start omega_stop n_samples(; #X text 268 157 outletA: vector containing sweep; #X text 43 34 [mtx_linsweep]; #X obj 33 165 mtx_linsweep; #X text 166 69 creates an n sample linear sweep starting and stopping specified (digital) frequencies.; #X msg 33 143 0 3.14159 200; #X connect 1 0 3 0; #X connect 7 0 1 0; #X connect 9 0 7 0; pd-iemmatrix-0.3/abs/mtx_linsweep.pd000066400000000000000000000031731262113134600175670ustar00rootroot00000000000000#N canvas 724 186 552 611 10; #X obj 94 57 inlet; #X obj 143 57 inlet; #X obj 190 57 inlet; #X obj 231 56 loadbang; #X obj 94 228 mtx_cumsum; #X text 187 209 instantaneous frequency; #X text 188 229 time dependent phase-angle argument; #X text 191 316 sweeped cos-oscillation; #N canvas 0 0 661 488 smooth_switches 0; #X obj 165 30 inlet; #X obj 165 368 outlet; #X obj 248 275 mtx_linspace; #X obj 248 254 pack f f f; #X obj 317 101 mtx_size; #X obj 283 123 t f f; #X obj 283 175 mtx; #X obj 235 174 mtx; #X obj 272 79 t b a a a; #X obj 165 50 t a a; #X obj 165 301 mtx_-; #X msg 283 150 element 1 \$1; #X msg 235 101 element 1 1; #X obj 283 213 expr -int($f1/3.14159265)*3.14159265+$f1; #X text 397 192 modulo pi; #X connect 0 0 9 0; #X connect 2 0 10 1; #X connect 3 0 2 0; #X connect 4 1 5 0; #X connect 5 0 11 0; #X connect 5 1 3 2; #X connect 6 0 13 0; #X connect 7 0 3 0; #X connect 8 0 12 0; #X connect 8 1 4 0; #X connect 8 2 7 1; #X connect 8 3 6 1; #X connect 9 0 10 0; #X connect 9 1 8 0; #X connect 10 0 1 0; #X connect 11 0 6 0; #X connect 12 0 7 0; #X connect 13 0 3 1; #X restore 94 284 pd smooth_switches (on and off zero-phase); #X text 189 261 force zero-crossing at start and end; #X obj 94 441 outlet; #X text 103 422 sweep vector; #X text 185 396 forming matrix with blocksize columns for playback ; #X text 102 38 wstart; #X text 147 36 wstop; #X text 195 35 len; #X obj 94 117 pack \$1 \$2 \$3; #X obj 94 315 mtx_sin; #X obj 94 208 mtx_linspace; #X connect 0 0 16 0; #X connect 1 0 16 1; #X connect 2 0 16 2; #X connect 3 0 16 0; #X connect 4 0 8 0; #X connect 8 0 17 0; #X connect 16 0 18 0; #X connect 17 0 10 0; #X connect 18 0 4 0; pd-iemmatrix-0.3/abs/mtx_logspace-help.pd000066400000000000000000000007101262113134600204560ustar00rootroot00000000000000#N canvas 439 163 841 379 10; #X text 482 28 part of iemmatrix; #X text 268 138 inlet: [startval stopval n(; #X text 268 157 outlet: matrix/vector; #X text 465 324 see also:; #X obj 33 187 mtx_print; #X text 43 34 [mtx_logspace]; #X text 166 69 creates a logarithmically spaced vector from a startvalue to a stopvalue with n entries; #X obj 33 165 mtx_logspace; #X msg 33 142 1 10000 9; #X obj 535 325 mtx_linspace; #X connect 7 0 4 0; #X connect 8 0 7 0; pd-iemmatrix-0.3/abs/mtx_logspace.pd000066400000000000000000000013231262113134600175310ustar00rootroot00000000000000#N canvas 0 0 657 300 10; #X obj 147 50 inlet; #X obj 146 219 outlet; #X obj 147 104 unpack f f f; #X obj 148 128 log; #X obj 183 128 log; #X obj 149 151 pack f f f; #X obj 148 172 mtx_linspace; #X obj 147 194 mtx_exp; #X text 125 1 logspace creates a logarithmical scale between start and end point with N points; #X obj 147 80 pack \$1 \$2 \$3; #X text 385 104 arg1: startval; #X text 382 120 arg2: stopval; #X text 378 135 arg3: N; #X text 315 68 inlet is a 3 argument list; #X text 347 88 optional creation arguments:; #X connect 0 0 9 0; #X connect 2 0 3 0; #X connect 2 1 4 0; #X connect 2 2 5 2; #X connect 3 0 5 0; #X connect 4 0 5 1; #X connect 5 0 6 0; #X connect 6 0 7 0; #X connect 7 0 1 0; #X connect 9 0 2 0; pd-iemmatrix-0.3/abs/mtx_logsweep-help.pd000066400000000000000000001137231262113134600205170ustar00rootroot00000000000000#N canvas 439 163 841 379 10; #X text 482 28 part of iemmatrix; #N canvas 0 0 450 300 convert2tablemsg 0; #X obj 130 35 inlet; #X obj 169 216 outlet; #X obj 130 60 t a a; #X obj 160 82 mtx_size; #X obj 130 107 list split 3; #X obj 220 107 change; #X msg 220 129 resize \$1; #X obj 169 154 list prepend 0; #X connect 0 0 2 0; #X connect 2 0 4 0; #X connect 2 1 3 0; #X connect 3 1 5 0; #X connect 4 1 7 0; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 1 0; #X restore 33 284 pd convert2tablemsg; #N canvas 0 0 450 300 (subpatch) 0; #X array view_sweep 4000 float 1; #A 0 0 0.00940563 0.0188248 0.0282568 0.0377007 0.0471557 0.0566209 0.0660955 0.0755787 0.0850695 0.0945671 0.104071 0.113579 0.123092 0.132608 0.142126 0.151646 0.161166 0.170686 0.180204 0.18972 0.199233 0.208741 0.218245 0.227742 0.237232 0.246714 0.256186 0.265649 0.2751 0.28454 0.293966 0.303378 0.312775 0.322155 0.331519 0.340864 0.350189 0.359495 0.368778 0.37804 0.387277 0.39649 0.405677 0.414837 0.42397 0.433073 0.442146 0.451187 0.460197 0.469173 0.478114 0.487019 0.495888 0.504718 0.51351 0.522261 0.53097 0.539637 0.548261 0.556839 0.565371 0.573857 0.582293 0.590681 0.599017 0.607302 0.615533 0.623711 0.631833 0.639898 0.647906 0.655854 0.663743 0.67157 0.679335 0.687036 0.694672 0.702243 0.709745 0.71718 0.724545 0.731839 0.739061 0.74621 0.753285 0.760284 0.767206 0.77405 0.780816 0.787501 0.794104 0.800625 0.807063 0.813415 0.819681 0.82586 0.83195 0.837951 0.843861 0.849679 0.855404 0.861035 0.866571 0.87201 0.877352 0.882595 0.887738 0.89278 0.89772 0.902557 0.90729 0.911917 0.916438 0.920852 0.925157 0.929353 0.933438 0.937411 0.941272 0.945019 0.948651 0.952168 0.955567 0.958849 0.962013 0.965057 0.96798 0.970782 0.973461 0.976016 0.978448 0.980754 0.982934 0.984988 0.986913 0.98871 0.990377 0.991914 0.99332 0.994594 0.995735 0.996743 0.997616 0.998355 0.998958 0.999424 0.999754 0.999946 0.999999 0.999913 0.999688 0.999323 0.998816 0.998169 0.997379 0.996447 0.995372 0.994153 0.992791 0.991284 0.989632 0.987836 0.985893 0.983804 0.98157 0.979188 0.976659 0.973984 0.97116 0.968189 0.96507 0.961803 0.958387 0.954823 0.951111 0.947249 0.943239 0.93908 0.934772 0.930315 0.92571 0.920955 0.916052 0.911001 0.9058 0.900452 0.894955 0.889311 0.883519 0.877579 0.871492 0.865259 0.858879 0.852353 0.845681 0.838865 0.831903 0.824797 0.817548 0.810155 0.802619 0.794942 0.787124 0.779164 0.771065 0.762827 0.75445 0.745935 0.737284 0.728497 0.719574 0.710518 0.701328 0.692006 0.682553 0.672971 0.663259 0.653419 0.643452 0.63336 0.623143 0.612804 0.602342 0.591761 0.581059 0.570241 0.559306 0.548256 0.537092 0.525817 0.514432 0.502937 0.491336 0.479629 0.467818 0.455905 0.443892 0.43178 0.419571 0.407268 0.394872 0.382384 0.369807 0.357143 0.344394 0.331562 0.318648 0.305656 0.292587 0.279443 0.266227 0.252941 0.239586 0.226166 0.212683 0.199138 0.185536 0.171877 0.158164 0.1444 0.130587 0.116728 0.102826 0.088882 0.0749002 0.0608825 0.0468313 0.0327501 0.0186413 0.00450744 -0.0096485 -0.0238235 -0.0380151 -0.0522207 -0.0664365 -0.0806604 -0.0948893 -0.10912 -0.12335 -0.137575 -0.151794 -0.166002 -0.180198 -0.194377 -0.208536 -0.222674 -0.236786 -0.250868 -0.264919 -0.278935 -0.292913 -0.306849 -0.320741 -0.334584 -0.348376 -0.362114 -0.375794 -0.389413 -0.402967 -0.416454 -0.429869 -0.443211 -0.456474 -0.469657 -0.482755 -0.495765 -0.508685 -0.521509 -0.534237 -0.546862 -0.559384 -0.571797 -0.584099 -0.596287 -0.608357 -0.620305 -0.632128 -0.643823 -0.655388 -0.666817 -0.678109 -0.689259 -0.700265 -0.711122 -0.721829 -0.732381 -0.742776 -0.753009 -0.763079 -0.772981 -0.782714 -0.792272 -0.801653 -0.810855 -0.819874 -0.828707 -0.837351 -0.845803 -0.85406 -0.862119 -0.869977 -0.877632 -0.88508 -0.892319 -0.899345 -0.906157 -0.912751 -0.919125 -0.925275 -0.931201 -0.936898 -0.942365 -0.947598 -0.952597 -0.957357 -0.961878 -0.966156 -0.970189 -0.973976 -0.977514 -0.980801 -0.983835 -0.986614 -0.989136 -0.9914 -0.993403 -0.995144 -0.996622 -0.997834 -0.998779 -0.999456 -0.999864 -1 -0.999864 -0.999455 -0.998771 -0.997811 -0.996575 -0.995062 -0.99327 -0.991199 -0.988849 -0.986218 -0.983306 -0.980114 -0.976639 -0.972883 -0.968845 -0.964525 -0.959923 -0.955039 -0.949873 -0.944426 -0.938697 -0.932687 -0.926397 -0.919828 -0.912979 -0.905852 -0.898448 -0.890768 -0.882812 -0.874582 -0.866079 -0.857305 -0.848261 -0.838949 -0.829369 -0.819525 -0.809417 -0.799048 -0.78842 -0.777535 -0.766394 -0.755002 -0.743359 -0.731468 -0.719333 -0.706956 -0.694339 -0.681486 -0.6684 -0.655083 -0.641539 -0.627772 -0.613784 -0.599581 -0.585163 -0.570537 -0.555705 -0.540672 -0.525441 -0.510018 -0.494405 -0.478607 -0.462629 -0.446475 -0.43015 -0.413658 -0.397005 -0.380195 -0.363233 -0.346124 -0.328874 -0.311487 -0.29397 -0.276327 -0.258563 -0.240685 -0.222699 -0.20461 -0.186423 -0.168145 -0.149782 -0.131339 -0.112824 -0.0942411 -0.0755984 -0.056901 -0.0381557 -0.0193696 -0.000548665 0.0183006 0.0371711 0.0560568 0.0749501 0.0938446 0.112734 0.131609 0.150466 0.169296 0.188091 0.206847 0.225553 0.244205 0.262795 0.281314 0.299757 0.318116 0.336382 0.35455 0.372612 0.39056 0.408388 0.426087 0.44365 0.46107 0.47834 0.495451 0.512398 0.529172 0.545766 0.562173 0.578386 0.594396 0.610198 0.625784 0.641146 0.656277 0.671171 0.685821 0.700219 0.714357 0.728231 0.741833 0.755155 0.768192 0.780936 0.793381 0.805521 0.817349 0.828859 0.840045 0.8509 0.861419 0.871596 0.881424 0.890899 0.900015 0.908765 0.917145 0.92515 0.932774 0.940013 0.946861 0.953315 0.959368 0.965018 0.970259 0.975088 0.9795 0.983492 0.987061 0.990202 0.992913 0.99519 0.99703 0.998431 0.99939 0.999905 0.999973 0.999592 0.998761 0.997478 0.995742 0.993551 0.990904 0.987801 0.98424 0.980222 0.975747 0.970814 0.965423 0.959576 0.953273 0.946514 0.939301 0.931636 0.92352 0.914955 0.905943 0.896487 0.886588 0.87625 0.865476 0.85427 0.842634 0.830572 0.818089 0.805188 0.791875 0.778155 0.764031 0.749509 0.734596 0.719295 0.703613 0.687559 0.671136 0.654351 0.637213 0.619726 0.601902 0.583744 0.565262 0.546463 0.527358 0.507952 0.488257 0.46828 0.44803 0.427517 0.406751 0.385742 0.364499 0.343033 0.321353 0.299472 0.277399 0.255148 0.232725 0.210145 0.187419 0.164559 0.141576 0.118482 0.0952894 0.0720106 0.0486582 0.0252449 0.00178335 -0.0217144 -0.0452345 -0.0687648 -0.092291 -0.115801 -0.13928 -0.162716 -0.186094 -0.209403 -0.232627 -0.255752 -0.278766 -0.301655 -0.324405 -0.347001 -0.369431 -0.39168 -0.413735 -0.435581 -0.457206 -0.478595 -0.499735 -0.52061 -0.54121 -0.56152 -0.581526 -0.601216 -0.620573 -0.639589 -0.658248 -0.676538 -0.694446 -0.71196 -0.729065 -0.745751 -0.762006 -0.777818 -0.793173 -0.808062 -0.822473 -0.836394 -0.849815 -0.862726 -0.875114 -0.886971 -0.898287 -0.909052 -0.919257 -0.928892 -0.93795 -0.94642 -0.954297 -0.961572 -0.968237 -0.974285 -0.97971 -0.984505 -0.988665 -0.992183 -0.995056 -0.997277 -0.998843 -0.99975 -0.999994 -0.999572 -0.998481 -0.99672 -0.994286 -0.991178 -0.987395 -0.982937 -0.977804 -0.971997 -0.965516 -0.958362 -0.950539 -0.942048 -0.932892 -0.923075 -0.912601 -0.901474 -0.889699 -0.877282 -0.864229 -0.850545 -0.836239 -0.821317 -0.805787 -0.789658 -0.77294 -0.755641 -0.737771 -0.719342 -0.700363 -0.680846 -0.660805 -0.640249 -0.619193 -0.59765 -0.575635 -0.553161 -0.530242 -0.506895 -0.483134 -0.458977 -0.434439 -0.409538 -0.38429 -0.358713 -0.332826 -0.306648 -0.280196 -0.25349 -0.22655 -0.199395 -0.172046 -0.144524 -0.116848 -0.0890406 -0.0611226 -0.0331147 -0.00504075 0.0230791 0.0512217 0.0793645 0.107487 0.135563 0.163573 0.191492 0.219297 0.246966 0.274475 0.301803 0.328923 0.355812 0.382451 0.408813 0.434877 0.460619 0.486016 0.511044 0.535684 0.55991 0.583701 0.607036 0.62989 0.652245 0.674079 0.695369 0.716096 0.736238 0.755776 0.774691 0.792964 0.810575 0.827506 0.843739 0.859258 0.874044 0.888082 0.901357 0.913852 0.925553 0.936446 0.946519 0.955757 0.96415 0.971686 0.978354 0.984144 0.989047 0.993055 0.996161 0.998356 0.999636 0.999994 0.999427 0.997932 0.995504 0.992144 0.987848 0.982619 0.976455 0.96936 0.961336 0.952385 0.942514 0.931727 0.92003 0.907431 0.893939 0.879561 0.864309 0.848193 0.831226 0.81342 0.79479 0.775349 0.755114 0.734102 0.712329 0.689816 0.666579 0.64264 0.61802 0.592742 0.566827 0.540299 0.513183 0.485504 0.457286 0.428559 0.399348 0.369684 0.339592 0.309104 0.278251 0.24706 0.215566 0.183799 0.15179 0.119576 0.0871878 0.0546596 0.0220246 -0.0106807 -0.043424 -0.0761664 -0.108876 -0.141517 -0.17405 -0.206443 -0.238657 -0.270657 -0.302407 -0.333873 -0.365014 -0.395797 -0.426184 -0.456143 -0.485636 -0.514628 -0.543085 -0.570971 -0.598252 -0.624896 -0.650868 -0.676137 -0.70067 -0.724432 -0.747399 -0.769537 -0.790817 -0.81121 -0.83069 -0.849228 -0.8668 -0.88338 -0.898944 -0.913469 -0.926933 -0.939317 -0.9506 -0.960763 -0.96979 -0.977666 -0.984374 -0.989902 -0.994238 -0.997372 -0.999294 -0.999997 -0.999474 -0.997721 -0.994734 -0.990512 -0.985055 -0.978364 -0.970441 -0.961292 -0.950923 -0.939341 -0.926556 -0.912578 -0.897421 -0.881098 -0.863625 -0.845019 -0.8253 -0.804489 -0.782608 -0.759678 -0.735727 -0.710783 -0.684874 -0.658027 -0.630274 -0.601648 -0.572186 -0.54192 -0.510889 -0.479129 -0.446683 -0.41359 -0.37989 -0.345629 -0.310849 -0.275595 -0.239914 -0.203855 -0.16746 -0.130785 -0.0938747 -0.0567798 -0.0195528 0.0177546 0.0550907 0.0924069 0.129648 0.166761 0.203692 0.24039 0.2768 0.312868 0.348543 0.38377 0.418498 0.452673 0.486244 0.51916 0.55137 0.582823 0.613469 0.643262 0.672152 0.700095 0.727041 0.75295 0.777776 0.801475 0.824012 0.845346 0.865438 0.884253 0.901757 0.917918 0.932704 0.946087 0.958041 0.968541 0.977563 0.985089 0.991099 0.995577 0.998511 0.999887 0.999698 0.997936 0.994599 0.989683 0.98319 0.975123 0.96549 0.954296 0.941555 0.92728 0.911487 0.894195 0.875426 0.855204 0.833555 0.810511 0.786101 0.76036 0.733324 0.705034 0.675531 0.644859 0.613063 0.580195 0.5463 0.511437 0.475657 0.439017 0.40158 0.3634 0.324543 0.285073; #A 1000 0.245053 0.204554 0.163639 0.122381 0.0808506 0.0391179 -0.00274409 -0.0446604 -0.0865609 -0.128369 -0.170013 -0.211414 -0.252499 -0.293191 -0.333418 -0.373104 -0.412175 -0.450557 -0.488175 -0.524964 -0.560846 -0.595755 -0.629622 -0.66238 -0.693962 -0.724303 -0.753346 -0.781028 -0.807291 -0.83208 -0.855342 -0.877026 -0.897084 -0.915472 -0.932147 -0.947069 -0.960202 -0.971512 -0.980972 -0.988552 -0.994232 -0.997991 -0.999814 -0.999689 -0.997608 -0.993565 -0.98756 -0.979597 -0.969683 -0.957829 -0.944051 -0.928366 -0.9108 -0.891378 -0.87013 -0.847095 -0.822309 -0.795815 -0.76766 -0.737895 -0.706574 -0.673753 -0.639497 -0.603867 -0.566932 -0.528764 -0.489438 -0.449029 -0.407619 -0.36529 -0.322131 -0.278225 -0.233665 -0.18854 -0.14295 -0.0969879 -0.0507473 -0.00433088 0.0421616 0.0886313 0.134975 0.181092 0.226882 0.272241 0.317066 0.361258 0.404713 0.447336 0.489025 0.529684 0.569219 0.607531 0.644534 0.680133 0.714247 0.746788 0.777675 0.80683 0.834182 0.859657 0.883188 0.904714 0.924174 0.941515 0.956686 0.969643 0.980346 0.98876 0.994854 0.998604 0.999992 0.999002 0.995628 0.989867 0.981722 0.971203 0.958324 0.943107 0.925578 0.90577 0.883722 0.859477 0.833086 0.804604 0.774093 0.74162 0.707257 0.67108 0.633175 0.593626 0.552529 0.509979 0.466076 0.420927 0.374643 0.327336 0.279121 0.230121 0.180458 0.130255 0.0796446 0.0287531 -0.0222875 -0.0733442 -0.124283 -0.174969 -0.22527 -0.275047 -0.324169 -0.372501 -0.419911 -0.466268 -0.511442 -0.555305 -0.597738 -0.638615 -0.677821 -0.715241 -0.750763 -0.784285 -0.815703 -0.844922 -0.871853 -0.896411 -0.918515 -0.938096 -0.955087 -0.969429 -0.981069 -0.989963 -0.996075 -0.999374 -0.999839 -0.997456 -0.99222 -0.984133 -0.973207 -0.959459 -0.942917 -0.923618 -0.901605 -0.876931 -0.849658 -0.819852 -0.787591 -0.752959 -0.716051 -0.676964 -0.635805 -0.592688 -0.547736 -0.501073 -0.452833 -0.403156 -0.352186 -0.300074 -0.24697 -0.193035 -0.138434 -0.0833236 -0.0278767 0.0277364 0.0833434 0.138771 0.19385 0.248401 0.302252 0.355232 0.407168 0.457891 0.507236 0.555037 0.601139 0.645383 0.687621 0.727702 0.765496 0.800868 0.833686 0.863842 0.891218 0.915716 0.93724 0.955707 0.971044 0.983187 0.992078 0.997675 0.999946 0.998869 0.99443 0.986633 0.975487 0.961017 0.943255 0.922253 0.898061 0.870756 0.840415 0.807126 0.770998 0.732137 0.690675 0.646739 0.600477 0.552034 0.501582 0.44928 0.395316 0.339864 0.28312 0.225288 0.166557 0.107148 0.0472629 -0.0128769 -0.0730614 -0.133064 -0.192672 -0.251658 -0.309807 -0.366903 -0.422725 -0.477066 -0.529715 -0.580471 -0.62913 -0.675507 -0.719411 -0.760675 -0.799124 -0.8346 -0.866963 -0.896065 -0.921789 -0.944016 -0.96265 -0.9776 -0.988792 -0.996169 -0.999683 -0.999305 -0.995018 -0.986823 -0.974736 -0.958785 -0.93902 -0.915499 -0.888302 -0.857518 -0.823261 -0.785649 -0.744819 -0.700926 -0.654127 -0.604607 -0.552552 -0.498164 -0.441656 -0.383255 -0.323186 -0.261695 -0.199033 -0.13545 -0.0712134 -0.00658402 0.0581643 0.122767 0.186939 0.250419 0.312926 0.374196 0.433956 0.491947 0.547907 0.601598 0.652764 0.701179 0.746626 0.788883 0.827761 0.863068 0.894638 0.922311 0.945952 0.965436 0.980659 0.991535 0.997996 0.999993 0.997499 0.990505 0.979022 0.963085 0.942744 0.918074 0.889173 0.856147 0.819138 0.778296 0.733791 0.685819 0.634585 0.580316 0.523248 0.463644 0.401768 0.337909 0.272355 0.205416 0.137399 0.0686245 -0.000573579 -0.0698716 -0.138932 -0.207427 -0.275006 -0.341356 -0.406133 -0.469019 -0.529694 -0.587854 -0.643201 -0.695443 -0.744316 -0.789554 -0.830921 -0.868186 -0.90115 -0.929627 -0.953453 -0.972485 -0.98661 -0.995731 -0.999781 -0.998717 -0.992522 -0.981204 -0.964803 -0.943378 -0.917023 -0.885848 -0.85 -0.809645 -0.764976 -0.71621 -0.663583 -0.607364 -0.547832 -0.485294 -0.42007 -0.352497 -0.28293 -0.211738 -0.139291 -0.0659894 0.00777693 0.0816112 0.155105 0.227857 0.299452 0.369503 0.437608 0.50338 0.566443 0.626437 0.683002 0.735815 0.784559 0.828936 0.868682 0.903546 0.93331 0.957781 0.976796 0.99022 0.997954 0.999927 0.996102 0.986476 0.971081 0.949982 0.923277 0.891099 0.853616 0.811024 0.763558 0.711473 0.655067 0.594658 0.530586 0.46323 0.392972 0.320238 0.245448 0.16906 0.0915197 0.0133128 -0.06509 -0.143206 -0.22055 -0.296638 -0.370989 -0.443137 -0.512618 -0.578983 -0.641802 -0.700662 -0.755174 -0.804976 -0.849722 -0.889111 -0.922866 -0.950745 -0.972544 -0.988093 -0.997267 -0.999978 -0.996178 -0.985867 -0.969082 -0.945905 -0.916464 -0.88092 -0.83949 -0.792418 -0.739998 -0.682553 -0.620448 -0.554082 -0.483884 -0.410309 -0.333849 -0.255009 -0.174309 -0.0923048 -0.00954283 0.0733988 0.155956 0.237554 0.317622 0.395589 0.470911 0.543046 0.611465 0.675683 0.735219 0.789633 0.838516 0.881495 0.918237 0.948453 0.971895 0.988366 0.997715 0.999845 0.994709 0.982312 0.962712 0.936025 0.902413 0.862096 0.815343 0.762471 0.703851 0.639894 0.571054 0.497828 0.420752 0.340384 0.257323 0.172189 0.0856239 -0.00172692 -0.0891861 -0.176089 -0.261757 -0.345531 -0.426745 -0.504761 -0.578958 -0.648734 -0.713528 -0.772803 -0.826074 -0.872887 -0.912847 -0.945603 -0.970866 -0.988398 -0.998026 -0.999638 -0.993186 -0.978687 -0.956225 -0.925946 -0.888066 -0.842859 -0.79067 -0.731892 -0.666986 -0.596463 -0.520884 -0.440858 -0.357029 -0.27009 -0.180756 -0.0897722 0.00210585 0.0940952 0.185421 0.275295 0.362944 0.447615 0.528551 0.605051 0.676425 0.742036 0.801285 0.85363 0.898579 0.93571 0.964659 0.985135 0.996922 0.999875 0.99393 0.979103 0.955486 0.923254 0.88266 0.834036 0.777783 0.714387 0.644389 0.5684 0.487095 0.401192 0.311471 0.218736 0.123844 0.0276592 -0.0689165 -0.164992 -0.259656 -0.352012 -0.441188 -0.526312 -0.60657 -0.681168 -0.749379 -0.810511 -0.863956 -0.909157 -0.94565 -0.973039 -0.991019 -0.999375 -0.997983 -0.986813 -0.965935 -0.935511 -0.895801 -0.847156 -0.790024 -0.724936 -0.652511 -0.573435 -0.488486 -0.398488 -0.304331 -0.206953 -0.107326 -0.00646698 0.0946104 0.194854 0.293247 0.388751 0.480378 0.567141 0.64813 0.722473 0.78936 0.848058 0.897911 0.938354 0.968922 0.98924 0.999052 0.998207 0.986668 0.964511 0.931929 0.889231 0.836838 0.775265 0.705161 0.627246 0.542343 0.451346 0.355254 0.255088 0.151947 0.0469758 -0.0586861 -0.163836 -0.267291 -0.367894 -0.464497 -0.555975 -0.641279 -0.719399 -0.789424 -0.850515 -0.901927 -0.943023 -0.973291 -0.992331 -0.999871 -0.995775 -0.98004 -0.952796 -0.91432 -0.865017 -0.805418 -0.736186 -0.658096 -0.572057 -0.479053 -0.380176 -0.276569 -0.169491 -0.0602076 0.0499646 0.159696 0.267623 0.372439 0.472835 0.567557 0.655411 0.735279 0.806134 0.867059 0.917245 0.956015 0.982837 0.997321 0.999229 0.988483 0.965164 0.929514 0.881938 0.822989 0.753381 0.673966 0.585723 0.489757 0.38729 0.279624 0.168151 0.0543109 -0.0604174 -0.174501 -0.286449 -0.394753 -0.497968 -0.594682 -0.683578 -0.763424 -0.833116 -0.891666 -0.938226 -0.972114 -0.992818 -0.999996 -0.993489 -0.97333 -0.939735 -0.893109 -0.834048 -0.763311 -0.68184 -0.590726 -0.491192 -0.384615 -0.272473 -0.156308 -0.0377563 0.0814908 0.199751 0.315327 0.426549 0.531792 0.629517 0.718277 0.796745 0.863734 0.918213 0.959333 0.986435 0.999056 0.996947 0.980077 0.948632 0.903016 0.843849 0.77196 0.688374 0.594302 0.491111 0.380335 0.263622 0.142721 0.0194599 -0.104266 -0.226571 -0.345562 -0.459373 -0.566241 -0.664448 -0.752437 -0.828784 -0.89225 -0.941767 -0.976497 -0.995833 -0.999396 -0.987061 -0.958959 -0.91547 -0.857222 -0.785092 -0.700189 -0.603824 -0.497524 -0.382957 -0.26198 -0.13654 -0.00867176 0.119521 0.245928 0.368432 0.484996 0.593648 0.692533 0.779956 0.854392 0.91453 0.959297 0.987866 0.999677 0.994459 0.972226 0.933283 0.878233 0.807957 0.723598 0.626563 0.518491 0.40121 0.276747 0.14724 0.0149567 -0.11778 -0.24862 -0.37524 -0.495357 -0.606799 -0.707532 -0.795705 -0.869669 -0.928031 -0.969661 -0.993734 -0.999732 -0.98747 -0.95709 -0.909077 -0.844239 -0.763692 -0.668878 -0.561491 -0.443478 -0.317001 -0.184389 -0.0481328 0.0892343 0.22511 0.356917 0.482113 0.598288 0.703179 0.794734 0.871112 0.93079 0.972531 0.99545 0.99902 0.983085 0.947875 0.893997 0.82243 0.734515 0.631921 0.516622 0.390868 0.25712 0.118027 -0.0236403 -0.165027 -0.303289 -0.435601 -0.559238 -0.67165 -0.770498 -0.853675 -0.919417 -0.966286 -0.993233 -0.999613 -0.985203 -0.950214 -0.895291 -0.821495 -0.730307 -0.62357 -0.503477 -0.372525 -0.233452 -0.0891984 0.0571742 0.202531 0.343742 0.477718 0.601537 0.712467 0.808036 0.886085 0.944823 0.98288 0.999328 0.99371 0.966054 0.91688 0.847193 0.758459 0.65259 0.531894 0.399024 0.256941 0.108814 -0.041989 -0.192053 -0.337934 -0.476277 -0.603852 -0.717673 -0.81504 -0.893631 -0.951525 -0.987286 -0.999979 -0.989208 -0.955122 -0.898425 -0.820369 -0.722714 -0.607691 -0.47799 -0.336651 -0.187015 -0.0326605 0.122717 0.27533 0.421466 0.557539 0.680182 0.786313 0.87326 0.938796 0.981206 0.999335 0.99263 0.961151 0.905578 0.827197 0.727892 0.610074 0.476648 0.330925 0.176571 0.0174892 -0.142266 -0.298601 -0.447468 -0.584989 -0.707559 -0.811922 -0.89529 -0.955381 -0.990528 -0.999698 -0.982534 -0.939381 -0.871268 -0.779898 -0.667607 -0.537306 -0.392413 -0.236761 -0.0745029 0.0900094 0.252307 0.407973 0.552737 0.682591 0.793895 0.883517 0.948885 0.988088 0.999924 0.983943 0.940472 0.870611 0.776207 0.659811 0.524621 0.374374 0.213285 0.0458833 -0.123061 -0.288722 -0.446324 -0.591303 -0.71939 -0.826818 -0.910368 -0.967505 -0.996442 -0.996209 -0.966688 -0.908624 -0.823603 -0.714044 -0.583091 -0.434564 -0.272811 -0.102655 0.0708333 0.242426 0.406937 0.559341 0.694927 0.809504 0.899466 0.961948 0.994904 0.997189 0.968603 0.909896; #A 2000 0.822771 0.709826 0.574491 0.420915 0.25385 0.0785384 -0.0995222 -0.274662 -0.441315 -0.594089 -0.728047 -0.83879 -0.922653 -0.976811 -0.999373 -0.989474 -0.947294 -0.874071 -0.77208 -0.644552 -0.495577 -0.32999 -0.153223 0.028899 0.210304 0.384942 0.546911 0.690698 0.811378 0.90476 0.967566 0.997513 0.993444 0.955351 0.884394 0.782875 0.65417 0.502623 0.333401 0.152309 -0.0343525 -0.220073 -0.39833 -0.562805 -0.707618 -0.827558 -0.918247 -0.976332 -0.999592 -0.987044 -0.938982 -0.856993 -0.743883 -0.603639 -0.441233 -0.2625 -0.0739018 0.117667 0.305185 0.481698 0.640647 0.776046 0.88274 0.956643 0.994835 0.995728 0.959133 0.886265 0.779735 0.643434 0.482436 0.302775 0.111251 -0.0848122 -0.277878 -0.460488 -0.625518 -0.766466 -0.877745 -0.954871 -0.994682 -0.995443 -0.956957 -0.880585 -0.769179 -0.627035 -0.459669 -0.273691 -0.0764707 0.124122 0.319993 0.503181 0.666213 0.802377 0.90598 0.972659 0.999508 0.985253 0.930302 0.836756 0.708347 0.550256 0.368953 0.171945 -0.0325581 -0.23599 -0.429736 -0.605559 -0.755899 -0.874251 -0.95541 -0.995744 -0.993343 -0.948121 -0.861862 -0.738111 -0.58209 -0.400477 -0.201108 0.00738045 0.215828 0.41507 0.596224 0.751191 0.872963 0.955969 0.996316 0.992018 0.943076 0.851501 0.721267 0.558103 0.369305 0.163369 -0.0503217 -0.262001 -0.461928 -0.640804 -0.790267 -0.903234 -0.974292 -0.999944 -0.978788 -0.911618 -0.801398 -0.653159 -0.473767 -0.271602 -0.0562012 0.162196 0.373118 0.56642 0.732678 0.863741 0.953119 0.996272 0.990904 0.937062 0.837187 0.695991 0.520249 0.318533 0.100729 -0.12241 -0.33974 -0.540389 -0.714198 -0.852305 -0.947592 -0.995041 -0.992041 -0.938527 -0.837024 -0.692503 -0.512231 -0.305317 -0.0823343 0.145237 0.365577 0.567176 0.739434 0.873196 0.961259 0.998794 0.983597 0.916245 0.800093 0.641134 0.447661 0.229925 -0.000482313 -0.23119 -0.449723 -0.644176 -0.803869 -0.919948 -0.985865 -0.99779 -0.954839 -0.859145 -0.715781 -0.532487 -0.319303 -0.0880026 0.148575 0.377126 0.584778 0.759703 0.891861 0.973572 0.999961 0.969283 0.883044 0.745965 0.56572 0.352549 0.11865 -0.122461 -0.356794 -0.570599 -0.751282 -0.888066 -0.972699 -0.999954 -0.967977 -0.878407 -0.736351 -0.550061 -0.330528 -0.0908116 0.154746 0.391258 0.604384 0.781054 0.910317 0.984078 0.997569 0.949699 0.843157 0.684281 0.48273 0.250833 0.00296105 -0.245436 -0.478795 -0.68233 -0.843074 -0.950669 -0.998037 -0.981917 -0.903065 -0.766255 -0.580043 -0.356191 -0.109028 0.145561 0.39105 0.611401 0.792107 0.921163 0.989853 0.9934 0.931289 0.807351 0.629569 0.40954 0.161835 -0.0970624 -0.349805 -0.579318 -0.769965 -0.908659 -0.985738 -0.995683 -0.937518 -0.814949 -0.636131 -0.413176 -0.161299 0.102112 0.358802 0.590796 0.781772 0.918132 0.990043 0.992152 0.924013 0.790168 0.599856 0.366439 0.106453 -0.16157 -0.41831 -0.645187 -0.825647 -0.946375 -0.998312 -0.977371 -0.884777 -0.727027 -0.515453 -0.265502 0.00448399 0.274519 0.524469 0.735558 0.89179 0.981177 0.996701 0.93686 0.805878 0.613416 0.373893 0.105433 -0.171503 -0.435615 -0.666508 -0.846134 -0.96036 -0.999997 -0.961641 -0.847963 -0.667559 -0.434358 -0.166533 0.114859 0.387515 0.629713 0.821952 0.948628 0.999299 0.96955 0.861444 0.683394 0.449584 0.178803 -0.106952 -0.384356 -0.630549 -0.825133 -0.951792 -0.999741 -0.964656 -0.849108 -0.662406 -0.41991 -0.141775 0.148711 0.427021 0.669514 0.855401 0.968596 0.999103 0.943943 0.807508 0.601217 0.34262 0.0539322 -0.239853 -0.513119 -0.741862 -0.905814 -0.990272 -0.98743 -0.897177 -0.727148 -0.492144 -0.212876 0.0858373 0.37727 0.635154 0.836015 0.961437 0.999711 0.946974 0.807659 0.594156 0.325777 0.0269903 -0.274711 -0.551364 -0.777167 -0.930849 -0.997754 -0.971231 -0.853373 -0.654905 -0.394249 -0.0958376 0.212099 0.500224 0.740927 0.910917 0.99353 0.980436 0.872495 0.67976 0.420631 0.120099 -0.192593 -0.486815 -0.733563 -0.908258 -0.993316 -0.979911 -0.868964 -0.671112 -0.405811 -0.0994189 0.217422 0.512751 0.756574 0.923914 0.997409 0.969142 0.841584 0.627419 0.348326 0.0328724 -0.286432 -0.576431 -0.806769 -0.953134 -0.99984 -0.941541 -0.78394 -0.543283 -0.244699 0.0802948 0.397197 0.672068 0.875277 0.984679 0.988058 0.884617 0.685109 0.410815 0.0913572 -0.238545 -0.542736 -0.787662 -0.946045 -0.999991 -0.943072 -0.781155 -0.531869 -0.22271 0.111857 0.434304 0.708198 0.902301 0.994272 0.973202 0.841012 0.612365 0.313101 -0.0226211 -0.356193 -0.649006 -0.866837 -0.984038 -0.98648 -0.873395 -0.657569 -0.363997 -0.0270169 0.31362 0.617489 0.848199 0.977885 0.990584 0.884272 0.671258 0.376829 0.0363112 -0.309076 -0.617279 -0.850451 -0.979687 -0.988671 -0.875776 -0.654457 -0.351684 -0.00475503 0.343239 0.648795 0.873399 0.988471 0.979024 0.845732 0.604976 0.286941 -0.0681533 -0.415032 -0.709112 -0.912368 -0.998173 -0.954932 -0.787709 -0.517731 -0.179825 0.182092 0.520614 0.791063 0.957452 0.997317 0.90483 0.691742 0.386007 0.0281621 -0.33396 -0.65162 -0.881701 -0.992678 -0.968983 -0.813265 -0.546254 -0.204036 0.166679 0.514938 0.792546 0.960705 0.995602 0.891816 0.663262 0.341437 -0.0288243 -0.395522 -0.706799 -0.918347 -0.999622 -0.938512 -0.743153 -0.440932 -0.0749438 0.30235 0.636467 0.878722 0.993536 0.963602 0.792712 0.505316 0.143176 -0.240545 -0.589228 -0.85097 -0.986469 -0.97498 -0.817599 -0.537336 -0.175793 0.212763 0.569612 0.840539 0.983887 0.977271 0.821058 0.538615 0.172869 -0.220071 -0.579461 -0.849405 -0.987444 -0.971507 -0.803416 -0.508949 -0.133931 0.262751 0.618388 0.876266 0.994922 0.954831 0.761734 0.446007 0.0580302 -0.339874 -0.683254 -0.916101 -0.999982 -0.920581 -0.690239 -0.34615 0.0554735 0.448438 0.767635 0.959685 0.992022 0.858569 0.581032 0.205437 -0.205316 -0.5819 -0.860347 -0.992883 -0.956308 -0.756172 -0.426072 -0.0222982 0.385904 0.7279 0.944136 0.996436 0.875003 0.600346 0.220001 -0.199536 -0.584468 -0.866498 -0.995193 -0.946985 -0.729757 -0.381645 0.0354191 0.446669 0.777865 0.968746 0.984063 0.820303 0.506608 0.0997439 -0.325968 -0.692265 -0.931247 -0.998149 -0.879836 -0.597539 -0.203332 0.229516 0.619834 0.893954 0.999649 0.916185 0.658611 0.275248 -0.161181 -0.567333 -0.865065 -0.996567 -0.935742 -0.693581 -0.316339 0.12301 0.538945 0.849827 0.994174 0.942825 0.705113 0.327368 -0.115929 -0.53674 -0.850827 -0.994845 -0.939114 -0.694052 -0.30835 0.140331 0.561132 0.868094 0.998003 0.923508 0.659067 0.25839 -0.196225 -0.610776 -0.898897 -0.999973 -0.892105 -0.597031 -0.176013 0.282689 0.682201 0.937583 0.993916 0.838333 0.503227 0.059764 -0.397142 -0.769018 -0.975035 -0.969815 -0.753621 -0.372744 0.090172 0.533942 0.860841 0.998226 0.914941 0.628548 0.201908 -0.270368 -0.682734 -0.942483 -0.99045 -0.814975 -0.454808 0.00901356 0.471435 0.826871 0.993509 0.932335 0.656475 0.228741 -0.252535 -0.675804 -0.942336 -0.989224 -0.804599 -0.430824 0.0448746 0.51063 0.85607 0.998711 0.903746 0.59286 0.139611 -0.34775 -0.752034 -0.975249 -0.962581 -0.716123 -0.294968 0.198817 0.644543 0.932546 0.991259 0.805217 0.419447 -0.0709797 -0.544378 -0.882423 -0.999868 -0.866305 -0.514324 -0.0319431 0.459137 0.834243 0.997293 0.905772 0.582064 0.108386 -0.393833 -0.79497 -0.990633 -0.929165 -0.625467 -0.157975 0.351566 0.769354 0.984966 0.94057 0.646861 0.180854 -0.333944 -0.760177 -0.983239 -0.942336 -0.647413 -0.177122 0.341793 0.768487 0.986268 0.934742 0.626921 0.146397 -0.375132 -0.793638 -0.99268 -0.916049 -0.583962 -0.0881769 0.432938 0.833042 0.99882 0.882438 0.515735 0.00191786 -0.5131 -0.882098 -0.99866 -0.828245 -0.418793 0.112264 0.611442 0.933511 0.983798 0.746497 0.290001 -0.252361 -0.72101 -0.977054 -0.94372 -0.629712 -0.12752 0.413422 0.831132 0.999423 0.866545 0.471443 -0.0671285 -0.585996 -0.9268 -0.98463 -0.740581 -0.268438 0.28706 0.75453 0.988574 0.915485 0.556791 0.0234992 -0.517853 -0.897017 -0.993772 -0.776347 -0.312394 0.251488 0.735884 0.985543 0.919423 0.557512 0.0153348 -0.532515 -0.90834 -0.989207 -0.747531 -0.261076 0.311669 0.782598 0.996021 0.880276 0.472418 -0.0930985 -0.628291 -0.953998 -0.960138 -0.643354 -0.109176 0.462611 0.878218 0.995644 0.773618 0.286701 -0.299141 -0.782861 -0.997171 -0.866856 -0.435692 0.147529 0.680051 0.975389 0.928978 0.555768 -0.013923 -0.579422 -0.940115 -0.9669 -0.648871 -0.0983656 0.48812 0.899773 0.987441 0.718095 0.187967 -0.411192 -0.861121 -0.996697 -0.766915 -0.254756 0.351978 0.82928 0.99966 0.798477 0.299284 -0.31247 -0.807801 -0.999977 -0.815305 -0.322075 0.293896 0.798865 0.999849 0.818749 0.323482 -0.296791 -0.803418 -0.999986 -0.809064 -0.303304 0.321323 0.821112 0.99956 0.785243 0.261052 -0.366999 -0.850318 -0.996173 -0.745071 -0.195783 0.432663 0.88796 0.985845 0.685333 0.106604 -0.516162 -0.929276 -0.963052 -0.602105 0.00675818 0.613613 0.967567 0.920925 0.491465 -0.143356 -0.719041 -0.994081 -0.851686 -0.350202 0.299909 0.823712 0.998113 0.747398 0.177 -0.469953 -0.915745 -0.967504 -0.601296 0.0258645 0.642583 0.980069 0.889795 0.409586 -0.251125 -0.802015 -0.999291 -0.754133 -0.173699 0.484805 0.927576 0.9554 0.554137 -0.0971821 -0.705391 -0.994886 -0.832913 -0.29143 0.383778 0.884054 0.979008 0.623288 -0.0206614 -0.655801 -0.987233 -0.859437 -0.330249 0.354184 0.873164 0.981729 0.627014 -0.0249201 -0.665801 -0.990551 -0.842936 -0.291717 0.40015 0.900284 0.966559 0.565195 -0.110894 -0.733815 -0.999454 -0.776417 -0.172186 0.517478 0.952657 0.917099 0.426581 -0.276702 -0.842801 -0.98804 -0.6379 0.0334448 0.688732 0.996494 0.799322 0.195497 -0.508726 -0.95368 -0.910204 -0.398761 0.318849 0.872499 0.9745 0.570101 -0.131908 -0.7658 -0.999095 -0.70762 -0.0429161 0.645237 0.992306; #A 3000 0.812559 0.199681 -0.520583 -0.962797 -0.888329 -0.335299 0.399477 0.918754 0.939653 0.448824 -0.287632 -0.86745 -0.971656 -0.541013 0.188815 0.814955 0.989412 0.613319 -0.105539 -0.766148 -0.997531 -0.667786 0.0391454 0.72477 0.999921 0.706475 0.00966368 -0.693501 -0.999626 -0.731117 -0.0405886 0.674182 0.998781 0.742908 0.0535657 -0.667899 -0.998581 -0.742576 -0.0484975 0.675006 0.999233 0.729932 0.0253115 -0.69524 -0.999976 -0.704237 0.0161369 0.727576 0.999041 0.66396 -0.0759487 -0.770257 -0.993641 -0.607066 0.153727 0.820451 0.97997 0.531296 -0.248636 -0.874193 -0.953336 -0.434263 0.358706 0.926153 0.908254 0.314103 -0.480557 -0.969502 -0.83888 -0.170051 0.608857 0.996001 0.73953 0.00327029 -0.735897 -0.996159 -0.605567 0.182358 0.851305 0.959967 0.434443 -0.379508 -0.942211 -0.877852 -0.227016 0.576545 0.993782 0.742253 -0.0107422 -0.757275 -0.990501 -0.549714 0.266759 0.901533 0.918314 0.303179 -0.521807 -0.986635 -0.767526 -0.0143158 0.749709 0.990218 0.536624 -0.294785 -0.919251 -0.894475 -0.235633 0.591402 0.997815 0.691628 -0.110424 -0.834002 -0.957532 -0.389552 0.461168 0.977875 0.78307 0.0162852 -0.76319 -0.983258 -0.479837 0.378243 0.957309 0.826643 0.0808161 -0.72607 -0.990689 -0.512566 0.351495 0.951412 0.832631 0.0825016 -0.731099 -0.988327 -0.490533 0.383637 0.96396 0.802234 0.0206866 -0.777735 -0.972927 -0.410741 0.472673 0.98698 0.727085 -0.105294 -0.855434 -0.929466 -0.266192 0.609545 0.999941 0.591039 -0.29222 -0.941388 -0.832325 -0.0503463 0.773178 0.969246 0.375742 -0.525272 -0.99695 -0.650226 0.232299 0.923906 0.85128 0.0718853 -0.76806 -0.967873 -0.358003 0.552846 0.999495 0.603577 -0.303167 -0.953731 -0.794011 0.0427514 0.843793 0.922454 0.208553 -0.685683 -0.988493 -0.435419 0.496311 0.996786 0.627501 -0.291429 -0.955451 -0.779333 0.084569 0.874472 0.889463 0.11344 -0.764498 -0.95973 -0.294836 0.635669 0.994212 0.454781 -0.497145 -0.998399 -0.590833 0.356588 0.978443 0.702694 -0.220045 -0.940569 -0.791539 0.0919179 0.890673 0.85956 0.024701 -0.834082 -0.909671 -0.128041 0.775288 0.944954 0.217215 -0.718051 -0.968509 -0.292026 0.665385 0.983286 0.352669 -0.61972 -0.991844 -0.399705 0.582669 0.996309 0.43376 -0.555578 -0.99835 -0.455238 0.539241 0.999099 0.464606 -0.53415 -0.999163 -0.461893 0.540541 0.998595 0.447098 -0.558244 -0.996903 -0.41981 0.586871 0.99302 0.379411 -0.625508 -0.985338 -0.32532 0.672934 0.971713 0.256836 -0.727321 -0.949456 -0.173348 0.786158 0.915457 0.0746623 -0.846141 -0.86636 0.0387317 0.903075 0.798618 -0.165548 -0.951848 -0.708917 0.303198 0.986393 0.594601 -0.447474 -0.99999 -0.454094 0.592513 0.985511 0.287541 -0.730212 -0.935976 -0.097403 0.850858 0.845381 -0.110781 -0.942803 -0.70974 0.327862 0.993734 0.528127 -0.540976 -0.991505 -0.304231 0.733694 0.925869 0.0471416 -0.886903 -0.790442 0.227512 0.980349 0.585115 -0.497725 -0.995219 -0.31806 0.736078 0.917475 0.00745057 -0.912148 -0.741636 0.31811 0.996295 0.474425 -0.620983 -0.965052 -0.137601 0.857953 0.807145 -0.231256 -0.986747 -0.529287 0.581064 0.973966 0.160267 -0.853069 -0.804708 0.248465 0.99133 0.490682 -0.627605 -0.955102 -0.0751097 0.900689 0.732507 -0.369076 -0.99996 -0.350801 0.749147 0.885658 -0.120415 -0.971409 -0.56327 0.57739 0.966295 0.092946 -0.902714 -0.713633 0.415039 0.996676 0.260022 -0.821969 -0.8117 0.280629 0.998589 0.379154 -0.749915 -0.869936 0.184226 0.989738 0.45314 -0.700032 -0.899486 0.130304 0.982189 0.485459 -0.680036 -0.907482 0.120755 0.982077 0.478063 -0.692787 -0.896002 0.156072 0.989526 0.430094 -0.736777 -0.861655 0.235788 0.998521 0.338168 -0.805865 -0.795918 0.357177 0.996636 0.197945 -0.887578 -0.686249 0.513041 0.965128 0.00710446 -0.961814 -0.518886 0.688121 0.880266 -0.229675 -0.99958 -0.28394 0.855203 0.71734 -0.49484 -0.964732 0.016926 0.973537 0.458322 -0.751928 -0.820092 0.36102 0.991381 0.104438 -0.943189 -0.540362 0.695882 0.857029 -0.309764 -0.995911 -0.131623 0.938484 0.540648 -0.705309 -0.842903 0.347944 0.989577 0.0643084 -0.963435 -0.458359 0.778109 0.770822 -0.472067 -0.956931 0.0993282 0.995621 0.280943 -0.889786 -0.613945 0.662814 0.856983 -0.352519 -0.983652 0.00394682 0.985378 0.337606 -0.870041 -0.63239 0.658672 0.850418 -0.381054 -0.973682 0.0708177 0.996296 0.238677 -0.923422 -0.518219 0.768971 0.744877 -0.552812 -0.903427 0.297889 0.986593 -0.0274611 -0.994288 -0.236974 0.932488 0.477482 -0.811618 -0.680145 0.6449 0.835935 -0.446786 -0.940223 0.231743 0.992523 -0.0129302 -0.995551 -0.198263 0.954544 0.392747 -0.876387 -0.564003 0.768766 0.70778 -0.639661 -0.822009 0.496663 0.906545 -0.346641 -0.96262 0.195502 0.992648 -0.0480785 -0.999737 -0.0917794 0.987437 0.221398 -0.959487 -0.339062 0.919488 0.44388 -0.870966 -0.535534 0.81709 0.61445 -0.76057 -0.681235 0.703866 0.736781 -0.648985 -0.78238 0.597664 0.819047 -0.551122 -0.847951 0.510481 0.870234 -0.476518 -0.886726 0.449915 0.898281 -0.430964 -0.905448 0.419925 0.908681 -0.41705 -0.908116 0.422487 0.903667 -0.435946 -0.895127 0.457468 0.882025 -0.486744 -0.863624 0.523306 0.838981 -0.566496 -0.807186 0.615426 0.766936 -0.669014 -0.716979 0.725743 0.656153 -0.783639 -0.583117 0.840545 0.496997 -0.893678 -0.397058 0.939764 0.283158 -0.97524 -0.155823 0.996154 0.0165585 -0.998373 0.132473 0.977772 -0.287684 -0.930573 0.444194 0.853544 -0.5958 -0.744644 0.73507 0.603379 -0.853571 -0.431196 0.942354 0.232125 -0.992212 -0.0130608 0.994884 -0.216184 -0.943775 0.442616 0.835134 -0.650991 -0.66919 0.824337 0.451187 -0.945438 -0.192104 0.998639 -0.0913658 -0.971931 0.376426 0.859277 -0.636837 -0.662685 0.844082 0.394067 -0.970957 -0.0756261 0.995712 -0.260504 -0.906021 0.575257 0.702858 -0.826185 -0.403207 0.973899 0.0403645 -0.988671 0.337516 0.857478 -0.673594 -0.589498 0.910338 0.218614 -0.999935 0.198694 0.915511 -0.58961 -0.660119 0.877921 0.271473 -0.998849 0.180511 0.915644 -0.603842 -0.632809 0.90248 0.201358 -0.999107 0.286012 0.857549 -0.712634 -0.498555 0.96542 0.00287943 -0.966248 0.502658 0.699946 -0.875679 -0.227884 0.998903 -0.3205 -0.820652 0.778904 0.380671 -0.994956 0.191069 0.883429 -0.707367 -0.46554 0.983705 -0.125055 -0.907145 0.678615 0.488688 -0.981325 0.125808 0.901083 -0.698811 -0.452152 0.990426 -0.193544 -0.862322 0.76422 0.351721 -0.999887 0.325941 0.776322 -0.859622 -0.17981 0.984312 -0.512705 -0.620055 0.954675 -0.0669863 -0.90513 0.727035 0.370096 -0.999999 0.375272 0.717266 -0.916741 -0.0192215 0.930393 -0.698127 -0.38734 0.999986 -0.399732 -0.68228 0.943004 -0.0752332 -0.881132 0.791242 0.232705 -0.981806 0.580943 0.496242 -0.996416 0.34554 0.701621 -0.944598 0.11139 0.846871 -0.848228 -0.103143 0.93784 -0.727821 -0.287896 0.984809 -0.600313 -0.439002 0.999782 -0.478666 -0.556638 0.994366 -0.371839 -0.643981 0.978725 -0.285429 -0.704923 0.960957 -0.222768 -0.743444 0.946941 -0.185624 -0.762467 0.940365 -0.174955 -0.763639 0.942797 -0.190934 -0.747071 0.95368 -0.233415 -0.711067 0.970435 -0.301635 -0.652623 0.988067 -0.393735 -0.567611 0.999276 -0.506125 -0.451505 0.994347 -0.632106 -0.300857 0.961464 -0.761537 -0.114526 0.887636 -0.879614 0.103803 0.760538 -0.966856 0.343681 0.571043 -0.999972 0.585808 0.317729 -0.954914 0.801238 0.0103274 -0.811646 0.952521 -0.325219 -0.56113 0.998694 -0.645271 -0.214416 0.904579 -0.891298 0.191187 0.653563 -0.999082 0.588957 0.262026 -0.915535 0.889484 -0.209529 -0.621753 0.999776 -0.656735 -0.155073 0.854564 -0.94939 0.379145 0.453109 -0.970205 0.820901 -0.113507 -0.668497 0.999992 -0.664943 -0.10842 0.808304 -0.980081 0.51827 0.274237 -0.889954 0.941925 -0.403722 -0.383641 0.931907 -0.908363 0.333531 0.44022 -0.948452 0.893061 -0.312995 -0.447525 0.946727 -0.901478 0.343803 0.405663 -0.925773 0.930788 -0.424264 -0.311572 0.876502 -0.969916 0.548144 0.160363 -0.782683 0.998045 -0.701454 0.0500068 0.624087 -0.984485 0.857375 -0.31139 -0.383348 0.89113 -0.973202 0.596645 0.0565692 -0.680977 0.991202 -0.851125 0.329949 0.335338 -0.850408 0.993138 -0.707434 0.121507 0.51313 -0.93051 0.961486 -0.599268 -0.00364501 0.602266 -0.95954 0.939395 -0.555456 -0.0392438 0.616176 -0.959393 0.945566 -0.585657 0.0155907 0.557063 -0.929753 0.975446 -0.684042 0.1608 0.413912 -0.847475 0.999775 -0.826332 0.388576 0.169781 -0.671802 0.963292 -0.959155 0.666182 -0.177001 -0.361071 0.791408 -0.993086 0.913664 -0.580829 0.0909432 0.420344 -0.816346 0.995173 -0.914967 0.601734 -0.139123 -0.354833 0.758665 -0.976995 0.962175 -0.722785 0.318889 0.154187 -0.589453 0.892192 -1 0.894607 -0.603079 0.189785 0.258473 -0.651864 0.914687 -0.999694 0.895339 -0.625752 0.244404 0.177435 -0.564341 0.85059 -0.990199 0.963927 -0.78068 0.474176 -0.0960618 -0.293207 0.634579 -0.878847 0.993348 -0.965741 0.804164 -0.534809 0.196906 0.162998 -0.498399 0.7681 -0.941089 1 -0.941747 0.777012 -0.527733 0.224183 0.0995271 -0.409094 0.673697 -0.868869 0.978379 -0.995291 0.921608 -0.767525 0.549399 -0.288434 0.00756567 0.270037 -0.52282 0.733088 -0.887272 0.977002 -0.998971 0.954904 -0.850741 0.69576 -0.501935 0.282444 -0.0510985 -0.1791 0.395848 -0.588951 0.750129 -0.873626 0.955891 -0.995753 0.994016 -0.953257 0.877493 -0.771869 0.642085 -0.493892 0.333999 -0.167638 0.000961432 0.161888 -0.316019 0.458717 -0.586663 0.698403 -0.792563 0.868757 -0.926775 0.967431 -0.991377 0.999939 -0.994529 0.976717 -0.948166 0.910562 -0.865557 0.814596 -0.759433 0.701144 -0.641493 0.580866 -0.520793 0.461922 -0.404963 0.350504 -0.299261 0.25116 -0.20697 0.166448 -0.130485 0.0984809 -0.0712456 0.0481029 -0.0295714 0.0151798 -0.00566775 0.000549731 -7.03592e-05; #X coords 0 1 3999 -1 200 50 1; #X restore 326 228 graph; #X text 43 34 [mtx_logsweep]; #X obj 33 306 s view_sweep; #X obj 33 165 mtx_logsweep; #X msg 33 143 0.01 3.14159 4000; #X text 166 69 creates an n sample logarithmic sweep starting and stopping specified (digital) frequencies - note that "0" does _not_ work \, since log(0)=-inf.; #X text 268 138 list inlet: [omega_start omega_stop n_samples(; #X text 268 157 outletA: vector containing sweep; #X connect 1 0 4 0; #X connect 5 0 1 0; #X connect 6 0 5 0; pd-iemmatrix-0.3/abs/mtx_logsweep.pd000066400000000000000000000031731262113134600175660ustar00rootroot00000000000000#N canvas 724 186 552 611 10; #X obj 94 57 inlet; #X obj 143 57 inlet; #X obj 190 57 inlet; #X obj 231 56 loadbang; #X obj 94 228 mtx_cumsum; #X text 187 209 instantaneous frequency; #X text 188 229 time dependent phase-angle argument; #X text 191 316 sweeped cos-oscillation; #N canvas 0 0 661 488 smooth_switches 0; #X obj 165 30 inlet; #X obj 165 368 outlet; #X obj 248 275 mtx_linspace; #X obj 248 254 pack f f f; #X obj 317 101 mtx_size; #X obj 283 123 t f f; #X obj 283 175 mtx; #X obj 235 174 mtx; #X obj 272 79 t b a a a; #X obj 165 50 t a a; #X obj 165 301 mtx_-; #X msg 283 150 element 1 \$1; #X msg 235 101 element 1 1; #X obj 283 213 expr -int($f1/3.14159265)*3.14159265+$f1; #X text 397 192 modulo pi; #X connect 0 0 9 0; #X connect 2 0 10 1; #X connect 3 0 2 0; #X connect 4 1 5 0; #X connect 5 0 11 0; #X connect 5 1 3 2; #X connect 6 0 13 0; #X connect 7 0 3 0; #X connect 8 0 12 0; #X connect 8 1 4 0; #X connect 8 2 7 1; #X connect 8 3 6 1; #X connect 9 0 10 0; #X connect 9 1 8 0; #X connect 10 0 1 0; #X connect 11 0 6 0; #X connect 12 0 7 0; #X connect 13 0 3 1; #X restore 94 284 pd smooth_switches (on and off zero-phase); #X text 189 261 force zero-crossing at start and end; #X obj 94 441 outlet; #X text 103 422 sweep vector; #X text 185 396 forming matrix with blocksize columns for playback ; #X text 102 38 wstart; #X text 147 36 wstop; #X text 195 35 len; #X obj 94 117 pack \$1 \$2 \$3; #X obj 94 315 mtx_sin; #X obj 94 208 mtx_logspace; #X connect 0 0 16 0; #X connect 1 0 16 1; #X connect 2 0 16 2; #X connect 3 0 16 0; #X connect 4 0 8 0; #X connect 8 0 17 0; #X connect 16 0 18 0; #X connect 17 0 10 0; #X connect 18 0 4 0; pd-iemmatrix-0.3/abs/mtx_matcher-help.pd000066400000000000000000000023641262113134600203130ustar00rootroot00000000000000#N canvas 272 187 518 410 10; #X obj 192 220 mtx_matcher; #X obj 264 133 loadbang; #X msg 174 136 bang; #X obj 192 277 mtx_print matched; #X obj 264 251 mtx_print permutator; #X obj 141 298 mtx_-; #X obj 141 320 mtx_.^ 2; #X floatatom 141 383 0 0 0 0 error_unmatched - -; #X obj 174 180 t a a; #X obj 264 181 t a a a; #X obj 270 302 mtx_-; #X obj 270 324 mtx_.^ 2; #X floatatom 270 387 0 0 0 1 error_matched - -; #X obj 192 253 t a a; #X obj 141 343 mtx_sum; #X obj 141 363 mtx_sum; #X obj 270 347 mtx_sum; #X obj 270 367 mtx_sum; #X msg 87 134 bang; #X obj 87 155 mtx_rand 5; #X obj 174 157 mtx_eye 5; #X obj 264 157 mtx_egg 5; #X text 68 9 mtx_matcher:: match 2 sets of vectors; #X text 22 45 mtx_matcher tries to match 2 sets of vectors. The vector-sets are expressed as matrices; #X connect 0 0 13 0; #X connect 0 1 4 0; #X connect 1 0 21 0; #X connect 2 0 20 0; #X connect 5 0 6 0; #X connect 6 0 14 0; #X connect 8 0 0 0; #X connect 8 1 5 0; #X connect 9 0 0 1; #X connect 9 1 5 1; #X connect 9 2 10 1; #X connect 10 0 11 0; #X connect 11 0 16 0; #X connect 13 0 3 0; #X connect 13 1 10 0; #X connect 14 0 15 0; #X connect 15 0 7 0; #X connect 16 0 17 0; #X connect 17 0 12 0; #X connect 18 0 19 0; #X connect 19 0 8 0; #X connect 20 0 8 0; #X connect 21 0 9 0; pd-iemmatrix-0.3/abs/mtx_matcher.pd000066400000000000000000000035211262113134600173610ustar00rootroot00000000000000#N canvas 411 75 676 452 10; #X obj 61 190 mtx_distance2; #X obj 61 166 t a a; #X obj 61 234 t a a; #X obj 61 269 mtx_*; #X obj 61 315 outlet matched; #X obj 171 315 outlet matcher; #X obj 147 167 inlet dest; #X obj 61 139 inlet source; #X text 235 131 both "source" and "dest" must have the same number of columns (dimension in feature-space); #N canvas 0 0 618 479 mtx_rowpermutate 0; #X obj 150 214 t b a; #X obj 150 235 mtx; #X obj 150 256 mtx_*; #X obj 111 192 mtx_pivot -1; #X text 17 19 this unfortunately does not guarantee to give as a minimum trace of the result!; #X obj 150 309 outlet rowpermutator; #X obj 111 141 inlet permutans; #X connect 0 0 1 0; #X connect 0 1 2 1; #X connect 1 0 2 0; #X connect 2 0 5 0; #X connect 3 1 0 0; #X connect 3 2 1 1; #X connect 6 0 3 0; #X restore 61 211 pd mtx_rowpermutate; #X text 220 224 this algorithm is _far_ from being perfect! the [mtx_rowpermutate] does not really guarantee that the trace of the result is a global mimimum \; if it is not \, than the match will be sub-optimal! this will be even worse \, if there are several _equal_ (sub)minima in the distance-matrix.; #X text 158 184 greater distances have an extra penalty (^2) \; is this ok?; #X text 120 346 (c) 2005 by IOhannes m zmoelnig \, IEM KUG \, graz austria; #X text 120 363 for license-details see LICENSE.txt that must come with iemmatrix.; #X text 57 12 mtx_matcher:: match 2 sets of vectors; #X text 46 42 2 vectors are matching if their euclidean distance is a minimum. each "source" vector is assigned to a "dest" vector in order to get a maximum matching. the output is a permutation "matched" of the "source" vector-field \, and a permutation matrix "matcher".; #X connect 0 0 9 0; #X connect 1 0 0 0; #X connect 1 1 3 1; #X connect 2 0 3 0; #X connect 2 1 5 0; #X connect 3 0 4 0; #X connect 6 0 0 1; #X connect 7 0 1 0; #X connect 9 0 2 0; pd-iemmatrix-0.3/abs/mtx_max.pd000066400000000000000000000003011262113134600165140ustar00rootroot00000000000000#N canvas 0 0 450 300 10; #X obj 164 115 inlet; #X obj 164 169 mtx_minmax \$1; #X obj 250 233 outlet; #X text 122 82 get the maxim[um \, a] of a matrix; #X connect 0 0 1 0; #X connect 1 1 2 0; pd-iemmatrix-0.3/abs/mtx_meshgrid-help.pd000066400000000000000000000012441262113134600204660ustar00rootroot00000000000000#N canvas 439 163 841 379 10; #X text 482 28 part of iemmatrix; #X obj 65 227 mtx_print x; #X obj 150 227 mtx_print y; #X obj 28 207 t a a; #X msg 28 186 matrix 1 3 -1 -2 -3; #X msg 150 207 matrix 1 3 0.1 0.2 0.3; #X obj 28 287 mtx_print X; #X obj 112 287 mtx_print Y; #X obj 28 260 mtx_meshgrid; #X text 43 34 [mtx_meshgrid]; #X text 166 69 creates an [X \, Y] grid on the ticks given by the x and y vector; #X text 268 138 inlet1 \, 2: row vectors x \, y; #X text 268 157 outlet: matrices X \, Y containing all (x \, y) value-pairs ; #X connect 3 0 8 0; #X connect 3 1 1 0; #X connect 4 0 3 0; #X connect 5 0 2 0; #X connect 5 0 8 1; #X connect 8 0 6 0; #X connect 8 1 7 0; pd-iemmatrix-0.3/abs/mtx_meshgrid.pd000066400000000000000000000013561262113134600175440ustar00rootroot00000000000000#N canvas 0 0 450 300 10; #X obj 80 229 mtx_repmat; #X obj 181 232 mtx_repmat; #X msg 248 212 1 \$1; #X msg 147 209 \$1 1; #X obj 128 120 mtx_size; #X obj 206 121 mtx_size; #X obj 181 168 mtx; #X obj 96 98 t a a; #X obj 181 147 t b f; #X obj 80 259 outlet X; #X obj 181 258 outlet Y; #X obj 199 69 mtx_:; #X obj 96 69 mtx_:; #X obj 96 42 inlet x; #X obj 199 42 inlet y; #X obj 181 188 mtx_transpose; #X connect 0 0 9 0; #X connect 1 0 10 0; #X connect 2 0 1 1; #X connect 3 0 0 1; #X connect 4 1 8 0; #X connect 5 1 3 0; #X connect 6 0 15 0; #X connect 7 0 0 0; #X connect 7 1 4 0; #X connect 8 0 6 0; #X connect 8 1 2 0; #X connect 11 0 5 0; #X connect 11 0 6 1; #X connect 12 0 7 0; #X connect 13 0 12 0; #X connect 14 0 11 0; #X connect 15 0 1 0; pd-iemmatrix-0.3/abs/mtx_min.pd000066400000000000000000000003011262113134600165120ustar00rootroot00000000000000#N canvas 0 0 450 300 10; #X obj 164 115 inlet; #X obj 164 169 mtx_minmax \$1; #X obj 164 233 outlet; #X text 122 82 get the minim[um \, a] of a matrix; #X connect 0 0 1 0; #X connect 1 0 2 0; pd-iemmatrix-0.3/abs/mtx_mod.pd000066400000000000000000000006421262113134600165160ustar00rootroot00000000000000#N canvas 0 0 450 300 10; #X obj 162 18 inlet; #X obj 162 217 outlet; #X obj 240 18 inlet; #X obj 162 69 mtx_./ \$1; #X obj 162 93 t a a; #X obj 200 115 mtx_int; #X obj 162 141 mtx_-; #X obj 162 164 mtx_* \$1; #X text 48 9 matrix modulo; #X connect 0 0 3 0; #X connect 2 0 3 1; #X connect 2 0 7 1; #X connect 3 0 4 0; #X connect 4 0 6 0; #X connect 4 1 5 0; #X connect 5 0 6 1; #X connect 6 0 7 0; #X connect 7 0 1 0; pd-iemmatrix-0.3/abs/mtx_phon_curve-help.pd000066400000000000000000000035031262113134600210340ustar00rootroot00000000000000#N canvas 263 0 849 390 10; #N canvas 0 0 450 300 (subpatch) 0; #X array phon_curve 31 float 1; #A 0 91.9955 79.14 68.4519 59.5683 52.1864 46.0531 40.9579 36.7252 33.2091 30.2881 27.861 25.8434 24.1648 22.7658 21.5949 20.6057 19.7503 18.9676 18.1564 17.1207 15.5152 13.0798 10.9486 12.4363 16.429 18.3084 20.63 26.6031 41.7807 80.0491 176.294; #X coords 0 120 30 0 200 140 1; #X restore 36 187 graph; #N canvas 0 0 450 300 mtx2tablemsg 0; #X obj 155 57 inlet; #X obj 220 253 outlet; #X obj 157 79 list split 3; #X obj 198 98 t l l; #X obj 232 141 change; #X msg 235 164 resize \$1; #X obj 198 218 list prepend 0; #X obj 230 119 list length; #X connect 0 0 2 0; #X connect 2 1 3 0; #X connect 3 0 6 0; #X connect 3 1 7 0; #X connect 4 0 5 0; #X connect 5 0 1 0; #X connect 6 0 1 0; #X connect 7 0 4 0; #X restore 247 230 pd mtx2tablemsg; #X obj 365 208 loadbang; #X obj 247 125 mtx_logspace; #X text 30 331 20; #X text 70 331 80; #X text 105 331 340; #X msg 247 103 20 20000 31; #X text 144 331 1360; #X text 186 331 5440; #X text 226 331 21760; #X msg 365 228 bounds 0 120 30 0 \, xticks 0 1 3 \, yticks 0 20 1 \, ylabel 0 0 20 40 60 80 100 120; #X floatatom 246 48 5 0 0 0 - - -; #X obj 247 66 t b f f; #X text 290 47 dial Phon-curve; #X obj 247 275 s phon_curve; #X text 482 26 part of iemmatrix; #X text 469 113 inletA: row/col frequency vector; #X text 469 131 inletB: phon value; #X text 391 263 note: the "0" phon curve corresponds to the absolute threshold of hearing; #X text 44 32 [mtx_phon_curve]; #X text 480 345 Franz Zotter \, 2007; #X obj 247 145 mtx_phon_curve 0; #X text 470 155 outletA: row/col vector with phone curve at specified frequencies in dB; #X connect 1 0 15 0; #X connect 2 0 11 0; #X connect 3 0 22 0; #X connect 7 0 3 0; #X connect 11 0 15 0; #X connect 12 0 13 0; #X connect 13 0 7 0; #X connect 13 1 22 1; #X connect 22 0 1 0; pd-iemmatrix-0.3/abs/mtx_phon_curve.pd000066400000000000000000000037611262113134600201140ustar00rootroot00000000000000#N canvas 537 0 743 796 10; #X obj 78 35 inlet; #X obj 422 345 mtx_exp; #X obj 422 281 mtx_- 3.3; #X obj 53 553 mtx_+; #X obj 53 646 outlet; #X obj 296 284 mtx_.^ -0.8; #X obj 504 281 mtx_.^ 4; #X obj 296 390 mtx_* 3.64; #X obj 422 301 mtx_.^ 2; #X obj 422 321 mtx_* -0.6; #X obj 422 375 mtx_* -6.5; #X obj 422 402 mtx_+; #X text 94 53 freq; #X obj 78 104 mtx_* 0.001; #X obj 504 311 mtx_* 0.001; #X obj 79 133 t a a a a; #X obj 53 518 mtx_+; #X obj 53 448 mtx_* 0; #X obj 108 447 mtx_* 1; #X obj 155 355 / 100; #X obj 182 37 inlet; #X text 189 59 phon; #X obj 152 410 expr 1-$f1; #X obj 53 290 mtx_.^ -0.9; #X obj 53 388 mtx_* 1.183; #X obj 232 63 loadbang; #X obj 182 90 \$1; #X obj 78 76 mtx_max2 0.1; #X text 344 135 3.64*f^(-.8) - 6.5* exp(-.6*(f-3.3)^2)+10^(-3)*f^4 ; #X text 343 101 0 phon curve; #X text 343 118 absolute threshold of hearing; #X text 153 321 fade between; #X text 558 252 high freq. skirt; #X text 404 253 ear channel dip; #X text 277 250 low freq. skirt; #X text 307 266 0 phon; #X text 32 249 low freq. skirt; #X text 62 265 100 phon; #X text 362 567 Franz Zoter \, 2007; #X obj 53 584 mtx_+ 0; #X obj 155 376 t f f; #X text 321 85 3 rightmost paths:; #X text 321 169 1 leftmost path: lower skirt of 100 phon curve; #X text 246 30 calculates the contours of equal loudness for an arbitrary frequency vector/matrix in dB; #X connect 0 0 27 0; #X connect 1 0 10 0; #X connect 2 0 8 0; #X connect 3 0 39 0; #X connect 5 0 7 0; #X connect 6 0 14 0; #X connect 7 0 18 0; #X connect 8 0 9 0; #X connect 9 0 1 0; #X connect 10 0 11 0; #X connect 11 0 3 1; #X connect 13 0 15 0; #X connect 14 0 11 1; #X connect 15 0 23 0; #X connect 15 1 5 0; #X connect 15 2 2 0; #X connect 15 3 6 0; #X connect 16 0 3 0; #X connect 17 0 16 0; #X connect 18 0 16 1; #X connect 19 0 40 0; #X connect 20 0 26 0; #X connect 22 0 18 1; #X connect 23 0 24 0; #X connect 24 0 17 0; #X connect 25 0 26 0; #X connect 26 0 19 0; #X connect 26 0 39 1; #X connect 27 0 13 0; #X connect 39 0 4 0; #X connect 40 0 17 1; #X connect 40 1 22 0; pd-iemmatrix-0.3/abs/mtx_pinverse-help.pd000066400000000000000000000031431262113134600205170ustar00rootroot00000000000000#N canvas 366 49 705 646 10; #X text 347 472 updated for; #X obj 435 472 iemmatrix 0.2; #X obj 484 498 matrix; #X text 354 497 see also help for; #X text 243 142 singular; #X text 245 107 regular; #X text 246 158 regular; #X text 247 168 but badly conditioned; #X text 154 533 A*inv(A)=inv(A)*A=I; #X text 248 221 pseudoinverse: P1=inv(A'*A)*A'; #X text 247 269 pseudoinverse: P2=A'*inv(A*A'); #X text 245 553 P1*A=I; #X text 245 573 A*P2=I; #X obj 92 199 mtx 3; #X msg 112 164 1 2 3 2 4 4 3 4 5; #X msg 92 108 1 2 4 2 3 4 3 4 5; #X obj 92 472 mtx_print inverse; #X obj 92 300 t a a; #X obj 134 300 mtx_print original; #X obj 153 219 mtx_rand 4 3; #X msg 153 198 bang; #X msg 153 248 bang; #X obj 153 269 mtx_rand 3 4; #X obj 182 348 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X text 199 359 instability detected!; #X obj 92 348 mtx_pinverse; #X text 45 16 mtx_pinverse:: get the inverse of a matrix (with pivoting) ; #X text 44 49 mtx_pinverse calculates the inverse of a square-matrix. For inverting rectangle matrices \, use [mtx_inverse] or [mtx_pseudoinverse] ; #X msg 103 140 1 2 3 2 3 4 0 0 0; #X text 194 385 due to pivoting \, [mtx_pinverse] will handle badly conditioned matrices better than [mtx_inverse] \, however it will also detect less (real) instabilities than [mtx_inverse]; #X obj 485 524 mtx_inverse; #X obj 485 548 mtx_pseudoinverse; #X connect 13 0 17 0; #X connect 14 0 13 0; #X connect 15 0 13 0; #X connect 17 0 25 0; #X connect 17 1 18 0; #X connect 19 0 17 0; #X connect 20 0 19 0; #X connect 21 0 22 0; #X connect 22 0 17 0; #X connect 25 0 16 0; #X connect 25 1 23 0; #X connect 28 0 13 0; pd-iemmatrix-0.3/abs/mtx_pinverse.pd000066400000000000000000000015201262113134600175660ustar00rootroot00000000000000#N canvas 0 0 630 350 10; #X obj 44 102 inlet; #X obj 44 132 mtx_pivot; #X obj 44 154 mtx_inverse; #X obj 74 200 mtx_*; #X obj 44 221 mtx_*; #X obj 44 198 mtx; #X obj 44 176 t b a; #X obj 44 264 outlet; #X obj 116 264 outlet; #X text 109 22 matrix inversion with pivoting; #X text 107 56 pivoting makes the inversion of badly conditioned matrices more stable.; #X text 158 105 it also stabilizes the inversion of singular matrices (not so good) and is more expensive; #X text 188 202 for license-details see LICENSE.txt that must come with iemmatrix.; #X text 188 181 (c) 2006 by IOhannes m zmoelnig \, IEM KUG \, graz austria; #X connect 0 0 1 0; #X connect 1 0 2 0; #X connect 1 1 3 1; #X connect 1 2 5 1; #X connect 2 0 6 0; #X connect 2 1 8 0; #X connect 3 0 4 1; #X connect 4 0 7 0; #X connect 5 0 4 0; #X connect 6 0 5 0; #X connect 6 1 3 0; pd-iemmatrix-0.3/abs/mtx_polyval-help.pd000066400000000000000000000006751262113134600203610ustar00rootroot00000000000000#N canvas 0 0 514 300 10; #X obj 47 142 mtx_polyval; #X msg 122 100 matrix 1 5 1 -2 3 2 1; #X msg 43 73 matrix 1 3 0 1 2; #X obj 47 174 mtx_print; #X text 185 152 evaluate polynomial; #X text 181 178 1*x^4 -2*x^3 +3*x^2 +2*x^1 +1*x^0; #X text 45 13 [mtx_polyval] evaluates polynomial with given coefficients ; #X text 94 33 at given values for x; #X text 252 241 Franz Zotter \, 2010; #X connect 0 0 3 0; #X connect 1 0 0 1; #X connect 2 0 0 0; pd-iemmatrix-0.3/abs/mtx_polyval.pd000066400000000000000000000030121262113134600174170ustar00rootroot00000000000000#N canvas 0 326 645 532 10; #X obj 50 32 inlet; #X obj 310 34 inlet; #X text 354 32 coeffs; #X text 94 32 values; #X obj 50 60 mtx_:; #X obj 310 56 t a a; #X obj 342 78 mtx_size; #X obj 82 160 mtx_repmat 1 1; #X obj 82 135 spigot; #X obj 121 113 > 1; #X obj 50 115 t a a; #X obj 177 117 - 1; #X obj 50 184 mtx_size; #X obj 50 227 mtx_ones; #X obj 106 261 spigot; #X obj 50 261 spigot; #X obj 116 226 == 1; #X obj 50 389 mtx_*; #X msg 50 205 \$1 1; #X msg 177 137 1 \$1; #X obj 50 87 mtx_transpose; #X obj 106 280 mtx_concat row; #X obj 310 156 mtx_transpose; #X obj 50 427 outlet; #X text 181 319 powers of x:; #X text 192 335 [x1^0 x1^1 x1^2 ...; #X text 197 350 x2^0 x2^1 x2^2 ...; #X text 199 365 x3^0 x3^1 x3^2 ...; #X text 320 198 coefficients of polynomials; #X text 315 240 a1 b1 c1 d1 ...; #X text 309 223 [a0 b0 c0 d0 ...; #X text 315 255 a2 b3 c3 d3 ...; #X obj 50 319 mtx_cumprod row; #X obj 310 128 mtx_reverse col; #X connect 0 0 4 0; #X connect 1 0 5 0; #X connect 4 0 20 0; #X connect 5 0 33 0; #X connect 5 1 6 0; #X connect 6 1 9 0; #X connect 6 1 11 0; #X connect 6 1 16 0; #X connect 7 0 21 1; #X connect 8 0 7 0; #X connect 9 0 8 1; #X connect 9 0 14 1; #X connect 10 0 12 0; #X connect 10 1 8 0; #X connect 11 0 19 0; #X connect 12 0 18 0; #X connect 13 0 14 0; #X connect 13 0 15 0; #X connect 14 0 21 0; #X connect 15 0 32 0; #X connect 16 0 15 1; #X connect 17 0 23 0; #X connect 18 0 13 0; #X connect 19 0 7 1; #X connect 20 0 10 0; #X connect 21 0 32 0; #X connect 22 0 17 1; #X connect 32 0 17 0; #X connect 33 0 22 0; pd-iemmatrix-0.3/abs/mtx_pseudoinverse.pd000066400000000000000000000060461262113134600206360ustar00rootroot00000000000000#N canvas 727 0 495 641 10; #X obj 66 34 inlet; #X obj 66 73 mtx_svd; #X obj 342 47 inlet; #X obj 255 339 mtx_slice; #X obj 66 337 mtx_slice; #X obj 66 317 mtx; #X obj 255 361 mtx_transpose; #X obj 155 337 mtx_slice; #X obj 155 358 mtx_.^ -1; #X obj 172 427 mtx_diag; #X obj 155 380 list split 3; #X obj 172 455 mtx_*; #X obj 128 495 mtx_*; #X obj 171 403 list; #X obj 66 240 t b b a; #X obj 128 555 outlet; #X text 386 48 regularization; #N canvas 0 0 595 552 regularize 0; #X obj 159 56 inlet; #X obj 202 173 mtx_minmax; #X obj 266 196 * \$1; #X obj 159 244 mtx_> 0; #X obj 159 265 mtx_transpose; #X obj 160 286 mtx_sum; #X msg 160 307 1 1 end \$1; #X obj 289 56 inlet; #X obj 160 357 outlet; #X obj 159 152 t a a; #X obj 337 238 pack; #X msg 336 260 \$2 \$1; #X obj 336 360 outlet; #X obj 336 327 /; #X connect 0 0 9 0; #X connect 1 0 10 0; #X connect 1 1 2 0; #X connect 1 1 10 1; #X connect 2 0 3 1; #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 7 0 2 1; #X connect 9 0 3 0; #X connect 9 1 1 0; #X connect 10 0 11 0; #X connect 11 0 13 0; #X connect 13 0 12 0; #X restore 256 266 pd regularize; #X obj 226 219 t a a; #N canvas 0 0 450 300 list2mtx 0; #X obj 140 28 inlet; #X obj 140 229 outlet; #X obj 140 128 mtx; #X obj 140 106 t l l; #X obj 182 106 length; #X msg 233 105 size 1 \$1; #X connect 0 0 3 0; #X connect 2 0 1 0; #X connect 3 0 2 0; #X connect 3 1 4 0; #X connect 4 0 5 0; #X connect 5 0 2 0; #X restore 226 196 pd list2mtx; #N canvas 0 0 450 300 autotranspose 0; #X obj 31 16 inlet; #X obj 31 274 outlet; #X obj 317 269 outlet; #X obj 31 39 t a a; #X obj 186 82 mtx_size; #X obj 148 216 mtx_transpose; #X obj 31 191 spigot; #X obj 72 172 == 0; #X obj 149 196 spigot; #X obj 186 110 <; #X connect 0 0 3 0; #X connect 3 0 6 0; #X connect 3 0 8 0; #X connect 3 1 4 0; #X connect 4 0 9 0; #X connect 4 1 9 1; #X connect 5 0 1 0; #X connect 6 0 1 0; #X connect 7 0 6 1; #X connect 8 0 5 0; #X connect 9 0 2 0; #X connect 9 0 7 0; #X connect 9 0 8 1; #X restore 66 54 pd autotranspose; #N canvas 0 0 450 300 autotranspose 0; #X obj 31 274 outlet; #X obj 148 216 mtx_transpose; #X obj 31 191 spigot; #X obj 72 172 == 0; #X obj 149 196 spigot; #X obj 186 39 inlet; #X obj 31 39 inlet; #X connect 1 0 0 0; #X connect 2 0 0 0; #X connect 3 0 2 1; #X connect 4 0 1 0; #X connect 5 0 3 0; #X connect 5 0 4 1; #X connect 6 0 2 0; #X connect 6 0 4 0; #X restore 128 530 pd autotranspose; #X obj 342 562 outlet; #X text 355 519 condition number; #X connect 0 0 20 0; #X connect 1 0 14 0; #X connect 1 1 19 0; #X connect 1 2 5 1; #X connect 2 0 17 1; #X connect 3 0 6 0; #X connect 4 0 12 0; #X connect 5 0 4 0; #X connect 6 0 11 1; #X connect 7 0 8 0; #X connect 8 0 10 0; #X connect 9 0 11 0; #X connect 10 1 13 1; #X connect 11 0 12 1; #X connect 12 0 21 0; #X connect 13 0 9 0; #X connect 14 0 5 0; #X connect 14 1 13 0; #X connect 14 2 3 0; #X connect 17 0 3 1; #X connect 17 0 7 1; #X connect 17 0 4 1; #X connect 17 1 22 0; #X connect 18 0 7 0; #X connect 18 1 17 0; #X connect 19 0 18 0; #X connect 20 0 1 0; #X connect 20 1 21 1; #X connect 21 0 15 0; pd-iemmatrix-0.3/abs/mtx_randperm-help.pd000066400000000000000000000003651262113134600204770ustar00rootroot00000000000000#N canvas 773 206 450 300 10; #X obj 54 114 mtx_randperm; #X msg 54 79 4; #X text 82 36 random permutation matrix; #X text 230 221 Franz Zotter \, 2012; #X text 232 241 iemmatrix; #X obj 54 182 mtx_print; #X connect 0 0 5 0; #X connect 1 0 0 0; pd-iemmatrix-0.3/abs/mtx_randperm.pd000066400000000000000000000035261262113134600175530ustar00rootroot00000000000000#N canvas 151 48 558 777 10; #X obj 45 32 inlet; #X obj 45 53 t b f f; #X obj 68 81 *; #X obj 260 189 random; #X obj 311 189 random; #X obj 68 101 until; #X obj 68 121 t b b; #X obj 311 211 + 1; #X obj 260 211 + 1; #X obj 272 467 mtx; #X obj 260 234 pack; #X obj 260 256 mtx 1 2; #X obj 260 279 t a a; #X obj 260 306 mtx_reverse; #X obj 260 329 list split 3; #X obj 323 361 list split 3; #X obj 363 384 unpack; #X obj 260 353 unpack; #X obj 272 490 demux 0 1 2; #X obj 402 407 t f b; #X msg 447 407 2; #X obj 321 408 t f b; #X msg 366 408 1; #X obj 291 572 list trim; #X obj 256 382 t b f; #X msg 253 408 0; #X obj 299 381 t b f; #X obj 291 549 list prepend; #X obj 208 643 outlet; #X msg 111 99 \$1; #X obj 111 121 mtx_eye; #X msg 368 523 row \$1; #X msg 321 430 row \$1; #X obj 328 524 l; #X obj 291 524 l; #X connect 0 0 1 0; #X connect 1 0 9 0; #X connect 1 1 2 0; #X connect 1 2 29 0; #X connect 1 2 2 1; #X connect 1 2 3 1; #X connect 1 2 4 1; #X connect 2 0 5 0; #X connect 3 0 8 0; #X connect 4 0 7 0; #X connect 5 0 6 0; #X connect 6 0 3 0; #X connect 6 1 4 0; #X connect 7 0 10 1; #X connect 8 0 10 0; #X connect 9 0 18 0; #X connect 10 0 11 0; #X connect 11 0 12 0; #X connect 12 0 13 0; #X connect 12 1 15 0; #X connect 13 0 14 0; #X connect 14 1 17 0; #X connect 15 1 16 0; #X connect 16 0 21 0; #X connect 16 1 19 0; #X connect 17 0 24 0; #X connect 17 1 26 0; #X connect 18 0 28 0; #X connect 18 1 34 1; #X connect 18 2 33 1; #X connect 19 0 32 0; #X connect 19 1 20 0; #X connect 20 0 18 1; #X connect 21 0 32 0; #X connect 21 1 22 0; #X connect 22 0 18 1; #X connect 23 0 9 0; #X connect 24 0 25 0; #X connect 24 0 34 0; #X connect 24 1 31 0; #X connect 25 0 18 1; #X connect 26 0 33 0; #X connect 26 1 31 0; #X connect 27 0 23 0; #X connect 29 0 30 0; #X connect 30 0 9 1; #X connect 31 0 27 1; #X connect 32 0 9 0; #X connect 33 0 27 0; #X connect 34 0 27 0; pd-iemmatrix-0.3/abs/mtx_roots-help.pd000066400000000000000000000007471262113134600200410ustar00rootroot00000000000000#N canvas 774 102 578 400 10; #X obj 100 212 mtx_roots; #X text 29 22 [mtx_roots] uses [mtx_eig] to solve polynomials (see MATLAB-help for 'roots'); #X text 73 60 [mtx_eig] requires iemmatrix to be compiled with gsl ; #X text 339 350 Franz Zotter \, 2010; #X text 60 127 (x-3i)(x+3i)(x-1)(x+2)(x-3)=; #X text 77 144 x^5-2x^4+4x^3-12x^2-45x+54; #X msg 100 185 1 -2 4 -12 -45 54; #X obj 82 268 print re; #X obj 160 267 print im; #X connect 0 0 7 0; #X connect 0 1 8 0; #X connect 6 0 0 0; pd-iemmatrix-0.3/abs/mtx_roots.pd000066400000000000000000000024141262113134600171040ustar00rootroot00000000000000#N canvas 0 0 586 346 10; #N canvas 296 357 512 426 companion_matrix 0; #X obj 28 236 mtx_eye; #X obj -109 219 mtx; #X obj 179 87 list length; #X obj 28 214 f; #X obj 115 192 f; #X obj 29 21 inlet; #X obj -67 351 outlet; #X obj 115 234 mtx_zeros; #X obj -109 262 mtx_* -1; #X obj 46 193 - 2; #X obj -110 178 - 1; #X obj 179 110 moses 3; #X obj -207 177 list split 1; #X msg -57 218 \$1; #X obj -109 240 mtx_./ 1; #X obj 28 46 t l b b l; #X obj -68 314 mtx_concat col; #X msg -109 198 size 1 \$1; #X msg 115 213 \$1 1; #X obj 28 281 mtx_concat row; #X connect 0 0 19 0; #X connect 1 0 14 0; #X connect 2 0 11 0; #X connect 3 0 0 0; #X connect 4 0 18 0; #X connect 5 0 15 0; #X connect 7 0 19 1; #X connect 8 0 16 0; #X connect 9 0 3 1; #X connect 9 0 4 1; #X connect 10 0 17 0; #X connect 11 1 10 0; #X connect 11 1 9 0; #X connect 12 1 1 0; #X connect 13 0 14 1; #X connect 14 0 8 0; #X connect 15 0 12 0; #X connect 15 1 3 0; #X connect 15 2 4 0; #X connect 15 3 2 0; #X connect 15 3 13 0; #X connect 16 0 6 0; #X connect 17 0 1 0; #X connect 18 0 7 0; #X connect 19 0 16 1; #X restore 100 135 pd companion_matrix; #X obj 100 47 inlet; #X obj 100 159 mtx_eig; #X obj 182 223 outlet im; #X obj 76 221 outlet re; #X connect 0 0 2 0; #X connect 1 0 0 0; #X connect 2 0 4 0; #X connect 2 1 3 0; pd-iemmatrix-0.3/abs/mtx_rot-help.pd000066400000000000000000000012311262113134600174640ustar00rootroot00000000000000#N canvas 541 188 450 300 10; #X obj 72 78 hsl 128 15 0 360 0 0 empty empty empty -2 -8 0 10 -262144 -1 -1 0 1; #X floatatom 69 98 5 0 0 0 - - -; #X obj 69 115 *; #X obj 225 105 atan; #X msg 225 85 1; #X obj 225 65 loadbang; #X obj 225 124 / 45; #X obj 69 136 mtx_rot; #X obj 69 173 mtx_print R; #X text 58 23 2 dimensional cartesian rotation matrix; #X msg 33 51 0; #X msg 64 51 90; #X msg 94 51 180; #X msg 126 51 270; #X connect 0 0 1 0; #X connect 1 0 2 0; #X connect 2 0 7 0; #X connect 3 0 6 0; #X connect 4 0 3 0; #X connect 5 0 4 0; #X connect 6 0 2 1; #X connect 7 0 8 0; #X connect 10 0 1 0; #X connect 11 0 1 0; #X connect 12 0 1 0; #X connect 13 0 1 0; pd-iemmatrix-0.3/abs/mtx_rot.pd000066400000000000000000000010521262113134600165370ustar00rootroot00000000000000#N canvas 570 39 450 393 10; #X obj 94 26 inlet; #X obj 94 237 outlet; #X obj 151 97 sin; #X obj 94 95 cos; #X obj 151 115 t f f; #X obj 151 135 * -1; #X obj 94 173 mtx_diag; #X obj 94 207 mtx_+; #X obj 151 154 pack f f; #X obj 94 54 t f f; #X obj 151 175 mtx_diegg; #X msg 94 153 \$1 \$1; #X connect 0 0 9 0; #X connect 2 0 4 0; #X connect 3 0 11 0; #X connect 4 0 5 0; #X connect 4 1 8 1; #X connect 5 0 8 0; #X connect 6 0 7 0; #X connect 7 0 1 0; #X connect 8 0 10 0; #X connect 9 0 3 0; #X connect 9 1 2 0; #X connect 10 0 7 1; #X connect 11 0 6 0; pd-iemmatrix-0.3/abs/mtx_rotx-help.pd000066400000000000000000000012641262113134600176620ustar00rootroot00000000000000#N canvas 0 0 450 300 10; #X obj 72 108 hsl 128 15 0 360 0 0 empty empty empty -2 -8 0 10 -262144 -1 -1 0 1; #X floatatom 69 128 5 0 0 0 - - -; #X obj 69 145 *; #X obj 225 135 atan; #X msg 225 115 1; #X obj 225 95 loadbang; #X obj 225 154 / 45; #X obj 69 203 mtx_print Rx; #X msg 12 66 0; #X msg 43 66 90; #X msg 73 66 180; #X msg 105 66 270; #X obj 69 165 mtx_rotx; #X text 58 23 3 dimensional cartesian rotation matrix \, rotating around x-axis; #X connect 0 0 1 0; #X connect 1 0 2 0; #X connect 2 0 12 0; #X connect 3 0 6 0; #X connect 4 0 3 0; #X connect 5 0 4 0; #X connect 6 0 2 1; #X connect 8 0 1 0; #X connect 9 0 1 0; #X connect 10 0 1 0; #X connect 11 0 1 0; #X connect 12 0 7 0; pd-iemmatrix-0.3/abs/mtx_rotx.pd000066400000000000000000000006761262113134600167420ustar00rootroot00000000000000#N canvas 570 39 450 393 10; #X obj 94 26 inlet; #X obj 94 187 outlet; #X obj 94 48 mtx_rot; #X obj 194 25 loadbang; #X obj 194 65 mtx_diag; #X obj 94 70 mtx_resize 3 3; #X obj 94 108 mtx_+; #X obj 94 133 mtx_roll 1; #X obj 94 154 mtx_scroll 1; #X msg 194 46 0 0 1; #X connect 0 0 2 0; #X connect 2 0 5 0; #X connect 3 0 9 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 7 0; #X connect 7 0 8 0; #X connect 8 0 1 0; #X connect 9 0 4 0; pd-iemmatrix-0.3/abs/mtx_rotxyz.pd000066400000000000000000000011541262113134600173150ustar00rootroot00000000000000#N canvas 98 59 450 317 10; #X obj 244 21 inlet beta_y; #X obj 327 21 inlet gamma_z; #X obj 72 278 outlet; #X obj 72 104 pack f f f; #X obj 107 231 mtx_*; #X obj 72 252 mtx_*; #X obj 72 125 unpack f f f; #X text 211 179 3x3 rotation matrix; #X obj 106 187 mtx_roty; #X obj 141 159 mtx_rotz; #X obj 72 208 mtx_rotx; #X obj 72 21 inlet alpha_z \; [alpha_x \, beta_y \, gamma_y(; #X connect 0 0 3 1; #X connect 1 0 3 2; #X connect 3 0 6 0; #X connect 4 0 5 1; #X connect 5 0 2 0; #X connect 6 0 10 0; #X connect 6 1 8 0; #X connect 6 2 9 0; #X connect 8 0 4 0; #X connect 9 0 4 1; #X connect 10 0 5 0; #X connect 11 0 3 0; pd-iemmatrix-0.3/abs/mtx_roty-help.pd000066400000000000000000000012641262113134600176630ustar00rootroot00000000000000#N canvas 0 0 450 300 10; #X obj 72 108 hsl 128 15 0 360 0 0 empty empty empty -2 -8 0 10 -262144 -1 -1 0 1; #X floatatom 69 128 5 0 0 0 - - -; #X obj 69 145 *; #X obj 225 135 atan; #X msg 225 115 1; #X obj 225 95 loadbang; #X obj 225 154 / 45; #X msg 12 66 0; #X msg 43 66 90; #X msg 73 66 180; #X msg 105 66 270; #X text 58 23 3 dimensional cartesian rotation matrix \, rotating around y-axis; #X obj 69 165 mtx_roty; #X obj 69 203 mtx_print Ry; #X connect 0 0 1 0; #X connect 1 0 2 0; #X connect 2 0 12 0; #X connect 3 0 6 0; #X connect 4 0 3 0; #X connect 5 0 4 0; #X connect 6 0 2 1; #X connect 7 0 1 0; #X connect 8 0 1 0; #X connect 9 0 1 0; #X connect 10 0 1 0; #X connect 12 0 13 0; pd-iemmatrix-0.3/abs/mtx_roty.pd000066400000000000000000000007511262113134600167350ustar00rootroot00000000000000#N canvas 570 39 450 393 10; #X obj 94 26 inlet; #X obj 94 187 outlet; #X obj 94 64 mtx_rot; #X obj 194 25 loadbang; #X obj 194 65 mtx_diag; #X obj 94 86 mtx_resize 3 3; #X obj 94 108 mtx_+; #X msg 194 46 0 0 1; #X obj 94 133 mtx_roll -1; #X obj 94 154 mtx_scroll -1; #X obj 94 45 * -1; #X connect 0 0 10 0; #X connect 2 0 5 0; #X connect 3 0 7 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 8 0; #X connect 7 0 4 0; #X connect 8 0 9 0; #X connect 9 0 1 0; #X connect 10 0 2 0; pd-iemmatrix-0.3/abs/mtx_rotz-help.pd000066400000000000000000000012641262113134600176640ustar00rootroot00000000000000#N canvas 0 0 450 300 10; #X obj 72 108 hsl 128 15 0 360 0 0 empty empty empty -2 -8 0 10 -262144 -1 -1 0 1; #X floatatom 69 128 5 0 0 0 - - -; #X obj 69 145 *; #X obj 225 135 atan; #X msg 225 115 1; #X obj 225 95 loadbang; #X obj 225 154 / 45; #X msg 12 66 0; #X msg 43 66 90; #X msg 73 66 180; #X msg 105 66 270; #X text 58 23 3 dimensional cartesian rotation matrix \, rotating around z-axis; #X obj 69 203 mtx_print Rz; #X obj 69 165 mtx_rotz; #X connect 0 0 1 0; #X connect 1 0 2 0; #X connect 2 0 13 0; #X connect 3 0 6 0; #X connect 4 0 3 0; #X connect 5 0 4 0; #X connect 6 0 2 1; #X connect 7 0 1 0; #X connect 8 0 1 0; #X connect 9 0 1 0; #X connect 10 0 1 0; #X connect 13 0 12 0; pd-iemmatrix-0.3/abs/mtx_rotz.pd000066400000000000000000000006071262113134600167360ustar00rootroot00000000000000#N canvas 570 39 450 393 10; #X obj 94 26 inlet; #X obj 94 187 outlet; #X obj 94 64 mtx_rot; #X obj 194 25 loadbang; #X obj 194 65 mtx_diag; #X obj 94 86 mtx_resize 3 3; #X obj 94 108 mtx_+; #X msg 194 46 0 0 1; #X obj 94 45 * -1; #X connect 0 0 8 0; #X connect 2 0 5 0; #X connect 3 0 7 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 4 0; #X connect 8 0 2 0; pd-iemmatrix-0.3/abs/mtx_rotzyz.pd000066400000000000000000000011551262113134600173200ustar00rootroot00000000000000#N canvas 98 59 450 317 10; #X obj 244 21 inlet beta_y; #X obj 327 21 inlet gamma_z; #X obj 72 278 outlet; #X obj 72 104 pack f f f; #X obj 72 21 inlet alpha_z \; [alpha_z \, beta_y \, gamma_y(; #X obj 107 231 mtx_*; #X obj 72 252 mtx_*; #X obj 72 125 unpack f f f; #X text 211 179 3x3 rotation matrix; #X obj 106 187 mtx_roty; #X obj 141 159 mtx_rotz; #X obj 72 208 mtx_rotz; #X connect 0 0 3 1; #X connect 1 0 3 2; #X connect 3 0 7 0; #X connect 4 0 3 0; #X connect 5 0 6 1; #X connect 6 0 2 0; #X connect 7 0 11 0; #X connect 7 1 9 0; #X connect 7 2 10 0; #X connect 9 0 5 0; #X connect 10 0 5 1; #X connect 11 0 6 0; pd-iemmatrix-0.3/abs/mtx_rowcol2index.pd000066400000000000000000000007771262113134600203670ustar00rootroot00000000000000#N canvas 12 28 450 300 10; #X obj 77 12 inlet; #X obj 350 11 inlet; #X text 293 10 columns; #X text 118 13 row; #X obj 146 13 inlet; #X text 187 14 col; #X obj 77 168 outlet; #X obj 77 103 mtx_- 1; #X obj 77 125 mtx_.* \$1; #X obj 77 146 mtx_+; #X text 270 98 calculates; #X text 216 121 linear matrix indices; #X text 223 145 from row and col indices; #X text 232 169 and the column size; #X connect 0 0 7 0; #X connect 1 0 8 1; #X connect 4 0 9 1; #X connect 7 0 8 0; #X connect 8 0 9 0; #X connect 9 0 6 0; pd-iemmatrix-0.3/abs/mtx_rowrfft.pd000066400000000000000000000006401262113134600174260ustar00rootroot00000000000000#N canvas 0 0 895 300 12; #X obj 91 150 mtx_rfft; #X obj 91 60 inlet; #X obj 91 202 outlet; #X obj 160 203 outlet; #X obj 269 88 loadbang; #X msg 269 120 mtx_rowrfft: use [mtx_rfft] in the future!; #X obj 269 150 print; #X text 291 202 changed name mtx_rowrfft to mtx_rfft Jul \, 22nd; #X text 291 222 Franz Zotter; #X connect 0 0 2 0; #X connect 0 1 3 0; #X connect 1 0 0 0; #X connect 4 0 5 0; #X connect 5 0 6 0; pd-iemmatrix-0.3/abs/mtx_rowrifft.pd000066400000000000000000000006441262113134600176030ustar00rootroot00000000000000#N canvas 0 0 895 300 12; #X obj 91 60 inlet; #X obj 91 202 outlet; #X obj 269 88 loadbang; #X obj 269 150 print; #X text 291 222 Franz Zotter; #X obj 91 150 mtx_rifft; #X obj 169 60 inlet; #X msg 269 120 mtx_rowrifft: use [mtx_rifft] in the future!; #X text 291 202 changed name mtx_rowrifft to mtx_rifft Jul \, 22nd ; #X connect 0 0 5 0; #X connect 2 0 7 0; #X connect 5 0 1 0; #X connect 6 0 5 1; #X connect 7 0 3 0; pd-iemmatrix-0.3/abs/mtx_sfread-help.pd000066400000000000000000000007741262113134600201370ustar00rootroot00000000000000#N canvas 439 256 841 379 10; #X text 482 28 part of iemmatrix; #X obj 33 116 mtx_rand; #X msg 32 207 bang; #X obj 32 249 mtx_print file; #X obj 32 228 mtx_sfread 10 ./test_mtx_sfwrite.wav; #X obj 33 146 mtx_sfwrite ./test_mtx_sfwrite.wav; #X msg 33 94 10 3; #X obj 94 116 mtx_print original; #X text 43 34 [mtx_sfread][mtx_sfwrite]; #X text 165 69 reads the rows of a matrix from a multichannel sound file; #X connect 1 0 5 0; #X connect 1 0 7 0; #X connect 2 0 4 0; #X connect 4 0 3 0; #X connect 6 0 1 0; pd-iemmatrix-0.3/abs/mtx_sfread.pd000066400000000000000000000077661262113134600172210ustar00rootroot00000000000000#N canvas 308 65 872 786 10; #X msg 128 128 clear; #X obj 73 149 until 3; #X obj 98 168 + 1; #X obj 113 187 * 20; #X obj 145 187 + 80; #X obj 73 87 \$1; #X obj 73 107 clip 0 64; #X obj 73 207 makefilename \$0-track%d; #X obj 73 228 t a a; #X obj 73 249 pack s 1; #X obj 51 362 soundfiler; #X obj 51 24 inlet; #X obj 298 118 loadbang; #X msg 305 249 read -resize \$1; #X obj 266 249 t a b; #X obj 305 270 t l; #X obj 51 323 list; #X obj 51 342 list trim; #X obj 217 270 list prepend; #X obj 51 46 symbol \$2; #X msg 73 269 obj 100 \$2 table \$1; #X obj 73 128 t f b b; #X obj 267 470 until 3; #X obj 292 489 + 1; #X obj 267 413 \$1; #X obj 267 432 clip 0 64; #X obj 289 527 makefilename \$0-track%d; #X msg 152 427 clear; #X obj 122 405 t b b; #X obj 267 451 t f b; #X obj 267 758 mtx; #X obj 289 546 t b a; #X text 571 87 pd >=0.39-2; #X msg 267 633 row \$1; #X obj 267 652 list append; #X obj 349 652 spigot; #X obj 388 632 == 1; #X obj 267 508 t f f f; #X obj 319 624 t l l; #X obj 349 730 mtx_zeros; #X obj 349 691 t b f; #X obj 349 711 pack \$1 0; #X obj 267 780 outlet; #X obj 319 565 list prepend set; #X obj 319 584 list trim; #X obj 319 604 tabdump dummy; #X obj 267 671 list trim; #X obj 51 382 != 0; #X obj 83 382 sel 1; #X obj 73 290 iem_send; #N canvas 569 312 599 627 \$0-subpatch 0; #X obj 100 100 table 1036-track1; #X obj 100 120 table 1036-track2; #X obj 100 140 table 1036-track3; #X obj 100 160 table 1036-track4; #X obj 100 180 table 1036-track5; #X obj 100 200 table 1036-track6; #X obj 100 220 table 1036-track7; #X obj 100 240 table 1036-track8; #X obj 100 260 table 1036-track9; #X obj 100 280 table 1036-track10; #X restore 157 315 pd \$0-subpatch; #X obj 152 447 s \$0-tosubpatch; #X obj 298 137 \$0; #X obj 297 196 list trim; #X obj 298 157 makefilename pd-%d-subpatch; #X obj 297 176 list prepend set; #X text 601 115 \$1 ... nchan \$2 ... filename; #X text 474 73 requires iemlib \, iemmatrix; #X obj 73 187 t f f; #X obj 51 67 t b b a; #X obj 122 382 t b b; #X msg 127 149 1; #X obj 73 168 i; #X text 162 166 dynamic patching; #X text 376 229 gathering command for soundfiler; #X text 127 362 loading tracks into subpatch-tables; #X msg 321 470 1; #X obj 267 489 i; #X text 421 632 initialize matrix with zeros; #X text 329 506 stepping through the subpatch-tables; #X text 92 20 name/bang; #X text 286 30 reading multichannel audiofiles into matrix rows; #X obj 349 671 list length; #X connect 0 0 49 0; #X connect 1 0 62 0; #X connect 2 0 62 1; #X connect 3 0 4 0; #X connect 4 0 9 1; #X connect 5 0 6 0; #X connect 6 0 21 0; #X connect 7 0 8 0; #X connect 8 0 9 0; #X connect 8 1 18 0; #X connect 9 0 20 0; #X connect 10 0 47 0; #X connect 11 0 19 0; #X connect 12 0 52 0; #X connect 13 0 18 1; #X connect 14 0 13 0; #X connect 14 1 18 1; #X connect 15 0 18 1; #X connect 16 0 17 0; #X connect 17 0 10 0; #X connect 18 0 15 0; #X connect 18 0 16 1; #X connect 19 0 59 0; #X connect 20 0 49 0; #X connect 21 0 1 0; #X connect 21 1 61 0; #X connect 21 2 0 0; #X connect 22 0 67 0; #X connect 23 0 67 1; #X connect 24 0 25 0; #X connect 25 0 29 0; #X connect 26 0 31 0; #X connect 27 0 51 0; #X connect 28 0 30 0; #X connect 28 1 27 0; #X connect 29 0 22 0; #X connect 29 1 66 0; #X connect 30 0 42 0; #X connect 31 0 45 0; #X connect 31 1 43 0; #X connect 33 0 34 0; #X connect 34 0 46 0; #X connect 35 0 72 0; #X connect 36 0 35 1; #X connect 37 0 33 0; #X connect 37 1 26 0; #X connect 37 2 36 0; #X connect 38 0 34 1; #X connect 38 1 35 0; #X connect 39 0 30 1; #X connect 40 0 41 0; #X connect 40 1 41 1; #X connect 41 0 39 0; #X connect 43 0 44 0; #X connect 44 0 45 0; #X connect 45 0 38 0; #X connect 46 0 30 0; #X connect 47 0 48 0; #X connect 48 0 60 0; #X connect 52 0 54 0; #X connect 53 0 49 1; #X connect 54 0 55 0; #X connect 55 0 53 0; #X connect 58 0 7 0; #X connect 58 1 3 0; #X connect 59 0 16 0; #X connect 59 1 5 0; #X connect 59 2 14 0; #X connect 60 0 28 0; #X connect 60 1 24 0; #X connect 61 0 62 1; #X connect 62 0 2 0; #X connect 62 0 58 0; #X connect 66 0 67 1; #X connect 67 0 23 0; #X connect 67 0 37 0; #X connect 72 0 40 0; pd-iemmatrix-0.3/abs/mtx_sfwrite-help.pd000066400000000000000000000007751262113134600203570ustar00rootroot00000000000000#N canvas 439 256 841 379 10; #X text 482 28 part of iemmatrix; #X text 166 69 writes the rows of a matrix into a multichannel sound file; #X obj 33 116 mtx_rand; #X msg 32 207 bang; #X obj 32 249 mtx_print file; #X obj 32 228 mtx_sfread 10 ./test_mtx_sfwrite.wav; #X obj 33 146 mtx_sfwrite ./test_mtx_sfwrite.wav; #X text 43 34 [mtx_sfwrite][mtx_sfread]; #X msg 33 97 10 4; #X obj 95 116 mtx_print original; #X connect 2 0 6 0; #X connect 2 0 9 0; #X connect 3 0 5 0; #X connect 5 0 4 0; #X connect 8 0 2 0; pd-iemmatrix-0.3/abs/mtx_sfwrite.pd000066400000000000000000000062501262113134600174230ustar00rootroot00000000000000#N canvas 429 353 838 383 10; #X obj 53 121 until 3; #X obj 78 140 + 1; #X text 425 51 reading multichannel soundfiles via soundfiler and dynamically created table arrays into multichannel matrix; #X obj 239 345 soundfiler; #X obj 297 50 inlet; #X obj 595 120 loadbang; #X obj 401 285 t l; #X obj 239 325 list trim; #X obj 311 285 list prepend; #X text 399 30 pd >=0.39-2; #X obj 430 264 iem_send; #N canvas 569 312 599 627 \$0-subpatch 0; #X obj 100 100 table 1037-track1 3; #X obj 100 120 table 1037-track2 3; #X obj 100 140 table 1037-track3 3; #X obj 100 160 table 1037-track4 3; #X obj 100 180 table 1037-track5 3; #X obj 100 200 table 1037-track6 3; #X obj 100 220 table 1037-track7 3; #X obj 100 240 table 1037-track8 3; #X obj 100 260 table 1037-track9 3; #X obj 100 280 table 1037-track10 3; #X restore 430 285 pd \$0-subpatch; #X obj 595 140 \$0; #X obj 595 200 list trim; #X obj 595 159 makefilename pd-%d-subpatch; #X obj 595 180 list prepend set; #X obj 34 23 inlet; #X text 35 4 matrix; #X obj 53 62 mtx_size; #X text 235 50 filename; #X obj 53 82 clip 1 64; #X obj 53 224 mtx; #X msg 53 204 row \$1; #X obj 122 265 list prepend set; #X obj 122 286 list trim; #X obj 71 308 iem_send; #X obj 53 244 list prepend 0; #X obj 53 264 list trim; #X msg 533 181 clear; #X obj 430 142 until 3; #X obj 469 181 * 20; #X obj 501 181 + 80; #X obj 430 201 makefilename \$0-track%d; #X obj 430 122 t f b b; #X obj 53 160 t f f; #X obj 53 101 t f b f; #X text 633 140 qualified subpatch; #X text 427 78 dynamic table subpatch on dimension change; #X obj 430 221 pack s 1 1; #X msg 430 241 obj 100 \$2 table \$1 \$3; #X msg 239 265 write -wave -bytes 4 \$1; #X obj 239 305 list append; #X obj 34 42 t b a a b; #X text 396 15 requires iemlib \, iemmatrix; #X msg 106 121 1; #X obj 53 140 i; #X msg 483 142 1; #X obj 455 162 + 1; #X obj 430 162 i; #X obj 430 181 t f f; #X text 102 5 writing matrix rows into multichannel; #X text 102 22 audio files; #X obj 239 245 symbol \$1; #X text 535 28 \$1 ... filename; #X obj 83 182 makefilename \$0-track%d; #X connect 0 0 45 0; #X connect 1 0 45 1; #X connect 4 0 52 1; #X connect 5 0 12 0; #X connect 6 0 8 1; #X connect 7 0 3 0; #X connect 8 0 6 0; #X connect 8 0 41 1; #X connect 12 0 14 0; #X connect 13 0 10 1; #X connect 14 0 15 0; #X connect 15 0 13 0; #X connect 16 0 42 0; #X connect 18 0 20 0; #X connect 18 1 38 2; #X connect 20 0 35 0; #X connect 21 0 26 0; #X connect 22 0 21 0; #X connect 23 0 24 0; #X connect 24 0 25 1; #X connect 26 0 27 0; #X connect 27 0 25 0; #X connect 28 0 10 0; #X connect 29 0 48 0; #X connect 30 0 31 0; #X connect 31 0 38 1; #X connect 32 0 38 0; #X connect 33 0 29 0; #X connect 33 1 46 0; #X connect 33 2 28 0; #X connect 34 0 22 0; #X connect 34 1 54 0; #X connect 35 0 0 0; #X connect 35 1 44 0; #X connect 35 2 33 0; #X connect 38 0 39 0; #X connect 39 0 10 0; #X connect 40 0 41 0; #X connect 41 0 7 0; #X connect 42 0 52 0; #X connect 42 1 18 0; #X connect 42 2 21 1; #X connect 42 3 8 1; #X connect 44 0 45 1; #X connect 45 0 1 0; #X connect 45 0 34 0; #X connect 46 0 48 1; #X connect 47 0 48 1; #X connect 48 0 47 0; #X connect 48 0 49 0; #X connect 49 0 32 0; #X connect 49 1 30 0; #X connect 52 0 40 0; #X connect 54 0 23 0; #X connect 54 0 8 0; pd-iemmatrix-0.3/abs/mtx_sph2cart-help.pd000066400000000000000000000013351262113134600204130ustar00rootroot00000000000000#N canvas 537 0 450 300 10; #X obj 69 114 mtx 3 1; #X text 169 70 2 ey; #X msg 26 49 1 0 1.5708; #X obj 69 147 mtx_sph2cart; #X msg 69 71 2 1.5708 1.5708; #X msg 97 91 3 0 0; #X text 144 94 3 ez; #X obj 69 191 mtx_print xyz; #X text 19 11 converting spherical to carteisan coordinates; #X text 264 202 Franz Zotter \, 2009; #X text 99 49 1 ex; #X text 219 62 input matrices have the shape 3xL; #X text 221 76 and may contain L points; #X text 219 93 [ r \; phi \; theta ]; #X text 215 143 r... radius; #X text 215 156 phi... azimuth angle; #X text 215 169 theta.. zenith angle; #X text 239 243 see also; #X obj 298 243 mtx_cart2sph; #X connect 0 0 3 0; #X connect 2 0 0 0; #X connect 3 0 7 0; #X connect 4 0 0 0; #X connect 5 0 0 0; pd-iemmatrix-0.3/abs/mtx_sph2cart.pd000066400000000000000000000020551262113134600174650ustar00rootroot00000000000000#N canvas 683 47 450 551 10; #X obj 44 17 inlet \; [r \; phi \; theta]; #X obj 44 467 outlet \; [x \; y \; z]; #X obj 44 279 t a a; #X obj 101 377 mtx_concat; #X obj 44 378 mtx_.*; #X obj 296 139 mtx_slice 1 1 1 end; #X obj 196 211 mtx_cos; #X obj 169 253 mtx_sin; #X obj 169 183 t a a; #X obj 71 326 mtx_.*; #X obj 169 272 mtx_.*; #X obj 196 230 mtx_.*; #X obj 44 398 mtx_concat; #X obj 44 93 t a a a; #X text 229 451 Franz Zotter \, 2009; #X text 231 428 [iemmatrix]; #X obj 44 255 mtx_slice 2 1 2 end; #X obj 169 159 mtx_slice 3 1 3 end; #X obj 44 359 mtx_cos; #X obj 71 307 mtx_sin; #X connect 0 0 13 0; #X connect 2 0 18 0; #X connect 2 1 19 0; #X connect 3 0 12 1; #X connect 4 0 12 0; #X connect 5 0 10 1; #X connect 5 0 11 1; #X connect 6 0 11 0; #X connect 7 0 10 0; #X connect 8 0 7 0; #X connect 8 1 6 0; #X connect 9 0 3 0; #X connect 10 0 9 1; #X connect 10 0 4 1; #X connect 11 0 3 1; #X connect 12 0 1 0; #X connect 13 0 16 0; #X connect 13 1 17 0; #X connect 13 2 5 0; #X connect 16 0 2 0; #X connect 17 0 8 0; #X connect 18 0 4 0; #X connect 19 0 9 0; pd-iemmatrix-0.3/abs/mtx_spivot-help.pd000066400000000000000000000054701262113134600202150ustar00rootroot00000000000000#N canvas 0 35 759 714 10; #N canvas 352 114 190 367 rand-matrix 0; #X obj 74 163 inlet; #X obj 74 280 outlet; #X obj 74 195 mtx_rand; #X obj 74 215 mtx_* 10; #X connect 0 0 2 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X restore 53 369 pd rand-matrix; #X msg 53 347 4 3; #X obj 139 215 mtx_print pre; #X obj 53 255 mtx_print pivot; #X text 269 171 the first outlet is the pivot-transformed matrix.; #X obj 53 121 t a a; #X obj 83 140 mtx_print original; #X obj 53 98 mtx 3 3; #X msg 53 78 1 2 3 6 5 4 8 7 9; #X obj 53 532 mtx_print pivot; #X obj 97 421 mtx_print original; #X obj 53 398 t a a a; #X obj 139 475 mtx_*; #X obj 167 532 mtx_print pivot2; #N canvas 352 114 190 367 rand-matrix 0; #X obj 74 163 inlet; #X obj 74 240 outlet; #X obj 74 195 mtx_rand; #X obj 74 215 mtx_* 10; #X connect 0 0 2 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X restore 381 338 pd rand-matrix; #X obj 411 461 mtx_print pivot; #X obj 381 500 mtx_*; #X obj 411 560 mtx_print depivot; #X obj 381 437 t a a; #X obj 381 480 mtx_transpose; #X obj 381 520 mtx_transpose; #X text 456 22 part of [iemmatrix]; #X obj 403 383 mtx_print original; #X text 39 326 B=pivot(A)=pre*A; #X text 377 288 A=depivot(B)=(B'*pre)'; #X text 49 59 pivot-transform the rows of a matrix; #X text 270 122 this will tranform (permutate) the rows \, so that the result will have all maximum (or minimum) values in the diagonale. however \, the diagonale will be unsorted.; #X text 268 197 the second outlet gives the permutation-matrix that have to be pre-multiplied to the original matrix to get the semi-pivot-tranformation. this is useful for de-pivoting.; #X obj 70 494 mtx_-; #X obj 70 513 mtx_print diff; #X obj 381 582 mtx_-; #X obj 381 601 mtx_print diff; #X obj 381 540 t a a; #X obj 381 362 t a a a; #X msg 381 316 3 4; #X obj 521 461 mtx_print pivoteer; #X obj 453 434 t a a; #X obj 53 194 mtx_spivot; #X obj 53 450 mtx_spivot; #X obj 381 413 mtx_spivot; #X text 52 19 mtx_spivot:: semi-pivot transform a matrix; #X text 88 639 (c) 2005 by IOhannes m zmoelnig \, IEM KUG \, graz austria ; #X text 88 656 for license-details see LICENSE.txt that must come with iemmatrix.; #X connect 0 0 11 0; #X connect 1 0 0 0; #X connect 5 0 37 0; #X connect 5 1 6 0; #X connect 7 0 5 0; #X connect 8 0 7 0; #X connect 11 0 38 0; #X connect 11 1 12 1; #X connect 11 2 10 0; #X connect 12 0 13 0; #X connect 12 0 28 1; #X connect 14 0 33 0; #X connect 16 0 20 0; #X connect 18 0 19 0; #X connect 18 1 15 0; #X connect 19 0 16 0; #X connect 20 0 32 0; #X connect 28 0 29 0; #X connect 30 0 31 0; #X connect 32 0 30 0; #X connect 32 1 17 0; #X connect 33 0 39 0; #X connect 33 1 22 0; #X connect 33 2 30 1; #X connect 34 0 14 0; #X connect 36 0 16 1; #X connect 36 1 35 0; #X connect 37 0 3 0; #X connect 37 1 2 0; #X connect 38 0 9 0; #X connect 38 0 28 0; #X connect 38 1 12 0; #X connect 39 0 18 0; #X connect 39 1 36 0; pd-iemmatrix-0.3/abs/mtx_spivot.pd000066400000000000000000000035541262113134600172700ustar00rootroot00000000000000#N canvas 835 313 564 462 10; #X obj 154 166 mtx; #X obj 154 208 mtx_*; #X obj 115 78 inlet; #X obj 115 99 t a a; #X obj 154 248 mtx_*; #X obj 154 228 t a a; #X obj 115 119 mtx_pivot \$1; #X obj 154 270 outlet pivoted; #X obj 260 271 outlet pivoter; #X obj 154 139 t b a a; #N canvas 118 188 669 439 resizer 0; #X obj 322 204 mtx_size; #X obj 236 283 mtx_eye; #X obj 366 303 mtx_eye; #X obj 322 225 pack; #X obj 206 231 t a a; #X obj 206 263 mtx_resize; #X obj 236 323 mtx_-; #X obj 236 303 mtx_resize; #X obj 322 246 t l l l; #X text 138 30 what's going on here ?; #X obj 206 182 inlet A; #X obj 322 182 inlet B; #X obj 206 379 outlet C; #X text 153 52 a matrix A should be resized to the same size as a reference matrix B. the missing elements should be taken from the identity-matrix rather than from the zeros-matrix.; #X text 153 100 what we do is: resize A (with zeros) \, calculate the missing identity matrix (by subtracting a (zero-padded) resized I-matrix from a big I-matrix) and add them together; #X text 159 150 C=A+I(B)-I(A); #X obj 206 350 mtx_-; #X connect 0 0 3 0; #X connect 0 1 3 1; #X connect 1 0 7 0; #X connect 2 0 6 1; #X connect 3 0 8 0; #X connect 4 0 5 0; #X connect 4 1 1 0; #X connect 5 0 16 0; #X connect 6 0 16 1; #X connect 7 0 6 0; #X connect 8 0 5 1; #X connect 8 1 7 1; #X connect 8 2 2 0; #X connect 10 0 4 0; #X connect 11 0 0 0; #X connect 16 0 12 0; #X restore 154 187 pd resizer; #X text 72 316 (c) 2005 by IOhannes m zmoelnig \, IEM KUG \, graz austria ; #X text 72 333 for license-details see LICENSE.txt that must come with iemmatrix.; #X text 62 38 semi-pivotize a matrix; #X connect 0 0 10 0; #X connect 1 0 5 0; #X connect 2 0 3 0; #X connect 3 0 6 0; #X connect 3 1 4 1; #X connect 4 0 7 0; #X connect 5 0 4 0; #X connect 5 1 8 0; #X connect 6 1 9 0; #X connect 6 2 0 1; #X connect 9 0 0 0; #X connect 9 1 1 1; #X connect 9 2 10 1; #X connect 10 0 1 0; pd-iemmatrix-0.3/abs/mtx_symasym-help.pd000066400000000000000000000015751262113134600203750ustar00rootroot00000000000000#N canvas 302 270 518 410 10; #X msg 174 116 bang; #X obj 174 160 t a a; #X msg 87 114 bang; #X obj 87 135 mtx_rand 5; #X obj 174 137 mtx_eye 5; #X obj 264 137 mtx_egg 5; #X obj 174 240 mtx_symasym; #X obj 246 271 mtx_print asymmetric; #X obj 174 297 mtx_print symmetric; #X obj 204 205 mtx_print original; #X msg 264 114 bang; #X text 26 12 mtx_symasym:: decompose a matrix into symmetric & asymmetric parts; #X text 22 45 each square matrix can be decomposed into a symmetric and an assymmetric part \, with; #X text 205 79 M=S+A; #X text 70 336 (c) 2005 by IOhannes m zmoelnig \, IEM KUG \, graz austria ; #X text 70 353 for license-details see LICENSE.txt that must come with iemmatrix.; #X connect 0 0 4 0; #X connect 1 0 6 0; #X connect 1 1 9 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 1 0; #X connect 5 0 1 0; #X connect 6 0 8 0; #X connect 6 1 7 0; #X connect 10 0 5 0; pd-iemmatrix-0.3/abs/mtx_symasym.pd000066400000000000000000000014341262113134600174410ustar00rootroot00000000000000#N canvas 0 0 493 363 10; #X obj 61 66 inlet matrix; #X obj 61 255 outlet symmetric; #X obj 105 229 outlet assymetric; #X obj 105 136 mtx_transpose; #X obj 61 93 mtx_* 0.5; #X obj 61 229 mtx_+; #X obj 105 203 mtx_-; #X obj 61 115 t a a a; #X obj 105 158 t a a; #X text 23 19 mtx_symasym:: decompose a square matrix into a symmetric and an assymtric part; #X text 240 101 S=0.5*(M+M'); #X text 240 120 A=0.5*(M-M'); #X text 240 76 M=S+A; #X text 38 289 (c) 2005 by IOhannes m zmoelnig \, IEM KUG \, graz austria ; #X text 38 306 for license-details see LICENSE.txt that must come with iemmatrix.; #X connect 0 0 4 0; #X connect 3 0 8 0; #X connect 4 0 7 0; #X connect 5 0 1 0; #X connect 6 0 2 0; #X connect 7 0 5 0; #X connect 7 1 6 0; #X connect 7 2 3 0; #X connect 8 0 5 1; #X connect 8 1 6 1; pd-iemmatrix-0.3/abs/mtx_tab-help.pd000066400000000000000000000023371262113134600174360ustar00rootroot00000000000000#N canvas 382 218 668 300 10; #X obj 133 198 mtx_tab \$0-table; #X obj 435 97 table \$0-table; #X obj 131 120 mtx_rand; #X obj 133 141 t a a; #X obj 173 141 mtx_print orig; #X obj 133 259 mtx_print outlet; #X obj 311 125 mtx_zeros; #X msg 311 105 3 4; #X obj 264 101 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X msg 131 99 2 3; #X msg 86 122 row 1; #X obj 133 233 relay matrix; #X obj 258 257 print outlet; #X msg -1 122 row 1 1 2 3; #X text 478 4 part of iemmatrix; #X text 27 7 [mtx_tab]; #X text 92 28 is a matrix using a table for local/global storage of its data. for the full palette of matrix commands refer to the "mtx" help; #X text 487 158 see also:; #X obj 558 158 mtx; #X text 433 81 local table; #X obj 383 215 mtx_tab \$0-table; #X obj 383 260 mtx_print other; #X obj 383 237 mtx_+ 1; #X obj 383 193 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X msg 423 191 ones 1 3; #X connect 0 0 11 0; #X connect 2 0 3 0; #X connect 3 0 0 0; #X connect 3 1 4 0; #X connect 6 0 0 1; #X connect 7 0 6 0; #X connect 8 0 0 0; #X connect 9 0 2 0; #X connect 10 0 0 0; #X connect 11 0 5 0; #X connect 11 1 12 0; #X connect 13 0 0 0; #X connect 20 0 22 0; #X connect 22 0 21 0; #X connect 23 0 20 0; #X connect 24 0 20 0; pd-iemmatrix-0.3/abs/mtx_tab.pd000066400000000000000000000052421262113134600165060ustar00rootroot00000000000000#N canvas 60 0 784 503 10; #X obj 33 154 inlet; #X obj 108 154 inlet; #X obj 33 358 outlet; #X text 345 160 part of iemmatrix.; #X text 348 215 see also:; #X obj 431 213 mtx; #X text 105 56 mtx_tab behaves just like a "mtx" object that stores its internal matrix in a table. So this matrix can be seen as a local/global variable of the workspace.; #X text 349 282 Franz Zotter 2006; #X text 347 250 requires zexy's [tabdump]; #X text 105 6 [mtx_tab]; #N canvas 0 0 657 677 mtx_tab 1; #X obj 33 34 inlet; #X obj 287 86 inlet; #X obj 287 601 list prepend 0; #X obj 287 506 t a a; #X obj 412 561 *; #X msg 412 600 resize \$1; #X obj 33 438 outlet; #X obj 156 343 mtx; #X obj 156 75 t a b; #X obj 191 156 tabdump \$1; #X obj 191 176 list prepend matrix; #X obj 191 196 list trim; #X obj 156 306 spigot; #X msg 218 305 0; #X msg 218 285 1; #X obj 412 581 + 2; #X text 329 625 send to table; #X text 298 159 get from table; #X obj 156 363 t b a; #X obj 191 411 spigot; #X msg 234 364 0; #X msg 263 364 1; #X obj 191 384 t a a; #N canvas 0 0 450 300 bang 0; #X obj 103 28 inlet; #X obj 103 59 route bang; #X obj 103 119 outlet; #X obj 103 92 b; #X connect 0 0 1 0; #X connect 1 0 3 0; #X connect 1 1 2 0; #X connect 3 0 2 0; #X restore 197 255 pd bang; #X obj 156 217 t b b a b b; #X text 301 485 ...; #X obj 287 467 route matrix; #X msg 412 542 \$1 \$2; #X obj 33 94 list prepend matrix; #X obj 33 114 list trim; #X obj 33 75 t a a; #X msg 201 135 set \$1; #X obj 33 56 route matrix set; #X text 170 238 if no output: send to table anyway; #X obj 287 624 s; #X obj 201 115 symbol \$1; #X obj 447 464 loadbang; #X obj 447 484 symbol \$1; #X connect 0 0 32 0; #X connect 1 0 26 0; #X connect 2 0 34 0; #X connect 3 0 2 0; #X connect 3 1 27 0; #X connect 4 0 15 0; #X connect 5 0 34 0; #X connect 7 0 18 0; #X connect 8 0 24 0; #X connect 8 1 9 0; #X connect 9 0 10 0; #X connect 10 0 11 0; #X connect 11 0 7 1; #X connect 12 0 7 0; #X connect 13 0 12 1; #X connect 14 0 12 1; #X connect 15 0 5 0; #X connect 18 0 13 0; #X connect 18 1 22 0; #X connect 19 0 6 0; #X connect 20 0 19 1; #X connect 21 0 19 1; #X connect 22 0 19 0; #X connect 22 1 26 0; #X connect 23 0 7 0; #X connect 24 0 12 0; #X connect 24 1 20 0; #X connect 24 2 23 0; #X connect 24 3 14 0; #X connect 24 4 21 0; #X connect 26 0 3 0; #X connect 27 0 4 0; #X connect 28 0 29 0; #X connect 29 0 6 0; #X connect 30 0 28 0; #X connect 30 1 3 0; #X connect 31 0 9 0; #X connect 32 0 30 0; #X connect 32 1 35 0; #X connect 32 2 8 0; #X connect 35 0 31 0; #X connect 35 0 34 1; #X connect 36 0 37 0; #X connect 37 0 34 1; #X restore 33 327 pd mtx_tab; #X text 105 38 arguments: \$1 ... table name; #X connect 0 0 10 0; #X connect 1 0 10 1; #X connect 10 0 2 0; pd-iemmatrix-0.3/abs/mtx_win_besseli0.pd000066400000000000000000000064571262113134600203340ustar00rootroot00000000000000#N canvas 442 0 1152 729 12; #X obj 184 130 mtx_< 2.5; #X obj 385 142 mtx_>= 2.5; #X obj 385 165 mtx_find; #X obj 184 152 mtx_find; #X obj 307 251 mtx_index; #X obj 106 236 mtx_index; #X obj 106 343 mtx_fill; #X obj 82 427 mtx; #X obj 80 41 t b a a a; #X obj 567 198 mtx_zeros; #X obj 567 151 mtx_size; #X obj 567 175 pack; #N canvas 0 0 897 561 smallx 0; #X obj 240 -115 mtx_.^ 2; #X obj 240 -73 mtx_+ 8.92003e-06; #X obj 240 -93 mtx_* 0.249877; #X obj 240 277 mtx_+; #X obj 272 -48 mtx_.^ 4; #X obj 304 1 mtx_.^ 6; #X obj 338 47 mtx_.^ 8; #X obj 370 98 mtx_.^ 10; #X obj 402 144 mtx_.^ 12; #X obj 272 -26 mtx_* -0.0153664; #X obj 304 23 mtx_* 0.00152453; #X obj 338 69 mtx_* -0.000134196; #X obj 370 120 mtx_* 7.76875e-06; #X obj 402 166 mtx_* -2.04329e-07; #X obj 272 256 mtx_+; #X obj 304 236 mtx_+; #X obj 338 217 mtx_+; #X obj 370 196 mtx_+; #X obj 240 -158 t a a a a a a; #X obj 240 302 mtx_exp; #X obj 241 -181 inlet; #X obj 240 333 outlet; #X connect 0 0 2 0; #X connect 1 0 3 0; #X connect 2 0 1 0; #X connect 3 0 19 0; #X connect 4 0 9 0; #X connect 5 0 10 0; #X connect 6 0 11 0; #X connect 7 0 12 0; #X connect 8 0 13 0; #X connect 9 0 14 0; #X connect 10 0 15 0; #X connect 11 0 16 0; #X connect 12 0 17 0; #X connect 13 0 17 1; #X connect 14 0 3 1; #X connect 15 0 14 1; #X connect 16 0 15 1; #X connect 17 0 16 1; #X connect 18 0 0 0; #X connect 18 1 4 0; #X connect 18 2 5 0; #X connect 18 3 6 0; #X connect 18 4 7 0; #X connect 18 5 8 0; #X connect 19 0 21 0; #X connect 20 0 18 0; #X restore 106 260 pd smallx; #X obj 307 105 t a a; #X obj 106 102 t a a; #N canvas 295 16 806 381 bigx 0; #X obj 227 -132 inlet; #X obj 226 132 outlet; #X text 391 -110 exp(x)./sqrt(2*pi*x).*(1+1./(8*x)); #X obj 277 23 mtx_.^ 0.5; #X obj 226 46 mtx_./; #X obj 226 -25 mtx_exp; #X obj 455 20 mtx_+ 1; #X obj 455 -2 mtx_.^ -1; #X obj 455 -24 mtx_* 8; #X obj 226 80 mtx_.*; #X obj 226 -49 t a a; #X obj 337 -47 atan; #X obj 337 -24 * 8; #X obj 337 -93 loadbang; #X obj 277 -1 mtx_* 1; #X obj 226 -109 t a a; #X msg 337 -70 1; #X connect 0 0 15 0; #X connect 3 0 4 1; #X connect 4 0 9 0; #X connect 5 0 4 0; #X connect 6 0 9 1; #X connect 7 0 6 0; #X connect 8 0 7 0; #X connect 9 0 1 0; #X connect 10 0 5 0; #X connect 10 1 14 0; #X connect 11 0 12 0; #X connect 12 0 14 1; #X connect 13 0 16 0; #X connect 14 0 3 0; #X connect 15 0 10 0; #X connect 15 1 8 0; #X connect 16 0 11 0; #X restore 307 275 pd bigx; #X obj 80 18 inlet; #X obj 82 456 outlet; #X obj 463 165 mtx_size; #X obj 307 225 spigot; #X obj 237 177 mtx_size; #X obj 106 204 spigot; #X obj 184 177 t a a; #X obj 184 205 spigot; #X obj 385 223 spigot; #X connect 0 0 3 0; #X connect 1 0 2 0; #X connect 2 0 18 0; #X connect 2 0 24 0; #X connect 3 0 22 0; #X connect 4 0 15 0; #X connect 5 0 12 0; #X connect 6 0 7 1; #X connect 7 0 17 0; #X connect 8 0 7 0; #X connect 8 1 14 0; #X connect 8 2 13 0; #X connect 8 3 10 0; #X connect 9 0 6 1; #X connect 10 0 11 0; #X connect 10 1 11 1; #X connect 11 0 9 0; #X connect 12 0 6 0; #X connect 13 0 19 0; #X connect 13 1 1 0; #X connect 14 0 21 0; #X connect 14 1 0 0; #X connect 15 0 6 0; #X connect 16 0 8 0; #X connect 18 1 19 1; #X connect 18 1 24 1; #X connect 19 0 4 0; #X connect 20 1 21 1; #X connect 20 1 23 1; #X connect 21 0 5 0; #X connect 22 0 23 0; #X connect 22 1 20 0; #X connect 23 0 5 1; #X connect 23 0 6 2; #X connect 24 0 6 2; #X connect 24 0 4 1; pd-iemmatrix-0.3/abs/mtx_window-help.pd000066400000000000000000000306021262113134600201730ustar00rootroot00000000000000#N canvas 187 140 841 379 10; #X text 483 27 part of iemmatrix; #N canvas 0 0 450 300 convert2tablemsg 0; #X obj 130 35 inlet; #X obj 169 216 outlet; #X obj 130 60 t a a; #X obj 160 82 mtx_size; #X obj 130 107 list split 3; #X obj 220 107 change; #X msg 220 129 resize \$1; #X obj 169 154 list prepend 0; #X connect 0 0 2 0; #X connect 2 0 4 0; #X connect 2 1 3 0; #X connect 3 1 5 0; #X connect 4 1 7 0; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 1 0; #X restore 33 284 pd convert2tablemsg; #N canvas 0 0 450 300 (subpatch) 0; #X array view_window 101 float 1; #A 0 0.000448756 0.000945109 0.00165503 0.00268316 0.00407733 0.00591581 0.00828443 0.0112762 0.0149904 0.019532 0.0250102 0.0315369 0.0392254 0.0481884 0.0585358 0.0703731 0.0837981 0.0988997 0.115755 0.134427 0.154961 0.177385 0.201708 0.227912 0.255959 0.285784 0.317297 0.35038 0.384891 0.420659 0.457489 0.495163 0.53344 0.572058 0.610739 0.649192 0.687112 0.724189 0.760109 0.794559 0.827231 0.857827 0.886059 0.911661 0.934386 0.954011 0.970343 0.983219 0.99251 0.998122 1 0.998122 0.99251 0.98322 0.970343 0.954011 0.934386 0.911661 0.886059 0.857827 0.827231 0.794559 0.76011 0.724189 0.687112 0.649192 0.61074 0.572058 0.53344 0.495163 0.457489 0.420659 0.384891 0.350381 0.317297 0.285784 0.255959 0.227912 0.201708 0.177386 0.154961 0.134427 0.115755 0.0988999 0.0837981 0.0703731 0.0585359 0.0481884 0.0392254 0.0315369 0.0250102 0.019532 0.0149904 0.0112762 0.00828444 0.00591582 0.00407733 0.00268316 0.00165504 0.000945111 0.000448758; #X coords 0 1.1 100 0 101 80 1; #X restore 326 212 graph; #X text 43 34 [mtx_window]; #X text 166 69 creates a row vector with windows of different specifications. ; #X text 271 157 outletB: window vector; #X obj 33 306 s view_window; #X text 268 138 inletA: ; #X msg 33 68 rectangular 101; #X msg 42 87 bartlett 101; #X msg 50 106 sine 101; #X msg 54 126 hamming 101; #X msg 60 147 hanning 101; #X msg 63 169 blackman 101; #X msg 71 189 gauss 101 -77; #X text 227 315 note: the third parameter for gaussian windows describes the attenuation at the borders; #X text 480 241 use this e.g. for:; #X msg 80 216 kaiser 101 \$1; #X obj 33 242 mtx_window; #X msg 174 187 0; #X msg 296 188 10; #X msg 266 188 8; #X msg 235 188 5; #X msg 204 188 2; #N canvas 625 163 842 574 fft_analysis 0; #X msg 477 0 sine 64; #X msg 477 42 hanning 64; #X msg 475 -41 rectangular 64; #X obj 461 160 s array1; #N canvas 0 0 450 300 mtx2arraysend 0; #X obj 150 16 inlet; #X obj 148 254 outlet; #X obj 170 64 t a a; #X obj 204 85 mtx_size; #X msg 205 129 resize \$1; #X obj 205 108 change; #X obj 172 149 list split 3; #X obj 170 169 list prepend 0; #X connect 0 0 2 0; #X connect 2 0 6 0; #X connect 2 1 3 0; #X connect 3 1 5 0; #X connect 4 0 1 0; #X connect 5 0 4 0; #X connect 6 1 7 0; #X connect 7 0 1 0; #X restore 461 137 pd mtx2arraysend; #X obj 385 250 mtx_.*; #X obj 385 276 mtx_rowrfft; #X obj 385 298 mtx_.^ 2; #X obj 457 299 mtx_.^ 2; #X obj 385 320 mtx_+; #X obj 385 383 mtx_powtodb; #N canvas 0 0 450 300 mtx2arraysend 0; #X obj 150 16 inlet; #X obj 148 254 outlet; #X obj 170 64 t a a; #X obj 204 85 mtx_size; #X msg 205 129 resize \$1; #X obj 205 108 change; #X obj 172 149 list split 3; #X obj 170 169 list prepend 0; #X connect 0 0 2 0; #X connect 2 0 6 0; #X connect 2 1 3 0; #X connect 3 1 5 0; #X connect 4 0 1 0; #X connect 5 0 4 0; #X connect 6 1 7 0; #X connect 7 0 1 0; #X restore 385 404 pd mtx2arraysend; #N canvas 51 277 450 396 normalize 0; #X obj 107 27 inlet; #X obj 104 360 outlet; #X obj 227 117 mtx_sum; #X obj 227 96 mtx_transpose; #X obj 129 97 mtx_transpose; #X obj 129 118 mtx_.^ 2; #X obj 128 139 mtx_sum; #X obj 128 160 sqrt; #X obj 340 20 inlet; #X obj 238 227 f; #X obj 129 226 f; #X obj 129 295 mux 0 1; #X obj 107 66 t a a a; #X obj 104 295 mtx; #X obj 104 328 mtx_./ 1; #X obj 109 199 t b b b f; #X connect 0 0 12 0; #X connect 2 0 9 0; #X connect 3 0 2 0; #X connect 4 0 5 0; #X connect 5 0 6 0; #X connect 6 0 7 0; #X connect 7 0 10 0; #X connect 8 0 15 0; #X connect 9 0 11 1; #X connect 10 0 11 0; #X connect 11 0 14 1; #X connect 12 0 13 0; #X connect 12 1 4 0; #X connect 12 2 3 0; #X connect 13 0 14 0; #X connect 14 0 1 0; #X connect 15 0 13 0; #X connect 15 1 10 0; #X connect 15 2 9 0; #X connect 15 3 11 2; #X restore 394 230 pd normalize; #X msg 476 -20 bartlett 64; #X msg 477 21 hamming 64; #X msg 477 63 blackman 64; #X obj 385 362 mtx_+; #X obj 474 210 tgl 15 1 empty empty broad/narrow 0 -6 0 8 -262144 -1 -1 1 1; #X obj 37 353 dbtorms; #X obj 41 317 hsl 128 15 0 127 0 1 empty empty ampl -2 -6 0 12 -262144 -1 -1 0 1; #X floatatom 38 336 5 0 0 0 - - -; #X obj 79 197 dbtorms; #X obj 83 161 hsl 128 15 0 127 0 1 empty empty ampl -2 -6 0 10 -262144 -1 -1 9900 1; #X floatatom 80 180 5 0 0 0 - - -; #N canvas 0 0 450 300 (subpatch) 0; #X array spectrum 129 float 1; #A 0 56.377 77.3304 80.1692 76.3056 66.8052 80.5651 82.465 74.9327 82.4891 91.8709 96.2977 98.4686 99.0234 98.1252 95.6622 91.1155 82.4891 66.9537 78.6591 77.4688 68.019 67.7708 73.5005 71.7182 60.2204 65.3425 69.9818 67.9057 54.6513 63.1717 67.3292 65.0647 50.2597 61.3407 65.221 62.8226 46.6091 59.7915 63.4904 60.9916 43.4733 58.4672 62.0381 59.4612 40.7174 57.3238 60.7997 58.1604 38.2504 56.3288 59.7315 57.0415 36.0149 55.4562 58.8013 56.0695 33.9678 54.6867 57.9852 55.2182 32.0684 54.0057 57.2658 54.4691 30.298 53.4006 56.6287 53.8066 28.6325 52.8621 56.063 53.2186 27.0424 52.3832 55.5605 52.6966 25.5223 51.9567 55.1137 52.2326 24.0564 51.5776 54.7167 51.8203 22.6263 51.2422 54.3654 51.4551 21.2226 50.9464 54.0553 51.1324 19.8274 50.6876 53.7836 50.849 18.4236 50.4638 53.5478 50.6023 16.9878 50.2726 53.3455 50.3899 15.5157 50.1124 53.175 50.2099 14.0048 49.9819 53.0348 50.0604 12.4079 49.8806 52.9241 49.9408 10.7623 49.8072 52.8418 49.8498 9.20872 49.7614 52.7872 49.7866 7.94681 49.7429 52.7602 49.7513 7.39902; #X array sineamp 129 float 1; #A 0 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99; #X array noiseamp 129 float 1; #A 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0; #X coords 0 100 128 0 200 140 1; #X restore 51 -51 graph; #X obj 133 198 s sineamp; #X msg 133 178 const \$1; #X msg 91 333 const \$1; #X obj 91 353 s noiseamp; #X obj 385 342 mtx_* 0.1; #X obj 462 341 mtx_* 0.9; #X obj 502 381 loadbang; #X msg 502 403 ylabel -2 0 20 40 60 80 100 \, yticks 0 10 2; #X msg 532 342 xlabel -10 narrowband_dB; #X msg 596 319 xlabel -10 broadband_dB; #X obj 532 319 sel 1 0; #X text -5 133 1 choose sine/frequency+amplitude; #N canvas 61 0 443 338 mtx_oscillator 0; #X obj 84 12 inlet; #X obj 68 308 outlet; #X obj 68 131 f; #X obj 14 29 bang~; #X obj 183 27 loadbang; #X obj 183 69 mtx_:; #X obj 298 6 loadbang; #X msg 298 26 1; #X obj 297 46 atan; #X obj 68 245 mtx_* 1; #X obj 68 266 mtx_cos; #X obj 297 67 * 8; #X msg 183 49 0 63; #X obj 120 69 /; #X obj 68 201 mtx_* 1; #X obj 68 179 mtx; #N canvas 576 37 450 300 accumulate_modulo 0; #X obj 148 33 inlet; #X obj 148 232 outlet; #X obj 148 107 mtx_mod 1; #X obj 148 129 t a a; #X obj 249 33 inlet df; #X obj 188 129 mtx_slice 1 end 1 end; #X msg 339 129 \$3; #X obj 192 65 +; #X obj 148 86 mtx_+ 0; #X connect 0 0 8 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 3 1 5 0; #X connect 4 0 7 1; #X connect 5 0 6 0; #X connect 6 0 7 0; #X connect 7 0 8 1; #X connect 8 0 2 0; #X restore 68 223 pd accumulate_modulo; #X obj 68 155 t b f f; #X msg 121 50 1 64; #X obj 121 31 loadbang; #X obj 84 108 *; #X obj 68 288 mtx_* 2; #X connect 0 0 20 0; #X connect 2 0 17 0; #X connect 3 0 2 0; #X connect 4 0 12 0; #X connect 5 0 15 1; #X connect 6 0 7 0; #X connect 7 0 8 0; #X connect 8 0 11 0; #X connect 9 0 10 0; #X connect 10 0 21 0; #X connect 11 0 9 1; #X connect 12 0 5 0; #X connect 13 0 20 1; #X connect 14 0 16 0; #X connect 15 0 14 0; #X connect 16 0 9 0; #X connect 17 0 15 0; #X connect 17 1 14 1; #X connect 17 2 16 1; #X connect 18 0 13 0; #X connect 19 0 18 0; #X connect 20 0 2 1; #X connect 21 0 1 0; #X restore -8 219 pd mtx_oscillator; #X obj -8 239 mtx_* 0; #X obj 385 203 mtx_+; #X text -7 268 2 choose sine/frequency+amplitude; #X obj -7 376 mtx_* 0; #N canvas 0 0 450 300 mtx_noise~ 0; #X obj 180 137 mtx_* 2; #X obj 180 158 mtx_- 1; #X obj 323 116 loadbang; #X msg 323 140 3; #X obj 323 162 sqrt; #X obj 180 204 mtx_* 1; #X obj 180 235 outlet; #X obj 180 85 bang~; #X obj 180 106 mtx_rand 1 64; #X connect 0 0 1 0; #X connect 1 0 5 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 4 0 5 1; #X connect 5 0 6 0; #X connect 7 0 8 0; #X connect 8 0 0 0; #X restore -7 286 pd mtx_noise~; #X obj 339 63 dsp; #X obj 339 45 tgl 15 0 empty dsp_tgl empty 0 -6 0 8 -262144 -1 -1 0 1; #X text 343 -39 3 choose window; #X text 343 180 4 choose broadband/narrow band normalization; #X floatatom 347 93 5 0 0 0 - - -; #X floatatom 306 94 5 0 0 0 - - -; #N canvas 0 0 450 300 mtx2arraysend 0; #X obj 150 16 inlet; #X obj 148 254 outlet; #X obj 170 64 t a a; #X obj 204 85 mtx_size; #X msg 205 129 resize \$1; #X obj 205 108 change; #X obj 172 149 list split 3; #X obj 170 169 list prepend 0; #X connect 0 0 2 0; #X connect 2 0 6 0; #X connect 2 1 3 0; #X connect 3 1 5 0; #X connect 4 0 1 0; #X connect 5 0 4 0; #X connect 6 1 7 0; #X connect 7 0 1 0; #X restore 469 255 pd mtx2arraysend; #X floatatom 29 163 6 0 0 0 freq - -; #N canvas 0 0 450 300 (subpatch) 0; #X array signal 64 float 1; #A 0 0.332393 -0.190103 -0.696238 -1.14245 -1.49035 -1.70998 -1.78244 -1.70151 -1.47414 -1.1199 -0.669277 -0.161057 0.361022 0.852032 1.26971 1.57812 1.75071 1.77263 1.642 1.37004 0.980184 0.505969 -0.0117945 -0.528541 -0.999799 -1.38501 -1.65103 -1.77496 -1.74612 -1.56702 -1.25305 -0.831239 -0.337892 0.184535 0.69108 1.13815 1.48727 1.70839 1.78248 1.70317 1.47728 1.12425 0.674464 0.166635 -0.355539 -0.847111 -1.26578 -1.57551 -1.74965 -1.77321 -1.64417 -1.37362 -0.984858 -0.511333 0.00619539 0.52319 0.995158 1.38148 1.64891 1.77443 1.74724 1.56968 1.25702 0.836189 ; #X coords 0 2 63 -2 200 140 1; #X restore 589 -66 graph; #X obj 385 427 s spectrum; #X obj 469 278 s signal; #X msg 532 278 ylabel -2 0 -2 -1 0 1 2 \, yticks 0 0.5 2; #X obj 588 254 loadbang; #X obj 116 237 loadbang; #X obj 404 47 loadbang; #X msg 117 218 2.999; #X obj 211 353 mtx_resize 0 256; #X msg 472 87 gauss 64 -85; #X obj 461 113 mtx_window; #X msg 650 130 kaiser 64 \$1; #X msg 649 96 0; #X msg 743 96 8; #X msg 713 96 5; #X msg 777 95 10; #X msg 682 96 2; #X connect 0 0 61 0; #X connect 1 0 61 0; #X connect 2 0 61 0; #X connect 4 0 3 0; #X connect 5 0 59 0; #X connect 6 0 7 0; #X connect 6 1 8 0; #X connect 7 0 9 0; #X connect 8 0 9 1; #X connect 9 0 29 0; #X connect 10 0 11 0; #X connect 11 0 52 0; #X connect 12 0 5 1; #X connect 13 0 61 0; #X connect 14 0 61 0; #X connect 15 0 61 0; #X connect 16 0 10 0; #X connect 16 0 30 0; #X connect 17 0 12 1; #X connect 17 0 35 0; #X connect 18 0 41 1; #X connect 19 0 20 0; #X connect 20 0 18 0; #X connect 20 0 27 0; #X connect 21 0 38 1; #X connect 22 0 23 0; #X connect 23 0 21 0; #X connect 23 0 26 0; #X connect 26 0 25 0; #X connect 27 0 28 0; #X connect 29 0 16 0; #X connect 30 0 16 1; #X connect 31 0 32 0; #X connect 32 0 52 0; #X connect 33 0 52 0; #X connect 34 0 52 0; #X connect 35 0 33 0; #X connect 35 1 34 0; #X connect 37 0 38 0; #X connect 38 0 39 0; #X connect 39 0 5 0; #X connect 39 0 49 0; #X connect 41 0 39 1; #X connect 42 0 41 0; #X connect 43 0 48 0; #X connect 43 1 47 0; #X connect 44 0 43 0; #X connect 49 0 53 0; #X connect 50 0 37 0; #X connect 54 0 53 0; #X connect 55 0 54 0; #X connect 56 0 58 0; #X connect 57 0 2 0; #X connect 58 0 50 0; #X connect 59 0 6 0; #X connect 60 0 61 0; #X connect 61 0 4 0; #X connect 61 0 12 0; #X connect 62 0 61 0; #X connect 63 0 62 0; #X connect 64 0 62 0; #X connect 65 0 62 0; #X connect 66 0 62 0; #X connect 67 0 62 0; #X restore 616 242 pd fft_analysis; #X connect 1 0 6 0; #X connect 8 0 18 0; #X connect 9 0 18 0; #X connect 10 0 18 0; #X connect 11 0 18 0; #X connect 12 0 18 0; #X connect 13 0 18 0; #X connect 14 0 18 0; #X connect 17 0 18 0; #X connect 18 0 1 0; #X connect 19 0 17 0; #X connect 20 0 17 0; #X connect 21 0 17 0; #X connect 22 0 17 0; #X connect 23 0 17 0; pd-iemmatrix-0.3/abs/mtx_window.pd000066400000000000000000000133161262113134600172500ustar00rootroot00000000000000#N canvas 400 0 1130 500 10; #X obj 41 9 inlet; #N canvas 404 130 450 300 scale_-1...1 0; #X obj 126 -4 inlet; #X obj 129 274 outlet; #X obj 157 50 t f f; #X obj 157 228 mtx_linspace; #X msg 157 89 1 \$1; #X obj 157 108 /; #X msg 157 128 1 \$1; #X obj 157 148 -; #X obj 157 168 t f f; #X obj 157 187 * -1; #X obj 157 207 pack f f f; #X obj 157 70 << 1; #X msg 64 50 matrix 1 1 0; #X obj 126 21 moses 2; #X connect 0 0 13 0; #X connect 2 0 11 0; #X connect 2 1 10 2; #X connect 3 0 1 0; #X connect 4 0 5 0; #X connect 5 0 6 0; #X connect 6 0 7 0; #X connect 7 0 8 0; #X connect 8 0 9 0; #X connect 8 1 10 1; #X connect 9 0 10 0; #X connect 10 0 3 0; #X connect 11 0 4 0; #X connect 12 0 1 0; #X connect 13 0 12 0; #X connect 13 1 2 0; #X restore 48 88 pd scale_-1...1; #X obj 48 262 mtx_* 1; #N canvas 0 0 450 300 pi 0; #X obj 217 64 inlet; #X msg 217 84 1; #X obj 217 106 atan; #X obj 217 127 * 4; #X obj 217 148 outlet; #X connect 0 0 1 0; #X connect 1 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X restore 92 220 pd pi; #X obj 92 240 / 2; #X obj 92 200 loadbang; #X obj 48 286 mtx_cos; #X obj 48 309 mtx_.^ 2; #X obj 48 65 t f b; #X msg 90 110 0; #X obj 112 262 mtx_* 1; #N canvas 0 0 450 300 pi 0; #X obj 217 64 inlet; #X msg 217 84 1; #X obj 217 106 atan; #X obj 217 127 * 4; #X obj 217 148 outlet; #X connect 0 0 1 0; #X connect 1 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X restore 156 220 pd pi; #X obj 156 240 / 2; #X obj 156 200 loadbang; #X obj 112 286 mtx_cos; #X obj 87 65 t f b; #X msg 119 110 1; #X msg 151 110 2; #X obj 127 65 t f b a; #X obj 198 285 mtx_* 1; #X obj 259 265 *; #X obj 298 206 loadbang; #X msg 298 226 10; #X obj 298 246 log; #X obj 198 307 mtx_exp; #X msg 259 227 \$2; #X obj 259 246 / 20; #X obj 127 337 mtx_ones; #X msg 127 317 1 \$1; #X obj 198 261 mtx_.^ 2; #X obj 112 448 outlet; #X obj 181 65 t f b; #X msg 183 109 3; #X obj 356 265 mtx_abs; #X obj 356 285 mtx_* -1; #X obj 356 306 mtx_+ 1; #X obj 419 260 mtx_* 1; #N canvas 0 0 450 300 pi 0; #X obj 217 64 inlet; #X msg 217 84 1; #X obj 217 106 atan; #X obj 217 127 * 4; #X obj 217 148 outlet; #X connect 0 0 1 0; #X connect 1 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X restore 463 218 pd pi; #X obj 463 238 / 2; #X obj 463 198 loadbang; #X obj 419 284 mtx_cos; #X obj 419 307 mtx_.^ 2; #X obj 221 65 t f b; #X msg 223 109 4; #X obj 419 350 mtx_./ 1.08; #X obj 419 328 mtx_+ 0.08; #X obj 260 65 t f b; #X msg 264 109 5; #X text 24 147 hanning; #X text 62 162 sine; #X text 131 160 rect; #X text 173 161 hamming; #X obj 579 235 mtx_* 1; #N canvas 0 0 450 300 pi 0; #X obj 217 64 inlet; #X msg 217 84 1; #X obj 217 106 atan; #X obj 217 127 * 4; #X obj 217 148 outlet; #X connect 0 0 1 0; #X connect 1 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X restore 623 213 pd pi; #X obj 623 193 loadbang; #X obj 609 296 mtx_cos; #X text 188 150 blackman; #X obj 541 359 mtx_+ 0.42; #X obj 579 257 t a a; #X obj 609 277 mtx_* 2; #X obj 541 297 mtx_cos; #X obj 609 317 mtx_* 0.08; #X obj 541 317 mtx_* 0.5; #X obj 541 338 mtx_+; #X text 625 46 part of iemmatrix; #X text 549 412 Franz Zotter 2006; #X text 93 149 gauss; #X obj 48 131 demux 0 1 2 3 4 5 6; #X obj 48 32 route hanning sine gauss rectangular bartlett hamming blackman kaiser; #X obj 303 67 t f b a; #X msg 301 109 6; #N canvas 1059 432 430 404 kaiser 1; #X obj 43 41 inlet; #X obj 232 44 inlet; #X obj 43 362 outlet; #X obj 43 248 mtx_win_besseli0; #X obj 43 327 mtx_./ 1; #X obj 43 159 mtx_* 1; #X obj 43 74 mtx_.^ 2; #X obj 43 95 mtx_* -1; #X obj 43 116 mtx_+ 1; #X obj 43 137 mtx_.^ 0.5; #X msg 232 227 \$3; #X msg 232 65 \$2; #X msg 232 180 matrix 1 1 \$1; #X obj 232 204 mtx_win_besseli0; #X connect 0 0 6 0; #X connect 1 0 11 0; #X connect 3 0 4 0; #X connect 4 0 2 0; #X connect 5 0 3 0; #X connect 6 0 7 0; #X connect 7 0 8 0; #X connect 8 0 9 0; #X connect 9 0 5 0; #X connect 10 0 4 1; #X connect 11 0 5 1; #X connect 11 0 12 0; #X connect 12 0 13 0; #X connect 13 0 10 0; #X restore 704 317 pd kaiser; #X connect 0 0 68 0; #X connect 1 0 67 0; #X connect 2 0 6 0; #X connect 3 0 4 0; #X connect 4 0 2 1; #X connect 5 0 3 0; #X connect 6 0 7 0; #X connect 7 0 30 0; #X connect 8 0 1 0; #X connect 8 1 9 0; #X connect 9 0 67 1; #X connect 10 0 14 0; #X connect 11 0 12 0; #X connect 12 0 10 1; #X connect 13 0 11 0; #X connect 14 0 30 0; #X connect 15 0 1 0; #X connect 15 1 16 0; #X connect 16 0 67 1; #X connect 17 0 67 1; #X connect 18 0 1 0; #X connect 18 1 17 0; #X connect 18 2 25 0; #X connect 19 0 24 0; #X connect 20 0 19 1; #X connect 21 0 22 0; #X connect 22 0 23 0; #X connect 23 0 20 1; #X connect 24 0 30 0; #X connect 25 0 26 0; #X connect 26 0 20 0; #X connect 27 0 30 0; #X connect 28 0 27 0; #X connect 29 0 19 0; #X connect 31 0 1 0; #X connect 31 1 32 0; #X connect 32 0 67 1; #X connect 33 0 34 0; #X connect 34 0 35 0; #X connect 35 0 30 0; #X connect 36 0 40 0; #X connect 37 0 38 0; #X connect 38 0 36 1; #X connect 39 0 37 0; #X connect 40 0 41 0; #X connect 41 0 45 0; #X connect 42 0 1 0; #X connect 42 1 43 0; #X connect 43 0 67 1; #X connect 44 0 30 0; #X connect 45 0 44 0; #X connect 46 0 1 0; #X connect 46 1 47 0; #X connect 47 0 67 1; #X connect 52 0 58 0; #X connect 53 0 52 1; #X connect 54 0 53 0; #X connect 55 0 61 0; #X connect 57 0 30 0; #X connect 58 0 60 0; #X connect 58 1 59 0; #X connect 59 0 55 0; #X connect 60 0 62 0; #X connect 61 0 63 1; #X connect 62 0 63 0; #X connect 63 0 57 0; #X connect 67 0 2 0; #X connect 67 1 10 0; #X connect 67 2 29 0; #X connect 67 3 33 0; #X connect 67 4 36 0; #X connect 67 5 52 0; #X connect 67 6 71 0; #X connect 68 0 8 0; #X connect 68 1 15 0; #X connect 68 2 18 0; #X connect 68 3 28 0; #X connect 68 4 31 0; #X connect 68 5 42 0; #X connect 68 6 46 0; #X connect 68 7 69 0; #X connect 69 0 1 0; #X connect 69 1 70 0; #X connect 69 2 71 1; #X connect 70 0 67 1; #X connect 71 0 30 0; pd-iemmatrix-0.3/alias/000077500000000000000000000000001262113134600150445ustar00rootroot00000000000000pd-iemmatrix-0.3/alias/README000066400000000000000000000001721262113134600157240ustar00rootroot00000000000000 G.Holzmann: I made this alias directory for Pd-extended, so that the aliases for the single file externals will work ! pd-iemmatrix-0.3/alias/matrix_mul_line~.c000066400000000000000000000001351262113134600205750ustar00rootroot00000000000000#include "../src/mtx_mul~.c" void matrix_mul_line_tilde_setup() { mtx_mul_tilde_setup(); } pd-iemmatrix-0.3/alias/matrix_mul~.c000066400000000000000000000001301262113134600175610ustar00rootroot00000000000000#include "../src/mtx_mul~.c" void matrix_mul_tilde_setup() { mtx_mul_tilde_setup(); } pd-iemmatrix-0.3/alias/matrix~.c000066400000000000000000000001241262113134600167070ustar00rootroot00000000000000#include "../src/mtx_mul~.c" void matrix_tilde_setup() { mtx_mul_tilde_setup(); } pd-iemmatrix-0.3/alias/mtx.c000066400000000000000000000001021262113134600160110ustar00rootroot00000000000000#include "../src/matrix.c" void mtx_setup() { matrix_setup(); } pd-iemmatrix-0.3/alias/mtx_0x21.c000066400000000000000000000001361262113134600165720ustar00rootroot00000000000000// alias for [mtx_!] #include "../src/mtx_not.c" void mtx_0x21_setup() { mtx_not_setup(); } pd-iemmatrix-0.3/alias/mtx_0x210x3d.c000066400000000000000000000001431262113134600172670ustar00rootroot00000000000000// alias for [mtx_!=] #include "../src/mtx_neq.c" void mtx_0x210x3d_setup() { mtx_neq_setup(); } pd-iemmatrix-0.3/alias/mtx_0x26.c000066400000000000000000000001441262113134600165760ustar00rootroot00000000000000// alias for [mtx_&] #include "../src/mtx_bitand.c" void mtx_0x26_setup() { mtx_bitand_setup(); } pd-iemmatrix-0.3/alias/mtx_0x260x26.c000066400000000000000000000001431262113134600172150ustar00rootroot00000000000000// alias for [mtx_&&] #include "../src/mtx_and.c" void mtx_0x260x26_setup() { mtx_and_setup(); } pd-iemmatrix-0.3/alias/mtx_0x2a.c000066400000000000000000000001361262113134600166520ustar00rootroot00000000000000// alias for [mtx_*] #include "../src/mtx_mul.c" void mtx_0x2a_setup() { mtx_mul_setup(); } pd-iemmatrix-0.3/alias/mtx_0x2a0x7e.c000066400000000000000000000001521262113134600173540ustar00rootroot00000000000000// alias for [mtx_*~] #include "../src/mtx_mul~.c" void mtx_0x2a0x7e_setup() { mtx_mul_tilde_setup(); } pd-iemmatrix-0.3/alias/mtx_0x2b.c000066400000000000000000000001361262113134600166530ustar00rootroot00000000000000// alias for [mtx_+] #include "../src/mtx_add.c" void mtx_0x2b_setup() { mtx_add_setup(); } pd-iemmatrix-0.3/alias/mtx_0x2d.c000066400000000000000000000001361262113134600166550ustar00rootroot00000000000000// alias for [mtx_-] #include "../src/mtx_sub.c" void mtx_0x2d_setup() { mtx_sub_setup(); } pd-iemmatrix-0.3/alias/mtx_0x2e0x2a.c000066400000000000000000000001431262113134600173470ustar00rootroot00000000000000// alias for [mtx_.*] #include "../src/mtx_mul.c" void mtx_0x2e0x2a_setup() { mtx_mul_setup(); } pd-iemmatrix-0.3/alias/mtx_0x2e0x2f.c000066400000000000000000000001151262113134600173530ustar00rootroot00000000000000#include "../src/mtx_mul.c" void mtx_0x2e0x2f_setup() { mtx_div_setup(); } pd-iemmatrix-0.3/alias/mtx_0x2e0x5e.c000066400000000000000000000001421262113134600173550ustar00rootroot00000000000000// alias for [mtx.^] #include "../src/mtx_pow.c" void mtx_0x2e0x5e_setup() { mtx_pow_setup(); } pd-iemmatrix-0.3/alias/mtx_0x2f.c000066400000000000000000000001111262113134600166500ustar00rootroot00000000000000#include "../src/mtx_mul.c" void mtx_0x2f_setup() { mtx_div_setup(); } pd-iemmatrix-0.3/alias/mtx_0x3a.c000066400000000000000000000001421262113134600166500ustar00rootroot00000000000000// alias for [mtx_:] #include "../src/mtx_colon.c" void mtx_0x3a_setup() { mtx_colon_setup(); } pd-iemmatrix-0.3/alias/mtx_0x3c.c000066400000000000000000000001341262113134600166530ustar00rootroot00000000000000// alias for [mtx_<] #include "../src/mtx_lt.c" void mtx_0x3c_setup() { mtx_lt_setup(); } pd-iemmatrix-0.3/alias/mtx_0x3c0x3c.c000066400000000000000000000001531262113134600173520ustar00rootroot00000000000000// alias for [mtx_<<] #include "../src/mtx_bitleft.c" void mtx_0x3c0x3c_setup() { mtx_bitleft_setup(); } pd-iemmatrix-0.3/alias/mtx_0x3c0x3d.c000066400000000000000000000001411262113134600173500ustar00rootroot00000000000000// alias for [mtx_<=] #include "../src/mtx_le.c" void mtx_0x3c0x3d_setup() { mtx_le_setup(); } pd-iemmatrix-0.3/alias/mtx_0x3d0x3d.c000066400000000000000000000001411262113134600173510ustar00rootroot00000000000000// alias for [mtx_==] #include "../src/mtx_eq.c" void mtx_0x3d0x3d_setup() { mtx_eq_setup(); } pd-iemmatrix-0.3/alias/mtx_0x3e.c000066400000000000000000000001341262113134600166550ustar00rootroot00000000000000// alias for [mtx_>] #include "../src/mtx_gt.c" void mtx_0x3e_setup() { mtx_gt_setup(); } pd-iemmatrix-0.3/alias/mtx_0x3e0x3d.c000066400000000000000000000001411262113134600173520ustar00rootroot00000000000000// alias for [mtx_>=] #include "../src/mtx_ge.c" void mtx_0x3e0x3d_setup() { mtx_ge_setup(); } pd-iemmatrix-0.3/alias/mtx_0x3e0x3e.c000066400000000000000000000001551262113134600173600ustar00rootroot00000000000000// alias for [mtx_>>] #include "../src/mtx_bitright.c" void mtx_0x3e0x3e_setup() { mtx_bitright_setup(); } pd-iemmatrix-0.3/alias/mtx_0x7c.c000066400000000000000000000001421262113134600166560ustar00rootroot00000000000000// alias for [mtx_|] #include "../src/mtx_bitor.c" void mtx_0x7c_setup() { mtx_bitor_setup(); } pd-iemmatrix-0.3/alias/mtx_0x7c0x7c.c000066400000000000000000000001411262113134600173570ustar00rootroot00000000000000// alias for [mtx_||] #include "../src/mtx_or.c" void mtx_0x7c0x7c_setup() { mtx_or_setup(); } pd-iemmatrix-0.3/alias/mtx_div.c000066400000000000000000000000341262113134600166570ustar00rootroot00000000000000#include "../src/mtx_mul.c" pd-iemmatrix-0.3/autogen.sh000077500000000000000000000003521262113134600157540ustar00rootroot00000000000000#!/bin/sh AUTORECONF=$(which autoreconf) if [ -x "${AUTORECONF}" ]; then ${AUTORECONF} -fiv || exit 1 else aclocal && autoconf || exit 1 fi echo "now run './configure'" 1>&2 echo "for help on args run './configure --help'" 1>&2 pd-iemmatrix-0.3/configure.ac000066400000000000000000000176711262113134600162550ustar00rootroot00000000000000dnl Process this file with autoconf to produce a configure script. AC_PREREQ([2.60]) AC_INIT([iemmatrix], [0.3], [zmoelnig@iem.at], [iemmatrix], [http://puredata.info/downloads/iemmatrix]) AM_INIT_AUTOMAKE([1.10 foreign]) m4_ifdef([LT_INIT], [LT_INIT([disable-static win32-dll])], [AC_ENABLE_SHARED AC_DISABLE_STATIC AC_LIBTOOL_WIN32_DLL]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_FILES([Makefile]) AC_CONFIG_FILES([doc/Makefile abs/Makefile]) AC_CONFIG_FILES([iemmatrix-meta.pd]) AC_CONFIG_FILES([VERSION.txt]) AC_CONFIG_SRCDIR([src/iemmatrix.c]) IEM_OPERATING_SYSTEM ARCH=$(uname -m) KERN=$(uname -s) dnl m4_ifdef([AC_LIB_RPATH], [AC_LIB_RPATH]) dnl Checks for programs. AC_PROG_CC AC_PROG_LN_S AC_LIBTOOL_WIN32_DLL AC_PROG_LIBTOOL AC_ARG_WITH([pd], AC_HELP_STRING([--with-pd=], [where to look for Pd-headers and and -libs])) AC_ARG_WITH([extension], AC_HELP_STRING([--with-extension=], [enforce a certain extension for the dynamic library (e.g. dll)])) AC_ARG_ENABLE([library], AC_HELP_STRING([--enable-library], [build iemmatrix as multi-object library (default, "yes"), as single-object externals ("no") or as both ("both")])) AC_ARG_WITH([build-date], AC_HELP_STRING([--with-build-date=], [alternative date string])) AM_CONDITIONAL([LIBRARY], [test "x${enable_library}" != "xno"]) AM_CONDITIONAL([SINGLEOBJECTS], [test "x${enable_library}" = "xno" || test "x${enable_library}" = "xboth"]) if test "x${libdir}" = "x\${exec_prefix}/lib"; then libdir='${exec_prefix}/lib/pd/extra' fi if test "x$with_pd" != "x"; then if test -d "${with_pd}"; then PDPATH=${with_pd} fi if test -d "${PDPATH}/src"; then AC_MSG_RESULT([adding ${PDPATH}/src to CPPFLAGS]) CPPFLAGS="-I${PDPATH}/src ${CPPFLAGS}" AC_MSG_RESULT([adding ${PDPATH}/src to LDFLAGS]) LDFLAGS="-L${PDPATH}/src ${LDFLAGS}" else if test -d "${PDPATH}"; then AC_MSG_RESULT([adding ${PDPATH} to CPPFLAGS]) CPPFLAGS="-I${PDPATH} ${CPPFLAGS}" fi fi if test -d "${PDPATH}/bin"; then AC_MSG_RESULT([adding ${PDPATH}/bin to LDFLAGS]) LDFLAGS="-L${PDPATH}/bin ${LDFLAGS}" else if test -d "${PDPATH}"; then AC_MSG_RESULT([adding ${PDPATH} to LDFLAGS]) LDFLAGS="-L${PDPATH} ${LDFLAGS}" fi fi fi dnl Checks for libraries. dnl Replace `main' with a function in -lc: AC_CHECK_LIB([c], [main]) AC_CHECK_LIB([crtdll], [fclose]) AC_CHECK_LIB([coldname], [lseek]) AC_CHECK_LIB([kernel32], [main]) AC_CHECK_LIB([user32], [main]) AC_CHECK_LIB([gdi32], [main]) dnl Replace `main' with a function in -lm: AC_CHECK_LIB([m], [main]) dnl for math.h Bessel/Neumann functions AC_CHECK_LIB([m], [jn]) AS_IF([test "xyes" = "x${ac_cv_lib_m_jn}"],[ AC_DEFINE(HAVE_MATH_BESSEL,1,[can math compute Bessel functions?]) ]) AM_CONDITIONAL(HAVE_MATH_BESSEL, [test "x${ac_cv_lib_m_jn}" = "xyes"]) dnl Replace `main' with a function in -lpthread: dnl AC_CHECK_LIB([pthread], [main]) dnl Replace `main' with a function in -lstk: dnl AC_CHECK_LIB([stk], [main], [STK=yes]) tmp_pddll_LIBS=$LIBS AC_CHECK_LIB([:pd.dll], [nullfn], [have_pddll="yes"], [have_pddll="no"]) LIBS=$tmp_pddll_LIBS AS_IF([test "x$have_pddll" = "xyes"],[ EXTRA_LTFLAGS="$EXTRA_LTFLAGS -Xlinker -l:pd.dll" ],[ AC_CHECK_LIB([pd], [nullfn]) ]) dnl Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS([io.h math.h memory.h stdio.h stdlib.h string.h unistd.h]) dnl Checks for typedefs, structures, and compiler characteristics. AC_HEADER_TIME dnl Checks for library functions. AC_FUNC_MMAP IEM_CHECK_FAT(ARCH_FLAG) IEM_CHECK_CFLAGS([-mms-bitfields]) IEM_CHECK_SIMD AC_MSG_CHECKING([extension]) if test "x$with_extension" != "x" then EXTENSION=$with_extension else case "$KERN" in Darwin) EXTENSION=pd_darwin ;; Linux) EXTENSION=pd_linux ;; IRIX64) EXTENSION=pd_irix6 ;; IRIX32) EXTENSION=pd_irix5 ;; IRIX64) EXTENSION=pd_irix6 ;; *CYGWIN*) EXTENSION=dll ;; *MINGW*) EXTENSION=dll ;; *) EXTENSION=pd_linux ;; esac fi AC_MSG_RESULT([$EXTENSION]) have_pd="no" AC_CHECK_HEADERS([pd/m_pd.h m_pd.h], [have_pd="yes"]) AS_IF([test "x${have_pd}" = "xno"],[ AC_ERROR([m_pd.h is desperately needed! install pd and/or use "--with-pd="]) ]) AC_ARG_WITH([fftw], AC_HELP_STRING([--without-fftw], [compile without FFTW])) AS_IF([test "xno" != "x${with_fftw}" ],[ have_fftw="no" have_fftw3="no" AC_CHECK_LIB([fftw3],[fftw_execute]) AS_IF([test "x$ac_cv_lib_fftw3_fftw_execute" != "xyes"],[ AC_CHECK_LIB([fftw3-3],[fftw_execute]) ac_cv_lib_fftw3_fftw_execute=$ac_cv_lib_fftw3_3_fftw_execute ]) AS_IF([test "x$ac_cv_lib_fftw3_fftw_execute" = "xyes"],[ AC_CHECK_HEADERS([fftw3.h], [have_fftw3="yes"]) ]) ]) AS_IF([test "xyes" = "x${have_fftw3}"],[ have_fftw="yes" AC_DEFINE(HAVE_LIBFFTW3, 1, [Define to 1 if you have the 'fftw3' library (-lfftw3).]) ]) AS_IF([test "xyes" = "x${have_fftw}" ],[ dnl AC_DEFINE(HAVE_LIBFFTW,1,[Define to 1 if you have the 'fftw' library (e.g. -lfftw3).]) AC_DEFINE(USE_FFTW, 1, [can we use fftw?]) ]) AM_CONDITIONAL(HAVE_FFTW, [test "x${have_fftw}" = "xyes"]) dnl for soundfile reading (and writing, if we do that...) AC_ARG_WITH([sndfile], AC_HELP_STRING([--without-sndfile], [compile without libsndfile support])) have_sndfile="no" AS_IF([test "xno" != "x${with_sndfile}"],[ AC_CHECK_LIB([sndfile], [sf_close]) AS_IF([test "x$ac_cv_lib_sndfile_sf_close" != "xyes"],[ AC_CHECK_LIB([sndfile-1],[sf_close]) ac_cv_lib_sndfile_sf_close=$ac_cv_lib_sndfile_1_sf_close ]) AS_IF([test "x$ac_cv_lib_sndfile_sf_close" = "xyes"],[ AC_CHECK_HEADERS([sndfile.h], [have_sndfile="yes"]) ]) ]) AS_IF([test "xyes" = "x${have_sndfile}"],[ AC_DEFINE([HAVE_LIBSNDFILE],1,[Define to 1 if you have the 'sndfile' library (-lsndfile).]) AC_DEFINE([HAVE_SNDFILE_H],1,[Define to 1 if you have the header file.]) ]) AM_CONDITIONAL(HAVE_SNDFILE, [test "xyes" = "x${have_sndfile}"]) dnl for gnu scientific library -lgsl: AC_ARG_WITH([gsl], AC_HELP_STRING([--without-gsl], [compile without GNU Scientific Library])) AS_IF([test "xno" != "x${with_gsl}"],[ AC_CHECK_LIB([gslcblas], [cblas_dgemm]) AC_CHECK_LIB([gsl], [gsl_blas_dgemm]) AS_IF([test "x${ac_cv_lib_gsl_gsl_blas_dgemm}" = "xyes"],[ AC_CHECK_LIB([gsl], [gsl_eigen_nonsymm], [:]) AC_CHECK_LIB([gsl], [gsl_sf_bessel_Jn], [:]) ]) ]) AM_CONDITIONAL(HAVE_GSL, [test "x${ac_cv_lib_gsl_gsl_blas_dgemm}" = "xyes"]) AM_CONDITIONAL(HAVE_GSL_CBLAS, [test "x${ac_cv_lib_gslcblas_cblas_dgemm}" = "xyes"]) AS_IF([test "x${ac_cv_lib_gsl_gsl_blas_dgemm}" = "xyes"],[ AC_DEFINE(HAVE_LIBGSL,1,[Define to 1 if you have the 'gsl' library (-lgsl).]) ]) AS_IF([test "x${ac_cv_lib_gslcblas_cblas_dgemm}" = "xyes"],[ AC_DEFINE(HAVE_LIBGSLCBLAS,1,[Define to 1 if you have the 'gslcblas' library (-lgslcblas).]) ]) AS_IF([test "x${ac_cv_lib_gsl_gsl_eigen_nonsymm}" = "xyes"],[ AC_DEFINE(HAVE_GSL_EIGEN_NONSYMM,1,[can gsl compute complex eigenvalues?]) ]) AM_CONDITIONAL(HAVE_GSL_EIGEN, [test "x${ac_cv_lib_gsl_gsl_eigen_nonsymm}" = "xyes"]) AS_IF([test "x${ac_cv_lib_gsl_gsl_sf_bessel_Jn}" = "xyes"],[ AC_DEFINE(HAVE_GSL_BESSEL,1,[can gsl compute Bessel functions?]) ]) AM_CONDITIONAL(HAVE_GSL_BESSEL, [test "x${ac_cv_lib_gsl_sf_bessel_Jn}" = "xyes"]) AC_MSG_CHECKING([build-date]) AS_IF([test "x$with_build_date" = "xyes" ],[with_build_date=""]) AS_IF([test "x$with_build_date" = "xno" ],[with_build_date=""]) AS_IF([test "x$with_build_date" != "x" ],[ AC_DEFINE_UNQUOTED([BUILD_DATE], ["$with_build_date"], [user-defined build-date string])]) ## urgh, brackets need to be escaped with @<:@ and @:>@... AS_IF([test "x$with_build_date" != "x" ],[ with_build_date="@<:@default@:>@" ]) AC_MSG_RESULT([$with_build_date]) AC_SUBST([CPPFLAGS]) AC_SUBST([CFLAGS]) AC_SUBST([LIBS]) AC_SUBST([DEFS]) AC_SUBST([ARCH_FLAG]) AC_SUBST([LIBTOOL_DEPS]) AC_SUBST([EXTRA_LTFLAGS]) AC_SUBST(EXTENSION) AC_OUTPUT() pd-iemmatrix-0.3/doc/000077500000000000000000000000001262113134600145205ustar00rootroot00000000000000pd-iemmatrix-0.3/doc/Makefile.am000066400000000000000000000037011262113134600165550ustar00rootroot00000000000000AUTOMAKE_OPTIONS = foreign SUFFIXES = .pd iemmatrixdir=$(pkglibdir) dist_iemmatrix_DATA= \ matrix-help.pd \ matrix~-help.pd \ mtx_abs-help.pd \ mtx_add-help.pd \ mtx_and-help.pd \ mtx_atan-help.pd \ mtx_bessel-help.pd \ mtx_binops-help.pd \ mtx_bitand-help.pd \ mtx_bitleft-help.pd \ mtx_bitor-help.pd \ mtx_bitright-help.pd \ mtx_check-help.pd \ mtx_cholesky-help.pd \ mtx_circular_harmonics-help.pd \ mtx_col-help.pd \ mtx_colon-help.pd \ mtx_concat-help.pd \ mtx_conv-help.pd \ mtx_cos-help.pd \ mtx_cumprod-help.pd \ mtx_cumsum-help.pd \ mtx_dbtopow-help.pd \ mtx_dbtorms-help.pd \ mtx_diag-help.pd \ mtx_diegg-help.pd \ mtx_diff-help.pd \ mtx_distance2-help.pd \ mtx_egg-help.pd \ mtx_eig-help.pd \ mtx_ei~-help.pd \ mtx_element-help.pd \ mtx_eq-help.pd \ mtx_exp-help.pd \ mtx_eye-help.pd \ mtx_fill-help.pd \ mtx_find-help.pd \ mtx_gauss-help.pd \ mtx_ge-help.pd \ mtx_gt-help.pd \ mtx_index-help.pd \ mtx_int-help.pd \ mtx_inverse-help.pd \ mtx_le-help.pd \ mtx_log-help.pd \ mtx_lt-help.pd \ mtx_max2-help.pd \ mtx_mean-help.pd \ mtx_min2-help.pd \ mtx_minmax-help.pd \ mtx_mul-help.pd \ mtx_mul~-help.pd \ mtx_neq-help.pd \ mtx_not-help.pd \ mtx_ones-help.pd \ mtx_or-help.pd \ mtx_pack~-help.pd \ mtx_pivot-help.pd \ mtx_pow-help.pd \ mtx_powtodb-help.pd \ mtx_print-help.pd \ mtx_prod-help.pd \ mtx_qr-help.pd \ mtx_rand-help.pd \ mtx_repmat-help.pd \ mtx_resize-help.pd \ mtx_reverse-help.pd \ mtx_rfft-help.pd \ mtx_rifft-help.pd \ mtx_rmstodb-help.pd \ mtx_roll-help.pd \ mtx_row-help.pd \ mtx_scroll-help.pd \ mtx_sin-help.pd \ mtx_size-help.pd \ mtx_slice-help.pd \ mtx_sndfileread-help.pd \ mtx_spherical_harmonics-help.pd \ mtx_spherical_radial-help.pd \ mtx_sub-help.pd \ mtx_sum-help.pd \ mtx_svd-help.pd \ mtx_trace-help.pd \ mtx_transpose-help.pd \ mtx_unpack~-help.pd \ mtx_zeros-help.pd pd-iemmatrix-0.3/doc/matrix-help.pd000066400000000000000000000067601262113134600173100ustar00rootroot00000000000000#N canvas 94 0 1118 745 10; #X obj 258 -23 matrix; #X obj 61 187 mtx_check; #X obj 61 216 mtx_print; #X obj 544 -21 mtx; #X obj 30 535 mtx_print; #X obj 30 513 matrix; #X msg 42 372 zeros 5; #X msg 30 353 eye 3; #X msg 49 390 ones 4; #X msg 55 411 diag 1 2 3 4; #X obj 369 531 matrix; #X obj 471 496 loadbang; #X obj 471 516 mtx_diag 4 3 1 2; #X obj 369 553 print; #X msg 369 364 row; #X msg 539 497 bang; #X msg 379 404 row \$1; #X floatatom 379 385 4 0 0; #X floatatom 391 424 4 0 0; #X msg 391 443 row \$1 1 2 3 4; #X floatatom 498 382 4 0 0; #X floatatom 510 421 4 0 0; #X msg 488 362 col; #X msg 498 401 col \$1; #X msg 510 440 col \$1 1 2 3 4; #X msg 592 364 element; #X msg 623 406 element \$1; #X floatatom 643 428 4 0 0; #X msg 643 447 element 3 \$1; #X floatatom 623 386 4 0 0; #X msg 61 162 matrix 3 3 1 2 3 4 5 6 7; #X msg 39 136 matrix 3 3 1 2 3 4 5 6 7; #X text 43 79 this is \, how a matrix really looks...; #X text 216 134 an "illegal" matrix; #X text 122 187 make the "illegal" matrix consistent; #X text 216 103 a "legal" matrix; #X msg 40 103 matrix 3 3 1 2 3 1 2 4 7 6 5; #X obj 590 218 mtx_print; #X obj 590 196 matrix; #X obj 655 174 mtx_ones 10; #X msg 655 154 bang; #X text 121 218 print to stderr (like "print"); #X msg 590 64 bang; #X floatatom 615 103 4 0 0; #X msg 604 85 matrix 2 3 10 10 30 20 -5 8; #X msg 627 126 1 2 3 1 2 3 10 20 30; #X text 758 118 a list of elements; #X text 759 132 has to fit the size of the "current" matrix; #X text 651 104 set all elements of the current matrix to a value; #X text 366 345 get/set rows; #X text 479 344 get/set columns; #X text 5 564 create various matrices; #X text 356 -21 matrix operations; #X text 636 197 ==; #X obj 660 197 mtx; #X msg 335 398 bang; #X text 586 344 get/set elements; #X msg 654 486 element \$1 2 10; #X floatatom 654 468 4 0 0; #X msg 702 406 element \$1 \$1; #X text 687 406 ==; #X obj 161 479 matrix 3 2; #X obj 161 525 mtx_print; #X msg 161 357 bang; #X text 143 542 an "empty" [3 \, 2] matrix; #X msg 73 433 egg 4; #X msg 75 455 diegg 3 2 1; #X obj 126 671 mtx_element; #X obj 225 646 mtx_size; #X obj 225 669 mtx_transpose; #X obj 427 650 mtx_mean; #X obj 427 669 mtx_rand; #X obj 338 670 mtx_inverse; #X obj 126 646 mtx_eye; #X obj 338 645 mtx_+; #X text 127 620 see also help for:; #X msg 912 383 write /tmp/my_matrix.mtx; #X msg 912 406 read /tmp/my_matrix.mtx; #X obj 810 412 mtx_rand; #X msg 810 390 4 5; #X msg 858 389 bang; #X obj 858 464 mtx_print; #X text 848 351 load and save matrices; #X obj 858 440 matrix test.mtx; #X connect 1 0 2 0; #X connect 5 0 4 0; #X connect 6 0 5 0; #X connect 7 0 5 0; #X connect 8 0 5 0; #X connect 9 0 5 0; #X connect 10 0 13 0; #X connect 11 0 12 0; #X connect 12 0 10 1; #X connect 14 0 10 0; #X connect 15 0 12 0; #X connect 16 0 10 0; #X connect 17 0 16 0; #X connect 18 0 19 0; #X connect 19 0 10 0; #X connect 20 0 23 0; #X connect 21 0 24 0; #X connect 22 0 10 0; #X connect 23 0 10 0; #X connect 24 0 10 0; #X connect 25 0 10 0; #X connect 26 0 10 0; #X connect 27 0 28 0; #X connect 28 0 10 0; #X connect 29 0 26 0; #X connect 30 0 1 0; #X connect 31 0 2 0; #X connect 36 0 2 0; #X connect 38 0 37 0; #X connect 39 0 38 1; #X connect 40 0 39 0; #X connect 42 0 38 0; #X connect 43 0 38 0; #X connect 44 0 38 0; #X connect 45 0 38 0; #X connect 55 0 10 0; #X connect 57 0 10 0; #X connect 58 0 57 0; #X connect 61 0 62 0; #X connect 63 0 61 0; #X connect 65 0 5 0; #X connect 66 0 5 0; #X connect 76 0 83 0; #X connect 77 0 83 0; #X connect 78 0 83 0; #X connect 79 0 78 0; #X connect 80 0 83 0; #X connect 83 0 81 0; pd-iemmatrix-0.3/doc/matrix~-help.pd000066400000000000000000000031231262113134600174740ustar00rootroot00000000000000#N canvas 59 -12 889 589 12; #X obj 68 271 osc~ 100; #X obj 68 297 *~ 0.2; #X obj 112 320 osc~ 1000; #X obj 112 346 *~ 1.5; #X obj 157 295 osc~ 432; #X obj 68 411 env~; #X floatatom 68 435 4 0 0; #X obj 127 410 env~; #X floatatom 127 434 4 0 0; #X obj 187 410 env~; #X floatatom 187 434 4 0 0; #X obj 247 409 env~; #X floatatom 247 433 4 0 0; #X floatatom 284 350 4 0 0; #X text 332 353 fade time in [ms]; #X msg 265 100 bang; #X obj 265 127 mtx_eye 3 4; #X msg 362 100 bang; #X obj 362 127 mtx_egg 3 4; #X msg 261 179 bang; #X msg 362 178 bang; #X obj 261 206 mtx_ones 3 4; #X obj 362 205 mtx_zeros 3 4; #X obj 68 371 matrix~ 3 4 100 .......; #X obj 98 32 matrix~; #X text 174 24 matrix-multiply m IN~signals to n OUT~signals; #X text 174 37 matrices are interpolated a la line~; #X text 473 91 the one-before-last inlet eats; #X text 476 104 matrix-messages to control the gains; #X text 475 117 of the matrix~; #X text 484 333 the last inlet gets the fade-time between two matrix-messages. ; #X obj 78 505 matrix~; #X text 154 503 creation: "matrix~ [ [ []]] ; #X connect 0 0 1 0; #X connect 1 0 23 0; #X connect 2 0 3 0; #X connect 3 0 23 1; #X connect 4 0 23 2; #X connect 5 0 6 0; #X connect 7 0 8 0; #X connect 9 0 10 0; #X connect 11 0 12 0; #X connect 13 0 23 4; #X connect 15 0 16 0; #X connect 16 0 23 3; #X connect 17 0 18 0; #X connect 18 0 23 3; #X connect 19 0 21 0; #X connect 20 0 22 0; #X connect 21 0 23 3; #X connect 22 0 23 3; #X connect 23 0 5 0; #X connect 23 1 7 0; #X connect 23 2 9 0; #X connect 23 3 11 0; pd-iemmatrix-0.3/doc/mtx_abs-help.pd000066400000000000000000000010451262113134600174300ustar00rootroot00000000000000#N canvas 128 118 680 254 10; #X text 458 17 updated for; #X obj 546 17 iemmatrix 0.2; #X text 136 10 absolute value of matrix elements; #X obj 595 43 matrix; #X text 465 42 see also help for; #X obj 48 100 mtx 3 3; #X text 45 42 compute the absolute value of each element of a matrix ; #X obj 595 63 abs; #X obj 48 164 mtx_abs; #X obj 48 192 mtx_print abs; #X obj 48 131 t a a; #X obj 91 132 mtx_print org; #X msg 48 80 0 1 -2 -3 -4 5 -6 7 8; #X connect 5 0 10 0; #X connect 8 0 9 0; #X connect 10 0 8 0; #X connect 10 1 11 0; #X connect 12 0 5 0; pd-iemmatrix-0.3/doc/mtx_add-help.pd000066400000000000000000000017051262113134600174160ustar00rootroot00000000000000#N canvas 363 101 450 300 10; #X text 255 30 updated for; #X obj 343 30 iemmatrix 0.2; #X obj 392 56 matrix; #X text 262 55 see also help for; #X text 8 42 matrix arithmetic: adding; #X obj 46 176 mtx_add; #X obj 125 177 mtx_+; #X obj 123 147 mtx_diag 1 2 3 4 5; #X obj 46 147 mtx_ones 5; #X obj 46 124 t b b; #X obj 46 198 mtx_print; #X msg 46 105 bang; #X text 100 178 ==; #X obj 263 147 mtx_eye 4; #X obj 263 172 mtx_add 10; #X msg 263 120 bang; #X obj 263 199 mtx_print; #X floatatom 332 104 4 0 0 0 - - -; #X obj 332 122 t b f; #X obj 360 172 mtx_+ 10; #X text 339 173 ==; #X text 38 227 add 2 matrices; #X text 232 231 add an offset to a matrix; #X obj 17 23 mtx_add; #X obj 81 23 mtx_+; #X obj 392 77 +; #X connect 5 0 10 0; #X connect 7 0 5 1; #X connect 8 0 5 0; #X connect 9 0 8 0; #X connect 9 1 7 0; #X connect 11 0 9 0; #X connect 13 0 14 0; #X connect 14 0 16 0; #X connect 15 0 13 0; #X connect 17 0 18 0; #X connect 18 0 13 0; #X connect 18 1 14 1; pd-iemmatrix-0.3/doc/mtx_and-help.pd000066400000000000000000000017111262113134600174250ustar00rootroot00000000000000#N canvas 224 247 450 300 10; #X text 255 30 updated for; #X obj 343 30 iemmatrix 0.2; #X obj 392 56 matrix; #X text 262 55 see also help for; #X obj 123 167 mtx_diag 1 2 3 4 5; #X obj 46 167 mtx_ones 5; #X obj 46 144 t b b; #X obj 46 218 mtx_print; #X msg 46 125 bang; #X text 100 198 ==; #X obj 263 167 mtx_eye 4; #X msg 263 140 bang; #X obj 263 219 mtx_print; #X floatatom 332 124 4 0 0 0 - - -; #X obj 332 142 t b f; #X text 339 193 ==; #X obj 17 23 mtx_and; #X obj 81 23 mtx_&&; #X obj 392 77 &&; #X obj 46 196 mtx_and; #X obj 125 197 mtx_&&; #X obj 263 192 mtx_and 0; #X obj 360 192 mtx_&& 0; #X text 8 42 matrix logic: logical AND; #X text 38 247 AND 2 matrices; #X text 246 251 AND a matrix with a scalar; #X connect 4 0 19 1; #X connect 5 0 19 0; #X connect 6 0 5 0; #X connect 6 1 4 0; #X connect 8 0 6 0; #X connect 10 0 21 0; #X connect 11 0 10 0; #X connect 13 0 14 0; #X connect 14 0 10 0; #X connect 14 1 21 1; #X connect 19 0 7 0; #X connect 21 0 12 0; pd-iemmatrix-0.3/doc/mtx_atan-help.pd000066400000000000000000000010411262113134600176020ustar00rootroot00000000000000#N canvas 262 127 680 254 10; #X text 458 17 updated for; #X obj 546 17 iemmatrix 0.2; #X obj 595 43 matrix; #X text 465 42 see also help for; #X obj 48 100 mtx 3 3; #X obj 48 192 mtx_print abs; #X obj 48 131 t a a; #X obj 91 132 mtx_print org; #X msg 48 80 0 1 -2 -3 -4 5 -6 7 8; #X obj 48 164 mtx_atan; #X obj 595 63 atan; #X text 136 10 arc tangent value of matrix elements; #X text 45 42 compute the arc tangent of each element of a matrix; #X connect 4 0 6 0; #X connect 6 0 9 0; #X connect 6 1 7 0; #X connect 8 0 4 0; #X connect 9 0 5 0; pd-iemmatrix-0.3/doc/mtx_bessel-help.pd000066400000000000000000000246741262113134600201550ustar00rootroot00000000000000#N canvas 259 0 1021 852 10; #N canvas 0 0 450 300 (subpatch) 0; #X array j0 100 float 1; #A 0 0.997502 0.97014 0.913773 0.830957 0.725435 0.601943 0.465978 0.323516 0.180722 0.0436431 -0.0820875 -0.191518 -0.28061 -0.346423 -0.387235 -0.402599 -0.393338 -0.361468 -0.310062 -0.243063 -0.165057 -0.0810107 0.0039997 0.0850601 0.157677 0.218004 0.263034 0.29073 0.300115 0.291286 0.265378 0.224473 0.171447 0.109792 0.0433946 -0.0236951 -0.0874986 -0.144338 -0.191038 -0.225099 -0.244825 -0.249399 -0.238918 -0.214359 -0.177505 -0.130826 -0.0773149 -0.0203052 0.0367329 0.0903996 0.137563 0.175537 0.202236 0.21628 0.217067 0.204793 0.180429 0.145645 0.102705 0.0543173 0.00347017 -0.0467506 -0.0933476 -0.133587 -0.165158 -0.186302 -0.195911 -0.193583 -0.179634 -0.155072 -0.121522 -0.0811275 -0.0364084 0.00989075 0.0549676 0.0961309 0.13096 0.157444 0.174101 0.180053 0.175079 0.159613 0.134714 0.101994 0.0635146 0.0216587 -0.021016 -0.0619319 -0.0986478 -0.129001 -0.151236 -0.164104 -0.166933 -0.159661 -0.142834 -0.117567 -0.0854704 -0.0485473 -0.00907192 0.0305518; #X coords 0 1 99 -1 200 140 1; #X restore 69 219 graph; #N canvas 0 0 450 300 (subpatch) 0; #X array y0 100 float 1; #A 0 -1.53424 -0.706535 -0.316354 -0.0479056 0.153451 0.305045 0.413856 0.483524 0.516846 0.516798 0.486968 0.431677 0.355938 0.265312 0.16569 0.0630412 -0.036854 -0.128667 -0.207761 -0.270399 -0.313897 -0.336727 -0.338555 -0.320213 -0.283621 -0.23164 -0.167886 -0.0965075 -0.0219386 0.0513577 0.11914 0.177618 0.223658 0.254939 0.270062 0.268605 0.251123 0.219089 0.174787 0.121159 0.0616173 -0.00015986 -0.0604533 -0.115717 -0.162784 -0.199038 -0.222562 -0.232229 -0.227755 -0.2097 -0.179415 -0.13895 -0.0909182 -0.0383317 0.0155827 0.0675785 0.114582 0.153871 0.183229 0.201069 0.206518 0.199455 0.180506 0.150997 0.112863 0.0685233 0.0207323 -0.0275922 -0.0735441 -0.114401 -0.147784 -0.171796 -0.185126 -0.187123 -0.17782 -0.157927 -0.128781 -0.0922546 -0.0506369 -0.00649494 0.0374861 0.0786639 0.114597 0.143188 0.162805 0.172375 0.171439 0.160176 0.139381 0.110414 0.0751093 0.0356625 -0.00550591 -0.0458994 -0.0830937 -0.114883 -0.139409 -0.15527 -0.161599 -0.158113; #X coords 0 1 99 -1 200 140 1; #X restore 273 218 graph; #N canvas 0 0 450 300 (subpatch) 0; #X array j1 100 float 1; #A 0 0.0499375 0.170855 0.284007 0.384293 0.467263 0.529337 0.567981 0.581831 0.57075 0.535821 0.479285 0.404403 0.315285 0.216661 0.113629 0.0113882 -0.0850341 -0.17104 -0.242693 -0.296908 -0.331599 -0.345764 -0.339517 -0.314054 -0.27156 -0.215075 -0.148301 -0.0753895 -0.000698991 0.0714468 0.136998 0.192396 0.23476 0.26203 0.273066 0.267685 0.246652 0.211613 0.16498 0.109778 0.0494529 -0.0123297 -0.0719058 -0.125822 -0.171029 -0.205057 -0.226139 -0.233304 -0.226418 -0.206175 -0.174041 -0.132152 -0.0831818 -0.0301694 0.0236621 0.0750988 0.121125 0.159097 0.186895 0.203035 0.20675 0.198023 0.177574 0.146811 0.10773 0.0627931 0.0147728 -0.0334153 -0.0788895 -0.11897 -0.151337 -0.174164 -0.186216 -0.186921 -0.17639 -0.155404 -0.125358 -0.0881697 -0.04616 -0.00190804 0.0419047 0.0826564 0.11794 0.145705 0.164375 0.172936 0.170994 0.158785 0.137159 0.107522 0.071742 0.0320373 -0.00916389 -0.0493701 -0.0861753 -0.117403 -0.141234 -0.156312 -0.16182 -0.157524; #X coords 0 1 99 -1 200 140 1; #X restore 69 379 graph; #N canvas 0 0 450 300 (subpatch) 0; #X array y1 100 float 1; #A 0 -6.45895 -2.01607 -1.2716 -0.933446 -0.70804 -0.524255 -0.359463 -0.206701 -0.0652003 0.0631702 0.175545 0.268943 0.3408 0.389308 0.41362 0.413955 0.391621 0.348954 0.289206 0.216367 0.134951 0.0497571 -0.0343875 -0.112881 -0.181583 -0.237028 -0.276587 -0.298594 -0.302412 -0.288437 -0.25805 -0.21352 -0.15785 -0.0945889 -0.0276251 0.0390485 0.101559 0.156374 0.200491 0.231602 0.248208 0.249686 0.236306 0.209202 0.170279 0.122094 0.0676932 0.0104206 -0.0462769 -0.0990562 -0.14487 -0.181138 -0.205894 -0.217885 -0.216636 -0.202462 -0.176436 -0.140314 -0.0964208 -0.0475021 0.0034438 0.0533467 0.0992479 0.138472 0.168784 0.18851 0.196633 0.192841 0.177537 0.151802 0.117325 0.0762916 0.0312488 -0.0150529 -0.059824 -0.100404 -0.134416 -0.15991 -0.175465 -0.180277 -0.174191 -0.157707 -0.13194 -0.0985494 -0.0596289 -0.0175798 0.0250376 0.0656576 0.101865 0.131534 0.152955 0.164934 0.166852 0.158704 0.141085 0.115156 0.082562 0.045331 0.00574966 -0.0337779; #X coords 0 1 99 -1 200 140 1; #X restore 273 378 graph; #N canvas 0 0 450 300 (subpatch) 0; #X array j2 100 float 1; #A 0 0.00124896 0.0148923 0.0427945 0.0832583 0.133814 0.191362 0.252344 0.312952 0.369341 0.417851 0.455214 0.478744 0.486488 0.477347 0.451132 0.408587 0.351351 0.281865 0.203248 0.119123 0.0334192 -0.0498381 -0.12675 -0.193753 -0.247811 -0.286581 -0.308529 -0.313014 -0.300314 -0.271604 -0.22888 -0.174848 -0.112764 -0.0462525 0.0208965 0.0849392 0.14238 0.190164 0.225836 0.247666 0.254739 0.246987 0.225182 0.190878 0.146306 0.0942431 0.0378405 -0.0195609 -0.0746231 -0.124204 -0.165532 -0.196362 -0.215094 -0.220856 -0.213544 -0.193813 -0.163034 -0.123195 -0.0767841 -0.0266317 0.0242552 0.0728732 0.116397 0.152343 0.178707 0.194079 0.197713 0.189567 0.170292 0.141187 0.10411 0.0613699 0.0155753 -0.0305178 -0.0741709 -0.112825 -0.14425 -0.166671 -0.17887 -0.180248 -0.170857 -0.151388 -0.123121 -0.0878431 -0.0477395 -0.00525628 0.0370464 0.0766475 0.111215 0.138743 0.157664 0.166943 0.16613 0.155379 0.13544 0.107599 0.0736033 0.0355481 -0.00424858 -0.0433882; #X coords 0 1 99 -1 200 140 1; #X restore 69 549 graph; #N canvas 0 0 450 300 (subpatch) 0; #X array y2 100 float 1; #A 0 -127.645 -10.9168 -3.96653 -2.17272 -1.45546 -1.09073 -0.868466 -0.709635 -0.579683 -0.462391 -0.350305 -0.240661 -0.133398 -0.0300613 0.0669008 0.154628 0.230226 0.291072 0.335046 0.360719 0.36747 0.355557 0.326122 0.281146 0.223351 0.156064 0.0830362 0.00824897 -0.0643015 -0.130815 -0.187888 -0.232692 -0.263117 -0.277876 -0.276566 -0.259671 -0.228525 -0.185225 -0.1325 -0.0735489 -0.0118567 0.0490077 0.105594 0.154759 0.193846 0.22082 0.234378 0.234009 0.220011 0.193459 0.156134 0.110407 0.0590926 0.00528327 -0.0478377 -0.097179 -0.13992 -0.17367 -0.196602 -0.207547 -0.206057 -0.192418 -0.167623 -0.133306 -0.0916342 -0.0451764 0.00325392 0.0507668 0.0945676 0.132118 0.161283 0.180451 0.188622 0.185462 0.171307 0.147141 0.114531 0.0755202 0.0325088 -0.0118957 -0.0550349 -0.0943568 -0.127566 -0.152759 -0.168528 -0.174042 -0.169092 -0.154091 -0.130047 -0.0984966 -0.0614043 -0.021046 0.0201325 0.0596627 0.0951994 0.12466 0.146346 0.15904 0.162073 0.155361; #X coords 0 1 99 -1 200 140 1; #X restore 273 548 graph; #N canvas 0 0 450 300 plot 0; #X obj 60 19 inlet; #X obj 44 198 mtx; #X obj 58 42 t a a; #X obj 39 70 mtx_size; #X obj 39 112 until; #X obj 39 92 t f b; #X obj 68 131 + 1; #X obj 39 131 i; #X msg 82 93 1; #X obj 43 152 t f f; #X obj 152 243 outlet; #X obj 44 222 list prepend 0; #X obj 45 243 outlet; #X obj 152 219 - 1; #X msg 44 175 col \$1; #X connect 0 0 2 0; #X connect 1 0 11 0; #X connect 2 0 3 0; #X connect 2 1 1 1; #X connect 3 1 5 0; #X connect 4 0 7 0; #X connect 5 0 4 0; #X connect 5 1 8 0; #X connect 6 0 7 1; #X connect 7 0 6 0; #X connect 7 0 9 0; #X connect 8 0 7 1; #X connect 9 0 14 0; #X connect 9 1 13 0; #X connect 11 0 12 0; #X connect 13 0 10 0; #X connect 14 0 1 0; #X restore 124 112 pd plot; #X obj 124 160 s; #X msg 162 135 symbol j\$1; #N canvas 0 0 450 300 plot 0; #X obj 60 19 inlet; #X obj 44 198 mtx; #X obj 58 42 t a a; #X obj 39 70 mtx_size; #X obj 39 112 until; #X obj 39 92 t f b; #X obj 68 131 + 1; #X obj 39 131 i; #X msg 82 93 1; #X obj 43 152 t f f; #X obj 152 243 outlet; #X obj 44 222 list prepend 0; #X obj 45 243 outlet; #X obj 152 219 - 1; #X msg 44 175 col \$1; #X connect 0 0 2 0; #X connect 1 0 11 0; #X connect 2 0 3 0; #X connect 2 1 1 1; #X connect 3 1 5 0; #X connect 4 0 7 0; #X connect 5 0 4 0; #X connect 5 1 8 0; #X connect 6 0 7 1; #X connect 7 0 6 0; #X connect 7 0 9 0; #X connect 8 0 7 1; #X connect 9 0 14 0; #X connect 9 1 13 0; #X connect 11 0 12 0; #X connect 13 0 10 0; #X connect 14 0 1 0; #X restore 245 114 pd plot; #X obj 245 162 s; #X msg 283 137 symbol y\$1; #N canvas 0 0 450 300 (subpatch) 0; #X array j3 100 float 1; #A 0 2.08203e-05 0.000863198 0.00426674 0.0118419 0.0248787 0.0442418 0.0702931 0.102846 0.141158 0.183953 0.229489 0.275649 0.320061 0.360241 0.393741 0.418305 0.43201 0.433403 0.421599 0.39636 0.358132 0.308043 0.247866 0.17994 0.107056 0.0323225 -0.040996 -0.109652 -0.170585 -0.221087 -0.258952 -0.282594 -0.291135 -0.284462 -0.263226 -0.228818 -0.18329 -0.129249 -0.0697136 -0.00795365 0.0526869 0.10897 0.157936 0.197066 0.224408 0.238684 0.23935 0.226619 0.201443 0.165447 0.120837 0.0702672 0.0166866 -0.0368286 -0.0872512 -0.131771 -0.167952 -0.193865 -0.208194 -0.210298 -0.200245 -0.178796 -0.147357 -0.107885 -0.0627772 -0.01472 0.033463 0.0789776 0.119221 0.151926 0.175294 0.188088 0.189701 0.180186 0.16024 0.131164 0.0947712 0.0532857 0.0092003 -0.0348674 -0.0763307 -0.112785 -0.142145 -0.162767 -0.173538 -0.173933 -0.164048 -0.144578 -0.116778 -0.0823806 -0.0434883 -0.00244804 0.0382903 0.0763201 0.109418 0.135674 0.153603 0.162225 0.161121 0.150453; #X coords 0 1 99 -1 200 140 1; #X restore 69 709 graph; #N canvas 0 0 450 300 (subpatch) 0; #X array y3 100 float 1; #A 0 -5099.33 -123.861 -25.4478 -9.40414 -4.64486 -2.74506 -1.83722 -1.34584 -1.05214 -0.859669 -0.720975 -0.6108 -0.515016 -0.425639 -0.338379 -0.25134 -0.164261 -0.0780219 0.00571318 0.0847881 0.156805 0.219352 0.270202 0.307487 0.32985 0.336549 0.327533 0.303471 0.265738 0.216364 0.157937 0.0934828 0.0263055 -0.0401754 -0.102605 -0.15787 -0.203256 -0.236598 -0.256385 -0.261841 -0.252962 -0.23051 -0.195965 -0.151438 -0.0995561 -0.0433047 0.014132 0.0695525 0.119913 0.162495 0.195053 0.215934 0.224162 0.219488 0.202391 0.174046 0.136248 0.0913008 0.0418862 -0.0090994 -0.0587086 -0.104113 -0.142764 -0.172534 -0.191834 -0.1997 -0.195839 -0.18064 -0.15514 -0.120963 -0.0802127 -0.03535 0.0109558 0.055985 0.0971239 0.132017 0.158701 0.175716 0.182183 0.17785 0.163102 0.138928 0.106861 0.0688772 0.0272817 -0.0154349 -0.0567419 -0.0942188 -0.125697 -0.149382 -0.163959 -0.168664 -0.163323 -0.148355 -0.124748 -0.0939876 -0.0579688 -0.018879 0.0209329 0.0590982; #X coords 0 1 99 -1 200 140 1; #X restore 273 708 graph; #X obj 363 54 hsl 128 15 1 300 0 0 empty empty empty -2 -8 0 10 -262144 -1 -1 1000 1; #X msg 124 42 0.1 \$1 100; #X obj 125 63 mtx_linspace; #X obj 125 87 mtx_bessel H 3; #X connect 6 0 7 0; #X connect 6 1 8 0; #X connect 8 0 7 1; #X connect 9 0 10 0; #X connect 9 1 11 0; #X connect 11 0 10 1; #X connect 14 0 15 0; #X connect 15 0 16 0; #X connect 16 0 17 0; #X connect 17 0 6 0; #X connect 17 1 9 0; pd-iemmatrix-0.3/doc/mtx_binops-help.pd000066400000000000000000000103041262113134600201530ustar00rootroot00000000000000#N canvas 79 32 976 685 10; #X obj 87 360 mtx_mul; #X obj 157 360 mtx_*; #X obj 88 163 mtx_add; #X obj 167 166 mtx_+; #X obj 155 134 mtx_diag 1 2 3 4 5; #X obj 88 134 mtx_ones 5; #X obj 88 111 t b b; #X obj 88 185 mtx_print; #X msg 88 92 bang; #X text 142 165 ==; #X obj 305 134 mtx_eye 4; #X obj 305 159 mtx_add 10; #X msg 305 107 bang; #X obj 305 186 mtx_print; #X floatatom 374 101 4 0 0 0 - - -; #X obj 374 119 t b f; #X obj 392 160 mtx_+ 10; #X text 371 161 ==; #X obj 87 394 mtx_print; #X msg 87 270 bang; #X obj 133 332 mtx_diag 1 2; #X obj 87 297 t b b; #X obj 87 332 mtx_+ 3; #X text 137 361 ==; #X obj 87 314 mtx_eye 3 2; #X obj 249 399 mtx_print; #X obj 249 292 t b f; #X floatatom 249 274 4 0 0 0 - - -; #X msg 249 315 4 2 1 3; #X obj 249 335 mtx_diag; #X obj 249 363 mtx_mul 2; #X obj 328 363 mtx_* 2; #X obj 393 363 mtx_.* 2; #X text 310 363 ==; #X text 376 364 ==; #X obj 522 366 mtx_.*; #X obj 522 401 mtx_print; #X obj 522 304 mtx_diag 1 2 3; #X obj 553 322 mtx_ones 3; #X obj 522 283 t b b; #X msg 522 264 bang; #X obj 553 341 mtx_* 2; #X text 80 214 add 2 matrices; #X text 274 218 add an offset to a matrix; #X text 70 423 multiply 2 matrices; #X text 245 422 multiply a matrix with a scalar; #X text 506 425 multiply 2 matrices element by element; #X text 50 24 matrix arithmetic; #X obj 88 599 mtx_print; #X obj 88 492 t b f; #X floatatom 88 474 4 0 0 0 - - -; #X msg 88 515 4 2 1 3; #X obj 88 535 mtx_diag; #X obj 323 600 mtx_print; #X obj 323 503 mtx_diag 1 2 3; #X obj 354 521 mtx_ones 3; #X obj 354 540 mtx_* 2; #X text 44 622 divide a matrix by a scalar; #X obj 88 563 mtx_./ 2; #X obj 323 565 mtx_./; #X text 267 624 divide 2 matrices element by element; #X obj 323 482 t b b f; #X floatatom 323 463 4 0 0 0 - - -; #X obj 550 141 mtx_diag 1 2 3 4 5; #X obj 483 141 mtx_ones 5; #X obj 483 118 t b b; #X obj 483 192 mtx_print; #X msg 483 99 bang; #X text 537 172 ==; #X obj 700 141 mtx_eye 4; #X msg 700 114 bang; #X obj 700 193 mtx_print; #X floatatom 769 108 4 0 0 0 - - -; #X obj 769 126 t b f; #X text 762 168 ==; #X obj 483 170 mtx_sub; #X obj 562 173 mtx_-; #X obj 779 169 mtx_sub 10; #X obj 700 166 mtx_- 10; #X text 481 221 subtract 2 matrices; #X text 669 225 subtract an offset from a matrix; #X text 600 27 part of iemmatrix; #X obj 737 28 iemmatrix; #X obj 568 609 mtx_print; #X obj 568 502 t b f; #X floatatom 568 484 4 0 0 0 - - -; #X msg 568 525 4 2 1 3; #X obj 568 545 mtx_diag; #X obj 763 610 mtx_print; #X obj 763 513 mtx_diag 1 2 3; #X obj 794 531 mtx_ones 3; #X obj 794 550 mtx_* 2; #X obj 763 492 t b b f; #X floatatom 763 473 4 0 0 0 - - -; #X obj 568 573 mtx_.^ 2; #X obj 763 575 mtx_.^; #X text 546 638 matrix-elements^f; #X text 720 636 elementA(i \, j)^elementB(i \, j); #X connect 0 0 18 0; #X connect 2 0 7 0; #X connect 4 0 2 1; #X connect 5 0 2 0; #X connect 6 0 5 0; #X connect 6 1 4 0; #X connect 8 0 6 0; #X connect 10 0 11 0; #X connect 11 0 13 0; #X connect 12 0 10 0; #X connect 14 0 15 0; #X connect 15 0 10 0; #X connect 15 1 11 1; #X connect 19 0 21 0; #X connect 20 0 0 1; #X connect 21 0 24 0; #X connect 21 1 20 0; #X connect 22 0 0 0; #X connect 24 0 22 0; #X connect 26 0 28 0; #X connect 26 1 30 1; #X connect 27 0 26 0; #X connect 28 0 29 0; #X connect 29 0 30 0; #X connect 30 0 25 0; #X connect 35 0 36 0; #X connect 37 0 35 0; #X connect 38 0 41 0; #X connect 39 0 37 0; #X connect 39 1 38 0; #X connect 40 0 39 0; #X connect 41 0 35 1; #X connect 49 0 51 0; #X connect 49 1 58 1; #X connect 50 0 49 0; #X connect 51 0 52 0; #X connect 52 0 58 0; #X connect 54 0 59 0; #X connect 55 0 56 0; #X connect 56 0 59 1; #X connect 58 0 48 0; #X connect 59 0 53 0; #X connect 61 0 54 0; #X connect 61 1 55 0; #X connect 61 2 56 1; #X connect 62 0 61 0; #X connect 63 0 75 1; #X connect 64 0 75 0; #X connect 65 0 64 0; #X connect 65 1 63 0; #X connect 67 0 65 0; #X connect 69 0 78 0; #X connect 70 0 69 0; #X connect 72 0 73 0; #X connect 73 0 69 0; #X connect 73 1 78 1; #X connect 75 0 66 0; #X connect 78 0 71 0; #X connect 84 0 86 0; #X connect 84 1 94 1; #X connect 85 0 84 0; #X connect 86 0 87 0; #X connect 87 0 94 0; #X connect 89 0 95 0; #X connect 90 0 91 0; #X connect 91 0 95 1; #X connect 92 0 89 0; #X connect 92 1 90 0; #X connect 92 2 91 1; #X connect 93 0 92 0; #X connect 94 0 83 0; #X connect 95 0 88 0; pd-iemmatrix-0.3/doc/mtx_bitand-help.pd000066400000000000000000000017231262113134600201270ustar00rootroot00000000000000#N canvas 224 247 450 300 10; #X text 255 30 updated for; #X obj 343 30 iemmatrix 0.2; #X obj 392 56 matrix; #X text 262 55 see also help for; #X obj 123 167 mtx_diag 1 2 3 4 5; #X obj 46 167 mtx_ones 5; #X obj 46 144 t b b; #X obj 46 218 mtx_print; #X msg 46 125 bang; #X text 120 198 ==; #X obj 263 167 mtx_eye 4; #X msg 263 140 bang; #X obj 263 219 mtx_print; #X floatatom 332 124 4 0 0 0 - - -; #X obj 332 142 t b f; #X text 349 193 ==; #X obj 17 23 mtx_bitand; #X obj 101 23 mtx_&&; #X obj 392 77 &&; #X obj 46 196 mtx_bitand; #X obj 145 197 mtx_&&; #X obj 263 192 mtx_bitand 0; #X obj 370 192 mtx_&& 0; #X text 38 247 AND 2 matrices; #X text 246 251 AND a matrix with a scalar; #X text 9 42 matrix logic: bitwise AND; #X connect 4 0 19 1; #X connect 5 0 19 0; #X connect 6 0 5 0; #X connect 6 1 4 0; #X connect 8 0 6 0; #X connect 10 0 21 0; #X connect 11 0 10 0; #X connect 13 0 14 0; #X connect 14 0 10 0; #X connect 14 1 21 1; #X connect 19 0 7 0; #X connect 21 0 12 0; pd-iemmatrix-0.3/doc/mtx_bitleft-help.pd000066400000000000000000000020701262113134600203130ustar00rootroot00000000000000#N canvas 224 247 450 300 10; #X text 255 30 updated for; #X obj 343 30 iemmatrix 0.2; #X obj 392 56 matrix; #X text 262 55 see also help for; #X obj 123 167 mtx_diag 1 2 3 4 5; #X obj 46 167 mtx_ones 5; #X obj 46 144 t b b; #X obj 46 218 mtx_print; #X msg 46 125 bang; #X text 130 198 ==; #X obj 263 167 mtx_eye 4; #X msg 263 140 bang; #X obj 263 219 mtx_print; #X floatatom 332 124 4 0 0 0 - - -; #X obj 332 142 t b f; #X text 359 193 ==; #X obj 17 23 mtx_bitleft; #X obj 111 23 mtx_<<; #X obj 392 77 <<; #X obj 46 196 mtx_bitleft; #X obj 155 196 mtx_<<; #X obj 263 192 mtx_bitleft 0; #X obj 380 192 mtx_<< 0; #X text 8 42 matrix logic: bitwise leftshift; #X text 38 247 shift left matrix; #X text 38 260 (amount for each element; #X text 39 275 specified in right matrix); #X text 257 251 shift matrix as given by scalar; #X connect 4 0 19 1; #X connect 5 0 19 0; #X connect 6 0 5 0; #X connect 6 1 4 0; #X connect 8 0 6 0; #X connect 10 0 21 0; #X connect 11 0 10 0; #X connect 13 0 14 0; #X connect 14 0 10 0; #X connect 14 1 21 1; #X connect 19 0 7 0; #X connect 21 0 12 0; pd-iemmatrix-0.3/doc/mtx_bitor-help.pd000066400000000000000000000017101262113134600200010ustar00rootroot00000000000000#N canvas 224 247 450 300 10; #X text 255 30 updated for; #X obj 343 30 iemmatrix 0.2; #X obj 392 56 matrix; #X text 262 55 see also help for; #X obj 123 167 mtx_diag 1 2 3 4 5; #X obj 46 167 mtx_ones 5; #X obj 46 144 t b b; #X obj 46 218 mtx_print; #X msg 46 125 bang; #X text 120 198 ==; #X obj 263 167 mtx_eye 4; #X msg 263 140 bang; #X obj 263 219 mtx_print; #X floatatom 332 124 4 0 0 0 - - -; #X obj 332 142 t b f; #X text 349 193 ==; #X obj 17 23 mtx_bitor; #X obj 91 23 mtx_|; #X obj 392 77 |; #X obj 46 196 mtx_bitor; #X obj 145 197 mtx_|; #X obj 263 192 mtx_bitor 0; #X obj 370 192 mtx_| 0; #X text 8 42 matrix logic: bitwise OR; #X text 38 247 OR 2 matrices; #X text 245 251 OR a matrix with a scalar; #X connect 4 0 19 1; #X connect 5 0 19 0; #X connect 6 0 5 0; #X connect 6 1 4 0; #X connect 8 0 6 0; #X connect 10 0 21 0; #X connect 11 0 10 0; #X connect 13 0 14 0; #X connect 14 0 10 0; #X connect 14 1 21 1; #X connect 19 0 7 0; #X connect 21 0 12 0; pd-iemmatrix-0.3/doc/mtx_bitright-help.pd000066400000000000000000000020741262113134600205020ustar00rootroot00000000000000#N canvas 224 247 527 302 10; #X text 255 30 updated for; #X obj 343 30 iemmatrix 0.2; #X obj 392 56 matrix; #X text 262 55 see also help for; #X obj 125 167 mtx_diag 1 2 3 4 5; #X obj 46 167 mtx_ones 5; #X obj 46 144 t b b; #X obj 46 218 mtx_print; #X msg 46 125 bang; #X text 140 198 ==; #X obj 263 167 mtx_eye 4; #X msg 263 140 bang; #X obj 263 219 mtx_print; #X floatatom 332 124 4 0 0 0 - - -; #X obj 332 142 t b f; #X text 366 193 ==; #X text 38 247 shift left matrix; #X text 38 260 (amount for each element; #X text 39 275 specified in right matrix); #X text 257 251 shift matrix as given by scalar; #X obj 17 23 mtx_bitright; #X obj 111 23 mtx_>>; #X text 8 42 matrix logic: bitwise rightshift; #X obj 165 196 mtx_>>; #X obj 387 192 mtx_>> 0; #X obj 392 77 >>; #X obj 263 192 mtx_bitright 0; #X obj 46 196 mtx_bitright; #X connect 4 0 27 1; #X connect 5 0 27 0; #X connect 6 0 5 0; #X connect 6 1 4 0; #X connect 8 0 6 0; #X connect 10 0 26 0; #X connect 11 0 10 0; #X connect 13 0 14 0; #X connect 14 0 10 0; #X connect 14 1 26 1; #X connect 26 0 12 0; #X connect 27 0 7 0; pd-iemmatrix-0.3/doc/mtx_check-help.pd000066400000000000000000000023741262113134600177460ustar00rootroot00000000000000#N canvas 161 60 833 321 10; #X text 578 18 updated for; #X obj 666 18 iemmatrix 0.2; #X obj 715 44 matrix; #X text 585 43 see also help for; #X obj 86 294 mtx_print; #X obj 121 23 mtx_check; #X text 223 24 check (and fix) a matrix for validity; #X obj 86 242 mtx_check; #X text 83 107 check a matrix-message; #X msg 133 169 matrix 3 3 2; #X obj 488 254 mtx_int; #X msg 86 131 matrix 2 2 0 1 2 3; #X text 221 132 legal matrix message: [2x2] matrix with elements "0 1 \, 2 3"; #X text 233 163 this message is illegal: [3x3] matrix \, the only element of which is "2"; #X obj 638 273 mtx_int; #X obj 638 251 mtx_check; #X obj 488 279 mtx_print illegal; #X obj 638 297 mtx_print legalizeIt; #X msg 488 228 matrix 3 3 2; #X msg 638 227 matrix 3 3 2; #X text 65 44 illegal matrix-message are fixed by zero-padding (if too few elements are given) \, or truncation (if too many elements are given); #X msg 132 201 matrix 2 2 0 1 2 3 4 5 6; #X text 308 201 illegal too: too many elements are given; #X obj 86 267 t a a; #X obj 126 267 print fixed; #X connect 7 0 23 0; #X connect 9 0 7 0; #X connect 10 0 16 0; #X connect 11 0 7 0; #X connect 14 0 17 0; #X connect 15 0 14 0; #X connect 18 0 10 0; #X connect 19 0 15 0; #X connect 21 0 7 0; #X connect 23 0 4 0; #X connect 23 1 24 0; pd-iemmatrix-0.3/doc/mtx_cholesky-help.pd000066400000000000000000000012661262113134600205110ustar00rootroot00000000000000#N canvas 16 0 491 405 10; #X text 66 325 updated for; #X obj 154 325 iemmatrix 0.2; #X obj 203 351 matrix; #X text 73 350 see also help for; #X obj 203 371 mtx_gauss; #X text 26 12 mtx_cholesky:: decompose a matrix using cholesky's algorithm ; #X msg 176 54 bang; #X obj 176 98 t a a; #X obj 176 75 mtx_eye 5; #X obj 266 75 mtx_egg 5; #X obj 176 235 mtx_print symmetric; #X obj 206 143 mtx_print original; #X msg 266 52 bang; #X obj 176 178 mtx_cholesky; #X msg 53 53 bang; #X obj 53 74 mtx_diag 1 2 3 5; #X connect 6 0 8 0; #X connect 7 0 13 0; #X connect 7 1 11 0; #X connect 8 0 7 0; #X connect 9 0 7 0; #X connect 12 0 9 0; #X connect 13 0 10 0; #X connect 14 0 15 0; #X connect 15 0 7 0; pd-iemmatrix-0.3/doc/mtx_circular_harmonics-help.pd000066400000000000000000000223401262113134600225330ustar00rootroot00000000000000#N canvas 61 39 921 503 10; #X text 516 377 Franz Zotter \, 2009; #X text 129 226 for -n<=m<=n:; #X text 620 241 for m>=0; #X text 619 257 for m< 0; #X text 288 118 [mtx_circular_harmonics] requires a numerical creation argument specifyiing the maximum order 0<=n<=nmax.; #X text 74 54 [mtx_circular_harmonics] circular harmonics evaluated at a set of points given in phi coordinates.; #X text 284 160 for an L points 2xL input matrix \, [mtx_spherical_harmonics] evaluates the (2*nmax+2) circular harmonics at L points and delivers an Lx(2*nmax+2) output matrix.; #X text 167 242 PHI_m(phi) = sqrt((2-delta_m) / (2*pi)) * cos(m*phi) ; #X text 167 258 PHI_m(phi) = 1/sqrt(pi) * sin(m*phi); #X text 126 291 The order of the harmonics in the output columns is specified by the linear index k=nmax+m+1.; #X text 125 328 [mtx_circular_harmonics] uses fully normalized PHI_m. ; #N canvas 0 0 450 300 (subpatch) 0; #X array circularharmonic1 100 float 1; #A 0 0 0.106888 0.209904 0.305318 0.389673 0.459913 0.513495 0.548478 0.563594 0.558297 0.532777 0.48796 0.425469 0.347567 0.257076 0.157273 0.0517736 -0.055601 -0.160962 -0.260492 -0.350588 -0.427984 -0.489879 -0.53403 -0.558838 -0.563404 -0.547564 -0.51189 -0.457675 -0.386883 -0.302078 -0.206331 -0.10311 0.003845 0.110661 0.213468 0.308544 0.392444 0.462129 0.515076 0.549366 0.563758 0.55773 0.5315 0.486019 0.422934 0.34453 0.253647 0.153577 0.0479438 -0.059426 -0.164643 -0.263897 -0.353592 -0.43048 -0.491775 -0.535258 -0.559353 -0.563189 -0.546625 -0.510261 -0.455416 -0.384076 -0.298823 -0.202747 -0.0993281 0.00768981 0.114428 0.217022 0.311755 0.395197 0.464324 0.516633 0.550229 0.563895 0.557136 0.530198 0.484055 0.42038 0.341478 0.250207 0.149874 0.044112 -0.0632482 -0.168317 -0.267289 -0.35658 -0.432955 -0.493648 -0.536461 -0.559843 -0.562947 -0.54566 -0.508609 -0.453136 -0.38125 -0.295555 -0.199155 -0.0955408 0.0115335; #X coords 0 1 99 -1 200 50 1; #X restore 720 14 graph; #N canvas 0 0 450 300 (subpatch) 0; #X array circularharmonic2 100 float 1; #A 0 0 0.0714992 0.141845 0.209904 0.274579 0.334825 0.389673 0.438236 0.479734 0.513495 0.538976 0.555766 0.563594 0.562334 0.552006 0.532777 0.504957 0.468995 0.425469 0.375083 0.318648 0.257076 0.191358 0.122554 0.0517737 -0.0198414 -0.0911363 -0.160962 -0.228192 -0.291742 -0.350588 -0.40378 -0.450461 -0.489879 -0.521397 -0.544508 -0.558838 -0.564157 -0.560378 -0.547564 -0.52592 -0.495795 -0.457675 -0.412175 -0.360029 -0.302078 -0.239255 -0.172574 -0.10311 -0.031984 0.0396582 0.110661 0.179879 0.246196 0.308544 0.365916 0.417388 0.462129 0.499418 0.528655 0.549366 0.561219 0.564022 0.55773 0.542444 0.518411 0.486019 0.44579 0.398372 0.344531 0.285133 0.221138 0.153577 0.0835392 0.0121547 -0.0594257 -0.130048 -0.198574 -0.263897 -0.324964 -0.380792 -0.43048 -0.473225 -0.50834 -0.535258 -0.553544 -0.562905 -0.563189 -0.554391 -0.536653 -0.510261 -0.475642 -0.433353 -0.384075 -0.328605 -0.267836 -0.202748 -0.13439 -0.0638651 0.00768928; #X coords 0 1 99 -1 200 50 1; #X restore 718 80 graph; #N canvas 0 0 450 300 (subpatch) 0; #X array circularharmonic3 100 float 1; #A 0 0 0.0358219 0.0714992 0.106888 0.141845 0.176231 0.209904 0.242731 0.274579 0.305318 0.334825 0.362981 0.389673 0.414791 0.438236 0.459913 0.479734 0.497618 0.513495 0.527299 0.538976 0.548478 0.555766 0.560812 0.563594 0.564102 0.562334 0.558297 0.552006 0.543489 0.532777 0.519916 0.504957 0.48796 0.468995 0.448136 0.425469 0.401085 0.375083 0.347567 0.318648 0.288444 0.257076 0.22467 0.191358 0.157273 0.122554 0.0873399 0.0517737 0.0159984 -0.0198414 -0.055601 -0.0911363 -0.126304 -0.160962 -0.19497 -0.228192 -0.260492 -0.291742 -0.321814 -0.350588 -0.377946 -0.40378 -0.427984 -0.450461 -0.471121 -0.489879 -0.50666 -0.521397 -0.53403 -0.544508 -0.552788 -0.558838 -0.562633 -0.564157 -0.563404 -0.560378 -0.555091 -0.547564 -0.537827 -0.52592 -0.51189 -0.495795 -0.477699 -0.457675 -0.435805 -0.412175 -0.386883 -0.360029 -0.331723 -0.302078 -0.271213 -0.239255 -0.206331 -0.172574 -0.138121 -0.10311 -0.0676836 -0.031984 0.00384473 ; #X coords 0 1 99 -1 200 50 1; #X restore 719 146 graph; #N canvas 0 0 450 300 (subpatch) 0; #X array circularharmonic4 100 float 1; #A 0 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942 0.398942; #X coords 0 1 99 -1 200 50 1; #X restore 718 217 graph; #N canvas 0 0 450 300 (subpatch) 0; #X array circularharmonic5 100 float 1; #A 0 0.56419 0.563051 0.559641 0.553972 0.546068 0.53596 0.523689 0.509305 0.492866 0.474437 0.454095 0.43192 0.408001 0.382437 0.355329 0.326787 0.296927 0.265868 0.233737 0.200662 0.166777 0.13222 0.097129 0.061646 0.0259142 -0.00992222 -0.0457185 -0.0813303 -0.116614 -0.151427 -0.185629 -0.219082 -0.251651 -0.283204 -0.313614 -0.342759 -0.370521 -0.396788 -0.421453 -0.444418 -0.465589 -0.484881 -0.502217 -0.517526 -0.530747 -0.541826 -0.550718 -0.557388 -0.561809 -0.563963 -0.563841 -0.561443 -0.55678 -0.54987 -0.540741 -0.52943 -0.515983 -0.500453 -0.482904 -0.463407 -0.442039 -0.418887 -0.394045 -0.367613 -0.339697 -0.310411 -0.279872 -0.248204 -0.215534 -0.181994 -0.14772 -0.112849 -0.0775239 -0.0418852 -0.00607772 0.0297543 0.0654664 0.100914 0.135955 0.170447 0.204251 0.237231 0.269253 0.300189 0.329914 0.358307 0.385255 0.410648 0.434383 0.456366 0.476507 0.494725 0.510947 0.525107 0.537148 0.547022 0.554687 0.560115 0.563282 0.564176; #X coords 0 1 99 -1 200 50 1; #X restore 718 286 graph; #X obj 75 109 loadbang; #N canvas 624 434 600 460 send_to_tables 0; #X obj 21 14 inlet; #X obj 72 211 mtx; #X obj 21 36 t a a; #X obj 21 59 mtx_size; #X obj 74 105 until; #X obj 74 82 t f b; #X msg 117 82 0; #X obj 101 124 + 1; #X obj 74 124 f; #X obj 73 147 t f f; #X obj 72 249 s; #X msg 105 168 symbol circularharmonic\$1; #X obj 72 230 list prepend 0; #X msg 73 192 column \$1; #X connect 0 0 2 0; #X connect 1 0 12 0; #X connect 2 0 3 0; #X connect 2 1 1 1; #X connect 3 1 5 0; #X connect 4 0 8 0; #X connect 5 0 4 0; #X connect 5 1 6 0; #X connect 6 0 8 1; #X connect 7 0 8 1; #X connect 7 0 9 0; #X connect 8 0 7 0; #X connect 9 0 13 0; #X connect 9 1 11 0; #X connect 11 0 10 1; #X connect 12 0 10 0; #X connect 13 0 1 0; #X restore 75 179 pd send_to_tables; #X obj 75 133 mtx_linspace 0 6.29 100; #X obj 159 114 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 75 157 mtx_circular_harmonics 3; #N canvas 0 0 450 300 (subpatch) 0; #X array circularharmonic6 100 float 1; #A 0 0.56419 0.559641 0.546068 0.523689 0.492866 0.454095 0.408001 0.355329 0.296927 0.233737 0.166777 0.097129 0.0259142 -0.0457185 -0.116614 -0.185629 -0.251651 -0.313614 -0.370521 -0.421453 -0.465589 -0.502217 -0.530747 -0.550718 -0.561809 -0.563841 -0.55678 -0.540741 -0.515983 -0.482904 -0.442039 -0.394045 -0.339697 -0.279872 -0.215534 -0.14772 -0.0775239 -0.00607772 0.0654664 0.135955 0.204251 0.269253 0.329914 0.385255 0.434383 0.476507 0.510947 0.537148 0.554687 0.563282 0.562794 0.553231 0.534746 0.507639 0.472346 0.429436 0.379601 0.323646 0.262471 0.197064 0.128479 0.0578227 -0.0137663 -0.0851333 -0.155127 -0.22262 -0.286523 -0.345805 -0.399512 -0.446776 -0.486836 -0.519045 -0.542885 -0.557971 -0.564059 -0.561051 -0.548997 -0.528089 -0.498667 -0.461203 -0.416302 -0.364688 -0.307193 -0.244745 -0.17835 -0.10908 -0.0380498 0.0335932 0.104695 0.174108 0.240714 0.303438 0.361269 0.413275 0.458616 0.496562 0.526501 0.54795 0.560563 0.564137; #X coords 0 1 99 -1 200 50 1; #X restore 718 356 graph; #N canvas 0 0 450 300 (subpatch) 0; #X array circularharmonic7 100 float 1; #A 0 0.56419 0.553972 0.523689 0.474437 0.408001 0.326787 0.233737 0.13222 0.0259142 -0.0813303 -0.185629 -0.283204 -0.370521 -0.444418 -0.502217 -0.541826 -0.561809 -0.561443 -0.540741 -0.500453 -0.442039 -0.367613 -0.279872 -0.181994 -0.0775239 0.0297544 0.135955 0.237231 0.329914 0.410647 0.476507 0.525107 0.554687 0.564176 0.553231 0.522246 0.472346 0.405336 0.323645 0.230232 0.128479 0.0220729 -0.0851331 -0.189256 -0.286523 -0.373412 -0.446776 -0.503957 -0.542885 -0.562149 -0.561051 -0.539632 -0.498667 -0.439639 -0.364688 -0.276527 -0.17835 -0.0737135 0.0335929 0.139683 0.240714 0.333025 0.413275 0.478555 0.526501 0.555377 0.564137 0.552464 0.520779 0.470232 0.402653 0.320489 0.226717 0.124732 0.0182304 -0.0889317 -0.192873 -0.289828 -0.376285 -0.449113 -0.505674 -0.543919 -0.562462 -0.560633 -0.538497 -0.496857 -0.437219 -0.361746 -0.273169 -0.174699 -0.0698998 0.0374303 0.143405 0.244186 0.336121 0.415882 0.48058 0.527871 0.556041 0.564072; #X coords 0 1 99 -1 200 50 1; #X restore 716 422 graph; #X connect 16 0 18 0; #X connect 18 0 20 0; #X connect 19 0 18 0; #X connect 20 0 17 0; pd-iemmatrix-0.3/doc/mtx_col-help.pd000066400000000000000000000012671262113134600174460ustar00rootroot00000000000000#N canvas 136 41 544 373 10; #X text 276 28 updated for; #X obj 364 28 iemmatrix 0.2; #X obj 413 54 matrix; #X text 283 53 see also help for; #X obj 413 96 mtx_col; #X obj 89 32 mtx_col; #X obj 53 259 mtx_print; #X obj 64 217 mtx_ones 5 3; #X msg 64 198 bang; #X obj 53 240 mtx_col 4 3; #X msg 182 195 0; #X msg 174 173 2; #X msg 53 146 -1 2 3 4 5; #X text 133 242 creation: mtx_col [ []]; #X obj 413 76 mtx_element; #X text 19 9 set columns of a matrix; #X text 55 129 set matrix columns; #X text 214 170 set column [2]; #X text 213 195 set all columns; #X connect 7 0 9 0; #X connect 8 0 7 0; #X connect 9 0 6 0; #X connect 10 0 9 1; #X connect 11 0 9 1; #X connect 12 0 9 0; pd-iemmatrix-0.3/doc/mtx_colon-help.pd000066400000000000000000000027461262113134600200060ustar00rootroot00000000000000#N canvas 419 109 670 565 10; #X text 458 17 updated for; #X obj 546 17 iemmatrix 0.2; #X obj 595 43 matrix; #X text 465 42 see also help for; #X msg 12 124 bang; #X text 90 15 [mtx_colon]; #X text 47 34 colon operator: reading as row-vector / creating ascending number arrays; #X text 153 122 1 sequences; #X obj 12 277 mtx_print mtx_colon-sequence; #X obj 313 275 mtx_print mtx_colon-readout; #X obj 313 186 t a a; #X obj 432 231 mtx_print orig; #X obj 313 240 mtx_:; #X msg 85 141 bang; #X obj 12 233 mtx_:; #X msg 85 161 0 3; #X msg 12 145 2 1.5 7; #X text 422 120 2 linear read-out; #X text 8 60 you can create sequences (matrix vectors) with start- \, stop- and increment values. similar to octave you can also read out matrices linearly as vectors.; #X obj 301 411 mtx_print orig; #X obj 257 499 mtx_:; #X obj 257 434 mtx_transpose; #X obj 257 411 t a a; #X obj 257 456 mtx_repmat 1 3; #X obj 257 520 mtx_print sample-hold; #X msg 313 141 matrix 2 2 1 3 2 4; #X msg 257 358 matrix 1 4 1 2 3 4; #X obj 342 498 mtx_print repeated-orig; #X obj 257 477 t a a; #X text 251 324 this is e.g. useful when repeating values via sample+hold ; #X connect 4 0 16 0; #X connect 10 0 12 0; #X connect 10 1 11 0; #X connect 12 0 9 0; #X connect 13 0 15 0; #X connect 14 0 8 0; #X connect 15 0 14 0; #X connect 16 0 14 0; #X connect 20 0 24 0; #X connect 21 0 23 0; #X connect 22 0 21 0; #X connect 22 1 19 0; #X connect 23 0 28 0; #X connect 25 0 10 0; #X connect 26 0 22 0; #X connect 28 0 20 0; #X connect 28 1 27 0; pd-iemmatrix-0.3/doc/mtx_concat-help.pd000066400000000000000000000042061262113134600201340ustar00rootroot00000000000000#N canvas 27 49 670 511 10; #X text 458 17 updated for; #X obj 546 17 iemmatrix 0.2; #X obj 595 43 matrix; #X text 465 42 see also help for; #X obj 12 189 t a a; #X msg 12 124 bang; #X msg 265 390 mode row; #X msg 265 364 mode column; #X msg 352 363 mode col; #X msg 418 363 mode :; #X obj 263 416 t a; #X text 90 15 [mtx_concat]; #X text 47 34 concatenate 2 matrices; #X obj 12 166 mtx_ones 3 4; #X obj 12 146 t b b; #X obj 20 211 mtx_print left; #X text 471 363 concat columns (default); #X text 476 389 concat rows; #X obj 12 249 mtx_concat; #X obj 12 277 mtx_print col-concat; #X obj 123 191 t a a; #X obj 123 168 mtx_zeros 5 4; #X obj 131 213 mtx_print right; #X obj 313 190 t a a; #X msg 313 125 bang; #X obj 313 147 t b b; #X obj 321 212 mtx_print left; #X obj 424 192 t a a; #X obj 432 214 mtx_print right; #X obj 313 250 mtx_concat row; #X obj 313 167 mtx_ones 2 2; #X obj 424 169 mtx_zeros 2 3; #X obj 17 379 t a a; #X msg 17 318 bang; #X obj 17 340 t b b; #X obj 25 396 mtx_print left; #X obj 17 443 mtx_concat; #X obj 128 379 t a a; #X obj 136 396 mtx_print right; #X obj 17 481 mtx_print concat; #X obj 313 278 mtx_print row-concat; #X obj 17 360 mtx_ones 2 2; #X obj 128 360 mtx_zeros 2 2; #X text 8 60 you can concatenate 2 matrices either row-wise or column-wise \; if you concatenate them in "column"-mode (default) \, the 2 matrices must have the same number of columns and vice versa in "row"-mode. ; #X connect 4 0 18 0; #X connect 4 1 15 0; #X connect 5 0 14 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 36 0; #X connect 13 0 4 0; #X connect 14 0 13 0; #X connect 14 1 21 0; #X connect 18 0 19 0; #X connect 20 0 18 1; #X connect 20 1 22 0; #X connect 21 0 20 0; #X connect 23 0 29 0; #X connect 23 1 26 0; #X connect 24 0 25 0; #X connect 25 0 30 0; #X connect 25 1 31 0; #X connect 27 0 29 1; #X connect 27 1 28 0; #X connect 29 0 40 0; #X connect 30 0 23 0; #X connect 31 0 27 0; #X connect 32 0 36 0; #X connect 32 1 35 0; #X connect 33 0 34 0; #X connect 34 0 41 0; #X connect 34 1 42 0; #X connect 36 0 39 0; #X connect 37 0 36 1; #X connect 37 1 38 0; #X connect 41 0 32 0; #X connect 42 0 37 0; pd-iemmatrix-0.3/doc/mtx_conv-help.pd000066400000000000000000000017031262113134600176310ustar00rootroot00000000000000#N canvas 166 141 740 545 10; #X text 458 17 updated for; #X obj 546 17 iemmatrix 0.2; #X obj 595 43 matrix; #X text 465 42 see also help for; #X text 90 15 [mtx_conv]; #X text 47 34 2-dimensional convolution; #X text 18 63 you can calculate the convolution of a matrix with a filter matrix kernel (2 dimensional FIR filtering). Of course \, it can also be used for 1-dimensional FIR convolutions.; #X msg 42 127 bang; #X obj 42 151 t b b b; #X obj 64 215 t a a; #X obj 94 248 mtx_print orig; #X obj 64 274 mtx_conv; #X obj 173 197 t a a; #X obj 200 217 mtx_print filter_kernel; #X obj 64 304 mtx_print result; #X msg 173 174 matrix 2 3 1 1 1 1 1 1 1; #X msg 64 176 element 4 4 1; #X obj 63 196 matrix 5 5; #X connect 7 0 8 0; #X connect 8 0 17 0; #X connect 8 1 16 0; #X connect 8 2 15 0; #X connect 9 0 11 0; #X connect 9 1 10 0; #X connect 11 0 14 0; #X connect 12 0 11 1; #X connect 12 1 13 0; #X connect 15 0 12 0; #X connect 16 0 17 0; #X connect 17 0 9 0; pd-iemmatrix-0.3/doc/mtx_cos-help.pd000066400000000000000000000010131262113134600174420ustar00rootroot00000000000000#N canvas 128 118 680 254 10; #X text 458 17 updated for; #X obj 546 17 iemmatrix 0.2; #X obj 595 43 matrix; #X text 465 42 see also help for; #X obj 595 63 cos; #X obj 48 164 mtx_cos; #X obj 48 192 mtx_print cos; #X obj 48 131 t a a; #X obj 91 132 mtx_print org; #X text 136 10 cosine of matrix elements; #X text 45 42 compute the cosine of each element of a matrix; #X obj 48 100 mtx 2 2; #X msg 48 80 0 3.14159 1 90; #X connect 5 0 6 0; #X connect 7 0 5 0; #X connect 7 1 8 0; #X connect 11 0 7 0; #X connect 12 0 11 0; pd-iemmatrix-0.3/doc/mtx_cumprod-help.pd000066400000000000000000000031461262113134600203400ustar00rootroot00000000000000#N canvas 27 49 670 511 10; #X text 458 17 updated for; #X obj 546 17 iemmatrix 0.2; #X obj 595 43 matrix; #X text 465 42 see also help for; #X obj 12 189 t a a; #X msg 12 124 bang; #X msg 265 390 mode row; #X msg 265 364 mode column; #X msg 352 363 mode col; #X msg 418 363 mode :; #X obj 263 416 t a; #X obj 12 147 mtx_ones 3 4; #X obj 17 379 t a a; #X msg 17 305 bang; #X obj 17 331 mtx_ones 2 2; #X obj 20 211 mtx_print original; #X obj 46 400 mtx_print original; #X text 410 444 see also:; #X msg 298 336 direction -1; #X obj 12 235 t a a a; #X obj 409 466 mtx_cumsum; #X text 90 15 [mtx_cumprod]; #X text 47 34 cumulative product in row/col direction; #X text 18 63 you can calculate factorials or geometric series \; you can also do this into the reverse direction; #X obj 12 168 mtx_* 2; #X obj 17 357 mtx_* 2; #X obj 12 257 mtx_cumprod row; #X obj 138 258 mtx_cumprod col; #X obj 269 258 mtx_cumprod row -1; #X obj 17 442 mtx_cumprod row; #X obj 17 471 mtx_print cumprod; #X obj 12 285 mtx_print cumprod-row; #X obj 169 285 mtx_print cumprod-col; #X obj 330 285 mtx_print cumprod-col-reverse; #X text 377 484 Franz Zotter \, 2010; #X connect 4 0 19 0; #X connect 4 1 15 0; #X connect 5 0 11 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 29 0; #X connect 11 0 24 0; #X connect 12 0 29 0; #X connect 12 1 16 0; #X connect 13 0 14 0; #X connect 14 0 25 0; #X connect 18 0 10 0; #X connect 19 0 26 0; #X connect 19 1 27 0; #X connect 19 2 28 0; #X connect 24 0 4 0; #X connect 25 0 12 0; #X connect 26 0 31 0; #X connect 27 0 32 0; #X connect 28 0 33 0; #X connect 29 0 30 0; pd-iemmatrix-0.3/doc/mtx_cumsum-help.pd000066400000000000000000000027731262113134600202050ustar00rootroot00000000000000#N canvas 27 49 670 511 10; #X text 458 17 updated for; #X obj 546 17 iemmatrix 0.2; #X obj 595 43 matrix; #X text 465 42 see also help for; #X obj 12 189 t a a; #X msg 12 124 bang; #X msg 265 390 mode row; #X msg 265 364 mode column; #X msg 352 363 mode col; #X msg 418 363 mode :; #X obj 263 416 t a; #X obj 12 166 mtx_ones 3 4; #X obj 17 379 t a a; #X msg 17 335 bang; #X obj 17 360 mtx_ones 2 2; #X text 90 15 [mtx_cumsum]; #X text 47 34 cumulative sum in row/col direction; #X obj 20 211 mtx_print original; #X obj 12 257 mtx_cumsum row; #X obj 12 285 mtx_print cumsum-row; #X obj 46 400 mtx_print original; #X obj 17 472 mtx_print cumsum; #X obj 117 257 mtx_cumsum col; #X obj 159 285 mtx_print cumsum-col; #X obj 410 466 mtx_diff; #X text 410 444 see also:; #X msg 298 336 direction -1; #X obj 17 443 mtx_cumsum row; #X obj 12 235 t a a a; #X obj 248 258 mtx_cumsum row -1; #X obj 310 285 mtx_print cumsum-col-reverse; #X text 18 63 you can calculate numerical integrals or ascending sequences of numbers with cumsum \; you can also do this into the reverse direction ; #X connect 4 0 28 0; #X connect 4 1 17 0; #X connect 5 0 11 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 27 0; #X connect 11 0 4 0; #X connect 12 0 27 0; #X connect 12 1 20 0; #X connect 13 0 14 0; #X connect 14 0 12 0; #X connect 18 0 19 0; #X connect 22 0 23 0; #X connect 26 0 10 0; #X connect 27 0 21 0; #X connect 28 0 18 0; #X connect 28 1 22 0; #X connect 28 2 29 0; #X connect 29 0 30 0; pd-iemmatrix-0.3/doc/mtx_dbtopow-help.pd000066400000000000000000000022601262113134600203410ustar00rootroot00000000000000#N canvas 50 103 687 471 10; #X text 458 17 updated for; #X obj 546 17 iemmatrix 0.2; #X obj 181 100 mtx_eye; #X obj 64 285 mtx_rand 4 2; #X msg 64 263 bang; #X obj 64 307 t a a; #X obj 105 307 mtx_print org; #X obj 64 357 t a a; #X msg 181 79 3 3; #X obj 181 121 mtx_* 100; #X obj 48 162 mtx_print dbtorms; #X obj 105 357 mtx_print db; #X obj 64 407 mtx_print db; #X obj 48 100 mtx 2 2; #X text 290 305 note: dB(pd):=dB(techn)+100; #X text 307 337 this means: 100dB(pd)==unity gain (==1); #X text 404 375 0dB(pd)==zero gain (==0); #X text 391 354 106dB(pd)~=double gain (==2); #X obj 595 43 matrix; #X text 465 42 see also help for; #X text 44 34 convert dB(pd) to a power value for each element of a matrix; #X obj 48 134 mtx_dbtopow; #X obj 64 330 mtx_powtodb; #X obj 64 380 mtx_dbtopow; #X obj 599 91 dbtopow; #X obj 599 71 mtx_powtodb; #X text 188 7 convert dB(pd) to power; #X msg 48 80 0 100 97 103; #X connect 2 0 9 0; #X connect 3 0 5 0; #X connect 4 0 3 0; #X connect 5 0 22 0; #X connect 5 1 6 0; #X connect 7 0 23 0; #X connect 7 1 11 0; #X connect 8 0 2 0; #X connect 9 0 21 0; #X connect 13 0 21 0; #X connect 21 0 10 0; #X connect 22 0 7 0; #X connect 23 0 12 0; #X connect 27 0 13 0; pd-iemmatrix-0.3/doc/mtx_dbtorms-help.pd000066400000000000000000000022621262113134600203370ustar00rootroot00000000000000#N canvas 337 124 687 471 10; #X text 188 7 convert dB(pd) to rms; #X text 458 17 updated for; #X obj 546 17 iemmatrix 0.2; #X obj 181 100 mtx_eye; #X obj 64 285 mtx_rand 4 2; #X msg 64 263 bang; #X obj 64 307 t a a; #X obj 105 307 mtx_print org; #X obj 64 357 t a a; #X msg 181 79 3 3; #X obj 48 134 mtx_dbtorms; #X obj 64 380 mtx_dbtorms; #X obj 599 71 mtx_rmstodb; #X obj 599 91 dbtorms; #X obj 181 121 mtx_* 100; #X obj 48 162 mtx_print dbtorms; #X obj 64 330 mtx_rmstodb; #X obj 105 357 mtx_print db; #X obj 64 407 mtx_print db; #X obj 48 100 mtx 2 2; #X text 44 34 convert dB(pd) to a linear value for each element of a matrix; #X text 290 305 note: dB(pd):=dB(techn)+100; #X text 307 337 this means: 100dB(pd)==unity gain (==1); #X text 404 375 0dB(pd)==zero gain (==0); #X msg 48 80 0 100 97 106; #X text 391 354 106dB(pd)~=double gain (==2); #X obj 595 43 matrix; #X text 465 42 see also help for; #X connect 3 0 14 0; #X connect 4 0 6 0; #X connect 5 0 4 0; #X connect 6 0 16 0; #X connect 6 1 7 0; #X connect 8 0 11 0; #X connect 8 1 17 0; #X connect 9 0 3 0; #X connect 10 0 15 0; #X connect 11 0 18 0; #X connect 14 0 10 0; #X connect 16 0 8 0; #X connect 19 0 10 0; #X connect 24 0 19 0; pd-iemmatrix-0.3/doc/mtx_diag-help.pd000066400000000000000000000013621262113134600175710ustar00rootroot00000000000000#N canvas 61 0 491 290 10; #X text 285 23 updated for; #X obj 373 23 iemmatrix 0.2; #X obj 422 49 matrix; #X text 292 48 see also help for; #X obj 103 227 mtx_print; #X msg 103 130 bang; #X text 129 20 [mtx_diag]; #X msg 136 157 1 2 3 4 5; #X text 93 252 diagonal-matrix; #X obj 103 201 mtx_diag 7 9 8; #X text 30 89 create a diagonal matrix; #X obj 300 130 mtx_rand 4; #X msg 300 108 bang; #X obj 300 197 mtx_diag; #X obj 300 231 print diagonal; #X obj 300 158 t a a; #X obj 347 159 mtx_print org; #X text 294 258 diagonal of the matrix; #X text 276 88 get the diagonal of a matrix; #X connect 5 0 9 0; #X connect 7 0 9 0; #X connect 9 0 4 0; #X connect 11 0 15 0; #X connect 12 0 11 0; #X connect 13 0 14 0; #X connect 15 0 13 0; #X connect 15 1 16 0; pd-iemmatrix-0.3/doc/mtx_diegg-help.pd000066400000000000000000000017341262113134600177470ustar00rootroot00000000000000#N canvas 310 132 566 428 10; #X text 295 30 updated for; #X obj 383 30 iemmatrix 0.2; #X obj 432 56 matrix; #X text 302 55 see also help for; #X text 129 20 [mtx_diegg]; #X obj 103 227 mtx_print; #X msg 103 130 bang; #X msg 136 157 1 2 3 4 5; #X obj 300 130 mtx_rand 4; #X msg 300 108 bang; #X obj 300 158 t a a; #X obj 347 159 mtx_print org; #X text 294 258 diagonal of the matrix; #X text 276 88 get the turned diagonal of a matrix; #X obj 300 231 print dieggonal; #X text 93 252 turned diagonal-matrix; #X text 30 89 create a turned diagonal matrix; #X obj 300 197 mtx_diegg; #X obj 103 201 mtx_diegg 7 9 8; #X text 58 299 "turned" means rotated by -90deg:; #X text 90 339 1 0 0; #X text 90 353 0 2 0; #X text 90 366 0 0 3; #X text 200 353 0 2 0; #X text 200 339 0 0 1; #X text 200 366 3 0 0; #X text 148 353 ==>; #X connect 6 0 18 0; #X connect 7 0 18 0; #X connect 8 0 10 0; #X connect 9 0 8 0; #X connect 10 0 17 0; #X connect 10 1 11 0; #X connect 17 0 14 0; #X connect 18 0 5 0; pd-iemmatrix-0.3/doc/mtx_diff-help.pd000066400000000000000000000027671262113134600176070ustar00rootroot00000000000000#N canvas 628 70 670 511 10; #X text 458 17 updated for; #X obj 546 17 iemmatrix 0.2; #X obj 595 43 matrix; #X text 465 42 see also help for; #X obj 12 189 t a a; #X msg 12 124 bang; #X msg 265 390 mode row; #X msg 265 364 mode column; #X msg 352 363 mode col; #X msg 418 363 mode :; #X obj 263 416 t a; #X obj 12 166 mtx_ones 3 4; #X obj 17 379 t a a; #X msg 17 335 bang; #X obj 17 360 mtx_ones 2 2; #X obj 20 211 mtx_print original; #X obj 12 285 mtx_print cumsum-row; #X obj 46 400 mtx_print original; #X obj 17 472 mtx_print cumsum; #X obj 159 285 mtx_print cumsum-col; #X text 410 444 see also:; #X text 90 15 [mtx_diff]; #X obj 117 257 mtx_diff col; #X obj 17 443 mtx_diff; #X obj 410 466 mtx_cumsum; #X obj 12 257 mtx_diff row; #X text 47 34 first forward/backward difference; #X text 18 63 you can calculate the differences between matrix elements forwards/backwards \; this is useful for the numerical derivative of vectors/matrices.; #X obj 12 235 t a a a; #X obj 307 284 mtx_print cumsum-row-reverse; #X obj 265 256 mtx_diff col -1; #X msg 425 385 direction -1; #X connect 4 0 28 0; #X connect 4 1 15 0; #X connect 5 0 11 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 23 0; #X connect 11 0 4 0; #X connect 12 0 23 0; #X connect 12 1 17 0; #X connect 13 0 14 0; #X connect 14 0 12 0; #X connect 22 0 19 0; #X connect 23 0 18 0; #X connect 25 0 16 0; #X connect 28 0 25 0; #X connect 28 1 22 0; #X connect 28 2 30 0; #X connect 30 0 29 0; #X connect 31 0 10 0; pd-iemmatrix-0.3/doc/mtx_distance2-help.pd000066400000000000000000000020011262113134600205300ustar00rootroot00000000000000#N canvas 83 338 696 369 10; #X obj 33 242 mtx_distance2; #X obj 33 267 mtx_print distances; #X obj 119 179 t a a; #X obj 149 198 mtx_print B; #X obj 33 179 t a a; #X obj 63 198 mtx_print A; #X obj 33 106 t b b; #X msg 33 85 bang; #X obj 33 132 mtx_rand 4 3; #X obj 119 154 mtx_rand 2 3; #X text 44 34 [mtx_distance2]; #X text 482 28 part of iemmatrix; #X text 268 138 inletA: a matrix defining vectors of dimension ; #X text 268 158 inletB: a matrix defining vectors of dimension ; #X text 267 179 outlet: distance matrix (i \, j) \, where each element Y(i \, j)=(A(i)-B(i)).(A(i)-B(i))=|A(i)-B(i)|^2; #X text 166 69 calculate the (square of the) euclidian distance between two sets of vectors.; #X text 233 274 note: if you want the real-distance (non-squared) \, calculate the square-root with [mtx_.^ 0.5]; #X connect 0 0 1 0; #X connect 2 0 0 1; #X connect 2 1 3 0; #X connect 4 0 0 0; #X connect 4 1 5 0; #X connect 6 0 8 0; #X connect 6 1 9 0; #X connect 7 0 6 0; #X connect 8 0 4 0; #X connect 9 0 2 0; pd-iemmatrix-0.3/doc/mtx_egg-help.pd000066400000000000000000000007001262113134600174220ustar00rootroot00000000000000#N canvas 61 0 491 290 10; #X text 295 230 updated for; #X obj 383 230 iemmatrix 0.2; #X obj 432 256 matrix; #X text 302 255 see also help for; #X obj 103 201 mtx_egg 5; #X obj 103 227 mtx_print; #X msg 103 130 bang; #X msg 133 174 3 5; #X msg 119 150 10; #X text 129 20 [mtx_egg]; #X text 30 89 create a turned identity matrix; #X text 79 246 turned identity matrix; #X connect 4 0 5 0; #X connect 6 0 4 0; #X connect 7 0 4 0; #X connect 8 0 4 0; pd-iemmatrix-0.3/doc/mtx_eig-help.pd000066400000000000000000000016341262113134600174330ustar00rootroot00000000000000#N canvas 0 0 710 531 10; #X obj 82 93 mtx_eig; #X obj 82 66 mtx_rand; #X obj 82 146 print l_re; #X obj 128 124 print l_im; #X msg 82 38 3; #X obj 221 61 mtx_rand; #X msg 221 33 3; #X obj 230 119 mtx_eig v; #X obj 230 192 print l_re; #X obj 250 171 print l_im; #X obj 314 193 mtx_print Q_re; #X obj 335 171 mtx_print Q_im; #X obj 230 98 t a a; #X obj 375 123 mtx_print A; #X msg 350 56 matrix 2 2 1 1 -1 2; #X text 61 -33 [mtx_eig] computes (complex valued) eigenvalues \, and if desired eigenvectors of a matrix.; #X text 425 21 requires GSL; #X text 212 276 Franz Zotter \, 2009; #X text 98 238 Attention: eigenvectors seem to be wrong. Don't know why!; #X connect 0 0 2 0; #X connect 0 1 3 0; #X connect 1 0 0 0; #X connect 4 0 1 0; #X connect 5 0 12 0; #X connect 6 0 5 0; #X connect 7 0 8 0; #X connect 7 1 9 0; #X connect 7 2 10 0; #X connect 7 3 11 0; #X connect 12 0 7 0; #X connect 12 1 13 0; #X connect 14 0 12 0; pd-iemmatrix-0.3/doc/mtx_ei~-help.pd000066400000000000000000000050121262113134600174540ustar00rootroot00000000000000#N struct pcolor-plot float x float y array pcolor-element-array pcolor-element ; #N struct pcolor-element float x float y float c float dx; #N canvas 819 236 698 410 10; #X obj 540 85 dsp; #X floatatom 539 115 5 0 0 0 - - -; #X floatatom 586 117 5 0 0 0 - - -; #X obj 95 185 z~; #X obj 96 225 *~ 1; #X obj 361 39 block~ 8192; #X obj 228 179 hsl 128 15 0 1.5 0 0 empty empty empty -2 -8 0 10 -262144 -1 -1 0 1; #X obj 248 224 sin; #X obj 209 223 cos; #X obj 175 79 hsl 100 15 -10 10 0 0 empty empty empty -2 -8 0 10 -262144 -1 -1 7100 1; #X obj 173 125 + 10; #X floatatom 174 149 5 0 0 0 - - -; #X obj 155 184 z~ 10; #X obj 174 98 i; #X obj 169 368 mtx_pcolor; #X obj 525 46 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 1; #X obj 94 343 mtx; #X obj 95 366 mtx_print; #X obj 56 317 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 93 93 *~ 2; #X obj 81 59 noise~; #N canvas 0 0 450 300 computegains 0; #X obj 141 55 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 45 206 mtx_print; #X obj 45 152 mtx_rmstodb; #X obj 45 177 mtx_- 100; #X obj 142 93 mtx_logspace 1 0.17 10; #X obj 195 157 mtx_reverse; #X obj 167 180 mtx_+; #X obj 144 125 t a a a; #X obj 144 288 mtx_./; #X obj 167 203 t a a; #X msg 202 225 1 \$3; #X obj 242 225 /; #X obj 167 249 mtx_* 1; #X connect 0 0 4 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 7 0; #X connect 5 0 6 1; #X connect 6 0 9 0; #X connect 7 0 8 0; #X connect 7 1 6 0; #X connect 7 2 5 0; #X connect 8 0 2 0; #X connect 9 0 12 0; #X connect 9 1 10 0; #X connect 10 0 11 0; #X connect 11 0 12 1; #X connect 12 0 8 1; #X restore 489 325 pd computegains; #X obj 97 275 mtx_ei~ 23 0.909091 0.888184 0.863193 0.833662 0.79924 0.759747 0.715253 0.666139 0.613137 0.557312 0.5 0.442688 0.386863 0.333861 0.284747 0.240253 0.20076 0.166338 0.136807 0.111816 0.0909091 ; #X obj 156 224 *~ 0.5; #X obj 335 353 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 1; #X msg 332 378 vis \$1; #X connect 0 0 1 0; #X connect 0 1 2 0; #X connect 3 0 4 0; #X connect 4 0 22 0; #X connect 6 0 8 0; #X connect 6 0 7 0; #X connect 7 0 23 1; #X connect 8 0 4 1; #X connect 9 0 13 0; #X connect 10 0 3 1; #X connect 10 0 11 0; #X connect 12 0 23 0; #X connect 13 0 10 0; #X connect 15 0 0 0; #X connect 16 0 17 0; #X connect 18 0 16 0; #X connect 19 0 3 0; #X connect 19 0 12 0; #X connect 20 0 19 0; #X connect 22 0 14 0; #X connect 22 0 16 1; #X connect 23 0 22 1; #X connect 24 0 25 0; #X connect 25 0 14 1; pd-iemmatrix-0.3/doc/mtx_element-help.pd000066400000000000000000000016411262113134600203160ustar00rootroot00000000000000#N canvas 136 41 544 373 10; #X text 276 28 updated for; #X obj 364 28 iemmatrix 0.2; #X obj 413 54 matrix; #X text 283 53 see also help for; #X obj 413 76 mtx_row; #X obj 413 96 mtx_col; #X obj 53 302 mtx_print; #X obj 53 283 mtx_element 4 3; #X obj 64 260 mtx_ones 5 3; #X msg 64 241 bang; #X floatatom 53 191 4 0 0 0 - - -; #X msg 164 176 3 2; #X msg 164 197 2 0; #X msg 164 218 0 1; #X msg 165 238 0 0; #X text 199 177 set element [3 \, 2]; #X text 199 197 set all elements in row [2]; #X text 199 217 set all elements in column [1]; #X text 163 284 creation: mtx_element [ [ ]] ; #X obj 89 32 mtx_element; #X text 52 133 set matrix elements; #X text 200 237 set all elements of matrix (default!); #X text 19 9 set elements of a matrix; #X connect 7 0 6 0; #X connect 8 0 7 0; #X connect 9 0 8 0; #X connect 10 0 7 0; #X connect 11 0 7 1; #X connect 12 0 7 1; #X connect 13 0 7 1; #X connect 14 0 7 1; pd-iemmatrix-0.3/doc/mtx_eq-help.pd000066400000000000000000000017161262113134600172750ustar00rootroot00000000000000#N canvas 224 247 450 300 10; #X text 255 30 updated for; #X obj 343 30 iemmatrix 0.2; #X obj 392 56 matrix; #X text 262 55 see also help for; #X obj 123 167 mtx_diag 1 2 3 4 5; #X obj 46 167 mtx_ones 5; #X obj 46 144 t b b; #X obj 46 218 mtx_print; #X msg 46 125 bang; #X text 100 198 ==; #X obj 263 167 mtx_eye 4; #X msg 263 140 bang; #X obj 263 219 mtx_print; #X floatatom 332 124 4 0 0 0 - - -; #X obj 332 142 t b f; #X text 339 193 ==; #X obj 17 23 mtx_eq; #X obj 81 23 mtx_==; #X obj 392 77 ==; #X obj 46 196 mtx_eq; #X obj 125 197 mtx_==; #X obj 263 192 mtx_eq 0; #X obj 360 192 mtx_== 0; #X text 8 42 matrix logic: comparision; #X text 38 247 compare 2 matrices; #X text 246 251 compare a matrix with a scalar; #X connect 4 0 19 1; #X connect 5 0 19 0; #X connect 6 0 5 0; #X connect 6 1 4 0; #X connect 8 0 6 0; #X connect 10 0 21 0; #X connect 11 0 10 0; #X connect 13 0 14 0; #X connect 14 0 10 0; #X connect 14 1 21 1; #X connect 19 0 7 0; #X connect 21 0 12 0; pd-iemmatrix-0.3/doc/mtx_exp-help.pd000066400000000000000000000016621262113134600174640ustar00rootroot00000000000000#N canvas 128 118 687 471 10; #X msg 48 59 3 5; #X obj 555 66 exp; #X obj 48 134 mtx_exp; #X obj 48 81 mtx_eye; #X obj 125 100 mtx 3 3; #X msg 125 80 0 1 2 3 4 5 6 7 8; #X obj 555 86 mtx_log; #X obj 48 162 mtx_print exponential; #X obj 64 285 mtx_rand 4 2; #X msg 64 263 bang; #X obj 64 307 t a a; #X obj 105 307 mtx_print org; #X obj 64 330 mtx_exp; #X obj 64 357 t a a; #X obj 105 357 mtx_print exp; #X obj 64 380 mtx_log; #X obj 64 407 mtx_print log; #X text 418 17 updated for; #X obj 506 17 iemmatrix 0.2; #X obj 555 43 matrix; #X text 425 42 see also help for; #X text 45 42 compute the exponentials of matrix elements; #X text 188 7 exponentials of matrix elements; #X connect 0 0 3 0; #X connect 2 0 7 0; #X connect 3 0 2 0; #X connect 4 0 2 0; #X connect 5 0 4 0; #X connect 8 0 10 0; #X connect 9 0 8 0; #X connect 10 0 12 0; #X connect 10 1 11 0; #X connect 12 0 13 0; #X connect 13 0 15 0; #X connect 13 1 14 0; #X connect 15 0 16 0; pd-iemmatrix-0.3/doc/mtx_eye-help.pd000066400000000000000000000006631262113134600174520ustar00rootroot00000000000000#N canvas 61 0 491 290 10; #X text 295 230 updated for; #X obj 383 230 iemmatrix 0.2; #X text 30 89 create an identity matrix; #X obj 432 256 matrix; #X text 302 255 see also help for; #X obj 103 201 mtx_eye 5; #X obj 103 227 mtx_print; #X msg 103 130 bang; #X msg 133 174 3 5; #X msg 119 150 10; #X text 79 246 identity matrix; #X text 129 20 [mtx_eye]; #X connect 5 0 6 0; #X connect 7 0 5 0; #X connect 8 0 5 0; #X connect 9 0 5 0; pd-iemmatrix-0.3/doc/mtx_fill-help.pd000066400000000000000000000034331262113134600176140ustar00rootroot00000000000000#N canvas 333 84 670 511 10; #X text 458 17 updated for; #X obj 546 17 iemmatrix 0.2; #X obj 595 43 matrix; #X text 465 42 see also help for; #X obj 62 208 mtx_fill; #X text 87 15 [mtx_fill]; #X text 47 34 filling elements of a data matrix into specific positions of an other matrix; #X obj 136 117 mtx_zeros; #X obj 62 231 mtx_print; #X floatatom 232 110 5 0 0 0 - - -; #X obj 136 75 loadbang; #X msg 136 95 10 10; #X text 238 198 <-- if empty matrix: filling sub-matrix at start position ; #X floatatom 281 110 5 0 0 0 - - -; #X text 234 92 row; #X text 289 93 col; #X msg 145 197 matrix \$1 \$2; #X obj 247 127 t b f; #X obj 245 147 pack 1 1; #X obj 245 167 t b l; #X msg 61 127 3 3; #X obj 62 148 mtx_rand; #X obj 62 166 mtx_* 10; #X obj 62 183 mtx_int; #X obj 84 438 mtx_fill; #X obj 149 333 mtx_zeros; #X obj 84 461 mtx_print; #X obj 149 291 loadbang; #X msg 149 311 10 10; #X text 25 76 1 submatrix; #X text 19 275 2 any positions; #X obj 246 333 mtx_rand; #X obj 246 374 mtx_find; #X obj 71 401 mtx_ones; #X msg 246 310 10 10; #X obj 70 340 mtx_size; #X obj 71 360 *; #X obj 246 395 t a a; #X msg 71 379 1 \$1; #X obj 246 354 mtx_> 0.8; #X connect 4 0 8 0; #X connect 7 0 4 1; #X connect 9 0 18 0; #X connect 10 0 11 0; #X connect 11 0 7 0; #X connect 13 0 17 0; #X connect 16 0 4 2; #X connect 17 0 18 0; #X connect 17 1 18 1; #X connect 18 0 19 0; #X connect 19 0 20 0; #X connect 19 1 16 0; #X connect 20 0 21 0; #X connect 21 0 22 0; #X connect 22 0 23 0; #X connect 23 0 4 0; #X connect 24 0 26 0; #X connect 25 0 24 1; #X connect 27 0 28 0; #X connect 28 0 25 0; #X connect 31 0 39 0; #X connect 32 0 37 0; #X connect 33 0 24 0; #X connect 34 0 31 0; #X connect 35 0 36 0; #X connect 35 1 36 1; #X connect 36 0 38 0; #X connect 37 0 35 0; #X connect 37 1 24 2; #X connect 38 0 33 0; #X connect 39 0 32 0; pd-iemmatrix-0.3/doc/mtx_find-help.pd000066400000000000000000000031411262113134600176020ustar00rootroot00000000000000#N canvas 237 76 670 511 10; #X text 458 17 updated for; #X obj 546 17 iemmatrix 0.2; #X obj 595 43 matrix; #X text 465 42 see also help for; #X obj 41 208 t a a; #X text 504 412 see also:; #X text 89 15 [mtx_find]; #X text 47 34 finding indices to nonzero matrix elements; #X obj 504 431 mtx_index; #X msg 41 181 matrix 1 5 0 1 0 1 0 0; #X obj 83 209 mtx_print original; #X obj 41 232 mtx_find; #X obj 41 258 mtx_print nonzero; #X text 33 60 you can use this e.g. in combination with logical conditions \; the result is a matrix \, if non-existent an empty matrix.; #X text 36 112 the matrix result is important when trying to find the first/last nonzero element in column or row direction \, it enables flexible use with [mtx_index].; #X msg 205 182 matrix 1 3 0 0 0; #X msg 281 206 2 3; #X obj 220 207 mtx_ones; #X obj 120 345 mtx_find col -1; #X obj 233 345 mtx_find col; #X obj 324 345 mtx_find row -1; #X obj 439 345 mtx_find row; #X obj 204 276 mtx_rand; #X msg 204 256 3 4; #X obj 204 315 t a a a a a; #X obj 288 314 mtx_print orig; #X obj 120 430 mtx_print last-in-col; #X obj 233 411 mtx_print first-in-col; #X obj 439 370 mtx_print first-in-col; #X obj 324 391 mtx_print last-in-row; #X obj 205 295 mtx_> 0.5; #X connect 4 0 11 0; #X connect 4 1 10 0; #X connect 9 0 4 0; #X connect 11 0 12 0; #X connect 15 0 4 0; #X connect 16 0 17 0; #X connect 17 0 4 0; #X connect 18 0 26 0; #X connect 19 0 27 0; #X connect 20 0 29 0; #X connect 21 0 28 0; #X connect 22 0 30 0; #X connect 23 0 22 0; #X connect 24 0 18 0; #X connect 24 1 19 0; #X connect 24 2 20 0; #X connect 24 3 21 0; #X connect 24 4 25 0; #X connect 30 0 24 0; pd-iemmatrix-0.3/doc/mtx_gauss-help.pd000066400000000000000000000013761262113134600200140ustar00rootroot00000000000000#N canvas 66 122 731 401 10; #X text 458 17 updated for; #X obj 546 17 iemmatrix 0.2; #X text 465 42 see also help for; #X text 26 12 mtx_gauss:: gauss elimination algorithm; #X text 71 62 apply row- & column-transformation to a matrix to shape it into an upper-triangle matrix; #X obj 595 43 matrix; #X obj 595 63 abs; #X msg 174 146 bang; #X obj 174 190 t a a; #X msg 87 144 bang; #X obj 87 165 mtx_rand 5; #X obj 174 167 mtx_eye 5; #X obj 264 167 mtx_egg 5; #X obj 204 235 mtx_print original; #X msg 264 144 bang; #X obj 174 270 mtx_gauss; #X obj 174 327 mtx_print gauss; #X connect 7 0 11 0; #X connect 8 0 15 0; #X connect 8 1 13 0; #X connect 9 0 10 0; #X connect 10 0 8 0; #X connect 11 0 8 0; #X connect 12 0 8 0; #X connect 14 0 12 0; #X connect 15 0 16 0; pd-iemmatrix-0.3/doc/mtx_ge-help.pd000066400000000000000000000017161262113134600172630ustar00rootroot00000000000000#N canvas 224 247 450 300 10; #X text 255 30 updated for; #X obj 343 30 iemmatrix 0.2; #X obj 392 56 matrix; #X text 262 55 see also help for; #X obj 46 167 mtx_ones 5; #X obj 46 144 t b b; #X obj 46 218 mtx_print; #X msg 46 125 bang; #X text 100 198 ==; #X obj 263 167 mtx_eye 4; #X msg 263 140 bang; #X obj 263 219 mtx_print; #X floatatom 332 124 4 0 0 0 - - -; #X obj 332 142 t b f; #X text 339 193 ==; #X obj 17 23 mtx_ge; #X obj 81 23 mtx_>=; #X obj 392 77 >=; #X obj 46 196 mtx_ge; #X obj 125 197 mtx_>=; #X obj 263 192 mtx_ge 0; #X obj 360 192 mtx_>= 0; #X text 8 42 matrix logic: comparision; #X obj 123 167 mtx_diag 1 2 -3 4 5; #X text 38 247 compare 2 matrices; #X text 246 251 compare a matrix with a scalar; #X connect 4 0 18 0; #X connect 5 0 4 0; #X connect 5 1 23 0; #X connect 7 0 5 0; #X connect 9 0 20 0; #X connect 10 0 9 0; #X connect 12 0 13 0; #X connect 13 0 9 0; #X connect 13 1 20 1; #X connect 18 0 6 0; #X connect 20 0 11 0; #X connect 23 0 18 1; pd-iemmatrix-0.3/doc/mtx_gt-help.pd000066400000000000000000000017121262113134600172760ustar00rootroot00000000000000#N canvas 224 247 450 300 10; #X text 255 30 updated for; #X obj 343 30 iemmatrix 0.2; #X obj 392 56 matrix; #X text 262 55 see also help for; #X obj 123 167 mtx_diag 1 2 3 4 5; #X obj 46 167 mtx_ones 5; #X obj 46 144 t b b; #X obj 46 218 mtx_print; #X msg 46 125 bang; #X text 100 198 ==; #X obj 263 167 mtx_eye 4; #X msg 263 140 bang; #X obj 263 219 mtx_print; #X floatatom 332 124 4 0 0 0 - - -; #X obj 332 142 t b f; #X text 339 193 ==; #X obj 17 23 mtx_gt; #X obj 81 23 mtx_>; #X obj 392 77 >; #X obj 46 196 mtx_gt; #X obj 125 197 mtx_>; #X obj 263 192 mtx_gt 0; #X obj 360 192 mtx_> 0; #X text 8 42 matrix logic: comparision; #X text 38 247 compare 2 matrices; #X text 246 251 compare a matrix with a scalar; #X connect 4 0 19 1; #X connect 5 0 19 0; #X connect 6 0 5 0; #X connect 6 1 4 0; #X connect 8 0 6 0; #X connect 10 0 21 0; #X connect 11 0 10 0; #X connect 13 0 14 0; #X connect 14 0 10 0; #X connect 14 1 21 1; #X connect 19 0 7 0; #X connect 21 0 12 0; pd-iemmatrix-0.3/doc/mtx_index-help.pd000066400000000000000000000027731262113134600200030ustar00rootroot00000000000000#N canvas 0 0 646 521 10; #X text 458 17 updated for; #X obj 546 17 iemmatrix 0.2; #X obj 595 43 matrix; #X text 465 42 see also help for; #X obj 81 170 t a a; #X text 441 320 see also:; #X text 89 15 [mtx_index]; #X msg 81 135 matrix 1 5 -1 -2 -3 -4 -5; #X obj 275 168 t a a; #X obj 305 191 mtx_print right-indices; #X obj 111 193 mtx_print left-values; #X obj 81 237 mtx_print addressed-values; #X obj 81 214 mtx_index nan; #X text 185 215 <- invalid indices; #X msg 275 148 matrix 2 2 0 5 2 4; #X text 8 60 you can simultaneously address matrix elements you know the indices of \; the outlet matrix carries the shape of the indexing matrix \; 0 is not allowed as index \, so you can give an alternative value as creation argument (here nan).; #X obj 441 337 mtx_find; #X text 44 282 the indexing matrix can e.g. be the outlet of mtx_find based on logical conditions:; #X obj 89 325 mtx_rand; #X obj 89 347 t a a; #X obj 119 369 mtx_> 0.5; #X msg 51 323 2 3; #X obj 134 347 mtx_print random values; #X obj 119 391 mtx_find col; #X obj 89 413 mtx_index nan; #X obj 89 442 mtx_print result; #X text 200 411 finding the first nonzero entry in column; #X text 47 34 addressing matrix elements by their indices; #X connect 4 0 12 0; #X connect 4 1 10 0; #X connect 7 0 4 0; #X connect 8 0 12 1; #X connect 8 1 9 0; #X connect 12 0 11 0; #X connect 14 0 8 0; #X connect 18 0 19 0; #X connect 19 0 24 0; #X connect 19 1 20 0; #X connect 19 1 22 0; #X connect 20 0 23 0; #X connect 21 0 18 0; #X connect 23 0 24 1; #X connect 24 0 25 0; pd-iemmatrix-0.3/doc/mtx_int-help.pd000066400000000000000000000010421262113134600174520ustar00rootroot00000000000000#N canvas 128 118 680 254 10; #X text 458 17 updated for; #X obj 546 17 iemmatrix 0.2; #X obj 595 43 matrix; #X text 465 42 see also help for; #X obj 595 63 int; #X obj 48 164 mtx_int; #X obj 48 192 mtx_print int; #X obj 48 131 t a a; #X obj 91 132 mtx_print org; #X text 136 10 integer value of matrix elements; #X text 45 42 compute the integer value of each element of a matrix ; #X obj 48 100 mtx 3 2; #X msg 48 80 0 1 -2 0.9 -0.9 -999.1; #X connect 5 0 6 0; #X connect 7 0 5 0; #X connect 7 1 8 0; #X connect 11 0 7 0; #X connect 12 0 11 0; pd-iemmatrix-0.3/doc/mtx_inverse-help.pd000066400000000000000000000025551262113134600203450ustar00rootroot00000000000000#N canvas 366 49 604 572 10; #X text 347 392 updated for; #X obj 435 392 iemmatrix 0.2; #X obj 484 418 matrix; #X text 354 417 see also help for; #X text 243 142 singular; #X text 245 107 regular; #X text 246 158 regular; #X text 247 168 but badly conditioned; #X text 45 16 mtx_inverse:: get the inverse of a matrix; #X text 44 49 mtx_inverse calculates the inverse of a square-matrix ; #X text 43 67 if the input is a non-square matrix (rows!=cols) \, the pseudo-inverse will be calculated.; #X text 154 453 A*inv(A)=inv(A)*A=I; #X text 248 221 pseudoinverse: P1=inv(A'*A)*A'; #X text 247 269 pseudoinverse: P2=A'*inv(A*A'); #X text 245 473 P1*A=I; #X text 245 493 A*P2=I; #X obj 92 358 mtx_inverse; #X obj 92 199 mtx 3; #X msg 112 164 1 2 3 2 4 4 3 4 5; #X msg 103 140 1 2 3 2 3 4 3 4 5; #X msg 92 108 1 2 4 2 3 4 3 4 5; #X obj 92 392 mtx_print inverse; #X obj 92 300 t a a; #X obj 134 300 mtx_print original; #X obj 153 219 mtx_rand 4 3; #X msg 153 198 bang; #X msg 153 248 bang; #X obj 153 269 mtx_rand 3 4; #X obj 181 358 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X text 199 359 instability detected!; #X connect 16 0 21 0; #X connect 16 1 28 0; #X connect 17 0 22 0; #X connect 18 0 17 0; #X connect 19 0 17 0; #X connect 20 0 17 0; #X connect 22 0 16 0; #X connect 22 1 23 0; #X connect 24 0 22 0; #X connect 25 0 24 0; #X connect 26 0 27 0; #X connect 27 0 22 0; pd-iemmatrix-0.3/doc/mtx_le-help.pd000066400000000000000000000017161262113134600172700ustar00rootroot00000000000000#N canvas 224 247 450 300 10; #X text 255 30 updated for; #X obj 343 30 iemmatrix 0.2; #X obj 392 56 matrix; #X text 262 55 see also help for; #X obj 123 167 mtx_diag 1 2 3 4 5; #X obj 46 167 mtx_ones 5; #X obj 46 144 t b b; #X obj 46 218 mtx_print; #X msg 46 125 bang; #X text 100 198 ==; #X obj 263 167 mtx_eye 4; #X msg 263 140 bang; #X obj 263 219 mtx_print; #X floatatom 332 124 4 0 0 0 - - -; #X obj 332 142 t b f; #X text 339 193 ==; #X obj 17 23 mtx_le; #X obj 81 23 mtx_<=; #X obj 392 77 <=; #X obj 46 196 mtx_le; #X obj 125 197 mtx_<=; #X obj 263 192 mtx_le 0; #X obj 360 192 mtx_<= 0; #X text 8 42 matrix logic: comparision; #X text 38 247 compare 2 matrices; #X text 246 251 compare a matrix with a scalar; #X connect 4 0 19 1; #X connect 5 0 19 0; #X connect 6 0 5 0; #X connect 6 1 4 0; #X connect 8 0 6 0; #X connect 10 0 21 0; #X connect 11 0 10 0; #X connect 13 0 14 0; #X connect 14 0 10 0; #X connect 14 1 21 1; #X connect 19 0 7 0; #X connect 21 0 12 0; pd-iemmatrix-0.3/doc/mtx_log-help.pd000066400000000000000000000017121262113134600174450ustar00rootroot00000000000000#N canvas 128 118 687 471 10; #X text 188 7 natural logarithm of matrix-elements; #X text 458 17 updated for; #X obj 546 17 iemmatrix 0.2; #X obj 595 43 matrix; #X text 465 42 see also help for; #X obj 181 100 mtx_eye; #X obj 48 100 mtx 3 3; #X msg 48 80 0 1 2 3 4 5 6 7 8; #X obj 64 285 mtx_rand 4 2; #X msg 64 263 bang; #X obj 64 307 t a a; #X obj 105 307 mtx_print org; #X obj 64 357 t a a; #X text 45 42 compute the natural lograithm of each element of a matrix ; #X obj 48 134 mtx_log; #X obj 48 162 mtx_print logarithm; #X obj 64 330 mtx_log; #X obj 64 380 mtx_exp; #X obj 105 357 mtx_print log; #X obj 64 407 mtx_print exp; #X msg 181 79 3 3; #X obj 595 63 mtx_exp; #X obj 595 83 log; #X connect 5 0 14 0; #X connect 6 0 14 0; #X connect 7 0 6 0; #X connect 8 0 10 0; #X connect 9 0 8 0; #X connect 10 0 16 0; #X connect 10 1 11 0; #X connect 12 0 17 0; #X connect 12 1 18 0; #X connect 14 0 15 0; #X connect 16 0 12 0; #X connect 17 0 19 0; #X connect 20 0 5 0; pd-iemmatrix-0.3/doc/mtx_lt-help.pd000066400000000000000000000017121262113134600173030ustar00rootroot00000000000000#N canvas 224 247 450 300 10; #X text 255 30 updated for; #X obj 343 30 iemmatrix 0.2; #X obj 392 56 matrix; #X text 262 55 see also help for; #X obj 123 167 mtx_diag 1 2 3 4 5; #X obj 46 167 mtx_ones 5; #X obj 46 144 t b b; #X obj 46 218 mtx_print; #X msg 46 125 bang; #X text 100 198 ==; #X obj 263 167 mtx_eye 4; #X msg 263 140 bang; #X obj 263 219 mtx_print; #X floatatom 332 124 4 0 0 0 - - -; #X obj 332 142 t b f; #X text 339 193 ==; #X obj 17 23 mtx_lt; #X obj 81 23 mtx_<; #X obj 392 77 <; #X obj 46 196 mtx_lt; #X obj 125 197 mtx_<; #X obj 263 192 mtx_lt 0; #X obj 360 192 mtx_< 0; #X text 8 42 matrix logic: comparision; #X text 38 247 compare 2 matrices; #X text 246 251 compare a matrix with a scalar; #X connect 4 0 19 1; #X connect 5 0 19 0; #X connect 6 0 5 0; #X connect 6 1 4 0; #X connect 8 0 6 0; #X connect 10 0 21 0; #X connect 11 0 10 0; #X connect 13 0 14 0; #X connect 14 0 10 0; #X connect 14 1 21 1; #X connect 19 0 7 0; #X connect 21 0 12 0; pd-iemmatrix-0.3/doc/mtx_max2-help.pd000066400000000000000000000015651262113134600175410ustar00rootroot00000000000000#N canvas 165 66 505 292 10; #X text 255 30 updated for; #X obj 343 30 iemmatrix 0.2; #X obj 392 56 matrix; #X text 262 55 see also help for; #X obj 46 167 mtx_ones 5; #X obj 46 144 t b b; #X obj 46 218 mtx_print; #X msg 46 125 bang; #X obj 263 167 mtx_eye 4; #X msg 263 140 bang; #X obj 263 219 mtx_print; #X floatatom 332 124 4 0 0 0 - - -; #X obj 332 142 t b f; #X obj 46 196 mtx_max2; #X obj 263 192 mtx_max2 1; #X obj 17 23 mtx_max2; #X text 8 42 matrix logic: maximum of 2 matrices; #X obj 392 77 max; #X obj 123 167 mtx_diag 1 2 -3 4 5; #X text 38 247 maximum of 2 matrices; #X text 246 251 maximum of a matrix and a scalar; #X connect 4 0 13 0; #X connect 5 0 4 0; #X connect 5 1 18 0; #X connect 7 0 5 0; #X connect 8 0 14 0; #X connect 9 0 8 0; #X connect 11 0 12 0; #X connect 12 0 8 0; #X connect 12 1 14 1; #X connect 13 0 6 0; #X connect 14 0 10 0; #X connect 18 0 13 1; pd-iemmatrix-0.3/doc/mtx_mean-help.pd000066400000000000000000000007461262113134600176120ustar00rootroot00000000000000#N canvas 128 104 450 300 10; #X text 228 47 updated for; #X obj 316 47 iemmatrix 0.2; #X obj 365 73 matrix; #X text 235 72 see also help for; #X obj 57 176 mtx_mean; #X obj 57 231 print mean_row; #X obj 57 106 mtx_rand; #X msg 57 82 4 5; #X obj 57 127 t a a; #X obj 87 148 mtx_print org; #X text 56 11 mean values of a matrix; #X text 55 259 get the list(!) mean value of each column; #X connect 4 0 5 0; #X connect 6 0 8 0; #X connect 7 0 6 0; #X connect 8 0 4 0; #X connect 8 1 9 0; pd-iemmatrix-0.3/doc/mtx_min2-help.pd000066400000000000000000000015651262113134600175370ustar00rootroot00000000000000#N canvas 165 66 505 292 10; #X text 255 30 updated for; #X obj 343 30 iemmatrix 0.2; #X obj 392 56 matrix; #X text 262 55 see also help for; #X obj 46 167 mtx_ones 5; #X obj 46 144 t b b; #X obj 46 218 mtx_print; #X msg 46 125 bang; #X obj 263 167 mtx_eye 4; #X msg 263 140 bang; #X obj 263 219 mtx_print; #X floatatom 332 124 4 0 0 0 - - -; #X obj 332 142 t b f; #X obj 46 196 mtx_min2; #X obj 263 192 mtx_min2 1; #X obj 17 23 mtx_min2; #X text 8 42 matrix logic: minimum of 2 matrices; #X obj 392 77 min; #X obj 123 167 mtx_diag 1 2 -3 4 5; #X text 38 247 minimum of 2 matrices; #X text 246 251 minimum of a matrix and a scalar; #X connect 4 0 13 0; #X connect 5 0 4 0; #X connect 5 1 18 0; #X connect 7 0 5 0; #X connect 8 0 14 0; #X connect 9 0 8 0; #X connect 11 0 12 0; #X connect 12 0 8 0; #X connect 12 1 14 1; #X connect 13 0 6 0; #X connect 14 0 10 0; #X connect 18 0 13 1; pd-iemmatrix-0.3/doc/mtx_minmax-help.pd000066400000000000000000000010521262113134600201520ustar00rootroot00000000000000#N canvas 161 60 480 312 10; #X text 89 244 updated for; #X obj 177 244 iemmatrix 0.2; #X obj 226 270 matrix; #X text 96 269 see also help for; #X msg 136 83 3 5; #X obj 121 23 mtx_minmax; #X text 223 24 get minimum/maximum of matrix; #X obj 136 186 print min; #X obj 201 186 print max; #X obj 136 106 mtx_rand; #X obj 136 130 t a a; #X obj 176 130 mtx_print; #X text 133 67 get min/max of a matrix; #X obj 136 152 mtx_minmax; #X connect 4 0 9 0; #X connect 9 0 10 0; #X connect 10 0 13 0; #X connect 10 1 11 0; #X connect 13 0 7 0; #X connect 13 1 8 0; pd-iemmatrix-0.3/doc/mtx_mul-help.pd000066400000000000000000000046661262113134600174740ustar00rootroot00000000000000#N canvas 65 0 766 595 10; #X text 525 20 updated for; #X obj 613 20 iemmatrix 0.2; #X obj 662 46 matrix; #X text 532 45 see also help for; #X obj 17 23 mtx_mul; #X obj 81 23 mtx_*; #X obj 662 67 *; #X text 8 42 matrix arithmetic: multiplication; #X obj 134 23 mtx_.*; #X obj 17 256 mtx_mul; #X obj 90 256 mtx_*; #X msg 17 104 bang; #X obj 73 172 mtx_diag 1 2; #X obj 17 128 t b b; #X obj 17 172 mtx_+ 3; #X text 70 257 ==; #X obj 17 148 mtx_eye 3 2; #X obj 219 259 mtx_print; #X obj 219 142 t b f; #X floatatom 219 124 4 0 0 0 - - -; #X msg 219 165 4 2 1 3; #X obj 219 185 mtx_diag; #X obj 219 223 mtx_mul 2; #X obj 304 223 mtx_* 2; #X obj 374 223 mtx_.* 2; #X text 285 223 ==; #X text 357 224 ==; #X obj 563 231 mtx_.*; #X obj 563 266 mtx_print; #X obj 563 146 mtx_diag 1 2 3; #X obj 600 172 mtx_ones 3; #X obj 563 125 t b b; #X msg 563 106 bang; #X obj 600 191 mtx_* 2; #X text 18 313 multiply 2 matrices; #X text 215 282 multiply a matrix with a scalar; #X text 476 290 multiply 2 matrices element by element; #X obj 17 294 mtx_print A*B; #X obj 73 195 t a a; #X obj 56 215 mtx_print A; #X obj 17 215 t a a; #X obj 112 195 mtx_print B; #X obj 158 539 mtx_print; #X obj 158 432 t b f; #X floatatom 158 414 4 0 0 0 - - -; #X msg 158 455 4 2 1 3; #X obj 158 475 mtx_diag; #X obj 403 540 mtx_print; #X obj 403 443 mtx_diag 1 2 3; #X obj 434 461 mtx_ones 3; #X obj 434 480 mtx_* 2; #X text 114 562 divide a matrix by a scalar; #X obj 158 503 mtx_./ 2; #X obj 403 505 mtx_./; #X text 347 564 divide 2 matrices element by element; #X obj 403 422 t b b f; #X floatatom 403 403 4 0 0 0 - - -; #X text 8 382 matrix arithmetic: division; #X obj 14 364 mtx_./; #X connect 9 0 37 0; #X connect 11 0 13 0; #X connect 12 0 38 0; #X connect 13 0 16 0; #X connect 13 1 12 0; #X connect 14 0 40 0; #X connect 16 0 14 0; #X connect 18 0 20 0; #X connect 18 1 22 1; #X connect 19 0 18 0; #X connect 20 0 21 0; #X connect 21 0 22 0; #X connect 22 0 17 0; #X connect 27 0 28 0; #X connect 29 0 27 0; #X connect 30 0 33 0; #X connect 31 0 29 0; #X connect 31 1 30 0; #X connect 32 0 31 0; #X connect 33 0 27 1; #X connect 38 0 9 1; #X connect 38 1 41 0; #X connect 40 0 9 0; #X connect 40 1 39 0; #X connect 43 0 45 0; #X connect 43 1 52 1; #X connect 44 0 43 0; #X connect 45 0 46 0; #X connect 46 0 52 0; #X connect 48 0 53 0; #X connect 49 0 50 0; #X connect 50 0 53 1; #X connect 52 0 42 0; #X connect 53 0 47 0; #X connect 55 0 48 0; #X connect 55 1 49 0; #X connect 55 2 50 1; #X connect 56 0 55 0; pd-iemmatrix-0.3/doc/mtx_mul~-help.pd000066400000000000000000000061121262113134600176560ustar00rootroot00000000000000#N canvas 48 0 889 615 12; #X obj 116 339 osc~ 100; #X obj 116 360 *~ 0.2; #X obj 166 381 osc~ 1000; #X obj 166 403 *~ 1.5; #X obj 212 356 osc~ 432; #X obj 68 471 env~; #X floatatom 68 495 4 0 0 0 - - -; #X obj 127 470 env~; #X floatatom 127 494 4 0 0 0 - - -; #X obj 187 470 env~; #X floatatom 187 494 4 0 0 0 - - -; #X floatatom 286 402 4 0 0 0 - - -; #X text 332 413 fade time in [ms]; #X msg 48 140 bang; #X msg 170 140 bang; #X msg 69 219 bang; #X msg 190 218 bang; #X text 174 24 matrix-multiply m IN~signals to n OUT~signals; #X text 173 41 matrices are interpolated a la line~; #X text 304 170 matrix-messages to control the gains; #X text 303 183 of the matrix~; #X text 334 380 the last inlet gets the fade-time between two matrix-messages. ; #X obj 98 32 mtx_*~; #X obj 69 431 mtx_*~ 4 3 100 .......; #X obj 253 471 env~; #X floatatom 253 495 4 0 0 0 - - -; #X obj 69 301 t a; #X obj 70 539 mtx_*~; #X text 147 536 creation: "mtx_*~ [<#out> [<#in> [] [<...>]] ; #X text 302 154 the first inlet eats; #X text 316 314 the 2nd...one-before-last inlets get the signals to be multiplied.; #X text 328 487 Output signals; #X text 207 68 OUT~^ = A * IN~^; #X obj 48 167 mtx_eye 4 3; #X obj 170 167 mtx_egg 4 3; #X obj 190 245 mtx_zeros 4 3; #X obj 69 246 mtx_ones 4 3; #X msg 699 33 \; pd dsp 1; #X text 127 96 or \, with dimensions: OUT~^[1*n] = A[n*m] * IN~^[m*1] ; #N canvas 34 69 925 425 LEGACY 0; #X obj 51 160 sig~; #X floatatom 180 166 5 0 0 0 - - -; #X text 286 127 this object \, accepted the signals at the first inputs \, then the matrix (and finally the fade-time); #X text 295 163 OUT~^[n] = IN~^[m] * B[m*x]; #X obj 192 307 sig~; #X msg 97 303 time 100; #X obj 93 160 sig~; #X obj 50 188 matrix~ 2 3 100; #X obj 136 138 mtx 2 3; #X obj 25 346 matrix_mul_line~ 2 3 100; #X obj 235 307 sig~; #X text 288 262 this object \, accepted the signals at the inlets \; all! messages went to the 1st inlet; #X obj 25 304 mtx 3 2; #X text 297 298 OUT~^[n] = B[n*m] * IN~^[m]; #X text 288 183 this is a _very_ unusual way to notate signal matrix multiplications; #X text 290 318 this conforms to the way how signal matrix multiplications is usually notated \, however \, we didn't like that the incoming matrix had different dimensions than the object ([mtx N M] vs [matrix_mul_line~ M N]) \; and the 1st inlet was a bit overloaded.; #X text 84 18 [mtx_*~] is the successor of 2 similar objects \, which we believe to have had some design flaws:; #X connect 0 0 7 0; #X connect 1 0 7 3; #X connect 4 0 9 0; #X connect 5 0 9 0; #X connect 6 0 7 1; #X connect 8 0 7 2; #X connect 10 0 9 1; #X connect 12 0 9 0; #X restore 231 585 pd LEGACY; #X connect 0 0 1 0; #X connect 1 0 23 1; #X connect 2 0 3 0; #X connect 3 0 23 2; #X connect 4 0 23 3; #X connect 5 0 6 0; #X connect 7 0 8 0; #X connect 9 0 10 0; #X connect 11 0 23 4; #X connect 13 0 33 0; #X connect 14 0 34 0; #X connect 15 0 36 0; #X connect 16 0 35 0; #X connect 23 0 5 0; #X connect 23 1 7 0; #X connect 23 2 9 0; #X connect 23 3 24 0; #X connect 24 0 25 0; #X connect 26 0 23 0; #X connect 33 0 26 0; #X connect 34 0 26 0; #X connect 35 0 26 0; #X connect 36 0 26 0; pd-iemmatrix-0.3/doc/mtx_neq-help.pd000066400000000000000000000017211262113134600174470ustar00rootroot00000000000000#N canvas 224 247 450 300 10; #X text 255 30 updated for; #X obj 343 30 iemmatrix 0.2; #X obj 392 56 matrix; #X text 262 55 see also help for; #X obj 123 167 mtx_diag 1 2 3 4 5; #X obj 46 167 mtx_ones 5; #X obj 46 144 t b b; #X obj 46 218 mtx_print; #X msg 46 125 bang; #X text 100 198 ==; #X obj 263 167 mtx_eye 4; #X msg 263 140 bang; #X obj 263 219 mtx_print; #X floatatom 332 124 4 0 0 0 - - -; #X obj 332 142 t b f; #X text 339 193 ==; #X obj 17 23 mtx_neq; #X obj 81 23 mtx_!=; #X obj 392 77 !=; #X obj 46 196 mtx_neq; #X obj 125 197 mtx_!=; #X obj 263 192 mtx_neq 0; #X obj 360 192 mtx_!= 0; #X text 8 42 matrix logic: comparision; #X text 38 247 compare 2 matrices; #X text 246 251 compare a matrix with a scalar; #X connect 4 0 19 1; #X connect 5 0 19 0; #X connect 6 0 5 0; #X connect 6 1 4 0; #X connect 8 0 6 0; #X connect 10 0 21 0; #X connect 11 0 10 0; #X connect 13 0 14 0; #X connect 14 0 10 0; #X connect 14 1 21 1; #X connect 19 0 7 0; #X connect 21 0 12 0; pd-iemmatrix-0.3/doc/mtx_not-help.pd000066400000000000000000000007321262113134600174650ustar00rootroot00000000000000#N canvas 128 118 680 254 10; #X text 458 17 updated for; #X obj 546 17 iemmatrix 0.2; #X obj 595 43 matrix; #X text 465 42 see also help for; #X obj 48 131 t a a; #X obj 91 132 mtx_print org; #X obj 16 23 mtx_not; #X obj 111 23 mtx_!; #X text 8 42 matrix logic: inversion; #X obj 48 164 mtx_!; #X obj 48 100 mtx 2 2; #X msg 48 80 0 1 12 0; #X obj 48 192 mtx_print not; #X connect 4 0 9 0; #X connect 4 1 5 0; #X connect 9 0 12 0; #X connect 10 0 4 0; #X connect 11 0 10 0; pd-iemmatrix-0.3/doc/mtx_ones-help.pd000066400000000000000000000007101262113134600176250ustar00rootroot00000000000000#N canvas 61 0 491 290 10; #X text 295 230 updated for; #X obj 383 230 iemmatrix 0.2; #X obj 432 256 matrix; #X text 302 255 see also help for; #X obj 103 201 mtx_ones 5; #X obj 103 227 mtx_print; #X msg 103 130 bang; #X msg 133 174 3 5; #X msg 119 150 10; #X text 129 20 [mtx_ones]; #X text 30 89 create a matrix with all elements := 1; #X text 74 248 all matrix elements=1; #X connect 4 0 5 0; #X connect 6 0 4 0; #X connect 7 0 4 0; #X connect 8 0 4 0; pd-iemmatrix-0.3/doc/mtx_or-help.pd000066400000000000000000000017031262113134600173040ustar00rootroot00000000000000#N canvas 224 247 450 300 10; #X text 255 30 updated for; #X obj 343 30 iemmatrix 0.2; #X obj 392 56 matrix; #X text 262 55 see also help for; #X obj 123 167 mtx_diag 1 2 3 4 5; #X obj 46 167 mtx_ones 5; #X obj 46 144 t b b; #X obj 46 218 mtx_print; #X msg 46 125 bang; #X text 100 198 ==; #X obj 263 167 mtx_eye 4; #X msg 263 140 bang; #X obj 263 219 mtx_print; #X floatatom 332 124 4 0 0 0 - - -; #X obj 332 142 t b f; #X text 339 193 ==; #X obj 17 23 mtx_or; #X obj 81 23 mtx_||; #X obj 392 77 ||; #X obj 46 196 mtx_or; #X obj 125 197 mtx_||; #X obj 263 192 mtx_or 0; #X obj 360 192 mtx_|| 0; #X text 8 42 matrix logic: logical OR; #X text 38 247 OR 2 matrices; #X text 246 251 OR a matrix with a scalar; #X connect 4 0 19 1; #X connect 5 0 19 0; #X connect 6 0 5 0; #X connect 6 1 4 0; #X connect 8 0 6 0; #X connect 10 0 21 0; #X connect 11 0 10 0; #X connect 13 0 14 0; #X connect 14 0 10 0; #X connect 14 1 21 1; #X connect 19 0 7 0; #X connect 21 0 12 0; pd-iemmatrix-0.3/doc/mtx_pack~-help.pd000066400000000000000000000014361262113134600200030ustar00rootroot00000000000000#N canvas 0 0 450 375 12; #X obj 99 140 mtx_pack~ 3; #X obj 98 115 sig~ 1; #X obj 161 115 sig~ 2; #X obj 222 115 sig~ 3; #X obj 99 166 mtx_size; #X floatatom 168 189 5 0 0 0 - - -; #X floatatom 99 190 5 0 0 0 - - -; #X msg 310 164 \; pd dsp 1; #X msg 309 202 \; pd dsp 0; #X obj 61 237 mtx; #X obj 61 260 mtx_print; #X obj 51 211 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X text 43 29 packing signal vectors (usually 64 samples); #X text 42 52 of multiple inputs into a matrix; #X text 214 268 [iemmatrix]; #X text 238 248 Franz Zotter \, 2008; #X text 165 297 see aso; #X obj 258 304 mtx_unpack~; #X connect 0 0 4 0; #X connect 0 0 9 1; #X connect 1 0 0 0; #X connect 2 0 0 1; #X connect 3 0 0 2; #X connect 4 0 6 0; #X connect 4 1 5 0; #X connect 9 0 10 0; #X connect 11 0 9 0; pd-iemmatrix-0.3/doc/mtx_pivot-help.pd000066400000000000000000000026161262113134600200310ustar00rootroot00000000000000#N canvas -35 125 814 290 10; #X text 458 17 updated for; #X obj 546 17 iemmatrix 0.2; #X obj 595 43 matrix; #X text 465 42 see also help for; #X text 198 15 [mtx_pivot]; #X text 59 79 pivot-transform a matrix; #X obj 63 164 mtx_pivot; #N canvas 352 114 190 367 rand-matrix 0; #X obj 74 163 inlet; #X obj 74 270 outlet; #X obj 74 195 mtx_rand; #X obj 74 215 mtx_* 10; #X obj 74 237 mtx_int; #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 restore 63 118 pd rand-matrix; #X msg 63 96 4 3; #X obj 112 185 mtx_print post; #X obj 87 205 mtx_print pre; #X obj 63 245 mtx_print pivot; #X text 290 184 the first outlet is the pivot-transformed matrix.; #X text 289 210 the other outlets are the 1/0-matrices that have to be pre-multiplied (row-tranform) and post-multiplied (column-tranform) to the original matrix to get the pivot-tranformation. this is useful for de-pivoting.; #X obj 63 141 t a a; #X obj 103 141 mtx_print original; #X msg 175 99 matrix 4 3 1 2 3 4 5 6 7 8 9 10 11 12; #X text 194 36 pivot-transform matrices; #X text 290 131 this will tranform the columns and rows \, so that the result will have "all" maximum values in the diagonale. the maximum of the matrix will be located at the upper-left corner.; #X connect 6 0 11 0; #X connect 6 1 10 0; #X connect 6 2 9 0; #X connect 7 0 14 0; #X connect 8 0 7 0; #X connect 14 0 6 0; #X connect 14 1 15 0; #X connect 16 0 14 0; pd-iemmatrix-0.3/doc/mtx_pow-help.pd000066400000000000000000000016631262113134600174760ustar00rootroot00000000000000#N canvas 17 -32 450 300 10; #X text 255 30 updated for; #X obj 343 30 iemmatrix 0.2; #X obj 392 56 matrix; #X text 262 55 see also help for; #X obj 56 251 mtx_print; #X obj 56 144 t b f; #X floatatom 56 126 4 0 0 0 - - -; #X msg 56 167 4 2 1 3; #X obj 56 187 mtx_diag; #X obj 251 252 mtx_print; #X obj 251 155 mtx_diag 1 2 3; #X obj 282 173 mtx_ones 3; #X obj 282 192 mtx_* 2; #X obj 251 134 t b b f; #X floatatom 251 115 4 0 0 0 - - -; #X obj 56 215 mtx_.^ 2; #X obj 251 217 mtx_.^; #X text 34 280 matrix-elements^f; #X text 208 278 elementA(i \, j)^elementB(i \, j); #X text 8 42 matrix arithmetic: power; #X obj 392 77 pow; #X obj 17 23 mtx_.^; #X connect 5 0 7 0; #X connect 5 1 15 1; #X connect 6 0 5 0; #X connect 7 0 8 0; #X connect 8 0 15 0; #X connect 10 0 16 0; #X connect 11 0 12 0; #X connect 12 0 16 1; #X connect 13 0 10 0; #X connect 13 1 11 0; #X connect 13 2 12 1; #X connect 14 0 13 0; #X connect 15 0 4 0; #X connect 16 0 9 0; pd-iemmatrix-0.3/doc/mtx_powtodb-help.pd000066400000000000000000000023401262113134600203400ustar00rootroot00000000000000#N canvas 580 295 687 471 10; #X text 458 17 updated for; #X obj 546 17 iemmatrix 0.2; #X obj 181 90 mtx_eye; #X obj 64 258 mtx_rand 4 2; #X msg 64 233 bang; #X obj 64 307 t a a; #X obj 105 307 mtx_print org; #X obj 64 357 t a a; #X msg 181 71 3 3; #X obj 181 110 mtx_* 100; #X obj 48 100 mtx 2 2; #X text 290 305 note: dB(pd):=dB(techn)+100; #X text 307 337 this means: 100dB(pd)==unity gain (==1); #X text 404 375 0dB(pd)==zero gain (==0); #X text 391 354 106dB(pd)~=double gain (==2); #X obj 105 357 mtx_print rms; #X obj 64 407 mtx_print db; #X msg 48 80 0 1 0.1 2; #X obj 64 277 mtx_* 100; #X obj 595 43 matrix; #X text 465 42 see also help for; #X text 188 7 convert power to dB(pd); #X text 44 34 convert a power value to dB(pd) to for each element of a matrix; #X obj 48 134 mtx_powtodb; #X obj 48 162 mtx_print powtodb; #X obj 64 330 mtx_dbtopow; #X obj 64 380 mtx_powtodb; #X obj 599 71 mtx_dbtopow; #X obj 599 91 powtodb; #X connect 2 0 9 0; #X connect 3 0 18 0; #X connect 4 0 3 0; #X connect 5 0 25 0; #X connect 5 1 6 0; #X connect 7 0 26 0; #X connect 7 1 15 0; #X connect 8 0 2 0; #X connect 9 0 23 0; #X connect 10 0 23 0; #X connect 17 0 10 0; #X connect 18 0 5 0; #X connect 23 0 24 0; #X connect 25 0 7 0; #X connect 26 0 16 0; pd-iemmatrix-0.3/doc/mtx_print-help.pd000066400000000000000000000011241262113134600200150ustar00rootroot00000000000000#N canvas 128 118 680 254 10; #X text 458 17 updated for; #X obj 546 17 iemmatrix 0.2; #X obj 595 43 matrix; #X text 465 42 see also help for; #X text 136 10 print a matrix to the console; #X obj 595 63 print; #X msg 48 80 bang; #X obj 48 100 mtx_ones 5; #X obj 48 141 t a a a; #X obj 92 164 mtx_print; #X obj 48 228 print oops; #X obj 70 194 mtx_print label; #X text 211 116 [mtx_print] will print the matrix in a formatted way ; #X text 216 143 you can give labels \, just like with [print]; #X connect 6 0 7 0; #X connect 7 0 8 0; #X connect 8 0 10 0; #X connect 8 1 11 0; #X connect 8 2 9 0; pd-iemmatrix-0.3/doc/mtx_prod-help.pd000066400000000000000000000013241262113134600176270ustar00rootroot00000000000000#N canvas 128 118 680 254 10; #X text 459 169 updated for; #X obj 547 169 iemmatrix 0.2; #X obj 596 195 matrix; #X text 466 194 see also help for; #X obj 48 100 mtx 3 3; #X obj 48 131 t a a; #X obj 91 132 mtx_print; #X msg 262 129 1 1 2; #X floatatom 262 178 5 0 0 0 - - -; #X obj 48 186 print sum; #X text 136 10 Product of columns of matrix; #X text 45 42 compute the column-wise product of a matrix (result is a list of products); #X obj 48 164 mtx_prod; #X obj 262 151 mtx_prod; #X text 262 107 can also be used for multiplying up lists; #X msg 48 80 0 1 -2 -3 -4 5 -6 7 -8; #X connect 4 0 5 0; #X connect 5 0 12 0; #X connect 5 1 6 0; #X connect 7 0 13 0; #X connect 12 0 9 0; #X connect 13 0 8 0; #X connect 15 0 4 0; pd-iemmatrix-0.3/doc/mtx_qr-help.pd000066400000000000000000000006561262113134600173140ustar00rootroot00000000000000#N canvas 0 0 670 367 10; #X obj 93 216 mtx_qr; #X obj 93 108 mtx_rand; #X obj 93 131 t a a; #X text 442 338 Franz Zotter \, 2009; #X obj 169 155 mtx_print A; #X msg 93 85 4 3; #X obj 201 298 mtx_print R; #X obj 93 298 mtx_print Q; #X text 353 153 A = Q * R; #X text 64 24 [mtx_qr] qr decomposition using gsl; #X connect 0 0 7 0; #X connect 0 1 6 0; #X connect 1 0 2 0; #X connect 2 0 0 0; #X connect 2 1 4 0; #X connect 5 0 1 0; pd-iemmatrix-0.3/doc/mtx_rand-help.pd000066400000000000000000000011211262113134600176020ustar00rootroot00000000000000#N canvas 25 323 504 298 10; #X text 51 7 fill a matrix with random values; #X text 295 20 updated for; #X obj 383 20 iemmatrix 0.2; #X obj 432 46 matrix; #X text 302 45 see also help for; #X obj 434 72 random; #X obj 59 148 mtx_rand; #X obj 59 194 mtx_print; #X obj 83 100 mtx_ones 6 3; #X msg 83 82 bang; #X msg 74 58 5 7; #X msg 59 35 3; #X msg 120 127 seed 12; #X text 51 219 get a matrix containing; #X text 51 232 random elements (0..1]; #X text 177 130 set seed; #X connect 6 0 7 0; #X connect 8 0 6 0; #X connect 9 0 8 0; #X connect 10 0 6 0; #X connect 11 0 6 0; #X connect 12 0 6 0; pd-iemmatrix-0.3/doc/mtx_repmat-help.pd000066400000000000000000000016401262113134600201540ustar00rootroot00000000000000#N canvas -18 184 715 302 10; #X text 458 17 updated for; #X obj 546 17 iemmatrix 0.2; #X obj 595 43 matrix; #X text 465 42 see also help for; #X obj 42 139 t a a; #X obj 84 140 mtx_print org; #X msg 42 94 bang; #X text 90 15 [mtx_repmat]; #X text 108 35 repeat a matrix into a meta-matrix; #X obj 42 257 mtx_print repeated; #X obj 42 229 mtx_repmat 2 2; #X obj 42 116 mtx_egg 3 4; #X msg 209 127 1 2; #X obj 209 199 t b l; #X msg 225 151 3 1; #X text 246 126 repeat incoming matrix 1*vertically and 2*horizontally ; #X text 259 151 repeat incoming matrix 3*vertically and 1*horizontally ; #X msg 261 172 2 2; #X text 294 174 repeat incoming matrix 2*vertically and 2*horizontally ; #X text 39 77 repeat a matrix; #X connect 4 0 10 0; #X connect 4 1 5 0; #X connect 6 0 11 0; #X connect 10 0 9 0; #X connect 11 0 4 0; #X connect 12 0 13 0; #X connect 13 0 11 0; #X connect 13 1 10 1; #X connect 14 0 13 0; #X connect 17 0 13 0; pd-iemmatrix-0.3/doc/mtx_resize-help.pd000066400000000000000000000015631262113134600201710ustar00rootroot00000000000000#N canvas 161 60 833 285 10; #X obj 121 23 mtx_resize; #X text 578 18 updated for; #X obj 666 18 iemmatrix 0.2; #X obj 715 44 matrix; #X text 585 43 see also help for; #X text 223 24 resize a matrix; #X obj 136 244 mtx_print; #X obj 136 106 mtx_ones; #X msg 136 83 3 5; #X obj 136 222 mtx_resize; #X text 133 67 resize a matrix; #X msg 245 91 3 2; #X msg 244 119 2 0; #X msg 241 174 0 0; #X text 285 92 resize to [3 \, 2]; #X text 285 120 resize to 2 rows \, leave row-length unchanged; #X text 284 174 don't resize; #X text 209 222 creation: mtx_resize [ []]; #X msg 243 146 0 4; #X text 285 145 resize to 4 columns \, leave column-length unchanged ; #X msg 242 199 8; #X text 274 199 resize to [8 \, 8]; #X connect 7 0 9 0; #X connect 8 0 7 0; #X connect 9 0 6 0; #X connect 11 0 9 1; #X connect 12 0 9 1; #X connect 13 0 9 1; #X connect 18 0 9 1; #X connect 20 0 9 1; pd-iemmatrix-0.3/doc/mtx_reverse-help.pd000066400000000000000000000020341262113134600203350ustar00rootroot00000000000000#N canvas 54 132 670 392 10; #X text 458 17 updated for; #X obj 546 17 iemmatrix 0.2; #X obj 595 43 matrix; #X text 465 42 see also help for; #X obj 42 139 t a a; #X obj 84 140 mtx_print org; #X obj 42 229 mtx_reverse; #X obj 42 116 mtx_rand 3 4; #X msg 42 94 bang; #X text 108 35 revert order of rows/columns/elements; #X obj 42 257 mtx_print reversed; #X msg 244 172 mode row; #X msg 244 146 mode column; #X msg 331 145 mode col; #X msg 397 145 mode :; #X obj 155 196 t a; #X text 39 77 revert a matrix; #X msg 244 196 mode element; #X msg 338 197 mode .; #X text 450 145 revert columns (default); #X text 454 175 revert rows; #X text 456 198 revert elements; #X text 82 310 You can also set the mode via the argument to the object: ; #X obj 491 310 mtx_reverse row; #X text 90 15 [mtx_reverse]; #X connect 4 0 6 0; #X connect 4 1 5 0; #X connect 6 0 10 0; #X connect 7 0 4 0; #X connect 8 0 7 0; #X connect 11 0 15 0; #X connect 12 0 15 0; #X connect 13 0 15 0; #X connect 14 0 15 0; #X connect 15 0 6 0; #X connect 17 0 15 0; #X connect 18 0 15 0; pd-iemmatrix-0.3/doc/mtx_rfft-help.pd000066400000000000000000000026361262113134600176330ustar00rootroot00000000000000#N canvas 547 150 672 515 10; #X text 457 17 updated for; #X obj 545 17 iemmatrix 0.2; #X obj 594 43 matrix; #X text 464 42 see also help for; #X msg 11 124 bang; #X text 46 34 real fft in each matrix row; #X text 7 60 you can calculate real ffts in column direction \; matrix has to have 2^k columns \; a N/2+1 columns matrix is the result \; ; #X obj 11 191 mtx_cumsum; #X msg 11 147 1 16; #X obj 11 169 mtx_ones; #X obj 11 213 mtx_- 1; #X obj 49 255 mtx_* 0; #X floatatom 140 210 5 0 0 0 - - -; #X text 184 208 <-- scroll here to select frequency; #X obj 172 255 / 8; #X obj 49 306 t a a; #X obj 92 306 mtx_print original; #X obj 49 414 mtx_print rfft_realpart; #X obj 121 392 mtx_print rfft_imagpart; #X text 266 419 see also:; #X obj 49 280 mtx_cos; #X obj 103 255 * 3.14159; #X text 109 280 cosine wave; #X obj 121 372 mtx_int; #X obj 49 393 mtx_int; #X text 89 15 [mtx_rfft]; #X obj 49 330 mtx_rfft; #X obj 261 438 mtx_rifft; #X obj 121 353 mtx_+ 0.5; #X obj 49 373 mtx_+ 0.5; #X obj 140 231 t b f; #X connect 4 0 8 0; #X connect 7 0 10 0; #X connect 8 0 9 0; #X connect 9 0 7 0; #X connect 10 0 11 0; #X connect 11 0 20 0; #X connect 12 0 30 0; #X connect 14 0 21 0; #X connect 15 0 26 0; #X connect 15 1 16 0; #X connect 20 0 15 0; #X connect 21 0 11 1; #X connect 23 0 18 0; #X connect 24 0 17 0; #X connect 26 0 29 0; #X connect 26 1 28 0; #X connect 28 0 23 0; #X connect 29 0 24 0; #X connect 30 0 4 0; #X connect 30 1 14 0; pd-iemmatrix-0.3/doc/mtx_rifft-help.pd000066400000000000000000000023561262113134600200030ustar00rootroot00000000000000#N canvas 547 150 672 515 10; #X text 457 17 updated for; #X obj 545 17 iemmatrix 0.2; #X obj 594 43 matrix; #X text 464 42 see also help for; #X msg 11 124 bang; #X obj 11 191 mtx_cumsum; #X obj 11 169 mtx_ones; #X obj 11 213 mtx_- 1; #X obj 49 255 mtx_* 0; #X floatatom 155 202 5 0 0 0 - - -; #X obj 187 255 / 8; #X obj 49 278 t a a; #X text 266 443 see also:; #X text 46 34 real ifft in each matrix row; #X text 7 60 you can calculate real inverse ffts in column direction \; matrix has to have 2^(k-1)+1 columns \; a 2^k columns matrix is the result \;; #X msg 11 147 1 9; #X obj 49 307 mtx_cos; #X obj 104 307 mtx_sin; #X text 199 203 <-- scroll here to select delay; #X obj 49 411 mtx_print rifft; #X obj 49 389 mtx_int; #X obj 103 255 * -3.14159; #X text 89 15 [mtx_rifft]; #X obj 262 463 mtx_rfft; #X obj 49 336 mtx_rifft; #X obj 49 362 mtx_+ 0.5; #X obj 155 223 t b f; #X connect 4 0 15 0; #X connect 5 0 7 0; #X connect 6 0 5 0; #X connect 7 0 8 0; #X connect 8 0 11 0; #X connect 9 0 26 0; #X connect 10 0 21 0; #X connect 11 0 16 0; #X connect 11 1 17 0; #X connect 15 0 6 0; #X connect 16 0 24 0; #X connect 17 0 24 1; #X connect 20 0 19 0; #X connect 21 0 8 1; #X connect 24 0 25 0; #X connect 25 0 20 0; #X connect 26 0 4 0; #X connect 26 1 10 0; pd-iemmatrix-0.3/doc/mtx_rmstodb-help.pd000066400000000000000000000023411262113134600203350ustar00rootroot00000000000000#N canvas 337 124 687 471 10; #X text 188 7 convert rms to dB(pd); #X text 458 17 updated for; #X obj 546 17 iemmatrix 0.2; #X obj 181 90 mtx_eye; #X obj 64 258 mtx_rand 4 2; #X msg 64 233 bang; #X obj 64 307 t a a; #X obj 105 307 mtx_print org; #X obj 64 357 t a a; #X msg 181 71 3 3; #X obj 181 110 mtx_* 100; #X obj 48 162 mtx_print dbtorms; #X obj 48 100 mtx 2 2; #X text 290 305 note: dB(pd):=dB(techn)+100; #X text 307 337 this means: 100dB(pd)==unity gain (==1); #X text 404 375 0dB(pd)==zero gain (==0); #X text 391 354 106dB(pd)~=double gain (==2); #X text 44 34 convert a linear value to dB(pd) to for each element of a matrix; #X obj 48 134 mtx_rmstodb; #X obj 64 330 mtx_dbtorms; #X obj 64 380 mtx_rmstodb; #X obj 105 357 mtx_print rms; #X obj 64 407 mtx_print db; #X msg 48 80 0 1 0.1 2; #X obj 64 277 mtx_* 100; #X obj 595 43 matrix; #X text 465 42 see also help for; #X obj 599 71 mtx_dbtorms; #X obj 599 91 rmstodb; #X connect 3 0 10 0; #X connect 4 0 24 0; #X connect 5 0 4 0; #X connect 6 0 19 0; #X connect 6 1 7 0; #X connect 8 0 20 0; #X connect 8 1 21 0; #X connect 9 0 3 0; #X connect 10 0 18 0; #X connect 12 0 18 0; #X connect 18 0 11 0; #X connect 19 0 8 0; #X connect 20 0 22 0; #X connect 23 0 12 0; #X connect 24 0 6 0; pd-iemmatrix-0.3/doc/mtx_roll-help.pd000066400000000000000000000012151262113134600176320ustar00rootroot00000000000000#N canvas 79 113 670 283 10; #X text 458 17 updated for; #X obj 546 17 iemmatrix 0.2; #X obj 595 43 matrix; #X text 465 42 see also help for; #X text 194 36 tranpose matrices; #X text 198 15 [mtx_roll]; #X obj 194 162 t a a; #X obj 236 163 mtx_print org; #X obj 194 220 mtx_print rolled; #X msg 194 120 1 2 3 4 5; #X obj 194 142 mtx_diag; #X text 190 103 shift columns of a matrix; #X floatatom 289 196 4 0 5 1 shift - -; #X text 374 182 (0=no-shift \; 1=1-column-right \; -2=2-columns-left \; ...); #X obj 194 192 mtx_roll 1; #X connect 6 0 14 0; #X connect 6 1 7 0; #X connect 9 0 10 0; #X connect 10 0 6 0; #X connect 12 0 14 1; #X connect 14 0 8 0; pd-iemmatrix-0.3/doc/mtx_row-help.pd000066400000000000000000000012601262113134600174710ustar00rootroot00000000000000#N canvas 136 41 544 373 10; #X text 276 28 updated for; #X obj 364 28 iemmatrix 0.2; #X obj 413 54 matrix; #X text 283 53 see also help for; #X obj 413 96 mtx_col; #X obj 89 32 mtx_row; #X text 19 9 set rows of a matrix; #X obj 53 259 mtx_print; #X obj 64 217 mtx_ones 5 3; #X msg 64 198 bang; #X obj 53 240 mtx_row 4 3; #X msg 182 195 0; #X text 213 195 set all rows; #X msg 174 173 2; #X text 214 170 set row [2]; #X msg 53 146 -1 2 3 4 5; #X text 133 242 creation: mtx_row [ []]; #X text 55 129 set matrix rows; #X obj 413 76 mtx_element; #X connect 8 0 10 0; #X connect 9 0 8 0; #X connect 10 0 7 0; #X connect 11 0 10 1; #X connect 13 0 10 1; #X connect 15 0 10 0; pd-iemmatrix-0.3/doc/mtx_scroll-help.pd000066400000000000000000000012041262113134600201560ustar00rootroot00000000000000#N canvas 83 78 670 283 10; #X text 458 17 updated for; #X obj 546 17 iemmatrix 0.2; #X obj 595 43 matrix; #X text 465 42 see also help for; #X text 194 36 tranpose matrices; #X text 198 15 [mtx_scroll]; #X obj 194 162 t a a; #X obj 236 163 mtx_print org; #X obj 194 220 mtx_print scrolled; #X obj 194 192 mtx_scroll 1; #X msg 194 116 1 2 3 4 5; #X text 190 99 shift rows of a matrix; #X floatatom 301 191 4 0 6 1 shift - -; #X obj 194 138 mtx_diag; #X text 380 179 (0=no-shift \; 1=1-row-down \; -2=2-rows-up \; ...) ; #X connect 6 0 9 0; #X connect 6 1 7 0; #X connect 9 0 8 0; #X connect 10 0 13 0; #X connect 12 0 9 1; #X connect 13 0 6 0; pd-iemmatrix-0.3/doc/mtx_sin-help.pd000066400000000000000000000010071262113134600174520ustar00rootroot00000000000000#N canvas 128 118 680 254 10; #X text 458 17 updated for; #X obj 546 17 iemmatrix 0.2; #X obj 595 43 matrix; #X text 465 42 see also help for; #X obj 48 131 t a a; #X obj 91 132 mtx_print org; #X obj 48 100 mtx 2 2; #X msg 48 80 0 3.14159 1 90; #X text 136 11 sine of matrix elements; #X text 45 42 compute the sine of each element of a matrix; #X obj 48 192 mtx_print sin; #X obj 48 164 mtx_sin; #X obj 595 63 sin; #X connect 4 0 11 0; #X connect 4 1 5 0; #X connect 6 0 4 0; #X connect 7 0 6 0; #X connect 11 0 10 0; pd-iemmatrix-0.3/doc/mtx_size-help.pd000066400000000000000000000010561262113134600176370ustar00rootroot00000000000000#N canvas 161 60 453 283 10; #X text 108 233 updated for; #X obj 196 233 iemmatrix 0.2; #X obj 245 259 matrix; #X text 115 258 see also help for; #X floatatom 151 178 4 0 0 0 - - -; #X text 148 68 get the size of a matrix; #X obj 151 140 mtx_size; #X msg 185 91 3 2; #X msg 151 91 7; #X obj 151 115 mtx_ones; #X floatatom 194 178 4 0 0 0 - - -; #X text 192 194 columns; #X text 152 195 rows; #X obj 150 22 mtx_size; #X text 223 24 get the size of a matrix; #X connect 6 0 4 0; #X connect 6 1 10 0; #X connect 7 0 9 0; #X connect 8 0 9 0; #X connect 9 0 6 0; pd-iemmatrix-0.3/doc/mtx_slice-help.pd000066400000000000000000000015111262113134600177600ustar00rootroot00000000000000#N canvas 333 84 670 511 10; #X text 458 17 updated for; #X obj 546 17 iemmatrix 0.2; #X obj 595 43 matrix; #X text 465 42 see also help for; #X text 89 15 [mtx_slice]; #X text 47 34 slicing parts out of a matrix; #X text 33 60 you can use this to partition matrices; #X obj 156 264 mtx_slice; #X obj 156 127 mtx_ones; #X obj 156 147 mtx_cumsum :; #X obj 156 167 t a a; #X msg 156 107 3 4; #X obj 204 192 mtx_print left; #X obj 156 290 mtx_print slice; #X text 338 241 [list idx1_row idx1_col idx2_row idx2_col(; #X msg 214 241 list 2 2 end end; #X msg 193 222 list 2 2 3 4; #X text 313 263 the keyword 'end' is allowed; #X text 347 355 see also:; #X obj 347 374 mtx_fill; #X connect 7 0 13 0; #X connect 8 0 9 0; #X connect 9 0 10 0; #X connect 10 0 7 0; #X connect 10 1 12 0; #X connect 11 0 8 0; #X connect 15 0 7 1; #X connect 16 0 7 1; pd-iemmatrix-0.3/doc/mtx_sndfileread-help.pd000066400000000000000000000022451262113134600211460ustar00rootroot00000000000000#N canvas 0 169 604 484 10; #X msg 276 196 open \$1; #X obj 276 88 openpanel; #X obj 276 66 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 113 112 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 302 261 print DONE; #X obj 198 347 mtx_print; #X msg 114 165 20; #X obj 243 289 mtx_size; #X floatatom 244 311 0 0 0 0 - - -; #X floatatom 299 311 0 0 0 0 - - -; #X msg 113 186 100; #X msg 112 204 100000; #X msg 115 146 4; #X msg 287 153 symbol x.wav; #X msg 303 172 symbol x.mat; #X floatatom 153 148 5 0 0 0 - - -; #X msg 335 196 close; #X text 309 64 open audiofile (multichannel); #X text 75 90 read number of samples; #X text 137 111 read 1; #X text 391 370 Franz Zotter 2008; #X text 356 389 [iemmatrix]; #X text 79 24 reading multichannel data from soundfile; #X obj 200 239 mtx_sndfileread; #X connect 0 0 23 0; #X connect 1 0 0 0; #X connect 2 0 1 0; #X connect 3 0 23 0; #X connect 6 0 23 0; #X connect 7 0 8 0; #X connect 7 1 9 0; #X connect 10 0 23 0; #X connect 11 0 23 0; #X connect 12 0 23 0; #X connect 13 0 0 0; #X connect 14 0 0 0; #X connect 15 0 23 0; #X connect 16 0 23 0; #X connect 23 0 7 0; #X connect 23 0 5 0; #X connect 23 1 4 0; pd-iemmatrix-0.3/doc/mtx_spherical_harmonics-help.pd000066400000000000000000000022321262113134600226770ustar00rootroot00000000000000#N canvas 61 39 921 503 10; #X msg 96 97 matrix 2 1 0 0; #X obj 206 132 mtx_rand; #X msg 209 110 2 10; #X obj 96 197 mtx_print; #X text 537 377 Franz Zotter \, 2009; #X text 150 226 for -n<=m<=n:; #X text 188 258 Y_n^m(phi \, theta) = N_n^m * sin(m*phi) * P_n^m(cos(theta)) ; #X text 188 242 Y_n^m(phi \, theta) = N_n^m * cos(m*phi) * P_n^m(cos(theta)) ; #X text 641 241 for m>=0; #X text 640 257 for m< 0; #X text 147 291 The order of the harmonics in the output columns is specified by the linear index k=n^2+n+m+1.; #X text 95 54 [mtx_spherical_harmonics] spherical harmonics evaluated at a set of points given in phi and theta coordinates.; #X text 146 328 [mtx_spherical_harmonics] uses fully normalized Y_n^m with Condon-Shortley phase; #X text 305 160 for an L points 2xL input matrix \, [mtx_spherical_harmonics] evaluates the (nmax+2)^2 spherical harmonics at L points and delivers an Lx(nmax+2)^2 output matrix.; #X text 309 118 [mtx_spherical_harmonics] requires a numerical creation argument specifyiing the maximum order 0<=n<=nmax.; #X obj 96 157 mtx_spherical_harmonics 2; #X connect 0 0 15 0; #X connect 1 0 15 0; #X connect 2 0 1 0; #X connect 15 0 3 0; pd-iemmatrix-0.3/doc/mtx_spherical_radial-help.pd000066400000000000000000000257241262113134600221630ustar00rootroot00000000000000#N canvas 379 0 1021 852 10; #N canvas 0 0 450 300 (subpatch) 0; #X array j0 100 float 1; #A 0 0.998334 0.964227 0.888657 0.777588 0.639683 0.485483 0.32644 0.173872 0.0379576 -0.0731249 -0.153847 -0.201696 -0.217232 -0.203847 -0.167252 -0.114765 -0.054476 0.00562416 0.058443 0.0984482 0.122122 0.128169 0.117474 0.0928211 0.0584223 0.0193205 -0.0192641 -0.0525636 -0.0767977 -0.0895608 -0.0900205 -0.0789194 -0.0583864 -0.0315936 -0.00230552 0.0256184 0.0487061 0.0642826 0.0707609 0.067784 0.0562077 0.0379347 0.0156251 -0.00767335 -0.0289267 -0.045498 -0.0554624 -0.0578212 -0.0525892 -0.0407518 -0.0240998 -0.00497058 0.0140721 0.0305726 0.0424939 0.0484624 0.0479197 0.0411655 0.0292891 0.0140031 -0.002598 -0.018319 -0.03115 -0.0395184 -0.0424783 -0.0398125 -0.0320383 -0.0203186 -0.0062929 0.00814866 0.0211162 0.0309648 0.0365 0.03712 0.0328773 0.0244546 0.013059 0.000252624 -0.0122595 -0.0228541 -0.0301981 -0.0334145 -0.0321848 -0.0267766 -0.0179956 -0.00706707 0.00453248 0.0152732 0.0237724 0.0289707 0.0302626 0.0275654 0.0213185 0.0124147 0.00207441 -0.00832043 -0.0174098 -0.0240321 -0.0273718 -0.0270586; #X coords 0 1 99 -1 200 140 1; #X restore 69 219 graph; #N canvas 0 0 450 300 (subpatch) 0; #X array y0 100 float 1; #A 0 -9.95004 -1.91809 -0.810089 -0.304619 -0.00483966 0.181763 0.288657 0.333212 0.328231 0.285574 0.21711 0.13461 0.0491928 -0.0293734 -0.0933163 -0.137346 -0.158906 -0.15816 -0.137711 -0.102106 -0.0571689 -0.00924676 0.0355409 0.0719789 0.0962818 0.106425 0.102249 0.0853441 0.0587414 0.0264484 -0.00709537 -0.037585 -0.0613658 -0.0758406 -0.0797276 -0.0731431 -0.0575093 -0.0353085 -0.00971747 0.0158235 0.0380541 0.0542939 0.0627506 0.0627045 0.0545503 0.0396971 0.0203463 -0.000821204 -0.0210054 -0.037647 -0.048744 -0.0530835 -0.0503669 -0.0412123 -0.027042 -0.00987069 0.00797327 0.0241575 0.0366444 0.0439426 0.0452802 0.04068 0.0309308 0.0174615 0.00213646 -0.0129974 -0.0259804 -0.0351907 -0.0395426 -0.0386117 -0.0326705 -0.0226335 -0.00992048 0.00374029 0.016545 0.0268491 0.0333767 0.0353758 0.0327023 0.0258234 0.0157413 0.00384979 -0.00825582 -0.0189914 -0.0269888 -0.0312691 -0.0313604 -0.0273472 -0.0198471 -0.00991801 0.00108892 0.0117122 0.0205722 0.026549 0.028923 0.0274601 0.0224315 0.0145684 0.00495724 -0.00510983; #X coords 0 1 99 -1 200 140 1; #X restore 273 218 graph; #N canvas 0 0 450 300 (subpatch) 0; #X array j1 100 float 1; #A 0 0.0333 0.151926 0.258502 0.344765 0.404366 0.433434 0.430906 0.398561 0.340773 0.264018 0.176172 0.0857012 0.000808178 -0.0713561 -0.125349 -0.157887 -0.168057 -0.15727 -0.128968 -0.0881426 -0.0407019 0.00722327 0.0499589 0.0828816 0.102861 0.108515 0.100244 0.0800755 0.051316 0.0180848 -0.0152242 -0.0444836 -0.0663113 -0.0784363 -0.0799115 -0.0711576 -0.0538387 -0.0305939 -0.00466337 0.0205417 0.0418694 0.0568064 0.063761 0.0622198 0.0527642 0.0369499 0.0170698 -0.00416483 -0.0239835 -0.0399079 -0.0500544 -0.0533485 -0.049631 -0.0396435 -0.0249017 -0.00747387 0.0103011 0.0261224 0.0380184 0.0445884 0.0451623 0.0398627 0.0295634 0.0157541 0.000329767 -0.0146647 -0.027302 -0.0360164 -0.0397945 -0.0382901 -0.0318491 -0.0214458 -0.0085399 0.00512516 0.0177551 0.0277372 0.0338448 0.0353847 0.0322742 0.0250353 0.0147129 0.00272587 -0.00932521 -0.0198704 -0.0275726 -0.0314957 -0.0312168 -0.0268688 -0.0191109 -0.00903089 0.00200534 0.0125378 0.0212037 0.0269128 0.0289832 0.0272214 0.0219371 0.0138931 0.00419583 -0.00585494 ; #X coords 0 1 99 -1 200 140 1; #X restore 69 379 graph; #N canvas 0 0 450 300 (subpatch) 0; #X array y1 100 float 1; #A 0 100.499 5.08199 1.86277 1.03198 0.642778 0.391258 0.200655 0.0486347 -0.0704963 -0.157309 -0.211619 -0.234338 -0.228189 -0.197797 -0.149379 -0.0901827 -0.0277821 0.0306545 0.0790444 0.112931 0.129831 0.129357 0.113112 0.0843665 0.047579 0.00780913 -0.0299028 -0.0611178 -0.0824773 -0.0920306 -0.0893798 -0.075634 -0.0531885 -0.0253627 0.00405364 0.031287 0.0530402 0.0668722 0.071455 0.0666825 0.0536247 0.0343387 0.0115672 -0.0116345 -0.032295 -0.047895 -0.0566644 -0.0577737 -0.0513997 -0.0386632 -0.0214493 -0.00214039 0.016706 0.0326874 0.043856 0.0489506 0.0475324 0.0400125 0.0275701 0.0119765 -0.00465167 -0.0201339 -0.0325078 -0.0402728 -0.0425692 -0.0392682 -0.0309667 -0.0188886 -0.00470961 0.00967236 0.0223871 0.0318329 0.0368752 0.0369804 0.0322683 0.0234795 0.0118627 -0.000998855 -0.0134016 -0.0237446 -0.0307342 -0.033544 -0.0319104 -0.0261532 -0.0171201 -0.00606465 0.00552617 0.0161298 0.0243871 0.0292745 0.0302296 0.0272147 0.020709 0.0116366 0.00123572 -0.00910834 -0.0180468 -0.0244415 -0.0275097 -0.0269179; #X coords 0 1 99 -1 200 140 1; #X restore 273 378 graph; #N canvas 0 0 450 300 (subpatch) 0; #X array j2 100 float 1; #A 0 0.000666191 0.0142423 0.0438713 0.0861799 0.136337 0.188585 0.236874 0.275523 0.299836 0.306613 0.294482 0.264041 0.217772 0.159759 0.0952301 0.0299879 -0.0302173 -0.0802925 -0.116323 -0.135954 -0.138587 -0.125385 -0.0990795 -0.0636155 -0.0236694 0.0158917 0.0505546 0.0766421 0.0916826 0.0946273 0.0858963 0.0672542 0.041536 0.0122611 -0.0168159 -0.0421625 -0.0608785 -0.071014 -0.0717602 -0.0634945 -0.0476817 -0.0266473 -0.00325543 0.019465 0.0387006 0.0521913 0.0584877 0.0570986 0.0485147 0.0341096 0.0159345 -0.00356237 -0.0218585 -0.0366754 -0.0462567 -0.0495713 -0.0464185 -0.037425 -0.0239387 -0.00783391 0.00874297 0.0236544 0.0350433 0.0415603 0.0425204 0.0379701 0.0286599 0.015928 0.00151276 -0.0126817 -0.024833 -0.0334324 -0.037469 -0.0365463 -0.0309168 -0.0214326 -0.00941995 0.00350276 0.015641 0.0254441 0.0317013 0.0336896 0.0312552 0.0248197 0.0153124 0.00403802 -0.00749991 -0.0177981 -0.0255479 -0.0298004 -0.0300804 -0.0264389 -0.0194339 -0.0100484 0.000446893 0.0106636 0.0192785 0.0252034 0.0277219 0.0265749; #X coords 0 1 99 -1 200 140 1; #X restore 69 549 graph; #N canvas 0 0 450 300 (subpatch) 0; #X array y2 100 float 1; #A 0 3024.91 34.6483 7.52992 2.89013 1.2384 0.426713 -0.0263457 -0.278374 -0.398111 -0.424692 -0.386041 -0.305084 -0.201668 -0.0928367 0.00748753 0.0889225 0.144905 0.172714 0.173186 0.150159 0.109688 0.0591149 0.0061069 -0.0422499 -0.0802067 -0.103891 -0.111582 -0.103722 -0.0826649 -0.0522311 -0.0171175 0.017751 0.0478499 0.0695893 0.0806976 0.0804173 0.0695012 0.050022 0.0250285 -0.00189889 -0.0271343 -0.0474708 -0.0605065 -0.0649094 -0.0605325 -0.0483731 -0.0303889 -0.00920143 0.0122733 0.031212 0.045245 0.0527412 0.0529879 0.0462443 0.0336689 0.0171336 -0.00104611 -0.0184281 -0.0327644 -0.0422855 -0.0459131 -0.0433748 -0.0352119 -0.0226813 -0.00756812 0.00806366 0.0221484 0.0328881 0.0389768 0.0397568 0.0352832 0.0262963 0.0141048 0.000398699 -0.012982 -0.024291 -0.0321012 -0.0354818 -0.0341065 -0.0282798 -0.0188812 -0.00723461 0.00507498 0.0164157 0.0253228 0.0306859 0.0318857 0.0288629 0.0221128 0.0126073 0.00165734 -0.00926688 -0.0187316 -0.0255258 -0.0288155 -0.0282441 -0.0239688 -0.0166291 -0.00725295 0.00288612; #X coords 0 1 99 -1 200 140 1; #X restore 273 548 graph; #N canvas 0 0 450 300 plot 0; #X obj 60 19 inlet; #X obj 44 198 mtx; #X obj 58 42 t a a; #X obj 39 70 mtx_size; #X obj 39 112 until; #X obj 39 92 t f b; #X obj 68 131 + 1; #X obj 39 131 i; #X msg 82 93 1; #X obj 43 152 t f f; #X obj 152 243 outlet; #X obj 44 222 list prepend 0; #X obj 45 243 outlet; #X obj 152 219 - 1; #X msg 44 175 col \$1; #X connect 0 0 2 0; #X connect 1 0 11 0; #X connect 2 0 3 0; #X connect 2 1 1 1; #X connect 3 1 5 0; #X connect 4 0 7 0; #X connect 5 0 4 0; #X connect 5 1 8 0; #X connect 6 0 7 1; #X connect 7 0 6 0; #X connect 7 0 9 0; #X connect 8 0 7 1; #X connect 9 0 14 0; #X connect 9 1 13 0; #X connect 11 0 12 0; #X connect 13 0 10 0; #X connect 14 0 1 0; #X restore 124 112 pd plot; #X obj 124 160 s; #X msg 162 135 symbol j\$1; #N canvas 0 0 450 300 plot 0; #X obj 60 19 inlet; #X obj 44 198 mtx; #X obj 58 42 t a a; #X obj 39 70 mtx_size; #X obj 39 112 until; #X obj 39 92 t f b; #X obj 68 131 + 1; #X obj 39 131 i; #X msg 82 93 1; #X obj 43 152 t f f; #X obj 152 243 outlet; #X obj 44 222 list prepend 0; #X obj 45 243 outlet; #X obj 152 219 - 1; #X msg 44 175 col \$1; #X connect 0 0 2 0; #X connect 1 0 11 0; #X connect 2 0 3 0; #X connect 2 1 1 1; #X connect 3 1 5 0; #X connect 4 0 7 0; #X connect 5 0 4 0; #X connect 5 1 8 0; #X connect 6 0 7 1; #X connect 7 0 6 0; #X connect 7 0 9 0; #X connect 8 0 7 1; #X connect 9 0 14 0; #X connect 9 1 13 0; #X connect 11 0 12 0; #X connect 13 0 10 0; #X connect 14 0 1 0; #X restore 245 114 pd plot; #X obj 245 162 s; #X msg 283 137 symbol y\$1; #N canvas 0 0 450 300 (subpatch) 0; #X array j3 100 float 1; #A 0 9.51852e-06 0.00095102 0.00527028 0.0150905 0.0317082 0.0553716 0.085194 0.119212 0.154584 0.187911 0.215627 0.234435 0.241716 0.235869 0.216543 0.184724 0.142677 0.0937343 0.0419586 -0.00827382 -0.0527338 -0.0877843 -0.110761 -0.120243 -0.11619 -0.09992 -0.0739438 -0.0416654 -0.00699329 0.0260988 0.0540063 0.0738778 0.0839026 0.083473 0.0732052 0.0548197 0.0308987 0.00455261 -0.020964 -0.0426398 -0.0580521 -0.0656311 -0.0648136 -0.0560715 -0.0408163 -0.0211929 0.000206524 0.020674 0.0377202 0.0493699 0.0543867 0.0523989 0.0439155 0.0302337 0.0132523 -0.00478447 -0.0215758 -0.0350539 -0.0436334 -0.0463949 -0.0431797 -0.0345861 -0.0218717 -0.00677619 0.00871263 0.0226157 0.0332128 0.0392526 0.0400974 0.0357879 0.027019 0.0150343 0.00145374 -0.0119425 -0.0234446 -0.031629 -0.0355328 -0.0347652 -0.0295429 -0.0206482 -0.00931503 0.00293997 0.0145178 0.0239443 0.0300561 0.0321429 0.0300285 0.0240813 0.015155 0.00446824 -0.00655985 -0.016497 -0.0240825 -0.0283853 -0.0289184 -0.0256915 -0.0192001 -0.0103516 -0.000340117 0.00951389; #X coords 0 1 99 -1 200 140 1; #X restore 69 709 graph; #N canvas 0 0 450 300 (subpatch) 0; #X array y3 100 float 1; #A 0 151145 366.834 43.4101 11.0361 3.31824 0.714766 -0.258057 -0.571765 -0.587221 -0.468662 -0.301997 -0.135561 0.0035989 0.102198 0.15655 0.169761 0.149492 0.106014 0.0504976 -0.00643979 -0.0558783 -0.0913754 -0.109365 -0.10918 -0.0927436 -0.0639955 -0.0281465 0.0091362 0.042514 0.0676428 0.0816513 0.0833923 0.0734539 0.0539494 0.028129 -0.000125397 -0.0268511 -0.0485288 -0.0625167 -0.0673434 -0.0628338 -0.0500594 -0.031131 -0.00886785 0.013607 0.0332908 0.047688 0.0551132 0.0548748 0.0473213 0.0337506 0.0162001 -0.00285082 -0.0208224 -0.0353766 -0.0447137 -0.0477865 -0.0444104 -0.0352552 -0.0217275 -0.00576019 0.0104582 0.0247791 0.0353731 0.0409598 0.0409568 0.0355346 0.0255707 0.0125128 -0.00182793 -0.0155244 -0.0267899 -0.0342077 -0.036906 -0.0346574 -0.0278903 -0.0176154 -0.00527729 0.00744578 0.0188686 0.0275192 0.0323273 0.0327536 0.0288477 0.0212272 0.0109833 -0.00047449 -0.0116095 -0.0209631 -0.0273442 -0.0299787 -0.0286024 -0.0234837 -0.0153772 -0.00541359 0.0050563 0.0146438 0.0221049 0.0265009 0.0273153; #X coords 0 1 99 -1 200 140 1; #X restore 273 708 graph; #X obj 365 54 hsl 128 15 1 300 0 0 empty empty empty -2 -8 0 10 -262144 -1 -1 1500 1; #X msg 124 42 0.1 \$1 100; #X obj 125 87 mtx_spherical_radial h 3; #X obj 125 63 mtx_linspace; #X connect 6 0 7 0; #X connect 6 1 8 0; #X connect 8 0 7 1; #X connect 9 0 10 0; #X connect 9 1 11 0; #X connect 11 0 10 1; #X connect 14 0 15 0; #X connect 15 0 17 0; #X connect 16 0 6 0; #X connect 16 1 9 0; #X connect 17 0 16 0; pd-iemmatrix-0.3/doc/mtx_sub-help.pd000066400000000000000000000017201262113134600174540ustar00rootroot00000000000000#N canvas 363 101 481 299 10; #X text 255 30 updated for; #X obj 343 30 iemmatrix 0.2; #X obj 392 56 matrix; #X text 262 55 see also help for; #X obj 46 176 mtx_sub; #X obj 125 177 mtx_-; #X obj 123 147 mtx_diag 1 2 3 4 5; #X obj 46 147 mtx_ones 5; #X obj 46 124 t b b; #X obj 46 198 mtx_print; #X msg 46 105 bang; #X text 100 178 ==; #X obj 263 147 mtx_eye 4; #X obj 263 172 mtx_sub 10; #X msg 263 120 bang; #X obj 263 199 mtx_print; #X floatatom 332 104 4 0 0 0 - - -; #X obj 332 122 t b f; #X obj 360 172 mtx_- 10; #X text 339 173 ==; #X text 38 227 sub 2 matrices; #X obj 17 23 mtx_sub; #X obj 81 23 mtx_-; #X text 8 42 matrix arithmetic: subtraction; #X obj 393 77 -; #X text 232 231 subtract an offset from a matrix; #X connect 4 0 9 0; #X connect 6 0 4 1; #X connect 7 0 4 0; #X connect 8 0 7 0; #X connect 8 1 6 0; #X connect 10 0 8 0; #X connect 12 0 13 0; #X connect 13 0 15 0; #X connect 14 0 12 0; #X connect 16 0 17 0; #X connect 17 0 12 0; #X connect 17 1 13 1; pd-iemmatrix-0.3/doc/mtx_sum-help.pd000066400000000000000000000012761262113134600174750ustar00rootroot00000000000000#N canvas 128 118 680 254 10; #X text 459 169 updated for; #X obj 547 169 iemmatrix 0.2; #X obj 596 195 matrix; #X text 466 194 see also help for; #X obj 48 100 mtx 3 3; #X obj 48 131 t a a; #X msg 48 80 0 1 -2 -3 -4 5 -6 7 8; #X obj 48 164 mtx_sum; #X obj 91 132 mtx_print; #X text 136 10 sum columns of matrix; #X text 45 42 compute the column-wise sum of a matrix (result is a list of sums); #X obj 262 151 mtx_sum; #X msg 262 129 1 1 2; #X floatatom 262 178 5 0 0 0 - - -; #X obj 48 186 print sum; #X text 262 107 can also be used for summing up lists; #X connect 4 0 5 0; #X connect 5 0 7 0; #X connect 5 1 8 0; #X connect 6 0 4 0; #X connect 7 0 14 0; #X connect 11 0 13 0; #X connect 12 0 11 0; pd-iemmatrix-0.3/doc/mtx_svd-help.pd000066400000000000000000000011321262113134600174540ustar00rootroot00000000000000#N canvas 482 188 717 423 12; #X obj 93 216 mtx_svd; #X obj 93 108 mtx_rand; #X obj 309 275 mtx_transpose; #X obj 201 273 mtx_diag; #X obj 93 131 t a a; #X text 64 24 [mtx_svd] singular value decomposition using gsl; #X text 442 338 Franz Zotter \, 2009; #X text 353 153 A = U * S * V^T; #X obj 93 298 mtx_print U; #X obj 201 299 mtx_print S; #X obj 309 298 mtx_print V^T; #X obj 169 155 mtx_print A; #X msg 93 85 4 3; #X connect 0 0 8 0; #X connect 0 1 3 0; #X connect 0 2 2 0; #X connect 1 0 4 0; #X connect 2 0 10 0; #X connect 3 0 9 0; #X connect 4 0 0 0; #X connect 4 1 11 0; #X connect 12 0 1 0; pd-iemmatrix-0.3/doc/mtx_trace-help.pd000066400000000000000000000007121262113134600177610ustar00rootroot00000000000000#N canvas 108 140 615 247 10; #X text 360 64 updated for; #X obj 448 64 iemmatrix 0.2; #X text 83 25 get the trace of a matrix; #X obj 84 106 mtx_ones 7; #X msg 84 83 bang; #X obj 84 147 mtx_trace; #X floatatom 84 189 4 0 0 0 - - -; #X text 86 68 get trace of a matrix; #X text 81 204 trace = sum(diagonal elements); #X obj 497 90 matrix; #X text 367 89 see also help for; #X obj 498 114 mtx_diag; #X connect 3 0 5 0; #X connect 4 0 3 0; #X connect 5 0 6 0; pd-iemmatrix-0.3/doc/mtx_transpose-help.pd000066400000000000000000000007771262113134600207140ustar00rootroot00000000000000#N canvas 168 0 670 283 10; #X obj 194 192 mtx_transpose; #X msg 194 117 3 5; #X text 191 100 transpose a matrix; #X text 458 17 updated for; #X obj 546 17 iemmatrix 0.2; #X obj 595 43 matrix; #X text 465 42 see also help for; #X text 194 36 tranpose matrices; #X text 198 15 [mtx_transpose]; #X obj 194 139 mtx_eye; #X obj 194 162 t a a; #X obj 236 163 mtx_print org; #X obj 194 220 mtx_print transposed; #X connect 0 0 12 0; #X connect 1 0 9 0; #X connect 9 0 10 0; #X connect 10 0 0 0; #X connect 10 1 11 0; pd-iemmatrix-0.3/doc/mtx_unpack~-help.pd000066400000000000000000000016151262113134600203450ustar00rootroot00000000000000#N canvas 682 0 450 300 12; #X msg 310 164 \; pd dsp 1; #X msg 309 202 \; pd dsp 0; #X obj 292 114 mtx_print; #X text 43 29 packing signal vectors (usually 64 samples); #X text 42 52 of multiple inputs into a matrix; #X text 214 268 [iemmatrix]; #X text 238 248 Franz Zotter \, 2008; #X obj 77 162 mtx_unpack~ 3; #X obj 47 115 mtx_rand; #X obj 47 138 t b a a; #X obj 292 87 block~ 8; #X msg 47 93 3 8; #X obj 5 162 t b b b; #X obj 192 220 print~ C; #X obj 133 244 print~ B; #X obj 77 267 print~ A; #X obj 19 96 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 126 115 mtx_ones; #X msg 126 93 3 8; #X connect 7 0 15 0; #X connect 7 1 14 0; #X connect 7 2 13 0; #X connect 8 0 9 0; #X connect 9 0 12 0; #X connect 9 1 7 0; #X connect 9 2 2 0; #X connect 11 0 8 0; #X connect 12 0 15 0; #X connect 12 1 14 0; #X connect 12 2 13 0; #X connect 16 0 9 0; #X connect 17 0 9 0; #X connect 18 0 17 0; pd-iemmatrix-0.3/doc/mtx_zeros-help.pd000066400000000000000000000007121262113134600200250ustar00rootroot00000000000000#N canvas 61 0 491 290 10; #X text 295 230 updated for; #X obj 383 230 iemmatrix 0.2; #X obj 432 256 matrix; #X text 302 255 see also help for; #X obj 103 201 mtx_zeros 5; #X obj 103 227 mtx_print; #X msg 103 130 bang; #X msg 133 174 3 5; #X msg 119 150 10; #X text 129 20 [mtx_zeros]; #X text 30 89 create a matrix with all elements := 0; #X text 74 248 all matrix elements=0; #X connect 4 0 5 0; #X connect 6 0 4 0; #X connect 7 0 4 0; #X connect 8 0 4 0; pd-iemmatrix-0.3/iemmatrix-meta.pd.in000066400000000000000000000005051262113134600176300ustar00rootroot00000000000000#N canvas 10 10 200 200 10; #N canvas 20 20 420 300 META 0; #X text 10 10 META this is a prototype of a libdir meta file; #X text 10 30 NAME @PACKAGE_NAME@; #X text 10 50 AUTHOR IOhannes m zmoelnig\, Thomas Musil\, Franz Zotter; #X text 10 70 LICENSE GPL-2; #X text 10 90 VERSION @PACKAGE_VERSION@; #X restore 10 10 pd META; pd-iemmatrix-0.3/m4/000077500000000000000000000000001262113134600142735ustar00rootroot00000000000000pd-iemmatrix-0.3/m4/iem_checkflags.m4000066400000000000000000000056401262113134600174660ustar00rootroot00000000000000dnl Copyright (C) 2005-2011 IOhannes m zmölnig dnl This file is free software; IOhannes m zmölnig dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # IEM_CHECK_CPPFLAGS(ADDITIONAL-CPPFLAGS, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND) # # checks whether the $(C) compiler accepts the ADDITIONAL-CPPFLAGS # if so, they are added to the CPPFLAGS AC_DEFUN([IEM_CHECK_CPPFLAGS], [ AC_MSG_CHECKING([whether $CPP accepts "$1"]) temp_check_cppflags="${CPPFLAGS}" CPPFLAGS="$1 ${CPPFLAGS}" AC_PREPROC_IFELSE( [AC_LANG_SOURCE([[int main(void){return 0;}]])], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); CPPFLAGS="${temp_check_cppflags}"]) ])# IEM_CHECK_CPPFLAGS # IEM_CHECK_CFLAGS(ADDITIONAL-CFLAGS, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND) # # checks whether the $(C) compiler accepts the ADDITIONAL-CFLAGS # if so, they are added to the CFLAGS AC_DEFUN([IEM_CHECK_CFLAGS], [ AC_MSG_CHECKING([whether $CC accepts "$1"]) cat > conftest.c << EOF int main(){ return 0; } EOF if $CC $CFLAGS [$1] -o conftest.o conftest.c > /dev/null 2>&1 then AC_MSG_RESULT([yes]) CFLAGS="${CFLAGS} [$1]" [$2] else AC_MSG_RESULT([no]) [$3] fi ])# IEM_CHECK_CFLAGS # IEM_CHECK_CXXFLAGS(ADDITIONAL-CXXFLAGS, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND) # # checks whether the $(CXX) (c++) compiler accepts the ADDITIONAL-CXXFLAGS # if so, they are added to the CXXFLAGS AC_DEFUN([IEM_CHECK_CXXFLAGS], [ AC_MSG_CHECKING([whether $CXX accepts "$1"]) cat > conftest.c++ << EOF int main(){ return 0; } EOF if $CXX $CPPFLAGS $CXXFLAGS -o conftest.o conftest.c++ [$1] > /dev/null 2>&1 then AC_MSG_RESULT([yes]) CXXFLAGS="${CXXFLAGS} [$1]" [$2] else AC_MSG_RESULT([no]) [$3] fi ])# IEM_CHECK_CXXFLAGS # IEM_CHECK_FRAMEWORK(FRAMEWORK, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND) # # AC_DEFUN([IEM_CHECK_FRAMEWORK], [ AC_MSG_CHECKING([for "$1"-framework]) temp_check_ldflags_org="${LDFLAGS}" LDFLAGS="-framework [$1] ${LDFLAGS}" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [temp_check_ldflags_success="yes"],[temp_check_ldflags_success="no"]) if test "x$temp_check_ldflags_success" = "xyes"; then AC_MSG_RESULT([yes]) [$2] else AC_MSG_RESULT([no]) LDFLAGS="$temp_check_ldflags_org" [$3] fi ])# IEM_CHECK_FRAMEWORK # IEM_CHECK_LDFLAGS(ADDITIONAL-LDFLAGS, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND) # # checks whether the $(LD) linker accepts the ADDITIONAL-LDFLAGS # if so, they are added to the LDFLAGS AC_DEFUN([IEM_CHECK_LDFLAGS], [ AC_MSG_CHECKING([whether linker accepts "$1"]) temp_check_ldflags_org="${LDFLAGS}" LDFLAGS="$1 ${LDFLAGS}" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [temp_check_ldflags_success="yes"],[temp_check_ldflags_success="no"]) if test "x$temp_check_ldflags_success" = "xyes"; then AC_MSG_RESULT([yes]) [$2] else AC_MSG_RESULT([no]) LDFLAGS="$temp_check_ldflags_org" [$3] fi ])# IEM_CHECK_LDFLAGS pd-iemmatrix-0.3/m4/iem_fat.m4000066400000000000000000000034631262113134600161470ustar00rootroot00000000000000dnl Copyright (C) 2005-2006 IOhannes m zmölnig dnl This file is free software; IOhannes m zmölnig dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([IEM_CHECK_FAT], [ AC_ARG_ENABLE(fat-binary, [ --enable-fat-binary=ARCHS build an Apple Multi Architecture Binary (MAB); ARCHS is a comma-delimited list of architectures for which to build; if ARCHS is omitted, then the package will be built for all architectures supported by the platform (e.g. "ppc,i386" for MacOS/X and Darwin; if this option is disabled or omitted entirely, then the package will be built only for the target platform], [fat_binary=$enableval], [fat_binary=no]) if test "$fat_binary" != no; then AC_MSG_CHECKING([target architectures]) # Respect TARGET_ARCHS setting from environment if available. if test -z "$TARGET_ARCHS"; then # Respect ARCH given to --enable-fat-binary if present. if test "$fat_binary" != yes; then TARGET_ARCHS=`echo "$fat_binary" | tr ',' ' '` else # Choose a default set of architectures based upon platform. TARGET_ARCHS="ppc i386" fi fi AC_MSG_RESULT([$TARGET_ARCHS]) define([Name],[translit([$1],[./-], [___])]) # /usr/lib/arch_tool -archify_list $TARGET_ARCHS []Name="" for archs in $TARGET_ARCHS do []Name="$[]Name -arch $archs" done if test "x$[]Name" != "x"; then IEM_CHECK_CFLAGS($[]Name,,[]Name="") IEM_CHECK_CXXFLAGS($[]Name,,[]Name="") IEM_CHECK_LDFLAGS($[]Name,,[]Name="") fi undefine([Name]) fi ])# IEM_CHECK_FAT pd-iemmatrix-0.3/m4/iem_operatingsystem.m4000066400000000000000000000016741262113134600206340ustar00rootroot00000000000000dnl try to figure out the target operating system and set some AM-macros accordingly dnl dnl Copyright (C) 2011 IOhannes m zmölnig AC_DEFUN([IEM_OPERATING_SYSTEM], [ AC_CANONICAL_HOST LINUX=no ANDROID=no MACOSX=no IPHONEOS=no BSD=no WINDOWS=no MINGW=no CYGWIN=no HURD=no IRIX=no case $host_os in *linux*) LINUX=yes ;; *darwin*) MACOSX=yes ;; GNU/kFreeBSD) BSD=yes ;; *mingw*) WINDOWS=yes MINGW=yes ;; *cygwin*) WINDOWS=yes CYGWIN=yes ;; GNU) HURD=yes ;; esac AM_CONDITIONAL(LINUX, test x$LINUX = xyes) AM_CONDITIONAL(ANDROID, test x$ANDROID = xyes) AM_CONDITIONAL(MACOSX, test x$MACOSX = xyes) AM_CONDITIONAL(IPHONEOS, test x$IPHONEOS = xyes) AM_CONDITIONAL(BSD, test x$BSD = xyes) AM_CONDITIONAL(WINDOWS, test x$WINDOWS = xyes) AM_CONDITIONAL(CYGWIN, test x$MINGW = xyes) AM_CONDITIONAL(MINGW, test x$MINGW = xyes) AM_CONDITIONAL(HURD, test x$HURD = xyes) AM_CONDITIONAL(IRIX, test x$IRIX = xyes) ]) dnl IEM_OPERATING_SYSTEM pd-iemmatrix-0.3/m4/iem_parallelport.m4000066400000000000000000000022601262113134600200700ustar00rootroot00000000000000dnl Copyright (C) 2005-2006 IOhannes m zmölnig dnl This file is free software; IOhannes m zmölnig dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([IEM_CHECK_LPT], [ dnl check for LPT AC_ARG_ENABLE(lpt, [ --enable-lpt enable parallelport-support]) if test "x" = "x${enable_lpt}" ; then enable_lpt="${with_lpt}" fi AC_CHECK_HEADERS(linux/ppdev.h, [ have_ppdev=" (with device-support)" ], [ have_ppdev="" ]) if test x"$enable_lpt" != "xno" then AC_MSG_CHECKING([parallel-port]) if test "x$enable_lpt" = "xyes" then # forced AC_DEFINE([Z_WANT_LPT], [1], [Define if you want parallelport support]) have_lpt="yes (forced)" else AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ ioperm(0x3bc, 8, 1); outb(0, 0x3bc); ioperm(0x3bc, 8, 0); ]])], [have_lpt="yes"], [have_lpt="no"]) fi fi if test "x$have_lpt" != "xno"; then AC_DEFINE([Z_WANT_LPT], [1], [Define if you want line printer support]) AC_MSG_RESULT([$have_lpt$have_ppdev]) else AC_MSG_RESULT([no]) fi AM_CONDITIONAL([LPT], [test "x${have_lpt}" != "xno"]) ]) dnl IEM_CHECK_LPT pd-iemmatrix-0.3/m4/iem_simd.m4000066400000000000000000000020351262113134600163230ustar00rootroot00000000000000dnl Copyright (C) 2005-2006 IOhannes m zmölnig dnl This file is free software; IOhannes m zmölnig dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([IEM_CHECK_SIMD], [ AC_ARG_ENABLE(simd, [ --enable-simd=ARCHS enable SIMD optimization; valid arguments are: SSE2 ], [simd=$enableval], [simd=no]) if test "$simd" != no; then AC_MSG_CHECKING([SIMD optimization]) # Respect SIMD given to --enable-simd if present. if test "$simd" != yes; then SIMD=`echo "$simd" | tr ',' ' '` else # Choose a default set of architectures based upon platform. SIMD="SSE2" fi for smd in $SIMD do case "${smd}" in SSE2|sse2) AC_MSG_RESULT([SSE2]) IEM_CHECK_CFLAGS([-mfpmath=sse -msse]) IEM_CHECK_CXXFLAGS([-mfpmath=sse -msse]) ;; *) AC_MSG_RESULT([unknown SIMD instructions: ${smd}]) ;; esac done fi ])# IEM_CHECK_SIMD pd-iemmatrix-0.3/m4/libtool.m4000066400000000000000000010601111262113134600162010ustar00rootroot00000000000000# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. m4_define([_LT_COPYING], [dnl # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool 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. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ]) # serial 57 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. m4_defun([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_WITH_SYSROOT])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi ]) if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PREPARE_SED_QUOTE_VARS # -------------------------- # Define a few sed substitution that help us do robust quoting. m4_defun([_LT_PREPARE_SED_QUOTE_VARS], [# Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([["`\\]]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ]) # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from `configure', and `config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # `config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain="$ac_aux_dir/ltmain.sh" ])# _LT_PROG_LTMAIN ## ------------------------------------- ## ## Accumulate code for creating libtool. ## ## ------------------------------------- ## # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the `libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) ## ------------------------ ## ## FIXME: Eliminate VARNAME ## ## ------------------------ ## # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to `config.status' so that its # declaration there will have the same value as in `configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags="_LT_TAGS"dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the `libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into `config.status', and then the shell code to quote escape them in # for loops in `config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$[]1 _LTECHO_EOF' } # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done _LT_OUTPUT_LIBTOOL_INIT ]) # _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) # ------------------------------------ # Generate a child script FILE with all initialization necessary to # reuse the environment learned by the parent script, and make the # file executable. If COMMENT is supplied, it is inserted after the # `#!' sequence but before initialization text begins. After this # macro, additional text can be appended to FILE to form the body of # the child script. The macro ends with non-zero status if the # file could not be fully written (such as if the disk is full). m4_ifdef([AS_INIT_GENERATED], [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], [m4_defun([_LT_GENERATED_FILE_INIT], [m4_require([AS_PREPARE])]dnl [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl [lt_write_fail=0 cat >$1 <<_ASEOF || lt_write_fail=1 #! $SHELL # Generated by $as_me. $2 SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$1 <<\_ASEOF || lt_write_fail=1 AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 _ASEOF test $lt_write_fail = 0 && chmod +x $1[]dnl m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) _LT_GENERATED_FILE_INIT(["$CONFIG_LT"], [# Run this file to recreate a libtool stub with the current configuration.]) cat >>"$CONFIG_LT" <<\_LTEOF lt_cl_silent=false exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ \`$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2011 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test $[#] != 0 do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try \`$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try \`$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. lt_cl_success=: test "$silent" = yes && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # _LT_COPYING _LT_LIBTOOL_TAGS # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac _LT_PROG_LTMAIN # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) _LT_PROG_REPLACE_SHELLFNS mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Go], [_LT_LANG(GO)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG m4_ifndef([AC_PROG_GO], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_GO. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_GO], [AC_LANG_PUSH(Go)dnl AC_ARG_VAR([GOC], [Go compiler command])dnl AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl _AC_ARG_VAR_LDFLAGS()dnl AC_CHECK_TOOL(GOC, gccgo) if test -z "$GOC"; then if test -n "$ac_tool_prefix"; then AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) fi fi if test -z "$GOC"; then AC_CHECK_PROG(GOC, gccgo, gccgo, false) fi ])#m4_defun ])#m4_ifndef # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([AC_PROG_GO], [LT_LANG(GO)], [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) dnl AC_DEFUN([AC_LIBTOOL_RC], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[[012]]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES([TAG]) # --------------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test "$lt_cv_ld_force_load" = "yes"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" m4_if([$1], [CXX], [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX([TAGNAME]) # ---------------------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. # Store the results from the different compilers for each TAGNAME. # Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ lt_aix_libpath_sed='[ /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }]' _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" fi ]) aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [m4_divert_text([M4SH-INIT], [$1 ])])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Find how we can fake an echo command that does not interpret backslash. # In particular, with Autoconf 2.60 or later we add some code to the start # of the generated configure script which will find a shell with a builtin # printf (which we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO AC_MSG_CHECKING([how to print strings]) # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $[]1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } case "$ECHO" in printf*) AC_MSG_RESULT([printf]) ;; print*) AC_MSG_RESULT([print -r]) ;; *) AC_MSG_RESULT([cat]) ;; esac m4_ifdef([_AS_DETECT_SUGGESTED], [_AS_DETECT_SUGGESTED([ test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test "X`printf %s $ECHO`" = "X$ECHO" \ || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [ --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified).], [], [with_sysroot=no]) dnl lt_sysroot will always be passed unquoted. We quote it here dnl in case the user passed a directory name. lt_sysroot= case ${with_sysroot} in #( yes) if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) AC_MSG_RESULT([${with_sysroot}]) AC_MSG_ERROR([The sysroot must be an absolute path.]) ;; esac AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl [dependent libraries, and in which our libraries should be installed.])]) # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; powerpc64le-*) LD="${LD-ld} -m elf32lppclinux" ;; powerpc64-*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; powerpcle-*) LD="${LD-ld} -m elf64lppc" ;; powerpc-*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; *-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD="${LD-ld}_sol2" fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" ])# _LT_ENABLE_LOCK # _LT_PROG_AR # ----------- m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} : ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no AC_COMPILE_IFELSE([AC_LANG_PROGRAM], [echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a ]) ]) if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi _LT_DECL([], [archiver_list_spec], [1], [How to feed a file listing to the archiver]) ])# _LT_PROG_AR # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [_LT_PROG_AR AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) _LT_DECL([], [lock_old_archive_extraction], [0], [Whether to use a lock for old archive extraction]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $RM conftest* ]) if test x"[$]$2" = xyes; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len" && \ test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF [#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links="nottested" if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", [Define to the sub-directory in which libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existent directories. if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; *) lt_sed_strip_eq="s,=/,/,g" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[[4-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[23]].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[[3-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], [lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [lt_cv_shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir ]) shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[List of archive names. First name is the real one, the rest are links. The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [install_override_mode], [1], [Permission mode override for installation of shared libraries]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([], [sys_lib_dlsearch_path_spec], [2], [Run-time system search path for libraries]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program which can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program which can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PROG_ECHO_BACKSLASH])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method = "file_magic"]) _LT_DECL([], [file_magic_glob], [1], [How to find potential files when deplibs_check_method = "file_magic"]) _LT_DECL([], [want_nocaseglob], [1], [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi]) if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi AC_SUBST([DUMPBIN]) if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # _LT_CHECK_SHAREDLIB_FROM_LINKLIB # -------------------------------- # how to determine the name of the shared library # associated with a specific link library. # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) m4_require([_LT_DECL_DLLTOOL]) AC_CACHE_CHECK([how to associate runtime and link libraries], lt_cv_sharedlib_from_linklib_cmd, [lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac ]) sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO _LT_DECL([], [sharedlib_from_linklib_cmd], [1], [Command to associate shared and link libraries]) ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB # _LT_PATH_MANIFEST_TOOL # ---------------------- # locate the manifest tool m4_defun([_LT_PATH_MANIFEST_TOOL], [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], [lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&AS_MESSAGE_LOG_FD if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest*]) if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then case $cc_basename in nvcc*) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; *) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; esac _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT@&t@_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT@&t@_DLSYM_CONST #else # define LT@&t@_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT@&t@_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then nm_file_list_spec='@' fi _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) _LT_DECL([], [nm_file_list_spec], [1], [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL 8.0, 9.0 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; *Sun\ F* | *Sun*Fortran*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Intel*\ [[CF]]*Compiler*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; *Portland\ Group*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_CACHE_CHECK([for $compiler option to produce PIC], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global defined # symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] ;; esac ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi _LT_TAGVAR(link_all_deplibs, $1)=no else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) m4_if($1, [], [ # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) _LT_LINKER_OPTION([if $CC understands -b], _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) ;; esac fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], [lt_cv_irix_exported_symbol], [save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" AC_LINK_IFELSE( [AC_LANG_SOURCE( [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], [C++], [[int foo (void) { return 0; }]], [Fortran 77], [[ subroutine foo end]], [Fortran], [[ subroutine foo end]])])], [lt_cv_irix_exported_symbol=yes], [lt_cv_irix_exported_symbol=no]) LDFLAGS="$save_LDFLAGS"]) if test "$lt_cv_irix_exported_symbol" = yes; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_CACHE_CHECK([whether -lc should be explicitly linked in], [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), [$RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no else lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* ]) _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary and the resulting library dependency is "absolute", i.e impossible to change by setting ${shlibpath_var} if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [postlink_cmds], [2], [Commands necessary for finishing linking programs]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_TAG_COMPILER # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC="$lt_save_CC" ])# _LT_LANG_C_CONFIG # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared # libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ func_to_tool_file "$lt_outputfile"~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd2*) # C++ shared libraries are fairly broken _LT_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ '"$_LT_TAGVAR(old_archive_cmds, $1)" _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(GCC, $1)="$GXX" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test "$_lt_caught_CXX_error" != yes AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_FUNC_STRIPNAME_CNF # ---------------------- # func_stripname_cnf prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # # This function is identical to the (non-XSI) version of func_stripname, # except this one can be used by m4 code that may be executed by configure, # rather than the libtool script. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl AC_REQUIRE([_LT_DECL_SED]) AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) func_stripname_cnf () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname_cnf ])# _LT_FUNC_STRIPNAME_CNF # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF package foo func foo() { } _LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case ${prev}${p} in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" || test $p = "-R"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test "$pre_test_object_deps_done" = no; then case ${prev} in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)="${prev}${p}" else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)="$p" else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)="$p" else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_LANG_PUSH(Fortran 77) if test -z "$F77" || test "X$F77" = "Xno"; then _lt_disable_F77=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_F77" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} CFLAGS=$FFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$G77" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC="$lt_save_CC" CFLAGS="$lt_save_CFLAGS" fi # test "$_lt_disable_F77" != yes AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_LANG_PUSH(Fortran) if test -z "$FC" || test "X$FC" = "Xno"; then _lt_disable_FC=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_FC" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} CFLAGS=$FCFLAGS compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test "$_lt_disable_FC" != yes AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_GO_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Go compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GO_CONFIG], [AC_REQUIRE([LT_PROG_GO])dnl AC_LANG_SAVE # Source file extension for Go test sources. ac_ext=go # Object file extension for compiled Go test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="package main; func main() { }" # Code to be used in simple link tests lt_simple_link_test_code='package main; func main() { }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GOC-"gccgo"} CFLAGS=$GOFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # Go did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GO_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= CC=${RC-"windres"} CFLAGS= compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_GO # ---------- AC_DEFUN([LT_PROG_GO], [AC_CHECK_TOOL(GOC, gccgo,) ]) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_DLLTOOL # ---------------- # Ensure DLLTOOL variable is set. m4_defun([_LT_DECL_DLLTOOL], [AC_CHECK_TOOL(DLLTOOL, dlltool, false) test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program]) AC_SUBST([DLLTOOL]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [AC_MSG_CHECKING([whether the shell understands some XSI constructs]) # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes AC_MSG_RESULT([$xsi_shell]) _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) AC_MSG_CHECKING([whether the shell understands "+="]) lt_shell_append=no ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes AC_MSG_RESULT([$lt_shell_append]) _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) # ------------------------------------------------------ # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. m4_defun([_LT_PROG_FUNCTION_REPLACE], [dnl { sed -e '/^$1 ()$/,/^} # $1 /c\ $1 ()\ {\ m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: ]) # _LT_PROG_REPLACE_SHELLFNS # ------------------------- # Replace existing portable implementations of several shell functions with # equivalent extended shell implementations where those features are available.. m4_defun([_LT_PROG_REPLACE_SHELLFNS], [if test x"$xsi_shell" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary parameter first. func_stripname_result=${3} func_stripname_result=${func_stripname_result#"${1}"} func_stripname_result=${func_stripname_result%"${2}"}]) _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl func_split_long_opt_name=${1%%=*} func_split_long_opt_arg=${1#*=}]) _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl func_split_short_opt_arg=${1#??} func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) fi if test x"$lt_shell_append" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl func_quote_for_eval "${2}" dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) fi ]) # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- # Determine which file name conversion functions should be used by # func_to_host_file (and, implicitly, by func_to_host_path). These are needed # for certain cross-compile configurations and native mingw. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_MSG_CHECKING([how to convert $build file names to $host format]) AC_CACHE_VAL(lt_cv_to_host_file_cmd, [case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac ]) to_host_file_cmd=$lt_cv_to_host_file_cmd AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], [0], [convert $build file names to $host format])dnl AC_MSG_CHECKING([how to convert $build file names to toolchain format]) AC_CACHE_VAL(lt_cv_to_tool_file_cmd, [#assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac ]) to_tool_file_cmd=$lt_cv_to_tool_file_cmd AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], [0], [convert $build files to toolchain format])dnl ])# _LT_PATH_CONVERSION_FUNCTIONS pd-iemmatrix-0.3/m4/ltoptions.m4000066400000000000000000000300731262113134600165730ustar00rootroot00000000000000# Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, # Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 7 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option `$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl `shared' nor `disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) ]) ])# _LT_SET_OPTIONS ## --------------------------------- ## ## Macros to handle LT_INIT options. ## ## --------------------------------- ## # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [1], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the `shared' and # `disable-shared' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the `static' and # `disable-static' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the `fast-install' # and `disable-fast-install' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the `pic-only' and `no-pic' # LT_INIT options. # MODE is either `yes' or `no'. If omitted, it defaults to `both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for lt_pkg in $withval; do IFS="$lt_save_ifs" if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS="$lt_save_ifs" ;; esac], [pic_mode=default]) test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) ## ----------------- ## ## LTDL_INIT Options ## ## ----------------- ## m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) pd-iemmatrix-0.3/m4/ltsugar.m4000066400000000000000000000104241262113134600162170ustar00rootroot00000000000000# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59 which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) pd-iemmatrix-0.3/m4/ltversion.m4000066400000000000000000000012621262113134600165630ustar00rootroot00000000000000# ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # @configure_input@ # serial 3337 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.4.2]) m4_define([LT_PACKAGE_REVISION], [1.3337]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4.2' macro_revision='1.3337' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) pd-iemmatrix-0.3/m4/lt~obsolete.m4000066400000000000000000000137561262113134600171230ustar00rootroot00000000000000# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 5 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) pd-iemmatrix-0.3/src/000077500000000000000000000000001262113134600145425ustar00rootroot00000000000000pd-iemmatrix-0.3/src/iemmatrix.c000066400000000000000000000014451262113134600167110ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, forum::für::umläute * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" void iemmatrix_sources_setup(void); #ifndef BUILD_DATE # define BUILD_DATE "" __DATE__ " : " __TIME__ #endif void iemmatrix_setup(){ post(""); post("iemmatrix "VERSION); post("\tobjects for manipulating 2d-matrices"); post("\t(c) 2001-2015 iem"); post("\t\tIOhannes m zmölnig"); post("\t\tThomas Musil"); post("\t\tFranz Zotter"); post("\tcompiled "BUILD_DATE); post(""); iemmatrix_sources_setup(); } pd-iemmatrix-0.3/src/iemmatrix.h000066400000000000000000000127121262113134600167150ustar00rootroot00000000000000/* ************************************* */ /* iemmatrix */ /* ************************************* */ /* objects for simple matrix operations */ /* ************************************* */ /* * IEMMATRIX is a runtime-library * for miller s. puckette's realtime-computermusic-software "pure data" * therefore you NEED "pure data" to make any use of the IEMMATRIX external * (except if you want to use the code for other things) * * you can get "pure data" at * http://pd.iem.at * ftp://iem.at/pd */ /* * Copyright (c) Thomas Musil; IEM KUG, Graz, Austria; 2001-2005 * Copyright (c) IOhannes m zmölnig (forum::für::umläute), IEM KUG, Graz, Austria; 2001-2005 * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * * * "pure data" has it's own license, that comes shipped with "pure data". * * there are ABSOLUTELY NO WARRANTIES for anything */ #ifndef INCLUDE_IEMMATRIX_H__ #define INCLUDE_IEMMATRIX_H__ #ifdef __WIN32__ /* MinGW automaticaly defines __WIN32__ * other windos compilers might have to define it by hand */ /* m_pd.h expexts MSW rather than __WIN32__ */ # ifndef MSW # define MSW # endif # ifndef NT # define NT # endif # pragma warning( disable : 4244 ) # pragma warning( disable : 4305 ) #endif /* __WIN32__ */ #include #ifndef M_PI #endif #ifdef HAVE_CONFIG_H # include "config.h" #endif /* HAVE_CONFIG_H */ #ifndef VERSION #ifdef PACKAGE_VERSION # define VERSION PACKAGE_VERSION #else # define VERSION "(unknown)" #endif #endif /* VERSION */ #include #include #include #include #ifdef __WIN32__ #ifndef fabsf # define fabsf fabs #endif #ifndef sqrtf # define sqrtf sqrt #endif #ifndef powf # define powf pow #endif #ifndef atanf # define atanf atan #endif #endif #ifdef __APPLE__ # include # if defined (MAC_OS_X_VERSION_10_3) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3 # else /* float intrinsics not in math.h, so we define them here */ # 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 #endif typedef double t_matrixfloat; /* the main class...*/ typedef struct _matrix { t_object x_obj; int row; int col; t_atom *atombuffer; int current_row, current_col; /* this makes things easy for the mtx_row & mtx_col...*/ t_float f; t_canvas *x_canvas; /* needed for file-reading */ t_outlet *x_outlet; /* just in case somebody wants an outlet */ } t_matrix; typedef struct _mtx_binscalar { t_object x_obj; t_matrix m; /* the output matrix */ t_float f; /* the second input */ } t_mtx_binscalar; typedef struct _mtx_binmtx { t_object x_obj; t_matrix m; /* the output matrix */ t_matrix m2; /* the second input */ } t_mtx_binmtx; /* G.Holzmann: the following is now implemented in iemmatrix_utility.c */ void matrix_free(t_matrix*x); /* utility function */ void setdimen(t_matrix *x, int row, int col); void adjustsize(t_matrix *x, int desiredRow, int desiredCol); void debugmtx(int argc, t_float *buf, int id); t_matrixfloat *matrix2float(t_atom *ap); void float2matrix(t_atom *ap, t_matrixfloat *buffer); /* basic I/O functions */ void matrix_bang(t_matrix *x); /* output the matrix stored in atombuffer */ void matrix_matrix2(t_matrix *x, t_symbol *s, int argc, t_atom *argv); /* store the matrix in atombuffer */ /* set data */ void matrix_set(t_matrix *x, t_float f); /* set the entire matrix to "f" */ void matrix_zeros(t_matrix *x, t_symbol *s, int argc, t_atom *argv); void matrix_ones(t_matrix *x, t_symbol *s, int argc, t_atom *argv); void matrix_eye(t_matrix *x, t_symbol *s, int argc, t_atom *argv); void matrix_egg(t_matrix *x, t_symbol *s, int argc, t_atom *argv); void matrix_diag(t_matrix *x, t_symbol *s, int argc, t_atom *argv); void matrix_diegg(t_matrix *x, t_symbol *s, int argc, t_atom *argv); /* get/set data */ void matrix_row(t_matrix *x, t_symbol *s, int argc, t_atom *argv); void matrix_col(t_matrix *x, t_symbol *s, int argc, t_atom *argv); void matrix_element(t_matrix *x, t_symbol *s, int argc, t_atom *argv); /* in iemmatrix_binops.c */ void mtx_bin_matrix2(t_mtx_binmtx *x, t_symbol *s, int argc, t_atom *argv); void mtx_binmtx_bang(t_mtx_binmtx *x); void mtx_binmtx_free(t_mtx_binmtx *x); void mtx_binscalar_bang(t_mtx_binscalar *x); void mtx_binscalar_free(t_mtx_binscalar *x); /* some math */ /* invert a square matrix (row=col=rowcol) */ /* if "error" is non-NULL, it's content will be set to 0 if the matrix was invertable, else to non-0 */ t_matrixfloat*mtx_doInvert(t_matrixfloat*input, int rowcol, int*error); /* transpose a matrix */ t_matrixfloat*mtx_doTranspose(t_matrixfloat*output, int row, int col); /* multiply matrix A=[rowA*colA] with matrix B=[rowB*colB]; C=A*B; colA=rowB=colArowB */ t_matrixfloat*mtx_doMultiply(int rowA, t_matrixfloat*A, int colArowB, t_matrixfloat*B, int colB); /** wrapper functions in iemmatrix_utility.c * * iemmatrix_fdclose == sys_close */ int iemmatrix_fdclose(int fd); /* for debugging purposes */ #define MARK startpost("MARK[%s:%d@%s]", __FILE__, __LINE__, __FUNCTION__), post #endif pd-iemmatrix-0.3/src/iemmatrix_binops.c000066400000000000000000000032251262113134600202610ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, forum::für::umläute * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" /* -------------------------------------------------------------- */ /* matrix math */ void mtx_bin_matrix2(t_mtx_binmtx *x, t_symbol *s, int argc, t_atom *argv) { int row = atom_getfloat(argv); int col = atom_getfloat(argv+1); if (argc<2){post("mtx_bin2: crippled matrix"); return;} if ((col<1)||(row<1)) {post("mtx_bin2: invalid dimensions %dx%d", row,col); return;} if (col*row+2>argc){ post("mtx_bin2: sparse matrix not yet supported : use \"mtx_check\""); return;} if (row*col!=x->m2.row*x->m2.col) { freebytes(x->m2.atombuffer, (x->m2.row*x->m2.col+2)*sizeof(t_atom)); x->m2.atombuffer=copybytes(argv,(row*col+2)*sizeof(t_atom)); }else memcpy(x->m2.atombuffer, argv, (row*col+2)*sizeof(t_atom)); setdimen(&x->m2, row, col); } void mtx_binmtx_bang(t_mtx_binmtx *x) { if((&x->m)&&(x->m.atombuffer)) outlet_anything(x->x_obj.ob_outlet, gensym("matrix"), x->m.col*x->m.row+2, x->m.atombuffer); } void mtx_binmtx_free(t_mtx_binmtx *x) { matrix_free(&x->m); matrix_free(&x->m2); } void mtx_binscalar_bang(t_mtx_binscalar *x) { if((&x->m)&&(x->m.atombuffer)) outlet_anything(x->x_obj.ob_outlet, gensym("matrix"), x->m.col*x->m.row+2, x->m.atombuffer); } void mtx_binscalar_free(t_mtx_binscalar *x) { matrix_free(&x->m); } void iemtx_binops_setup(void) { } pd-iemmatrix-0.3/src/iemmatrix_sources.c000066400000000000000000000074361262113134600204620ustar00rootroot00000000000000/* iemmatrix-setup autogenerated setup-file * generated by "./makesource.sh" * !! DO NOT MANUALLY EDIT !! */ #include "iemmatrix_sources.h" void iemmatrix_sources_setup(void) { iematrix_setup(); /* matrix.c */ iemtx_abs_setup(); /* mtx_abs.c */ iemtx_add_setup(); /* mtx_add.c */ iemtx_and_setup(); /* mtx_and.c */ iemtx_atan2_setup(); /* mtx_atan2.c */ iemtx_atan_setup(); /* mtx_atan.c */ iemtx_bessel_setup(); /* mtx_bessel.c */ iemtx_bitand_setup(); /* mtx_bitand.c */ iemtx_bitleft_setup(); /* mtx_bitleft.c */ iemtx_bitor_setup(); /* mtx_bitor.c */ iemtx_bitright_setup(); /* mtx_bitright.c */ iemtx_bspline_setup(); /* mtx_bspline.c */ iemtx_check_setup(); /* mtx_check.c */ iemtx_cholesky_setup(); /* mtx_cholesky.c */ iemtx_col_setup(); /* mtx_col.c */ iemtx_colon_setup(); /* mtx_colon.c */ iemtx_concat_setup(); /* mtx_concat.c */ iemtx_conv_setup(); /* mtx_conv.c */ iemtx_cos_setup(); /* mtx_cos.c */ iemtx_cumprod_setup(); /* mtx_cumprod.c */ iemtx_cumsum_setup(); /* mtx_cumsum.c */ iemtx_dbtopow_setup(); /* mtx_dbtopow.c */ iemtx_dbtorms_setup(); /* mtx_dbtorms.c */ iemtx_decay_setup(); /* mtx_decay.c */ iemtx_diag_setup(); /* mtx_diag.c */ iemtx_diegg_setup(); /* mtx_diegg.c */ iemtx_diff_setup(); /* mtx_diff.c */ iemtx_dispersive_dline_setup(); /* mtx_dispersive_dline.c */ iemtx_distance2_setup(); /* mtx_distance2.c */ iemtx_egg_setup(); /* mtx_egg.c */ iemtx_ei__setup(); /* mtx_ei~.c */ iemtx_eig_setup(); /* mtx_eig.c */ iemtx_element_setup(); /* mtx_element.c */ iemtx_eq_setup(); /* mtx_eq.c */ iemtx_exp_setup(); /* mtx_exp.c */ iemtx_eye_setup(); /* mtx_eye.c */ iemtx_fft_setup(); /* mtx_fft.c */ iemtx_fill_setup(); /* mtx_fill.c */ iemtx_find_setup(); /* mtx_find.c */ iemtx_gauss_setup(); /* mtx_gauss.c */ iemtx_ge_setup(); /* mtx_ge.c */ iemtx_gt_setup(); /* mtx_gt.c */ iemtx_ifft_setup(); /* mtx_ifft.c */ iemtx_index_setup(); /* mtx_index.c */ iemtx_int_setup(); /* mtx_int.c */ iemtx_inverse_setup(); /* mtx_inverse.c */ iemtx_isequal_setup(); /* mtx_isequal.c */ iemtx_le_setup(); /* mtx_le.c */ iemtx_log_setup(); /* mtx_log.c */ iemtx_lt_setup(); /* mtx_lt.c */ iemtx_max2_setup(); /* mtx_max2.c */ iemtx_mean_setup(); /* mtx_mean.c */ iemtx_min2_setup(); /* mtx_min2.c */ iemtx_minmax_setup(); /* mtx_minmax.c */ iemtx_mul__setup(); /* mtx_mul~.c */ iemtx_mul_setup(); /* mtx_mul.c */ iemtx_neq_setup(); /* mtx_neq.c */ iemtx_not_setup(); /* mtx_not.c */ iemtx_ones_setup(); /* mtx_ones.c */ iemtx_or_setup(); /* mtx_or.c */ iemtx_pack__setup(); /* mtx_pack~.c */ iemtx_pivot_setup(); /* mtx_pivot.c */ iemtx_pow_setup(); /* mtx_pow.c */ iemtx_powtodb_setup(); /* mtx_powtodb.c */ iemtx_print_setup(); /* mtx_print.c */ iemtx_prod_setup(); /* mtx_prod.c */ iemtx_qhull_setup(); /* mtx_qhull.c */ iemtx_qr_setup(); /* mtx_qr.c */ iemtx_rand_setup(); /* mtx_rand.c */ iemtx_repmat_setup(); /* mtx_repmat.c */ iemtx_resize_setup(); /* mtx_resize.c */ iemtx_reverse_setup(); /* mtx_reverse.c */ iemtx_rfft_setup(); /* mtx_rfft.c */ iemtx_rifft_setup(); /* mtx_rifft.c */ iemtx_rmstodb_setup(); /* mtx_rmstodb.c */ iemtx_roll_setup(); /* mtx_roll.c */ iemtx_row_setup(); /* mtx_row.c */ iemtx_scroll_setup(); /* mtx_scroll.c */ iemtx_sin_setup(); /* mtx_sin.c */ iemtx_size_setup(); /* mtx_size.c */ iemtx_slice_setup(); /* mtx_slice.c */ iemtx_sndfileread_setup(); /* mtx_sndfileread.c */ iemtx_sort_setup(); /* mtx_sort.c */ iemtx_spherical_harmonics_setup(); /* mtx_spherical_harmonics.c */ iemtx_spherical_radial_setup(); /* mtx_spherical_radial.c */ iemtx_sub_setup(); /* mtx_sub.c */ iemtx_sum_setup(); /* mtx_sum.c */ iemtx_svd_setup(); /* mtx_svd.c */ iemtx_trace_setup(); /* mtx_trace.c */ iemtx_transpose_setup(); /* mtx_transpose.c */ iemtx_unpack__setup(); /* mtx_unpack~.c */ iemtx_zeros_setup(); /* mtx_zeros.c */ } pd-iemmatrix-0.3/src/iemmatrix_sources.h000066400000000000000000000110271262113134600204560ustar00rootroot00000000000000/* iemmatrix-setup autogenerated header-file * generated by "./makesource.sh" * !! DO NOT MANUALLY EDIT !! */ #ifndef IEMMATRIX_SOURCES_H__ #define IEMMATRIX_SOURCES_H__ void iematrix_setup(void); /* matrix.c */ void iemtx_abs_setup(void); /* mtx_abs.c */ void iemtx_add_setup(void); /* mtx_add.c */ void iemtx_and_setup(void); /* mtx_and.c */ void iemtx_atan2_setup(void); /* mtx_atan2.c */ void iemtx_atan_setup(void); /* mtx_atan.c */ void iemtx_bessel_setup(void); /* mtx_bessel.c */ void iemtx_bitand_setup(void); /* mtx_bitand.c */ void iemtx_bitleft_setup(void); /* mtx_bitleft.c */ void iemtx_bitor_setup(void); /* mtx_bitor.c */ void iemtx_bitright_setup(void); /* mtx_bitright.c */ void iemtx_bspline_setup(void); /* mtx_bspline.c */ void iemtx_check_setup(void); /* mtx_check.c */ void iemtx_cholesky_setup(void); /* mtx_cholesky.c */ void iemtx_col_setup(void); /* mtx_col.c */ void iemtx_colon_setup(void); /* mtx_colon.c */ void iemtx_concat_setup(void); /* mtx_concat.c */ void iemtx_conv_setup(void); /* mtx_conv.c */ void iemtx_cos_setup(void); /* mtx_cos.c */ void iemtx_cumprod_setup(void); /* mtx_cumprod.c */ void iemtx_cumsum_setup(void); /* mtx_cumsum.c */ void iemtx_dbtopow_setup(void); /* mtx_dbtopow.c */ void iemtx_dbtorms_setup(void); /* mtx_dbtorms.c */ void iemtx_decay_setup(void); /* mtx_decay.c */ void iemtx_diag_setup(void); /* mtx_diag.c */ void iemtx_diegg_setup(void); /* mtx_diegg.c */ void iemtx_diff_setup(void); /* mtx_diff.c */ void iemtx_dispersive_dline_setup(void); /* mtx_dispersive_dline.c */ void iemtx_distance2_setup(void); /* mtx_distance2.c */ void iemtx_egg_setup(void); /* mtx_egg.c */ void iemtx_ei__setup(void); /* mtx_ei~.c */ void iemtx_eig_setup(void); /* mtx_eig.c */ void iemtx_element_setup(void); /* mtx_element.c */ void iemtx_eq_setup(void); /* mtx_eq.c */ void iemtx_exp_setup(void); /* mtx_exp.c */ void iemtx_eye_setup(void); /* mtx_eye.c */ void iemtx_fft_setup(void); /* mtx_fft.c */ void iemtx_fill_setup(void); /* mtx_fill.c */ void iemtx_find_setup(void); /* mtx_find.c */ void iemtx_gauss_setup(void); /* mtx_gauss.c */ void iemtx_ge_setup(void); /* mtx_ge.c */ void iemtx_gt_setup(void); /* mtx_gt.c */ void iemtx_ifft_setup(void); /* mtx_ifft.c */ void iemtx_index_setup(void); /* mtx_index.c */ void iemtx_int_setup(void); /* mtx_int.c */ void iemtx_inverse_setup(void); /* mtx_inverse.c */ void iemtx_isequal_setup(void); /* mtx_isequal.c */ void iemtx_le_setup(void); /* mtx_le.c */ void iemtx_log_setup(void); /* mtx_log.c */ void iemtx_lt_setup(void); /* mtx_lt.c */ void iemtx_max2_setup(void); /* mtx_max2.c */ void iemtx_mean_setup(void); /* mtx_mean.c */ void iemtx_min2_setup(void); /* mtx_min2.c */ void iemtx_minmax_setup(void); /* mtx_minmax.c */ void iemtx_mul__setup(void); /* mtx_mul~.c */ void iemtx_mul_setup(void); /* mtx_mul.c */ void iemtx_neq_setup(void); /* mtx_neq.c */ void iemtx_not_setup(void); /* mtx_not.c */ void iemtx_ones_setup(void); /* mtx_ones.c */ void iemtx_or_setup(void); /* mtx_or.c */ void iemtx_pack__setup(void); /* mtx_pack~.c */ void iemtx_pivot_setup(void); /* mtx_pivot.c */ void iemtx_pow_setup(void); /* mtx_pow.c */ void iemtx_powtodb_setup(void); /* mtx_powtodb.c */ void iemtx_print_setup(void); /* mtx_print.c */ void iemtx_prod_setup(void); /* mtx_prod.c */ void iemtx_qhull_setup(void); /* mtx_qhull.c */ void iemtx_qr_setup(void); /* mtx_qr.c */ void iemtx_rand_setup(void); /* mtx_rand.c */ void iemtx_repmat_setup(void); /* mtx_repmat.c */ void iemtx_resize_setup(void); /* mtx_resize.c */ void iemtx_reverse_setup(void); /* mtx_reverse.c */ void iemtx_rfft_setup(void); /* mtx_rfft.c */ void iemtx_rifft_setup(void); /* mtx_rifft.c */ void iemtx_rmstodb_setup(void); /* mtx_rmstodb.c */ void iemtx_roll_setup(void); /* mtx_roll.c */ void iemtx_row_setup(void); /* mtx_row.c */ void iemtx_scroll_setup(void); /* mtx_scroll.c */ void iemtx_sin_setup(void); /* mtx_sin.c */ void iemtx_size_setup(void); /* mtx_size.c */ void iemtx_slice_setup(void); /* mtx_slice.c */ void iemtx_sndfileread_setup(void); /* mtx_sndfileread.c */ void iemtx_sort_setup(void); /* mtx_sort.c */ void iemtx_spherical_harmonics_setup(void); /* mtx_spherical_harmonics.c */ void iemtx_spherical_radial_setup(void); /* mtx_spherical_radial.c */ void iemtx_sub_setup(void); /* mtx_sub.c */ void iemtx_sum_setup(void); /* mtx_sum.c */ void iemtx_svd_setup(void); /* mtx_svd.c */ void iemtx_trace_setup(void); /* mtx_trace.c */ void iemtx_transpose_setup(void); /* mtx_transpose.c */ void iemtx_unpack__setup(void); /* mtx_unpack~.c */ void iemtx_zeros_setup(void); /* mtx_zeros.c */ #endif /* IEMMATRIX_SOURCES_H__ */ pd-iemmatrix-0.3/src/iemmatrix_utility.c000066400000000000000000000313011262113134600204660ustar00rootroot00000000000000/* * iemmatrix_utility * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, forum::für::umläute * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ /* G.Holzmann: this has been in mtx_matrix.c before now here should be the shared code !!! */ #if defined __linux__ || defined __APPLE__ # define DL_OPEN #endif #ifdef DL_OPEN # define _GNU_SOURCE # include #endif #if defined _WIN32 # include # include # define close _close #endif #include #include "iemmatrix.h" /* utility functions */ void setdimen(t_matrix *x, int row, int col) { x->col = col; x->row = row; SETFLOAT(x->atombuffer, row); SETFLOAT(x->atombuffer+1, col); } void adjustsize(t_matrix *x, int desiredRow, int desiredCol) { int col=x->col, row=x->row; if (desiredRow<1){ post("cannot make less than 1 rows"); desiredRow=1; } if (desiredCol<1){ post("cannot make less than 1 columns"); desiredCol=1; } if (col*row!=desiredRow*desiredCol){ if(x->atombuffer)freebytes(x->atombuffer, (col*row+2)*sizeof(t_atom)); x->atombuffer=(t_atom *)getbytes((desiredCol*desiredRow+2)*sizeof(t_atom)); } setdimen(x, desiredRow, desiredCol); return; } void debugmtx(int argc, t_float *buf, int id) { int i=argc; while(i--){ int j=argc; startpost("debug%d: ", id); while(j--) startpost("%f ", *buf++); endpost(); } } t_matrixfloat *matrix2float(t_atom *ap) { int row = atom_getfloat(ap++); int col=atom_getfloat(ap++); int length = row * col; t_matrixfloat *buffer = (t_matrixfloat *)getbytes(sizeof(t_matrixfloat)*length); t_matrixfloat *buf = buffer; while(length--)*buf++=atom_getfloat(ap++); return buffer; } void float2matrix(t_atom *ap, t_matrixfloat *buffer) { int row=atom_getfloat(ap++); int col=atom_getfloat(ap++); int length = row * col; t_matrixfloat*buf= buffer; while(length--){ SETFLOAT(ap, *buf++); ap++; } freebytes(buffer, row*col*sizeof(t_matrixfloat)); } /* core functions */ void matrix_bang(t_matrix *x) { /* output the matrix */ if (x->atombuffer)outlet_anything(x->x_obj.ob_outlet, gensym("matrix"), x->col*x->row+2, x->atombuffer); } void matrix_matrix2(t_matrix *x, t_symbol *s, int argc, t_atom *argv) { int row, col; if (argc<2){ post("matrix : corrupt matrix passed"); return; } row = atom_getfloat(argv); col = atom_getfloat(argv+1); if ((row<1)||(col<1)){ post("matrix : corrupt matrix passed"); return; } if (row*col > argc-2){ post("matrix: sparse matrices not yet supported : use \"mtx_check\""); return; } /* this is fast and dirty, MAYBE make it slow and clean */ /* or, to clean matrices, use the mtx_check object */ if (row*col != x->row*x->col) { freebytes(x->atombuffer, x->row*x->col*sizeof(t_atom)); x->atombuffer = copybytes(argv, (row*col+2)*sizeof(t_atom)); } else memcpy(x->atombuffer, argv, (row*col+2)*sizeof(t_atom)); setdimen(x, row, col); } /* set data */ void matrix_set(t_matrix *x, t_float f) { int size = x->col * x->row; t_atom *buf=x->atombuffer+2; if(x->atombuffer)while(size--)SETFLOAT(&buf[size], f); } void matrix_zeros(t_matrix *x, t_symbol *s, int argc, t_atom *argv) { int col, row; switch(argc) { case 0: /* zero out the actual matrix */ matrix_set(x, 0); break; case 1: row=atom_getfloat(argv); adjustsize(x, row, row); matrix_set(x, 0); break; default: row=atom_getfloat(argv++); col=atom_getfloat(argv); adjustsize(x, row, col); matrix_set(x, 0); } matrix_bang(x); } void matrix_ones(t_matrix *x, t_symbol *s, int argc, t_atom *argv) { int col, row; switch(argc) { case 0: /* zero out the actual matrix */ matrix_set(x, 1); break; case 1: row=atom_getfloat(argv); adjustsize(x, row, row); matrix_set(x, 1); break; default: row=atom_getfloat(argv++); col=atom_getfloat(argv); adjustsize(x, row, col); matrix_set(x, 1); } matrix_bang(x); } void matrix_eye(t_matrix *x, t_symbol *s, int argc, t_atom *argv) { int col, row; int n; switch(argc) { case 0: /* zero out the actual matrix */ matrix_set(x, 0); break; case 1: row=atom_getfloat(argv); adjustsize(x, row, row); matrix_set(x, 0); break; default: row=atom_getfloat(argv++); col=atom_getfloat(argv); adjustsize(x, row, col); matrix_set(x, 0); } col=x->col; row=x->row; n = (colatombuffer+2+n*(1+col), 1); matrix_bang(x); } void matrix_egg(t_matrix *x, t_symbol *s, int argc, t_atom *argv) { int col, row; int n; switch(argc) { case 0: /* zero out the actual matrix */ matrix_set(x, 0); break; case 1: row=atom_getfloat(argv); adjustsize(x, row, row); matrix_set(x, 0); break; default: row=atom_getfloat(argv++); col=atom_getfloat(argv); adjustsize(x, row, col); matrix_set(x, 0); } col=x->col; row=x->row; n = (colatombuffer+2+(n+1)*(col-1), 1); matrix_bang(x); } void matrix_diag(t_matrix *x, t_symbol *s, int argc, t_atom *argv) { int col=argc; argv+=argc-1; if (argc<1) { post("matrix: no diagonale present"); return; } adjustsize(x, argc, argc); matrix_set(x, 0); while(argc--)SETFLOAT(x->atombuffer+2+argc*(1+col), atom_getfloat(argv--)); matrix_bang(x); } void matrix_diegg(t_matrix *x, t_symbol *s, int argc, t_atom *argv) { int col=argc; argv+=argc-1; if (argc<1) { post("matrix: no dieggonale present"); return; } adjustsize(x, argc, argc); matrix_set(x, 0); while(argc--){ t_atom *ap=x->atombuffer+2+(argc+1)*(col-1); SETFLOAT(ap, atom_getfloat(argv--)); } matrix_bang(x); } /* the rest */ void matrix_row(t_matrix *x, t_symbol *s, int argc, t_atom *argv) { t_atom *ap; int row=x->row, col=x->col; int r; t_float f; switch (argc){ case 0: for (r=0;rx_obj.ob_outlet, gensym("row"), col, x->atombuffer+r*col+2); break; case 1: r=atom_getfloat(argv)-1; if ((r<0)||(r>=row)){ post("matrix: row index %d is out of range", r+1); return; } outlet_list(x->x_obj.ob_outlet, gensym("row"), col, x->atombuffer+r*col+2); break; case 2: r=atom_getfloat(argv)-1; f=atom_getfloat(argv+1); if ((r<0)||(r>=row)){ post("matrix: row index %d is out of range", r+1); return; } default: r=atom_getfloat(argv++)-1; if (argc--=row)){ post("matrix: row index %d is out of range", r+1); return; } if (r==row) { } else { ap=x->atombuffer+2+col*r; memcpy(ap, argv, col*sizeof(t_atom)); } } } void matrix_col(t_matrix *x, t_symbol *s, int argc, t_atom *argv) { t_atom *ap; int row=x->row, col=x->col; int c, r; switch (argc){ case 0: ap=(t_atom *)getbytes(row*sizeof(t_atom)); for (c=0;catombuffer+2+c+col*r)); outlet_list(x->x_obj.ob_outlet, gensym("col"), row, ap); } freebytes(ap, row*sizeof(t_atom)); break; case 1: ap=(t_atom *)getbytes(row*sizeof(t_atom)); c=atom_getfloat(argv)-1; if ((c<0)||(c>=col)){ post("matrix: col index %d is out of range", c+1); return; } for (r=0;ratombuffer+2+c+col*r)); outlet_list(x->x_obj.ob_outlet, gensym("col"), row, ap); freebytes(ap, row*sizeof(t_atom)); break; default: c=atom_getfloat(argv++)-1; if (argc--=col)){ post("matrix: col index %d is out of range", c+1); return; } argv+=argc-1; if (argc>row)argc=row; while(argc--){ ap=x->atombuffer+2+c+col*argc; SETFLOAT(ap, atom_getfloat(argv--)); } } } void matrix_element(t_matrix *x, t_symbol *s, int argc, t_atom *argv) { t_atom *ap=x->atombuffer+2; int row=x->row, col=x->col; int r, c, i=row*col; switch (argc){ case 0: while(i--)outlet_float(x->x_obj.ob_outlet, atom_getfloat(ap++)); break; case 1: r=c=atom_getfloat(argv)-1; if ((r<0)||(r>=row)){ post("matrix: row index %d is out of range", r+1); return; } if ((c<0)||(c>=col)){ post("matrix: col index %d is out of range", c+1); return; } outlet_float(x->x_obj.ob_outlet, atom_getfloat(x->atombuffer+2+c+r*col)); break; case 2: r=atom_getfloat(argv++)-1; c=atom_getfloat(argv++)-1; if ((r<0)||(r>=row)){ post("matrix: row index %d is out of range", r+1); return; } if ((c<0)||(c>=col)){ post("matrix: col index %d is out of range", c+1); return; } outlet_float(x->x_obj.ob_outlet, atom_getfloat(x->atombuffer+2+c+r*col)); break; default: r=atom_getfloat(argv++)-1; c=atom_getfloat(argv++)-1; if ((r<0)||(r>=row)){ post("matrix: row index %d is out of range", r+1); return; } if ((c<0)||(c>=col)){ post("matrix: col index %d is out of range", c+1); return; } SETFLOAT(x->atombuffer+2+c+r*col, atom_getfloat(argv)); } } /* destructor */ void matrix_free(t_matrix *x) { freebytes(x->atombuffer, (x->col*x->row+2)*sizeof(t_atom)); x->atombuffer=0; x->col=x->row=0; } /* some math */ /* invert a square matrix (row=col=rowcol) */ /* if "error" is non-NULL, it's content will be set to 0 if the matrix was invertable, else to non-0 */ t_matrixfloat* mtx_doInvert(t_matrixfloat*input, int rowcol, int*err){ /* * row==col==rowclo * input=t_matrixfloat[row*col] * output=t_matrixfloat[row*col] */ int i, k; t_matrixfloat *a1, *b1, *a2, *b2; int ok=0; /* error counter */ int col=rowcol, row=rowcol, row2=row*col; t_matrixfloat *original=input; t_matrixfloat *inverted = 0; if(input==0)return 0; /* 1a reserve space for the inverted matrix */ inverted=(t_matrixfloat *)getbytes(sizeof(t_matrixfloat)*row2); if(inverted==0)return 0; /* 1b make an eye-shaped float-buf for B */ i=row2; b1=inverted; while(i--)*b1++=0; i=row; b1=inverted; while(i--)b1[i*(row+1)]=1; /* 2. do the Gauss-Jordan */ for (k=0;k $IEMMATRIX_H head_c > $IEMMATRIX_C for i in $(${LS} *.c | ${EGREP} -v "iemmatrix.*\.c") do ## each c-file in iemmatrix needs to have an ie_setup()-function ## that calls all needed setup-functions ## any non-alpha-numeric-character is replaced by "_" ## e.g. "multiplex~.c" -> "z_multiplex__setup()" SETUPNAME=ie$(echo ${i%.c} | ${SED} -e 's/[^[:alnum:]]/_/g')_setup echo "void ${SETUPNAME}(void); /* $i */" >> $IEMMATRIX_H echo " ${SETUPNAME}(); /* $i */" >> $IEMMATRIX_C done foot_h >> $IEMMATRIX_H foot_c >> $IEMMATRIX_C pd-iemmatrix-0.3/src/matrix.c000066400000000000000000000157341262113134600162240ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, forum::für::umläute * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ /* matrix : basic object : create and store matrices mtx : alias for matrix */ #include "iemmatrix.h" #include #ifdef _WIN32 /* or should we use the security enhanced _snprintf_s() ?? */ # define snprintf _snprintf #endif /* -------------------- matrix ------------------------------ */ /* G.Holzmann: see iemmatrix_utility.c for the functions you don't find here ... ;) */ static t_class *matrix_class; static void matrix_matrix(t_matrix *x, t_symbol *s, int argc, t_atom *argv) { int row, col; if (argc<2){ post("matrix : corrupt matrix passed"); return; } row = atom_getfloat(argv); col = atom_getfloat(argv+1); if ((row<1)||(col<1)){ post("matrix : corrupt matrix passed"); return; } if (row*col > argc-2){ post("matrix: sparse matrices not yet supported : use \"mtx_check\""); return; } matrix_matrix2(x, s, argc, argv); matrix_bang(x); } static void matrix_float(t_matrix *x, t_float f) { matrix_set(x, f); matrix_bang(x); } static void matrix_size(t_matrix *x, t_symbol *s, int argc, t_atom *argv) { int col, row; switch(argc) { case 0: /* size */ if (x->row*x->col) outlet_list(x->x_obj.ob_outlet, gensym("size"), 2, x->atombuffer); break; case 1: row=atom_getfloat(argv); adjustsize(x, row, row); matrix_set(x, 0); break; default: row=atom_getfloat(argv++); col=atom_getfloat(argv); adjustsize(x, row, col); matrix_set(x, 0); } } /* ------------- file I/O ------------------ */ static void matrix_read(t_matrix *x, t_symbol *filename) { t_binbuf *bbuf = binbuf_new(); t_atom *ap; int n; if (binbuf_read_via_path(bbuf, filename->s_name, canvas_getdir(x->x_canvas)->s_name, 0)) pd_error(x,"matrix: failed to read %128s", filename->s_name); ap=binbuf_getvec(bbuf); n =binbuf_getnatom(bbuf)-1; if ((ap->a_type == A_SYMBOL) && (!strcmp(ap->a_w.w_symbol->s_name,"matrix") || !strcmp(ap->a_w.w_symbol->s_name,"#matrix")) ){ matrix_matrix2(x, gensym("matrix"), n, ap+1); } binbuf_free(bbuf); } static void matrix_write(t_matrix *x, t_symbol *filename) { t_atom *ap=x->atombuffer+2; char *filnam = (char*)getbytes(sizeof(char)*MAXPDSTRING); int rows = x->row, cols = x->col; FILE *f=0; sys_bashfilename(filename->s_name, filnam); /* open file */ if (!(f = fopen(filnam, "w"))) { pd_error(x,"matrix : failed to open %128s", filnam); } else { char *text=(char *)getbytes(sizeof(char)*MAXPDSTRING); int textlen; /* header: * we now write "#matrix" instead of "matrix", * so that these files can easily read by other * applications such as octave */ snprintf(text, MAXPDSTRING, "#matrix %d %d\n", rows, cols); text[MAXPDSTRING-1]=0; textlen = strlen(text); if (fwrite(text, textlen*sizeof(char), 1, f) < 1) { pd_error(x,"matrix : failed to write %128s", filnam); goto end; } while(rows--) { int c = cols; while (c--) { t_float val = atom_getfloat(ap++); snprintf(text, MAXPDSTRING, "%.15f ", val); text[MAXPDSTRING-1]=0; textlen=strlen(text); if (fwrite(text, textlen*sizeof(char), 1, f) < 1) { pd_error(x,"matrix : failed to write %128s", filnam); goto end; } } if (fwrite("\n", sizeof(char), 1, f) < 1) { pd_error(x, "matrix : failed to write %128s", filnam); goto end; } } freebytes(text, sizeof(char)*MAXPDSTRING); } end: /* close file */ if (f) fclose(f); if(filnam)freebytes(filnam, sizeof(char)*MAXPDSTRING); } static void matrix_list(t_matrix *x, t_symbol *s, int argc, t_atom *argv) { /* like matrix, but without col/row information, so the previous size is kept */ int row=x->row, col=x->col; if(!row*col){ post("matrix : unknown matrix dimensions"); return; } if (argcatombuffer+2, argv, row*col*sizeof(t_atom)); matrix_bang(x); } static void *matrix_new(t_symbol *s, int argc, t_atom *argv) { t_matrix *x = (t_matrix *)pd_new(matrix_class); int row, col; inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("matrix"), gensym("")); outlet_new(&x->x_obj, 0); x->atombuffer = 0; x->x_canvas = canvas_getcurrent(); switch (argc) { case 0: row = col = 0; break; case 1: if (argv->a_type == A_SYMBOL) { matrix_read(x, argv->a_w.w_symbol); return(x); } row = col = atom_getfloat(argv); break; default: row = atom_getfloat(argv++); col = atom_getfloat(argv++); } if(row*col){ adjustsize(x, row, col); matrix_set(x, 0); } return (x); } void matrix_setup(void) { matrix_class = class_new(gensym("matrix"), (t_newmethod)matrix_new, (t_method)matrix_free, sizeof(t_matrix), 0, A_GIMME, 0); class_addcreator((t_newmethod)matrix_new, gensym("mtx"), A_GIMME, 0); class_addcreator((t_newmethod)matrix_new, gensym("iemmatrix"), A_GIMME, 0); /* the core : functions for matrices */ class_addmethod (matrix_class, (t_method)matrix_matrix, gensym("matrix"), A_GIMME, 0); class_addmethod (matrix_class, (t_method)matrix_matrix2, gensym(""), A_GIMME, 0); /* the basics : functions for creation */ class_addmethod (matrix_class, (t_method)matrix_size, gensym("size"), A_GIMME, 0); class_addmethod (matrix_class, (t_method)matrix_eye, gensym("eye"), A_GIMME, 0); class_addmethod (matrix_class, (t_method)matrix_diag, gensym("diag"), A_GIMME, 0); class_addmethod (matrix_class, (t_method)matrix_ones, gensym("ones"), A_GIMME, 0); class_addmethod (matrix_class, (t_method)matrix_zeros, gensym("zeros"), A_GIMME, 0); class_addmethod (matrix_class, (t_method)matrix_egg, gensym("egg"), A_GIMME, 0); class_addmethod (matrix_class, (t_method)matrix_diegg, gensym("diegg"), A_GIMME, 0); /* the rest : functions for anything */ class_addbang (matrix_class, matrix_bang); class_addfloat (matrix_class, matrix_float); class_addlist (matrix_class, matrix_list); class_addmethod (matrix_class, (t_method)matrix_row, gensym("row"), A_GIMME, 0); class_addmethod (matrix_class, (t_method)matrix_col, gensym("column"), A_GIMME, 0); class_addmethod (matrix_class, (t_method)matrix_col, gensym("col"), A_GIMME, 0); class_addmethod (matrix_class, (t_method)matrix_element, gensym("element"), A_GIMME, 0); /* the file functions */ class_addmethod (matrix_class, (t_method)matrix_write, gensym("write"), A_SYMBOL, 0); class_addmethod (matrix_class, (t_method)matrix_read , gensym("read") , A_SYMBOL, 0); } void iemtx_matrix_setup(void){ matrix_setup(); } void mtx_matrix_setup(void){ matrix_setup(); } void iematrix_setup(void){ matrix_setup(); } pd-iemmatrix-0.3/src/mtx_abs.c000066400000000000000000000040301262113134600163400ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, forum::für::umläute * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" /* mtx_abs: B=abs(A); */ static t_class *mtx_abs_class; static void mtx_abs_matrix(t_mtx_binmtx *x, t_symbol *s, int argc, t_atom *argv) { int row=atom_getint(argv++); int col=atom_getint(argv++); t_atom *m; int n = row*col; if (argc<2){ post("mtx_abs: crippled matrix"); return; } if ((col<1)||(row<1)) { post("mtx_abs: invalid dimensions"); return; } if (col*row>argc-2){ post("sparse matrix not yet supported : use \"mtx_check\""); return; } adjustsize(&x->m, row, col); m = x->m.atombuffer+2; while(n--){ t_float f = atom_getfloat(argv++); SETFLOAT(m, (t_float)fabs(f)); m++; } outlet_anything(x->x_obj.ob_outlet, gensym("matrix"), argc, x->m.atombuffer); } static void mtx_abs_list(t_mtx_binscalar *x, t_symbol *s, int argc, t_atom *argv) { int n=argc; t_atom *m; adjustsize(&x->m, 1, argc); m = x->m.atombuffer; while(n--){ m->a_type = A_FLOAT; (m++)->a_w.w_float = (t_float)fabs(atom_getfloat(argv++)); } outlet_list(x->x_obj.ob_outlet, gensym("list"), argc, x->m.atombuffer); } static void *mtx_abs_new(t_symbol *s) { /* element abs */ t_matrix *x = (t_matrix *)pd_new(mtx_abs_class); outlet_new(&x->x_obj, 0); x->col = x->row = 0; x->atombuffer = 0; return(x); } void mtx_abs_setup(void) { mtx_abs_class = class_new(gensym("mtx_abs"), (t_newmethod)mtx_abs_new, (t_method)mtx_binmtx_free, sizeof(t_mtx_binmtx), 0, A_GIMME, 0); class_addmethod(mtx_abs_class, (t_method)mtx_abs_matrix, gensym("matrix"), A_GIMME, 0); class_addlist (mtx_abs_class, mtx_abs_list); class_addbang (mtx_abs_class, mtx_binmtx_bang); } void iemtx_abs_setup(void) { mtx_abs_setup(); } pd-iemmatrix-0.3/src/mtx_add.c000066400000000000000000000012221262113134600163230ustar00rootroot00000000000000/* * iemmatrix * * objects fand manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, forum::für::umläute * IEM, Graz, Austria * * Fand infandmation on usage and redistribution, and fand a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ /* name of the object and the classes */ #define MTXBIN_GENERIC__NAME mtx_add /* operator; also used for abbreviation of object */ #define MTXBIN_GENERIC__OPERATOR + /* the operator operates on integers instead of floats */ /* #define MTXBIN_GENERIC__INTEGEROP */ #include "mtx_binop_generic.h" pd-iemmatrix-0.3/src/mtx_and.c000066400000000000000000000012151262113134600163370ustar00rootroot00000000000000/* * iemmatrix * * objects fand manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, forum::für::umläute * IEM, Graz, Austria * * Fand infandmation on usage and redistribution, and fand a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ /* name of the object and the classes */ #define MTXBIN_GENERIC__NAME mtx_and /* operator; also used for abbreviation of object */ #define MTXBIN_GENERIC__OPERATOR && /* the operator operates on integers instead of floats */ #define MTXBIN_GENERIC__INTEGEROP #include "mtx_binop_generic.h" pd-iemmatrix-0.3/src/mtx_atan.c000066400000000000000000000040571262113134600165270ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, forum::für::umläute * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" /* mtx_atan: B=atan(A); */ static t_class *mtx_atan_class; static void mtx_atan_matrix(t_mtx_binmtx *x, t_symbol *s, int argc, t_atom *argv) { int row=atom_getint(argv++); int col=atom_getint(argv++); t_atom *m; int n = row*col; if (argc<2){ post("mtx_atan: crippled matrix"); return; } if ((col<1)||(row<1)) { post("mtx_atan: invalid dimensions"); return; } if (col*row>argc-2){ post("sparse matrix not yet supported : use \"mtx_check\""); return; } adjustsize(&x->m, row, col); m = x->m.atombuffer+2; while(n--){ t_float f = atom_getfloat(argv++); SETFLOAT(m, (t_float)atanf(f)); m++; } outlet_anything(x->x_obj.ob_outlet, gensym("matrix"), argc, x->m.atombuffer); } static void mtx_atan_list(t_mtx_binscalar *x, t_symbol *s, int argc, t_atom *argv) { int n=argc; t_atom *m; adjustsize(&x->m, 1, argc); m = x->m.atombuffer; while(n--){ m->a_type = A_FLOAT; (m++)->a_w.w_float = (t_float)atanf(atom_getfloat(argv++)); } outlet_list(x->x_obj.ob_outlet, gensym("list"), argc, x->m.atombuffer); } static void *mtx_atan_new(t_symbol *s) { /* element atan */ t_matrix *x = (t_matrix *)pd_new(mtx_atan_class); outlet_new(&x->x_obj, 0); x->col = x->row = 0; x->atombuffer = 0; return(x); } void mtx_atan_setup(void) { mtx_atan_class = class_new(gensym("mtx_atan"), (t_newmethod)mtx_atan_new, (t_method)mtx_binmtx_free, sizeof(t_mtx_binmtx), 0, A_GIMME, 0); class_addmethod(mtx_atan_class, (t_method)mtx_atan_matrix, gensym("matrix"), A_GIMME, 0); class_addlist (mtx_atan_class, mtx_atan_list); class_addbang (mtx_atan_class, mtx_binmtx_bang); } void iemtx_atan_setup(void) { mtx_atan_setup(); } pd-iemmatrix-0.3/src/mtx_atan2.c000066400000000000000000000107561262113134600166140ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, forum::für::umläute * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" /* mtx_atan2 */ /* mtx_atan2 */ static t_class *mtx_atan2_class, *mtx_atan2scalar_class; static void mtx_atan2scalar_matrix(t_mtx_binscalar *x, t_symbol *s, int argc, t_atom *argv) { int n=argc-2; int row=atom_getfloat(argv), col=atom_getfloat(argv+1); t_float offset=x->f; t_atom *buf; t_atom *ap=argv+2; if(argc<2){post("mtx_atan2: crippled matrix");return; } adjustsize(&x->m, row, col); buf=x->m.atombuffer+2; while(n--){ buf->a_type = A_FLOAT; buf++->a_w.w_float = atan2f(atom_getfloat(ap),offset); ap++; } outlet_anything(x->x_obj.ob_outlet, gensym("matrix"), argc, x->m.atombuffer); } static void mtx_atan2scalar_list(t_mtx_binscalar *x, t_symbol *s, int argc, t_atom *argv) { int n=argc; t_atom *m; t_float offset = x->f; adjustsize(&x->m, 1, argc); m = x->m.atombuffer; while(n--){ m->a_type = A_FLOAT; (m++)->a_w.w_float = atan2f(atom_getfloat(argv),offset); argv++; } outlet_list(x->x_obj.ob_outlet, gensym("list"), argc, x->m.atombuffer); } static void mtx_atan2_matrix(t_mtx_binmtx *x, t_symbol *s, int argc, t_atom *argv) { int row=atom_getfloat(argv); int col=atom_getfloat(argv+1); t_atom *m; t_atom *m1 = argv+2; t_atom *m2 = x->m2.atombuffer+2; int n = argc-2; if (argc<2){ post("mtx_atan2: crippled matrix"); return; } if ((col<1)||(row<1)) { post("mtx_atan2: invalid dimensions"); return; } if (col*row>argc-2){ post("sparse matrix not yet supported : use \"mtx_check\""); return; } if (!(x->m2.col*x->m2.row)) { outlet_anything(x->x_obj.ob_outlet, gensym("matrix"), argc, argv); return; } if ((col!=x->m2.col)||(row!=x->m2.row)){ post("mtx_atan2: matrix dimensions do not match"); /* LATER SOLVE THIS */ return; } adjustsize(&x->m, row, col); m = x->m.atombuffer+2; while(n--){ t_float f1=atom_getfloat(m1++); t_float f2=atom_getfloat(m2++); t_float f = atan2f(f1,f2); SETFLOAT(m, f); m++; } outlet_anything(x->x_obj.ob_outlet, gensym("matrix"), argc, x->m.atombuffer); } static void mtx_atan2_float(t_mtx_binmtx *x, t_float f) { t_matrix *m=&x->m, *m2=&x->m2; t_atom *ap, *ap2=m2->atombuffer+2; int row2, col2, n; if (!m2->atombuffer){ pd_error(x, "right-hand matrix is missing"); return; } row2=atom_getfloat(m2->atombuffer); col2=atom_getfloat(m2->atombuffer+1); adjustsize(m, row2, col2); ap=m->atombuffer+2; n=row2*col2; while(n--){ SETFLOAT(ap, atan2f(f,atom_getfloat(ap2++))); ap++; } outlet_anything(x->x_obj.ob_outlet, gensym("matrix"), m->row*m->col+2, m->atombuffer); } static void *mtx_atan2_new(t_symbol *s, int argc, t_atom *argv) { if (argc>1) post("mtx_atan2 : extra arguments ignored"); if (argc) { t_mtx_binscalar *x = (t_mtx_binscalar *)pd_new(mtx_atan2scalar_class); floatinlet_new(&x->x_obj, &x->f); x->f = atom_getfloatarg(0, argc, argv); outlet_new(&x->x_obj, 0); return(x); } else { t_mtx_binmtx *x = (t_mtx_binmtx *)pd_new(mtx_atan2_class); inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("matrix"), gensym("")); outlet_new(&x->x_obj, 0); x->m.col = x->m.row = x->m2.col = x->m2.row = 0; x->m.atombuffer = x->m2.atombuffer = 0; return(x); } } void mtx_atan2_setup(void) { mtx_atan2_class = class_new(gensym("mtx_atan2"), (t_newmethod)mtx_atan2_new, (t_method)mtx_binmtx_free, sizeof(t_mtx_binmtx), 0, A_GIMME, 0); class_addmethod(mtx_atan2_class, (t_method)mtx_atan2_matrix, gensym("matrix"), A_GIMME, 0); class_addmethod(mtx_atan2_class, (t_method)mtx_bin_matrix2, gensym(""), A_GIMME, 0); class_addfloat (mtx_atan2_class, mtx_atan2_float); class_addbang (mtx_atan2_class, mtx_binmtx_bang); mtx_atan2scalar_class = class_new(gensym("mtx_atan2"), 0, (t_method)mtx_binscalar_free, sizeof(t_mtx_binscalar), 0, 0); class_addmethod(mtx_atan2scalar_class, (t_method)mtx_atan2scalar_matrix, gensym("matrix"), A_GIMME, 0); class_addlist (mtx_atan2scalar_class, mtx_atan2scalar_list); class_addbang (mtx_atan2scalar_class, mtx_binscalar_bang); } void iemtx_atan2_setup(void) { mtx_atan2_setup(); } pd-iemmatrix-0.3/src/mtx_bessel.c000066400000000000000000000121241262113134600170530ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * this functions depends on the GNU scientific library * * Copyright (c) 2009, Franz Zotter * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" #include #include #ifdef HAVE_GSL_BESSEL #include #endif static t_class *mtx_bessel_class; typedef struct _MTXBessel_ MTXBessel; struct _MTXBessel_ { t_object x_obj; t_outlet *list_h_re_out; t_outlet *list_h_im_out; t_atom *list_h_re; t_atom *list_h_im; double *kr; double *h_re; double *h_im; size_t nmax; size_t l; }; static void allocMTXBesseldata (MTXBessel *x) { x->kr=(double*)calloc(x->l,sizeof(double)); if (x->list_h_re_out!=0) { x->list_h_re=(t_atom*)calloc(x->l*(x->nmax+1)+2,sizeof(t_atom)); x->h_re=(double*)calloc(x->l*(x->nmax+1),sizeof(double)); } if (x->list_h_im_out!=0) { x->list_h_im=(t_atom*)calloc(x->l*(x->nmax+1)+2,sizeof(t_atom)); x->h_im=(double*)calloc(x->l*(x->nmax+1),sizeof(double)); } } static void deleteMTXBesseldata (MTXBessel *x) { if (x->kr!=0) free(x->kr); if (x->h_re!=0) free(x->h_re); if (x->h_im!=0) free(x->h_im); if (x->list_h_re!=0) free(x->list_h_re); if (x->list_h_im!=0) free(x->list_h_im); x->list_h_re=0; x->list_h_im=0; x->h_re=0; x->h_im=0; x->kr=0; } static void *newMTXBessel (t_symbol *s, int argc, t_atom *argv) { int nmax; char whichfunction = 'j'; t_symbol *fsym; MTXBessel *x = (MTXBessel *) pd_new (mtx_bessel_class); x->list_h_re = 0; x->list_h_im = 0; x->list_h_im_out = 0; x->list_h_re_out = 0; x->kr = 0; x->h_re = 0; x->h_im = 0; x->l=0; fsym=atom_getsymbol(argv); if (fsym->s_name!=0) whichfunction=fsym->s_name[0]; switch (whichfunction) { default: case 'J': x->list_h_re_out = outlet_new (&x->x_obj, gensym("matrix")); break; case 'H': x->list_h_re_out = outlet_new (&x->x_obj, gensym("matrix")); case 'Y': x->list_h_im_out = outlet_new (&x->x_obj, gensym("matrix")); } nmax=(int) atom_getfloat(argv+1); if (nmax<0) nmax=0; x->nmax=nmax; return ((void *) x); } static void mTXBesselBang (MTXBessel *x) { if (x->list_h_im!=0) { outlet_anything(x->list_h_im_out, gensym("matrix"), x->l*(x->nmax+1)+2, x->list_h_im); } if (x->list_h_re!=0) { outlet_anything(x->list_h_re_out, gensym("matrix"), x->l*(x->nmax+1)+2, x->list_h_re); } } static void mTXBesselMatrix (MTXBessel *x, t_symbol *s, int argc, t_atom *argv) { int rows = atom_getint (argv++); int columns = atom_getint (argv++); int size = rows * columns; int in_size = argc-2; int n,m,ofs; #if defined HAVE_MATH_BESSEL || defined HAVE_GSL_BESSEL /* size check */ if (!size) post("mtx_bessel: invalid dimensions"); else if (in_sizel!=columns) { deleteMTXBesseldata(x); x->l=columns; allocMTXBesseldata(x); } for (n=0;nl;n++) { x->kr[n]=(double) atom_getfloat(argv+n); } #ifdef HAVE_GSL_BESSEL if (x->h_re!=0) for (m=0;ml;m++) for (n=0;nnmax+1;n++) x->h_re[n+m*(x->nmax+1)]=gsl_sf_bessel_Jn(n,x->kr[m]); if (x->h_im!=0) for (m=0;ml;m++) for (n=0;nnmax+1;n++) x->h_im[n+m*(x->nmax+1)]=gsl_sf_bessel_Yn(n,x->kr[m]); #else if (x->h_re!=0) for (m=0;ml;m++) for (n=0;nnmax+1;n++) x->h_re[n+m*(x->nmax+1)]=jn(n,x->kr[m]); if (x->h_im!=0) for (m=0;ml;m++) for (n=0;nnmax+1;n++) x->h_im[n+m*(x->nmax+1)]=yn(n,x->kr[m]); #endif if (x->h_re!=0) { SETFLOAT(x->list_h_re+1,(float)(x->nmax+1)); SETFLOAT(x->list_h_re,(float)x->l); for (n=0;nl*(x->nmax+1);n++) SETFLOAT(x->list_h_re+n+2,(float)x->h_re[n]); } if (x->h_im!=0) { SETFLOAT(x->list_h_im+1,(float)(x->nmax+1)); SETFLOAT(x->list_h_im,(float)x->l); for (n=0;nl*(x->nmax+1);n++) SETFLOAT(x->list_h_im+n+2,(float)x->h_im[n]); } mTXBesselBang(x); } #else post("mtx_bessel: implementation requires math.h that implements jn and yn Bessel functions or gsl_sf_bessel.h"); #endif } void mtx_bessel_setup (void) { mtx_bessel_class = class_new (gensym("mtx_bessel"), (t_newmethod) newMTXBessel, (t_method) deleteMTXBesseldata, sizeof (MTXBessel), CLASS_DEFAULT, A_GIMME, 0); class_addbang (mtx_bessel_class, (t_method) mTXBesselBang); class_addmethod (mtx_bessel_class, (t_method) mTXBesselMatrix, gensym("matrix"), A_GIMME,0); } void iemtx_bessel_setup(void){ mtx_bessel_setup(); } pd-iemmatrix-0.3/src/mtx_binop_generic.h000066400000000000000000000207701262113134600204140ustar00rootroot00000000000000/* * iemmatrix * * objects fand manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, fandum::für::umläute * IEM, Graz, Austria * * Fand infandmation on usage and redistribution, and fand a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #if defined MTXBIN_GENERIC__NAME && defined MTXBIN_GENERIC__OPERATOR #include "iemmatrix.h" #define MTXBIN_CONCAT_EXPAND(s1, s2) s1 ## s2 #define MTXBIN_CONCAT(s1, s2) MTXBIN_CONCAT_EXPAND (s1, s2) #define MTXBIN_APPEND(s1) MTXBIN_CONCAT (MTXBIN_GENERIC__NAME, s1) #define MTXBIN_STRINGNAME(s0,s1) s0#s1 #define MTXBIN_LONGNAME2(s1) MTXBIN_STRINGNAME("",s1) #define MTXBIN_LONGNAME MTXBIN_LONGNAME2(MTXBIN_GENERIC__NAME) #define MTXBIN_SHORTNAME2(s1) MTXBIN_STRINGNAME ("mtx_",s1) #define MTXBIN_SHORTNAME MTXBIN_SHORTNAME2 (MTXBIN_GENERIC__OPERATOR) #define MTXBIN_HELPNAME2(s1) MTXBIN_STRINGNAME("",s1) #ifdef MTXBIN_HELPNAME # define MTXBIN_REALHELPNAME MTXBIN_HELPNAME2(MTXBIN_HELPNAME) #else # define MTXBIN_REALHELPNAME MTXBIN_HELPNAME2(MTXBIN_GENERIC__NAME) #endif #define MTXBIN_IEMSETUP_EXPAND(s1) ie ## s1 ## _setup #define MTXBIN_IEMSETUP(s1) MTXBIN_IEMSETUP_EXPAND (s1) static t_class *MTXBIN_APPEND(_class ), *MTXBIN_APPEND(_scalarclass); static void mtxbin_scalar_matrix (t_mtx_binscalar *x, t_symbol *s, int argc, t_atom *argv) { int n=argc-2; int row=atom_getint(argv), col=atom_getint(argv+1); #ifdef MTXBIN_GENERIC__INTEGEROP t_int offset=(t_int)x->f; #else t_float offset=x->f; #endif t_atom *buf; t_atom *ap=argv+2; if(argc<2){post( MTXBIN_SHORTNAME ": crippled matrix");return; } adjustsize(&x->m, row, col); buf=x->m.atombuffer+2; while(n--){ #ifdef MTXBIN_GENERIC__INTEGEROP buf->a_w.w_float = atom_getint(ap) MTXBIN_GENERIC__OPERATOR offset; #else buf->a_w.w_float = atom_getfloat(ap) MTXBIN_GENERIC__OPERATOR offset; #endif buf->a_type = A_FLOAT; buf++; ap++; } outlet_anything(x->x_obj.ob_outlet, gensym("matrix"), argc, x->m.atombuffer); } static void mtxbin_scalar_list(t_mtx_binscalar *x, t_symbol *s, int argc, t_atom *argv) { int n=argc; t_atom *m; #ifdef MTXBIN_GENERIC__INTEGEROP t_int offset=x->f; #else t_float offset=x->f; #endif adjustsize(&x->m, 1, argc); m = x->m.atombuffer; while(n--){ m->a_type = A_FLOAT; #ifdef MTXBIN_GENERIC__INTEGEROP (m++)->a_w.w_float = atom_getint(argv++) MTXBIN_GENERIC__OPERATOR offset; #else (m++)->a_w.w_float = atom_getfloat(argv++) MTXBIN_GENERIC__OPERATOR offset; #endif } outlet_list(x->x_obj.ob_outlet, gensym("list"), argc, x->m.atombuffer); } static void mtxbin_matrix(t_mtx_binmtx *x, t_symbol *s, int argc, t_atom *argv) { int row=atom_getint(argv); int col=atom_getint(argv+1); t_atom *m; t_atom *m1 = argv+2; t_atom *m2 = x->m2.atombuffer+2; int n = argc-2; if (argc<2){ post( MTXBIN_SHORTNAME ": crippled matrix"); return; } if ((col<1)||(row<1)) { post( MTXBIN_SHORTNAME ": invalid dimensions"); return; } if (col*row>argc-2){ post( MTXBIN_SHORTNAME ":sparse matrix not yet suppandted : use \"mtx_check\""); return; } if (!(x->m2.col*x->m2.row)) { outlet_anything(x->x_obj.ob_outlet, gensym("matrix"), argc, argv); return; } if(x->m2.col==1&&x->m2.row==1) { #ifdef MTXBIN_GENERIC__INTEGEROP t_int offset=atom_getint(m2); #else t_float offset=atom_getfloat(m2); #endif adjustsize(&x->m, row, col); m = x->m.atombuffer+2; while(n--){ #ifdef MTXBIN_GENERIC__INTEGEROP t_float f = (t_float)(atom_getint(m1) MTXBIN_GENERIC__OPERATOR offset); #else t_float f = atom_getfloat(m1) MTXBIN_GENERIC__OPERATOR offset; #endif SETFLOAT(m, f); m++; m1++; } outlet_anything(x->x_obj.ob_outlet, gensym("matrix"), argc, x->m.atombuffer); return; } if(x->m2.row==1) { int c, r; adjustsize(&x->m, row, col); m = x->m.atombuffer+2; for(r=0; rm2.atombuffer+2; for(c=0; cx_obj.ob_outlet, gensym("matrix"), argc, x->m.atombuffer); return; } if(x->m2.col==1) { int c, r; adjustsize(&x->m, row, col); m = x->m.atombuffer+2; for(r=0; rx_obj.ob_outlet, gensym("matrix"), argc, x->m.atombuffer); return; } if ((col!=x->m2.col)||(row!=x->m2.row)){ post( MTXBIN_SHORTNAME ": matrix dimensions do not match"); /* LATER SOLVE THIS */ return; } adjustsize(&x->m, row, col); m = x->m.atombuffer+2; while(n--){ #ifdef MTXBIN_GENERIC__INTEGEROP t_float f = (t_float)(atom_getint(m1) MTXBIN_GENERIC__OPERATOR atom_getint(m2)); #else t_float f = atom_getfloat(m1) MTXBIN_GENERIC__OPERATOR atom_getfloat(m2); #endif m1++; m2++; SETFLOAT(m, f); m++; } outlet_anything(x->x_obj.ob_outlet, gensym("matrix"), argc, x->m.atombuffer); } static void mtxbin_float(t_mtx_binmtx *x, t_float fval) { t_matrix *m=&x->m, *m2=&x->m2; t_atom *ap, *ap2=m2->atombuffer+2; int row2, col2, n; #ifdef MTXBIN_GENERIC__INTEGEROP t_int offset=(t_int)fval; #else t_float offset=fval; #endif if (!m2->atombuffer){ post( MTXBIN_SHORTNAME ": operate on what ?"); return; } row2=atom_getint(m2->atombuffer); col2=atom_getint(m2->atombuffer+1); adjustsize(m, row2, col2); ap=m->atombuffer+2; n=row2*col2; while(n--){ t_float f = #ifdef MTXBIN_GENERIC__INTEGEROP offset MTXBIN_GENERIC__OPERATOR atom_getint(ap2); #else offset MTXBIN_GENERIC__OPERATOR atom_getfloat(ap2); #endif SETFLOAT(ap, f); ap++; ap2++; } outlet_anything(x->x_obj.ob_outlet, gensym("matrix"), m->row*m->col+2, m->atombuffer); } static void *mtxbin_new(t_symbol *s, int argc, t_atom *argv) { if (argc>1) post( MTXBIN_SHORTNAME " : extra arguments ignored"); if (argc) { t_mtx_binscalar *x = (t_mtx_binscalar *)pd_new(MTXBIN_APPEND(_scalarclass)); floatinlet_new(&x->x_obj, &x->f); x->f = atom_getfloatarg(0, argc, argv); outlet_new(&x->x_obj, 0); return(x); } else { t_mtx_binmtx *x = (t_mtx_binmtx *)pd_new(MTXBIN_APPEND(_class)); inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("matrix"), gensym("")); outlet_new(&x->x_obj, 0); x->m.col = x->m.row = x->m2.col = x->m2.row = 0; x->m.atombuffer = x->m2.atombuffer = 0; return(x); } } void MTXBIN_APPEND(_setup) (void) { MTXBIN_APPEND(_class) = class_new(gensym(MTXBIN_LONGNAME), (t_newmethod)mtxbin_new, (t_method)mtx_binmtx_free, sizeof(t_mtx_binmtx), 0, A_GIMME, 0); class_addmethod(MTXBIN_APPEND(_class), (t_method)mtxbin_matrix, gensym("matrix"), A_GIMME, 0); class_addmethod(MTXBIN_APPEND(_class), (t_method)mtx_bin_matrix2, gensym(""), A_GIMME, 0); class_addfloat (MTXBIN_APPEND(_class), mtxbin_float); class_addbang (MTXBIN_APPEND(_class), mtx_binmtx_bang); MTXBIN_APPEND(_scalarclass) = class_new(gensym(MTXBIN_LONGNAME), 0, (t_method)mtx_binscalar_free, sizeof(t_mtx_binscalar), 0, 0); class_addmethod(MTXBIN_APPEND(_scalarclass), (t_method)mtxbin_scalar_matrix, gensym("matrix"), A_GIMME, 0); class_addlist (MTXBIN_APPEND(_scalarclass), mtxbin_scalar_list); class_addbang (MTXBIN_APPEND(_scalarclass), mtx_binscalar_bang); class_sethelpsymbol(MTXBIN_APPEND(_class), gensym(MTXBIN_REALHELPNAME)); class_sethelpsymbol(MTXBIN_APPEND(_scalarclass), gensym(MTXBIN_REALHELPNAME)); class_addcreator((t_newmethod)mtxbin_new, gensym(MTXBIN_SHORTNAME), A_GIMME,0); } void MTXBIN_IEMSETUP(MTXBIN_GENERIC__NAME) (void) { MTXBIN_APPEND(_setup()); } #else # error no operation defined #endif /* MTXBIN_GENERIC__NAME && MTXBIN_GENERIC__OPERATOR */ pd-iemmatrix-0.3/src/mtx_bitand.c000066400000000000000000000012171262113134600170400ustar00rootroot00000000000000/* * iemmatrix * * objects fand manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, forum::für::umläute * IEM, Graz, Austria * * Fand infandmation on usage and redistribution, and fand a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ /* name of the object and the classes */ #define MTXBIN_GENERIC__NAME mtx_bitand /* operator; also used for abbreviation of object */ #define MTXBIN_GENERIC__OPERATOR & /* the operator operates on integers instead of floats */ #define MTXBIN_GENERIC__INTEGEROP #include "mtx_binop_generic.h" pd-iemmatrix-0.3/src/mtx_bitleft.c000066400000000000000000000012211262113134600172230ustar00rootroot00000000000000/* * iemmatrix * * objects fand manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, forum::für::umläute * IEM, Graz, Austria * * Fand infandmation on usage and redistribution, and fand a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ /* name of the object and the classes */ #define MTXBIN_GENERIC__NAME mtx_bitleft /* operator; also used for abbreviation of object */ #define MTXBIN_GENERIC__OPERATOR << /* the operator operates on integers instead of floats */ #define MTXBIN_GENERIC__INTEGEROP #include "mtx_binop_generic.h" pd-iemmatrix-0.3/src/mtx_bitor.c000066400000000000000000000012161262113134600167150ustar00rootroot00000000000000/* * iemmatrix * * objects fand manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, forum::für::umläute * IEM, Graz, Austria * * Fand infandmation on usage and redistribution, and fand a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ /* name of the object and the classes */ #define MTXBIN_GENERIC__NAME mtx_bitor /* operator; also used for abbreviation of object */ #define MTXBIN_GENERIC__OPERATOR | /* the operator operates on integers instead of floats */ #define MTXBIN_GENERIC__INTEGEROP #include "mtx_binop_generic.h" pd-iemmatrix-0.3/src/mtx_bitright.c000066400000000000000000000012221262113134600174070ustar00rootroot00000000000000/* * iemmatrix * * objects fand manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, forum::für::umläute * IEM, Graz, Austria * * Fand infandmation on usage and redistribution, and fand a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ /* name of the object and the classes */ #define MTXBIN_GENERIC__NAME mtx_bitright /* operator; also used for abbreviation of object */ #define MTXBIN_GENERIC__OPERATOR >> /* the operator operates on integers instead of floats */ #define MTXBIN_GENERIC__INTEGEROP #include "mtx_binop_generic.h" pd-iemmatrix-0.3/src/mtx_bspline.c000066400000000000000000000132461262113134600172400ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, forum::für::umläute * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" /* mtx_bspline: this is only in the iemmatrix library since i have to make sure that there is an x-value for each y-value; this however enforces that for each point we have to define a point in all dimensions; think: should we split this into 2 objects? - one for calculating the coefficients of the polynomial function for the bspline - another for calculating the value of a piecewise polyfuns */ static t_class *mtx_bspline_class; typedef struct _mtx_spline { t_object x_obj; t_outlet *x_outlet; int x_numpoints; int x_dimension; t_matrixfloat x_min, x_max; t_matrixfloat*x_x; t_matrixfloat**x_y, **x_u, **x_p; t_atom*x_result; } t_mtx_spline; static void mtx_bspline_resize(t_mtx_spline *x, int cols, int dim){ int size=x->x_numpoints*sizeof(t_matrixfloat); int i=0; if(x->x_x)freebytes(x->x_x, size); x->x_x=0; for(i=0; ix_dimension; i++){ if(x->x_y&&x->x_y[i])freebytes(x->x_y[i], size); x->x_y[i]=0; if(x->x_u&&x->x_u[i])freebytes(x->x_u[i], size); x->x_u[i]=0; if(x->x_p&&x->x_p[i])freebytes(x->x_p[i], size); x->x_p[i]=0; } if(x->x_y)freebytes(x->x_y, x->x_dimension*sizeof(t_matrixfloat*)); x->x_y=0; if(x->x_u)freebytes(x->x_u, x->x_dimension*sizeof(t_matrixfloat*)); x->x_u=0; if(x->x_p)freebytes(x->x_p, x->x_dimension*sizeof(t_matrixfloat*)); x->x_p=0; if(x->x_result)freebytes(x->x_result, x->x_dimension*sizeof(t_atom)); x->x_p=0; if(dim<1)dim=1; if(cols<0)cols=0; x->x_numpoints = cols; x->x_dimension = dim; if(cols>0){ size=x->x_numpoints*sizeof(t_matrixfloat); x->x_x = (t_matrixfloat*)getbytes(size); x->x_result = (t_atom*)getbytes(x->x_dimension*sizeof(t_atom)); x->x_y = (t_matrixfloat**)getbytes(dim*sizeof(t_matrixfloat*)); x->x_u = (t_matrixfloat**)getbytes(dim*sizeof(t_matrixfloat*)); x->x_p = (t_matrixfloat**)getbytes(dim*sizeof(t_matrixfloat*)); for(i=0; ix_dimension; i++){ x->x_y[i] = (t_matrixfloat*)getbytes(size); x->x_u[i] = (t_matrixfloat*)getbytes(size); x->x_p[i] = (t_matrixfloat*)getbytes(size); } } } static void mtx_bspline_matrix2(t_mtx_spline *X, t_symbol *s, int argc, t_atom *argv) { int row=0; int col=0; t_matrixfloat *x, **y, **u, **p, *w, *d, *fp; t_matrixfloat*dummy; int i,j; int N; if (argc<2){ error("mtx_bspline: crippled matrix"); return; } row=atom_getfloat(argv); col=atom_getfloat(argv+1); if ((col<2)||(row<3)) { error("mtx_bspline: invalid dimensions"); return; } if (col*row>argc-2){ error("sparse matrix not yet supported : use \"mtx_check\""); return; } col--; mtx_bspline_resize(X, row, col); /* 1st fill the matrix into the arrays */ fp=matrix2float(argv); dummy=fp; x=X->x_x; y=X->x_y; u=X->x_u; p=X->x_p; for(i=0; ix_min=x[0]; X->x_max=x[row-1]; w=(t_matrixfloat*)getbytes(X->x_numpoints*sizeof(t_matrixfloat)); d=(t_matrixfloat*)getbytes(X->x_numpoints*sizeof(t_matrixfloat)); N=row-1; for(j=0; j0; i--) p[j][i] = (w[i]-u[j][i]*p[j][i+1])/d[i]; } } static void mtx_bspline_list(t_mtx_spline *x, t_symbol *s, int argc, t_atom *argv) { /* this should output a matrix, one row for each element of this list */ } static void mtx_bspline_float(t_mtx_spline *X, t_float f) { int i=0, j=0; int dim=X->x_dimension; t_matrixfloat *x=X->x_x, **y=X->x_y, **u=X->x_u, **p=X->x_p; t_atom*result=X->x_result; if(dim<1){ outlet_float(X->x_outlet, 0.f); return; } if(fx_min)f=X->x_min; if(f>X->x_max)f=X->x_max; while(f>x[i+1])i++; for(j=0; jx_outlet, 0, dim, result); } static void mtx_bspline_free(t_mtx_spline *x) { mtx_bspline_resize(x, 0, 0); } static void *mtx_bspline_new(void) { t_mtx_spline *x = (t_mtx_spline *)pd_new(mtx_bspline_class); inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("matrix"), gensym("")); x->x_numpoints=0; x->x_dimension=0; x->x_min=0.0; x->x_max=0.0; x->x_x=0; x->x_y=x->x_u=x->x_p=0; x->x_result=0; x->x_outlet=outlet_new(&x->x_obj, 0); return(x); } void mtx_bspline_setup(void) { mtx_bspline_class = class_new(gensym("mtx_bspline"), (t_newmethod)mtx_bspline_new, (t_method)mtx_bspline_free, sizeof(t_mtx_spline), 0, A_NULL); /* class_addmethod(mtx_bspline_class, (t_method)mtx_bspline_matrix, gensym("list"), A_GIMME, 0); */ class_addmethod(mtx_bspline_class, (t_method)mtx_bspline_matrix2, gensym(""), A_GIMME, 0); class_addfloat (mtx_bspline_class, mtx_bspline_float); } void iemtx_bspline_setup(void) { mtx_bspline_setup(); } pd-iemmatrix-0.3/src/mtx_check.c000066400000000000000000000033131262113134600166530ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, forum::für::umläute * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" /* mtx_check */ static t_class *mtx_check_class; static void mtx_check_matrix(t_matrix *x, t_symbol *s, int argc, t_atom *argv) { int row=atom_getfloat(argv); int col=atom_getfloat(argv+1); t_atom *ap; int length=row*col, n; argc-=2; if(length>argc) { /* sparse matrix */ adjustsize(x, row, col); matrix_set(x, 0); argv+=2; ap=x->atombuffer+2; n=argc; while(n--){ t_float f = atom_getfloat(argv++); SETFLOAT(ap, f); ap++; } matrix_bang(x); } else { SETFLOAT(argv, row); SETFLOAT(argv+1, col); ap=argv+2; n=length; while(n--){ t_float f = atom_getfloat(ap); SETFLOAT(ap, f); ap++; } outlet_anything(x->x_obj.ob_outlet, gensym("matrix"), length+2, argv); } } static void *mtx_check_new(t_symbol *s, int argc, t_atom *argv) { t_matrix *x = (t_matrix *)pd_new(mtx_check_class); outlet_new(&x->x_obj, 0); x->col=x->row=0; x->atombuffer=0; return (x); } void mtx_check_setup(void) { mtx_check_class = class_new(gensym("mtx_check"), (t_newmethod)mtx_check_new, (t_method)matrix_free, sizeof(t_matrix), 0, A_GIMME, 0); class_addbang (mtx_check_class, matrix_bang); class_addmethod(mtx_check_class, (t_method)mtx_check_matrix, gensym("matrix"), A_GIMME, 0); } void iemtx_check_setup(void) { mtx_check_setup(); } pd-iemmatrix-0.3/src/mtx_cholesky.c000066400000000000000000000063471262113134600174310ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, forum::für::umläute * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" /* mtx_cholesky */ /* * calculate the "Cholesky Decomposition" of a "symmetric and positive definite matrix " * no check is done, whether the input matrix is really symmetric and positive definite. */ static t_class *mtx_cholesky_class; static void mtx_cholesky_matrix(t_matrix *x, t_symbol *s, int argc, t_atom *argv) { /* maybe we should do this in double or long double ? */ int row=atom_getfloat(argv); int col=atom_getfloat(argv+1); int i, j, k, row2=row*row; t_matrixfloat *original, *cholesky; if(row*col+2>argc){ post("mtx_print : sparse matrices not yet supported : use \"mtx_check\""); return; } if (row!=col){ post("mtx_cholesky: only symmetric and positive definite matrices can be cholesky-decomposed"); return; } /* reserve memory for outputting afterwards */ adjustsize(x, row, row); /* 1. get the 2 matrices : orig; invert (create as eye, but will be orig^(-1)) */ cholesky = (t_matrixfloat *)getbytes(sizeof(t_matrixfloat)*row2); /* 1a extract values of A to float-buf */ original=matrix2float(argv); /* 2 set the cholesky matrix to zero */ for(i=0; iatombuffer, cholesky); /* 4b destroy the buffers */ freebytes(original, sizeof(t_matrixfloat)*row2); /* 4c output the atombuf; */ matrix_bang(x); } static void *mtx_cholesky_new(t_symbol *s, int argc, t_atom *argv) { t_matrix *x = (t_matrix *)pd_new(mtx_cholesky_class); outlet_new(&x->x_obj, 0); x->col=x->row=0; x->atombuffer=0; return (x); } void mtx_cholesky_setup(void) { mtx_cholesky_class = class_new(gensym("mtx_cholesky"), (t_newmethod)mtx_cholesky_new, (t_method)matrix_free, sizeof(t_matrix), 0, A_GIMME, 0); class_addbang (mtx_cholesky_class, matrix_bang); class_addmethod(mtx_cholesky_class, (t_method)mtx_cholesky_matrix, gensym("matrix"), A_GIMME, 0); } void iemtx_cholesky_setup(void){ mtx_cholesky_setup(); } pd-iemmatrix-0.3/src/mtx_col.c000066400000000000000000000064361262113134600163640ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, forum::für::umläute * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" /* mtx_col */ static t_class *mtx_col_class; static void mtx_col_float(t_matrix *x, t_floatarg f) { int i = f; if(i<0)i=0; x->current_col = i; } static void mtx_col_matrix(t_matrix *x, t_symbol *s, int argc, t_atom *argv) { int row, col; if (argc<2){ post("matrix : corrupt matrix passed"); return; } row = atom_getfloat(argv); col = atom_getfloat(argv+1); if ((row<1)||(col<1)){ post("matrix : corrupt matrix passed"); return; } if (row*col > argc-2){ post("matrix: sparse matrices not yet supported : use \"mtx_check\""); return; } matrix_matrix2(x, s, argc, argv); matrix_bang(x); } static void mtx_col_list(t_matrix *x, t_symbol *s, int argc, t_atom *argv) { if (argc==1){ t_float f=atom_getfloat(argv); t_atom *ap=x->atombuffer+1+x->current_col; if (x->current_col>x->col){ post("mtx_col : too high a column is to be set"); return; } if (x->current_col){ int n=x->row; while(n--){ SETFLOAT(ap, f); ap+=x->row+1; } } matrix_bang(x); return; } if (argcrow){ post("mtx_col : column length is too small for %dx%d-matrix", x->row, x->col); return; } if (x->current_col>x->col){ post("mtx_col : too high a column is to be set"); return; } if(x->current_col) { int r=x->row; t_atom *ap=x->atombuffer+1+x->current_col; while(r--)SETFLOAT(&ap[(x->row-r-1)*x->col], atom_getfloat(argv++)); } else { int r=x->row; t_atom *ap=x->atombuffer+2; while (r--) { t_float f=atom_getfloat(argv++); int c=x->col; while(c--){ SETFLOAT(ap, f); ap++; } } } matrix_bang(x); } static void *mtx_col_new(t_symbol *s, int argc, t_atom *argv) { t_matrix *x = (t_matrix *)pd_new(mtx_col_class); int i, j, q; outlet_new(&x->x_obj, 0); inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("float"), gensym("")); x->current_col=0; x->col=x->row=0; x->atombuffer=0; switch (argc) { case 0:break; case 1: i = atom_getfloat(argv); if (i<0)i=0; if(i)adjustsize(x, i, i); matrix_set(x, 0); break; case 2: i = atom_getfloat(argv++);if(i<0)i=0; j = atom_getfloat(argv++);if(j<0)j=0; if(i*j)adjustsize(x, i, j); matrix_set(x, 0); break; default: i = atom_getfloat(argv++);if(i<0)i=0; j = atom_getfloat(argv++);if(j<0)j=0; q = atom_getfloat(argv++);if(q<0)q=0; if(i*j)adjustsize(x, i, j); matrix_set(x, 0); x->current_col=q; } return (x); } void mtx_col_setup(void) { mtx_col_class = class_new(gensym("mtx_col"), (t_newmethod)mtx_col_new, (t_method)matrix_free, sizeof(t_matrix), 0, A_GIMME, 0); class_addbang (mtx_col_class, matrix_bang); class_addlist (mtx_col_class, mtx_col_list); class_addmethod(mtx_col_class, (t_method)mtx_col_matrix, gensym("matrix"), A_GIMME, 0); class_addmethod(mtx_col_class, (t_method)mtx_col_float, gensym(""), A_FLOAT, 0); } void iemtx_col_setup(void) { mtx_col_setup(); } pd-iemmatrix-0.3/src/mtx_colon.c000066400000000000000000000077711262113134600167240ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) 2005, Franz Zotter * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" static t_class *mtx_colon_class; typedef struct _MTXColon_ MTXColon; struct _MTXColon_ { t_object x_obj; int size; t_atom *list_out; t_outlet *list_outlet; }; static void deleteMTXColon (MTXColon *mtx_colon_obj) { if (mtx_colon_obj->list_out) freebytes (mtx_colon_obj->list_out, sizeof(t_atom)*(mtx_colon_obj->size+2)); } static void *newMTXColon (t_symbol *s, int argc, t_atom *argv) { MTXColon *mtx_colon_obj = (MTXColon *) pd_new (mtx_colon_class); mtx_colon_obj->list_outlet = outlet_new (&mtx_colon_obj->x_obj, gensym("matrix")); return ((void *) mtx_colon_obj); } static void mTXColonBang (MTXColon *mtx_colon_obj) { if (mtx_colon_obj->list_out) outlet_anything(mtx_colon_obj->list_outlet, gensym("matrix"), mtx_colon_obj->size+2, mtx_colon_obj->list_out); } static void mTXColonList (MTXColon *mtx_colon_obj, t_symbol *s, int argc, t_atom *argv) { int size; t_float startval; t_float stopval; t_float step; t_atom *list_out = mtx_colon_obj->list_out; if (argc == 3) { startval = atom_getfloat(argv++); step = atom_getfloat(argv++); stopval = atom_getfloat(argv++); } else if (argc == 2) { startval = atom_getfloat(argv++); stopval = atom_getfloat(argv++); step = 1.0f; } else { post("mtx_colon: wrong number of input arguments"); return; } size = (int)((stopval- startval + step) / step); if (size) { if (size!=mtx_colon_obj->size) { if (list_out) list_out = (t_atom *) resizebytes (list_out, sizeof(t_atom)*(mtx_colon_obj->size+2), sizeof(t_atom)*(size+2)); else list_out = (t_atom*) getbytes (sizeof(t_atom)*(size+2)); mtx_colon_obj->size = size; } mtx_colon_obj->list_out = list_out; SETFLOAT (&list_out[0],1.0f); SETFLOAT (&list_out[1],(t_float)size); list_out += 2; for (;size--;list_out++,startval+=step) SETFLOAT(list_out,startval); mTXColonBang (mtx_colon_obj); } } static void mTXColonMtx (MTXColon *mtx_colon_obj, t_symbol *s, int argc, t_atom *argv) { int rows = atom_getint (argv++); int columns = atom_getint (argv++); int size = rows * columns; int list_size = argc - 2; t_atom *list_ptr = argv; t_atom *list_out = mtx_colon_obj->list_out; if (!size) { post("mtx_colon: invalid matrix dimensions"); return; } else if (list_sizesize) { list_out = (t_atom*) resizebytes (list_out, sizeof (t_atom) * (mtx_colon_obj->size+2), sizeof (t_atom) * (size+2)); } mtx_colon_obj->list_out = list_out; mtx_colon_obj->size = size; list_out+=2; while (size--) *list_out++ = *list_ptr++; list_out = mtx_colon_obj->list_out; size = mtx_colon_obj->size; SETSYMBOL(list_out, gensym("matrix")); SETFLOAT(list_out, 1); SETFLOAT(&list_out[1], size); mTXColonBang (mtx_colon_obj); } void mtx_colon_setup (void) { mtx_colon_class = class_new (gensym("mtx_colon"), (t_newmethod) newMTXColon, (t_method) deleteMTXColon, sizeof (MTXColon), CLASS_DEFAULT, A_GIMME, 0); class_addbang (mtx_colon_class, (t_method) mTXColonBang); class_addmethod (mtx_colon_class, (t_method) mTXColonMtx, gensym("matrix"), A_GIMME, 0); class_addlist (mtx_colon_class, (t_method) mTXColonList); class_addcreator ((t_newmethod) newMTXColon, gensym("mtx_:"), A_GIMME, 0); } void iemtx_colon_setup(void){ mtx_colon_setup(); } pd-iemmatrix-0.3/src/mtx_concat.c000066400000000000000000000127611262113134600170540ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) 2005, Franz Zotter * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" static t_class *mtx_concat_class; static t_symbol *row_sym; typedef struct _MTXconcat_ MTXconcat; struct _MTXconcat_ { t_object x_obj; int size; int concat_mode; t_matrix mtx_in1; t_matrix mtx_in2; t_matrix mtx_out; t_outlet *outl; }; static void deleteMTXConcat (MTXconcat *mtx_concat_obj) { matrix_free(&mtx_concat_obj->mtx_in2); matrix_free(&mtx_concat_obj->mtx_out); } static void mTXSetConcatMode (MTXconcat *mtx_concat_obj, t_symbol *c_mode) { char c=*c_mode->s_name; switch(c){ case 'c': case 'C': case ':': /* "column" */ mtx_concat_obj->concat_mode = 1; break; case 'r': case 'R': /* "row" */ mtx_concat_obj->concat_mode = 0; break; default: error("mtx_concat: invalid mode '%s'", c_mode->s_name); break; } } static void *newMTXConcat (t_symbol *s, int argc, t_atom *argv) { MTXconcat *mtx_concat_obj = (MTXconcat *) pd_new (mtx_concat_class); if(argc&&(A_SYMBOL==argv->a_type)) mTXSetConcatMode (mtx_concat_obj, atom_getsymbol (argv)); else mTXSetConcatMode (mtx_concat_obj, gensym(":")); mtx_concat_obj->outl = mtx_concat_obj->mtx_out.x_outlet = outlet_new (&mtx_concat_obj->x_obj, gensym("matrix")); inlet_new(&mtx_concat_obj->x_obj, &mtx_concat_obj->x_obj.ob_pd, gensym("matrix"),gensym("")); return ((void *) mtx_concat_obj); } static void mTXConcatBang (MTXconcat *mtx_concat_obj) { outlet_anything(mtx_concat_obj->outl, gensym("matrix"), mtx_concat_obj->mtx_out.row * mtx_concat_obj->mtx_out.col + 2, mtx_concat_obj->mtx_out.atombuffer); } static void copyList (int n, t_atom *x, t_atom *y) { while (n--) *y++=*x++; } static void writeFillMatrixIntoList (int fillrows, const int fillcols, int columns, t_atom *x, t_atom *y) { for (;fillrows--;x+=fillcols,y+=columns) copyList(fillcols, x, y); } static void mTXConcatMatrix2 (MTXconcat *mtx_concat_obj, t_symbol *s, int argc, t_atom *argv) { matrix_matrix2 (&mtx_concat_obj->mtx_in2, s, argc, argv); } static void mTXConcatDoRowConcatenation (MTXconcat *mtx_concat_obj, t_matrix *mtx1, t_matrix *mtx2, t_matrix *mtx_out) { int mcols = mtx1->col + mtx2->col; int cnt; t_atom *ptr_in1 = mtx1->atombuffer+2; t_atom *ptr_in2 = mtx2->atombuffer+2; t_atom *ptr_out; if (mtx1->row != mtx2->row) { post("mtx_concat: row-mode: matrices must have same number of rows!"); return; } adjustsize (mtx_out, mtx1->row, mcols); ptr_out = mtx_out->atombuffer+2; for (cnt=mtx1->row; cnt--; ptr_in1 += mtx1->col, ptr_in2 += mtx2->col, ptr_out += mtx_out->col) { memcpy (ptr_out, ptr_in1, mtx1->col * sizeof(t_atom)); memcpy (ptr_out+mtx1->col, ptr_in2, mtx2->col * sizeof(t_atom)); } mTXConcatBang(mtx_concat_obj); } static void mTXConcatDoColConcatenation (MTXconcat *mtx_concat_obj, t_matrix *mtx1, t_matrix *mtx2, t_matrix *mtx_out) { int mrows = mtx1->row + mtx2->row; int cnt; t_atom *ptr_in1 = mtx1->atombuffer+2; t_atom *ptr_in2 = mtx2->atombuffer+2; t_atom *ptr_out; if (mtx1->col != mtx2->col) { post("mtx_concat: col-mode: matrices must have same number of columns!"); return; } adjustsize (mtx_out, mrows, mtx1->col); ptr_out = mtx_out->atombuffer+2; for (cnt=mtx1->row; cnt--; ptr_in1 += mtx1->col, ptr_out += mtx_out->col) { memcpy (ptr_out, ptr_in1, mtx1->col * sizeof(t_atom)); } for (cnt=mtx2->row; cnt--; ptr_in2 += mtx2->col, ptr_out += mtx_out->col) { memcpy (ptr_out, ptr_in2, mtx2->col * sizeof(t_atom)); } mTXConcatBang(mtx_concat_obj); } static void mTXConcatMatrix (MTXconcat *mtx_concat_obj, t_symbol *s, int argc, t_atom *argv) { int rows = atom_getint (argv); int columns = atom_getint (argv+1); int size = rows * columns; int list_size = argc-2; t_matrix *mtx_in1 = &mtx_concat_obj->mtx_in1; t_matrix *mtx_in2 = &mtx_concat_obj->mtx_in2; t_matrix *mtx_out = &mtx_concat_obj->mtx_out; /* size check */ if (!size) { post("mtx_concat: invalid dimensions"); return; } else if (list_sizerow = rows; mtx_in1->col = columns; mtx_in1->atombuffer = argv; /* alternatively to the above: */ /* matrix_matrix2 (mtx_in1, s, argc, argv); */ if (mtx_concat_obj->concat_mode == 0) { mTXConcatDoRowConcatenation(mtx_concat_obj, mtx_in1, mtx_in2, mtx_out); } else { mTXConcatDoColConcatenation(mtx_concat_obj, mtx_in1, mtx_in2, mtx_out); } } void mtx_concat_setup (void) { mtx_concat_class = class_new (gensym("mtx_concat"), (t_newmethod) newMTXConcat, (t_method) deleteMTXConcat, sizeof (MTXconcat), CLASS_DEFAULT, A_GIMME, 0); class_addbang (mtx_concat_class, (t_method) mTXConcatBang); class_addmethod (mtx_concat_class, (t_method) mTXConcatMatrix, gensym("matrix"), A_GIMME,0); class_addmethod (mtx_concat_class, (t_method) mTXConcatMatrix2, gensym(""), A_GIMME,0); class_addmethod (mtx_concat_class, (t_method) mTXSetConcatMode, gensym("mode"), A_DEFSYMBOL,0); row_sym = gensym("row"); } void iemtx_concat_setup(void){ mtx_concat_setup(); } pd-iemmatrix-0.3/src/mtx_conv.c000066400000000000000000000203701262113134600165450ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) 2005, Franz Zotter * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" #include static t_class *mtx_conv_class; typedef struct _MTXConv_ MTXConv; struct _MTXConv_ { t_object x_obj; int size; int rows; int columns; int rows_k; int columns_k; int size_k; int rows_y; int columns_y; int size_y; t_float **x; t_float *x_array; t_float **k; t_float *k_array; t_float **y; t_float *y_array; t_outlet *list_outlet; t_atom *list; }; static void getTFloatMatrix (int rows, int columns, t_float ***mtx, t_float **array) { int size = rows*columns; t_float *ptr; t_float **dptr; if (!size) return; if ((*array=ptr=(t_float *)calloc(size, sizeof(t_float)))) { if ((*mtx=dptr=(t_float **)calloc(rows, sizeof(t_float *)))) { for(;rows-- ; ptr+=columns) { *dptr++ = ptr; } } else { free (*array); array=0; } } } static void deleteTFloatMatrix (int rows, int columns, t_float ***mtx, t_float **myarray) { int size = rows*columns; if (*mtx) free (*mtx); if (*myarray) free (*myarray); *mtx=0; *myarray=0; } static void deleteMTXConv (MTXConv *mtx_conv_obj) { deleteTFloatMatrix (mtx_conv_obj->rows_k, mtx_conv_obj->columns_k, &mtx_conv_obj->k, &mtx_conv_obj->k_array); deleteTFloatMatrix (mtx_conv_obj->rows, mtx_conv_obj->columns, &mtx_conv_obj->x, &mtx_conv_obj->x_array); deleteTFloatMatrix (mtx_conv_obj->rows_y, mtx_conv_obj->columns_y, &mtx_conv_obj->y, &mtx_conv_obj->y_array); if (mtx_conv_obj->list) free (mtx_conv_obj->list); mtx_conv_obj->list = 0; } static void *newMTXConv (t_symbol *s, int argc, t_atom *argv) { MTXConv *mtx_conv_obj = (MTXConv *) pd_new (mtx_conv_class); mtx_conv_obj->list_outlet = outlet_new (&mtx_conv_obj->x_obj, gensym("matrix")); inlet_new(&mtx_conv_obj->x_obj, &mtx_conv_obj->x_obj.ob_pd, gensym("matrix"),gensym("")); mtx_conv_obj->size = 0; mtx_conv_obj->rows = 0; mtx_conv_obj->columns = 0; mtx_conv_obj->size_y = 0; mtx_conv_obj->rows_y = 0; mtx_conv_obj->columns_y = 0; mtx_conv_obj->size_k = 0; mtx_conv_obj->rows_k = 0; mtx_conv_obj->columns_k = 0; return ((void *) mtx_conv_obj); } static void mTXConvBang (MTXConv *mtx_conv_obj) { if (mtx_conv_obj->list) outlet_anything(mtx_conv_obj->list_outlet, gensym("matrix"), mtx_conv_obj->size+2, mtx_conv_obj->list); } static void zeroFloatArray (int n, t_float *f) { while (n--) *f++ = 0.0f; } static void zeroTFloatMatrix (t_float **mtx, int rows, int columns) { while (rows--) zeroFloatArray (columns, *mtx++); } static void writeFloatIntoList (int n, t_atom *l, t_float *f) { for (;n--;f++, l++) SETFLOAT (l, *f); } static void readFloatFromList (int n, t_atom *l, t_float *f) { while (n--) *f++ = atom_getfloat (l++); } static void readMatrixFromList (int rows, int columns, t_atom *l, t_float **mtx) { int n,m; for (n=0;nrows_k) || (columns_k != mtx_conv_obj->columns_k)) { if (mtx_conv_obj->k) deleteTFloatMatrix (mtx_conv_obj->rows_k, mtx_conv_obj->columns_k, &mtx_conv_obj->k, &mtx_conv_obj->k_array); getTFloatMatrix (rows_k, columns_k, &mtx_conv_obj->k, &mtx_conv_obj->k_array); if ((!mtx_conv_obj->k)||(!mtx_conv_obj->k_array)) { post("mtx_conv: memory allocation failed!"); return; } mtx_conv_obj->rows_k = rows_k; mtx_conv_obj->columns_k = columns_k; mtx_conv_obj->size_k = size_k; } readMatrixFromList (rows_k, columns_k, argv, mtx_conv_obj->k); } static void convolveMtx (int rows, int columns, int rows_h, int columns_h, t_float **x, t_float **h, t_float **y) { int n,m,k,l; int rows_y=rows+rows_h-1; int cols_y=columns+columns_h-1; int n_max, m_max; zeroTFloatMatrix (y, rows_y, cols_y); for (k=0; krows_k; int columns_k = mtx_conv_obj->columns_k; int size_k = mtx_conv_obj->size_k; int in_size = argc-2; int rows_y; int columns_y; int size_y = mtx_conv_obj->size_y; t_atom *list_ptr = mtx_conv_obj->list; /* fftsize check */ if (!size){ post("mtx_conv: invalid dimensions"); return; } else if (in_sizerows != rows)||(mtx_conv_obj->columns != columns)) { if (mtx_conv_obj->x) deleteTFloatMatrix (mtx_conv_obj->rows, mtx_conv_obj->columns, &mtx_conv_obj->x, &mtx_conv_obj->x_array); getTFloatMatrix (rows, columns, &mtx_conv_obj->x, &mtx_conv_obj->x_array); if ((!mtx_conv_obj->x)||(!mtx_conv_obj->x_array)) { post("mtx_conv: memory allocation failed!"); return; } mtx_conv_obj->size = size; mtx_conv_obj->rows = rows; mtx_conv_obj->columns = columns; } rows_y = rows+rows_k-1; columns_y = columns+columns_k-1; if ((mtx_conv_obj->rows_y != rows_y)||(mtx_conv_obj->columns_y != columns_y)) { size_y = rows_y * columns_y; if (mtx_conv_obj->y) deleteTFloatMatrix (mtx_conv_obj->rows_y, mtx_conv_obj->columns_y, &mtx_conv_obj->y, &mtx_conv_obj->y_array); getTFloatMatrix (rows_y, columns_y, &mtx_conv_obj->y, &mtx_conv_obj->y_array); if ((!mtx_conv_obj->y)||(!mtx_conv_obj->y_array)) { post("mtx_conv: memory allocation failed!"); return; } mtx_conv_obj->size_y = size_y; mtx_conv_obj->rows_y = rows_y; mtx_conv_obj->columns_y = columns_y; if (list_ptr) list_ptr = (t_atom *) realloc (list_ptr, sizeof (t_atom) * (size_y+2)); else list_ptr = (t_atom *) calloc (size_y+2, sizeof (t_atom)); mtx_conv_obj->list = list_ptr; if (!list_ptr) { post("mtx_conv: memory allocation failed!"); return; } } /* main part */ readMatrixFromList (rows, columns, argv, mtx_conv_obj->x); convolveMtx (rows, columns, rows_k, columns_k, mtx_conv_obj->x, mtx_conv_obj->k, mtx_conv_obj->y); writeMatrixIntoList (rows_y, columns_y, list_ptr+2, mtx_conv_obj->y); SETSYMBOL(list_ptr, gensym("matrix")); SETFLOAT(list_ptr, rows_y); SETFLOAT(&list_ptr[1], columns_y); outlet_anything(mtx_conv_obj->list_outlet, gensym("matrix"), size_y+2, list_ptr); } void mtx_conv_setup (void) { mtx_conv_class = class_new (gensym("mtx_conv"), (t_newmethod) newMTXConv, (t_method) deleteMTXConv, sizeof (MTXConv), CLASS_DEFAULT, A_GIMME, 0); class_addbang (mtx_conv_class, (t_method) mTXConvBang); class_addmethod (mtx_conv_class, (t_method) mTXConvMatrix, gensym("matrix"), A_GIMME,0); class_addmethod (mtx_conv_class, (t_method) mTXConvKernelMatrix, gensym(""), A_GIMME,0); } void iemtx_conv_setup(void){ mtx_conv_setup(); } pd-iemmatrix-0.3/src/mtx_cos.c000066400000000000000000000040311262113134600163600ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, forum::für::umläute * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" /* mtx_cos: B=cos(A); */ static t_class *mtx_cos_class; static void mtx_cos_matrix(t_mtx_binmtx *x, t_symbol *s, int argc, t_atom *argv) { int row=atom_getfloat(argv++); int col=atom_getfloat(argv++); t_atom *m; int n = argc-2; if (argc<2){ post("mtx_cos: crippled matrix"); return; } if ((col<1)||(row<1)) { post("mtx_cos: invalid dimensions"); return; } if (col*row>argc-2){ post("sparse matrix not yet supported : use \"mtx_check\""); return; } adjustsize(&x->m, row, col); m = x->m.atombuffer+2; while(n--){ t_float f = (t_float)cos(atom_getfloat(argv++)); SETFLOAT(m, f); m++; } outlet_anything(x->x_obj.ob_outlet, gensym("matrix"), argc, x->m.atombuffer); } static void mtx_cos_list(t_mtx_binscalar *x, t_symbol *s, int argc, t_atom *argv) { int n=argc; t_atom *m; adjustsize(&x->m, 1, argc); m = x->m.atombuffer; while(n--){ m->a_type = A_FLOAT; (m++)->a_w.w_float = (t_float)cos(atom_getfloat(argv++)); } outlet_list(x->x_obj.ob_outlet, gensym("list"), argc, x->m.atombuffer); } static void *mtx_cos_new(t_symbol *s) { /* element cos */ t_matrix *x = (t_matrix *)pd_new(mtx_cos_class); outlet_new(&x->x_obj, 0); x->col = x->row = 0; x->atombuffer = 0; return(x); } void mtx_cos_setup(void) { mtx_cos_class = class_new(gensym("mtx_cos"), (t_newmethod)mtx_cos_new, (t_method)mtx_binmtx_free, sizeof(t_mtx_binmtx), 0, A_GIMME, 0); class_addmethod(mtx_cos_class, (t_method)mtx_cos_matrix, gensym("matrix"), A_GIMME, 0); class_addlist (mtx_cos_class, mtx_cos_list); class_addbang (mtx_cos_class, mtx_binmtx_bang); } void iemtx_cos_setup(void) { mtx_cos_setup(); } pd-iemmatrix-0.3/src/mtx_cumprod.c000066400000000000000000000171221262113134600172520ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) 2005, Franz Zotter * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" static t_class *mtx_cumprod_class; static t_symbol *row_sym; static t_symbol *col_sym; static t_symbol *col_sym2; typedef struct _MTXCumprod_ MTXCumprod; struct _MTXCumprod_ { t_object x_obj; int rows; int columns; int size; int cumprod_direction; t_symbol *cumprod_mode; t_outlet *list_outlet; t_atom *list_out; t_atom *list_in; t_float *x; t_float *y; }; static void deleteMTXCumprod (MTXCumprod *mtx_cumprod_obj) { if (mtx_cumprod_obj->list_out) freebytes (mtx_cumprod_obj->list_out, sizeof(t_atom)*(mtx_cumprod_obj->size+2)); if (mtx_cumprod_obj->x) freebytes (mtx_cumprod_obj->x, sizeof(t_float)*(mtx_cumprod_obj->size)); if (mtx_cumprod_obj->y) freebytes (mtx_cumprod_obj->y, sizeof(t_float)*(mtx_cumprod_obj->size)); } static void mTXSetCumprodDirection (MTXCumprod *mtx_cumprod_obj, t_float c_dir) { int direction = (int) c_dir; mtx_cumprod_obj->cumprod_direction = (direction==-1)?direction:1; } static void mTXSetCumprodMode (MTXCumprod *mtx_cumprod_obj, t_symbol *m_sym) { mtx_cumprod_obj->cumprod_mode = m_sym; } static void *newMTXCumprod (t_symbol *s, int argc, t_atom *argv) { MTXCumprod *mtx_cumprod_obj = (MTXCumprod *) pd_new (mtx_cumprod_class); mTXSetCumprodMode (mtx_cumprod_obj, gensym(":")); mTXSetCumprodDirection (mtx_cumprod_obj, 1.0f); if (argc>=1) { if (argv[0].a_type == A_SYMBOL) { mTXSetCumprodMode (mtx_cumprod_obj, atom_getsymbol (argv)); if (argc>=2) { if (argv[1].a_type != A_SYMBOL) mTXSetCumprodDirection (mtx_cumprod_obj, atom_getfloat (argv+1)); else post("mtx_cumprod: 2nd arg ignored. supposed to be float"); } } else { mTXSetCumprodDirection (mtx_cumprod_obj, atom_getfloat (argv)); if (argc>=2) { if (argv[1].a_type == A_SYMBOL) mTXSetCumprodMode (mtx_cumprod_obj, atom_getsymbol (argv+1)); else post("mtx_cumprod: 2nd arg ignored. supposed to be symbolic, e.g. \"row\", \"col\", \":\""); } } } mtx_cumprod_obj->list_outlet = outlet_new (&mtx_cumprod_obj->x_obj, gensym("matrix")); return ((void *) mtx_cumprod_obj); } static void mTXCumprodBang (MTXCumprod *mtx_cumprod_obj) { if (mtx_cumprod_obj->list_out) outlet_anything(mtx_cumprod_obj->list_outlet, gensym("matrix"), mtx_cumprod_obj->size+2, mtx_cumprod_obj->list_out); } static void writeFloatIntoList (int n, t_atom *l, t_float *f) { for (;n--;f++, l++) SETFLOAT (l, *f); } static void readFloatFromList (int n, t_atom *l, t_float *f) { while (n--) *f++ = atom_getfloat (l++); } static void readFloatFromListModulo (int n, int m, t_atom *l, t_float *f) { t_atom *ptr = l; int count1, count2; n /= m; count1 = m; while (count1--) for (count2 = n, ptr = l++; count2--; ptr += m, f++) *f = atom_getfloat (ptr); } static void writeFloatIntoListModulo (int n, int m, t_atom *l, t_float *f) { t_atom *ptr = l; int count1, count2; n /= m; count1 = m; while (count1--) for (count2 = n, ptr = l++; count2--; ptr += m, f++) SETFLOAT(ptr,*f); } static void cumProd (int n, t_float *x, t_float *y) { t_float accu = 1.0f; for (;n--; x++, y++) { accu *= *x; *y = accu; } } static void cumProdReverse (int n, t_float *x, t_float *y) { t_float accu = 1.0f; for (;n--; x--, y--) { accu *= *x; *y = accu; } } static void mTXCumprodMatrix (MTXCumprod *mtx_cumprod_obj, t_symbol *s, int argc, t_atom *argv) { int rows = atom_getint (argv++); int columns = atom_getint (argv++); int size = rows * columns; int list_size = argc - 2; t_atom *list_ptr = argv; t_atom *list_out = mtx_cumprod_obj->list_out; t_float *x = mtx_cumprod_obj->x; t_float *y = mtx_cumprod_obj->y; int count; /* size check */ if (!size) { post("mtx_cumprod: invalid dimensions"); return; } else if (list_sizesize) { x = (t_float *) resizebytes (x, sizeof (t_float) * (mtx_cumprod_obj->size), sizeof (t_float) * (size)); y = (t_float *) resizebytes (y, sizeof (t_float) * (mtx_cumprod_obj->size), sizeof (t_float) * (size)); list_out = (t_atom *) resizebytes (list_out, sizeof (t_atom) * (mtx_cumprod_obj->size+2), sizeof (t_atom) * (size + 2)); } mtx_cumprod_obj->size = size; mtx_cumprod_obj->rows = rows; mtx_cumprod_obj->columns = columns; mtx_cumprod_obj->list_out = list_out; mtx_cumprod_obj->x = x; mtx_cumprod_obj->y = y; /* main part */ /* reading matrix from inlet */ if ((mtx_cumprod_obj->cumprod_mode == col_sym) || (mtx_cumprod_obj->cumprod_mode == col_sym2)) { readFloatFromListModulo (size, columns, list_ptr, x); columns = mtx_cumprod_obj->rows; rows = mtx_cumprod_obj->columns; } else readFloatFromList (size, list_ptr, x); /* calculating cumprod */ if (mtx_cumprod_obj->cumprod_direction == -1) { if ((mtx_cumprod_obj->cumprod_mode == row_sym) || (mtx_cumprod_obj->cumprod_mode == col_sym) || (mtx_cumprod_obj->cumprod_mode == col_sym2)) { x += columns-1; y += columns-1; for (count = rows; count--; x += columns, y += columns) cumProdReverse (columns,x,y); } else { x += size-1; y += size-1; cumProdReverse (size, x, y); } } else if ((mtx_cumprod_obj->cumprod_mode == row_sym) || (mtx_cumprod_obj->cumprod_mode == col_sym) || (mtx_cumprod_obj->cumprod_mode == col_sym2)) for (count = rows; count--; x += columns, y += columns) cumProd (columns,x,y); else cumProd (size, x, y); x = mtx_cumprod_obj->x; y = mtx_cumprod_obj->y; /* writing matrix to outlet */ if ((mtx_cumprod_obj->cumprod_mode == col_sym) || (mtx_cumprod_obj->cumprod_mode == col_sym2)) { columns = mtx_cumprod_obj->columns; rows = mtx_cumprod_obj->rows; writeFloatIntoListModulo (size, columns, list_out+2, y); } else writeFloatIntoList (size, list_out+2, y); SETSYMBOL(list_out, gensym("matrix")); SETFLOAT(list_out, rows); SETFLOAT(&list_out[1], columns); outlet_anything(mtx_cumprod_obj->list_outlet, gensym("matrix"), mtx_cumprod_obj->size+2, list_out); } void mtx_cumprod_setup (void) { mtx_cumprod_class = class_new (gensym("mtx_cumprod"), (t_newmethod) newMTXCumprod, (t_method) deleteMTXCumprod, sizeof (MTXCumprod), CLASS_DEFAULT, A_GIMME, 0); class_addbang (mtx_cumprod_class, (t_method) mTXCumprodBang); class_addmethod (mtx_cumprod_class, (t_method) mTXCumprodMatrix, gensym("matrix"), A_GIMME,0); class_addmethod (mtx_cumprod_class, (t_method) mTXSetCumprodMode, gensym("mode"), A_DEFSYMBOL,0); class_addmethod (mtx_cumprod_class, (t_method) mTXSetCumprodDirection, gensym("direction"), A_DEFFLOAT,0); row_sym = gensym("row"); col_sym = gensym("col"); col_sym2 = gensym("column"); } void iemtx_cumprod_setup(void){ mtx_cumprod_setup(); } pd-iemmatrix-0.3/src/mtx_cumsum.c000066400000000000000000000167221262113134600171170ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) 2005, Franz Zotter * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" static t_class *mtx_cumsum_class; static t_symbol *row_sym; static t_symbol *col_sym; static t_symbol *col_sym2; typedef struct _MTXCumsum_ MTXCumsum; struct _MTXCumsum_ { t_object x_obj; int rows; int columns; int size; int cumsum_direction; t_symbol *cumsum_mode; t_outlet *list_outlet; t_atom *list_out; t_atom *list_in; t_float *x; t_float *y; }; static void deleteMTXCumsum (MTXCumsum *mtx_cumsum_obj) { if (mtx_cumsum_obj->list_out) freebytes (mtx_cumsum_obj->list_out, sizeof(t_atom)*(mtx_cumsum_obj->size+2)); if (mtx_cumsum_obj->x) freebytes (mtx_cumsum_obj->x, sizeof(t_float)*(mtx_cumsum_obj->size)); if (mtx_cumsum_obj->y) freebytes (mtx_cumsum_obj->y, sizeof(t_float)*(mtx_cumsum_obj->size)); } static void mTXSetCumsumDirection (MTXCumsum *mtx_cumsum_obj, t_float c_dir) { int direction = (int) c_dir; mtx_cumsum_obj->cumsum_direction = (direction==-1)?direction:1; } static void mTXSetCumsumMode (MTXCumsum *mtx_cumsum_obj, t_symbol *m_sym) { mtx_cumsum_obj->cumsum_mode = m_sym; } static void *newMTXCumsum (t_symbol *s, int argc, t_atom *argv) { MTXCumsum *mtx_cumsum_obj = (MTXCumsum *) pd_new (mtx_cumsum_class); mTXSetCumsumMode (mtx_cumsum_obj, gensym(":")); mTXSetCumsumDirection (mtx_cumsum_obj, 1.0f); if (argc>=1) { if (argv[0].a_type == A_SYMBOL) { mTXSetCumsumMode (mtx_cumsum_obj, atom_getsymbol (argv)); if (argc>=2) { if (argv[1].a_type != A_SYMBOL) mTXSetCumsumDirection (mtx_cumsum_obj, atom_getfloat (argv+1)); else post("mtx_cumsum: 2nd arg ignored. supposed to be float"); } } else { mTXSetCumsumDirection (mtx_cumsum_obj, atom_getfloat (argv)); if (argc>=2) { if (argv[1].a_type == A_SYMBOL) mTXSetCumsumMode (mtx_cumsum_obj, atom_getsymbol (argv+1)); else post("mtx_cumsum: 2nd arg ignored. supposed to be symbolic, e.g. \"row\", \"col\", \":\""); } } } mtx_cumsum_obj->list_outlet = outlet_new (&mtx_cumsum_obj->x_obj, gensym("matrix")); return ((void *) mtx_cumsum_obj); } static void mTXCumsumBang (MTXCumsum *mtx_cumsum_obj) { if (mtx_cumsum_obj->list_out) outlet_anything(mtx_cumsum_obj->list_outlet, gensym("matrix"), mtx_cumsum_obj->size+2, mtx_cumsum_obj->list_out); } static void writeFloatIntoList (int n, t_atom *l, t_float *f) { for (;n--;f++, l++) SETFLOAT (l, *f); } static void readFloatFromList (int n, t_atom *l, t_float *f) { while (n--) *f++ = atom_getfloat (l++); } static void readFloatFromListModulo (int n, int m, t_atom *l, t_float *f) { t_atom *ptr = l; int count1, count2; n /= m; count1 = m; while (count1--) for (count2 = n, ptr = l++; count2--; ptr += m, f++) *f = atom_getfloat (ptr); } static void writeFloatIntoListModulo (int n, int m, t_atom *l, t_float *f) { t_atom *ptr = l; int count1, count2; n /= m; count1 = m; while (count1--) for (count2 = n, ptr = l++; count2--; ptr += m, f++) SETFLOAT(ptr,*f); } static void cumSum (int n, t_float *x, t_float *y) { t_float accu = 0.0f; for (;n--; x++, y++) { accu += *x; *y = accu; } } static void cumSumReverse (int n, t_float *x, t_float *y) { t_float accu = 0.0f; for (;n--; x--, y--) { accu += *x; *y = accu; } } static void mTXCumsumMatrix (MTXCumsum *mtx_cumsum_obj, t_symbol *s, int argc, t_atom *argv) { int rows = atom_getint (argv++); int columns = atom_getint (argv++); int size = rows * columns; int list_size = argc - 2; t_atom *list_ptr = argv; t_atom *list_out = mtx_cumsum_obj->list_out; t_float *x = mtx_cumsum_obj->x; t_float *y = mtx_cumsum_obj->y; int count; /* size check */ if (!size) { post("mtx_cumsum: invalid dimensions"); return; } else if (list_sizesize) { x = (t_float *) resizebytes (x, sizeof (t_float) * (mtx_cumsum_obj->size), sizeof (t_float) * (size)); y = (t_float *) resizebytes (y, sizeof (t_float) * (mtx_cumsum_obj->size), sizeof (t_float) * (size)); list_out = (t_atom *) resizebytes (list_out, sizeof (t_atom) * (mtx_cumsum_obj->size+2), sizeof (t_atom) * (size + 2)); } mtx_cumsum_obj->size = size; mtx_cumsum_obj->rows = rows; mtx_cumsum_obj->columns = columns; mtx_cumsum_obj->list_out = list_out; mtx_cumsum_obj->x = x; mtx_cumsum_obj->y = y; /* main part */ /* reading matrix from inlet */ if ((mtx_cumsum_obj->cumsum_mode == col_sym) || (mtx_cumsum_obj->cumsum_mode == col_sym2)) { readFloatFromListModulo (size, columns, list_ptr, x); columns = mtx_cumsum_obj->rows; rows = mtx_cumsum_obj->columns; } else readFloatFromList (size, list_ptr, x); /* calculating cumsum */ if (mtx_cumsum_obj->cumsum_direction == -1) { if ((mtx_cumsum_obj->cumsum_mode == row_sym) || (mtx_cumsum_obj->cumsum_mode == col_sym) || (mtx_cumsum_obj->cumsum_mode == col_sym2)) { x += columns-1; y += columns-1; for (count = rows; count--; x += columns, y += columns) cumSumReverse (columns,x,y); } else { x += size-1; y += size-1; cumSumReverse (size, x, y); } } else if ((mtx_cumsum_obj->cumsum_mode == row_sym) || (mtx_cumsum_obj->cumsum_mode == col_sym) || (mtx_cumsum_obj->cumsum_mode == col_sym2)) for (count = rows; count--; x += columns, y += columns) cumSum (columns,x,y); else cumSum (size, x, y); x = mtx_cumsum_obj->x; y = mtx_cumsum_obj->y; /* writing matrix to outlet */ if ((mtx_cumsum_obj->cumsum_mode == col_sym) || (mtx_cumsum_obj->cumsum_mode == col_sym2)) { columns = mtx_cumsum_obj->columns; rows = mtx_cumsum_obj->rows; writeFloatIntoListModulo (size, columns, list_out+2, y); } else writeFloatIntoList (size, list_out+2, y); SETSYMBOL(list_out, gensym("matrix")); SETFLOAT(list_out, rows); SETFLOAT(&list_out[1], columns); outlet_anything(mtx_cumsum_obj->list_outlet, gensym("matrix"), mtx_cumsum_obj->size+2, list_out); } void mtx_cumsum_setup (void) { mtx_cumsum_class = class_new (gensym("mtx_cumsum"), (t_newmethod) newMTXCumsum, (t_method) deleteMTXCumsum, sizeof (MTXCumsum), CLASS_DEFAULT, A_GIMME, 0); class_addbang (mtx_cumsum_class, (t_method) mTXCumsumBang); class_addmethod (mtx_cumsum_class, (t_method) mTXCumsumMatrix, gensym("matrix"), A_GIMME,0); class_addmethod (mtx_cumsum_class, (t_method) mTXSetCumsumMode, gensym("mode"), A_DEFSYMBOL,0); class_addmethod (mtx_cumsum_class, (t_method) mTXSetCumsumDirection, gensym("direction"), A_DEFFLOAT,0); row_sym = gensym("row"); col_sym = gensym("col"); col_sym2 = gensym("column"); } void iemtx_cumsum_setup(void){ mtx_cumsum_setup(); } pd-iemmatrix-0.3/src/mtx_dbtopow.c000066400000000000000000000044461262113134600172640ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, forum::für::umläute * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" #define LOGTEN 2.302585092994 /* mtx_dbtopow: B=log(A); B[n,m]=e^A[n,m] */ static t_class *mtx_dbtopow_class; static void mtx_dbtopow_matrix(t_mtx_binmtx *x, t_symbol *s, int argc, t_atom *argv) { int row=atom_getfloat(argv++); int col=atom_getfloat(argv++); t_atom *m; int n = argc-2; if (argc<2){ post("mtx_dbtopow: crippled matrix"); return; } if ((col<1)||(row<1)) { post("mtx_dbtopow: invalid dimensions"); return; } if (col*row>argc-2){ post("sparse matrix not yet supported : use \"mtx_check\""); return; } adjustsize(&x->m, row, col); m = x->m.atombuffer+2; while(n--){ t_float f=atom_getfloat(argv++); t_float v=0; f=(f>485)?485:f; v=(f<=0)?0:exp((LOGTEN*0.1) * (f-100.)); SETFLOAT(m, (v<0)?0:v); m++; } outlet_anything(x->x_obj.ob_outlet, gensym("matrix"), argc, x->m.atombuffer); } static void mtx_dbtopow_list(t_mtx_binscalar *x, t_symbol *s, int argc, t_atom *argv) { int n=argc; t_atom *m; adjustsize(&x->m, 1, argc); m = x->m.atombuffer; while(n--){ t_float f=atom_getfloat(argv++); t_float v=0; f=(f>485)?485:f; v=(f<=0)?0:exp((LOGTEN*0.1) * (f-100.)); SETFLOAT(m, (v<0)?0:v); m++; } outlet_list(x->x_obj.ob_outlet, gensym("list"), argc, x->m.atombuffer); } static void *mtx_dbtopow_new(t_symbol *s) { /* element log */ t_matrix *x = (t_matrix *)pd_new(mtx_dbtopow_class); outlet_new(&x->x_obj, 0); x->col = x->row = 0; x->atombuffer = 0; return(x); } void mtx_dbtopow_setup(void) { mtx_dbtopow_class = class_new(gensym("mtx_dbtopow"), (t_newmethod)mtx_dbtopow_new, (t_method)mtx_binmtx_free, sizeof(t_mtx_binmtx), 0, A_GIMME, 0); class_addmethod(mtx_dbtopow_class, (t_method)mtx_dbtopow_matrix, gensym("matrix"), A_GIMME, 0); class_addlist (mtx_dbtopow_class, mtx_dbtopow_list); class_addbang (mtx_dbtopow_class, mtx_binmtx_bang); } void iemtx_dbtopow_setup(void) { mtx_dbtopow_setup(); } pd-iemmatrix-0.3/src/mtx_dbtorms.c000066400000000000000000000044501262113134600172530ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, forum::für::umläute * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" #define LOGTEN 2.302585092994 /* mtx_dbtorms: B=log(A); B[n,m]=e^A[n,m] */ static t_class *mtx_dbtorms_class; static void mtx_dbtorms_matrix(t_mtx_binmtx *x, t_symbol *s, int argc, t_atom *argv) { int row=atom_getfloat(argv++); int col=atom_getfloat(argv++); t_atom *m; int n = argc-2; if (argc<2){ post("mtx_dbtorms: crippled matrix"); return; } if ((col<1)||(row<1)) { post("mtx_dbtorms: invalid dimensions"); return; } if (col*row>argc-2){ post("sparse matrix not yet supported : use \"mtx_check\""); return; } adjustsize(&x->m, row, col); m = x->m.atombuffer+2; while(n--){ t_float f=atom_getfloat(argv++); t_float v=0; f=(f>485)?485:f; v=(f<=0)?0:exp((LOGTEN*0.05) * (f-100.)); SETFLOAT(m, (v<0)?0:v); m++; } outlet_anything(x->x_obj.ob_outlet, gensym("matrix"), argc, x->m.atombuffer); } static void mtx_dbtorms_list(t_mtx_binscalar *x, t_symbol *s, int argc, t_atom *argv) { int n=argc; t_atom *m; adjustsize(&x->m, 1, argc); m = x->m.atombuffer; while(n--){ t_float f=atom_getfloat(argv++); t_float v=0; f=(f>485)?485:f; v=(f<=0)?0:exp((LOGTEN*0.05) * (f-100.)); SETFLOAT(m, (v<0)?0:v); m++; } outlet_list(x->x_obj.ob_outlet, gensym("list"), argc, x->m.atombuffer); } static void *mtx_dbtorms_new(t_symbol *s) { /* element log */ t_matrix *x = (t_matrix *)pd_new(mtx_dbtorms_class); outlet_new(&x->x_obj, 0); x->col = x->row = 0; x->atombuffer = 0; return(x); } void mtx_dbtorms_setup(void) { mtx_dbtorms_class = class_new(gensym("mtx_dbtorms"), (t_newmethod)mtx_dbtorms_new, (t_method)mtx_binmtx_free, sizeof(t_mtx_binmtx), 0, A_GIMME, 0); class_addmethod(mtx_dbtorms_class, (t_method)mtx_dbtorms_matrix, gensym("matrix"), A_GIMME, 0); class_addlist (mtx_dbtorms_class, mtx_dbtorms_list); class_addbang (mtx_dbtorms_class, mtx_binmtx_bang); } void iemtx_dbtorms_setup(void) { mtx_dbtorms_setup(); } pd-iemmatrix-0.3/src/mtx_decay.c000066400000000000000000000204651262113134600166720ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) 2005, Franz Zotter * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" static t_class *mtx_decay_class; static t_symbol *row_sym; static t_symbol *col_sym; static t_symbol *col_sym2; typedef struct _MTXDecay_ MTXDecay; struct _MTXDecay_ { t_object x_obj; int rows; int columns; int size; int decay_direction; t_symbol *decay_mode; t_float decay_parameter; t_outlet *list_outlet; t_atom *list_out; t_atom *list_in; t_float *x; t_float *y; }; static void deleteMTXDecay (MTXDecay *mtx_decay_obj) { if (mtx_decay_obj->list_out) freebytes (mtx_decay_obj->list_out, sizeof(t_atom)*(mtx_decay_obj->size+2)); if (mtx_decay_obj->x) freebytes (mtx_decay_obj->x, sizeof(t_float)*(mtx_decay_obj->size)); if (mtx_decay_obj->y) freebytes (mtx_decay_obj->y, sizeof(t_float)*(mtx_decay_obj->size)); } static void mTXSetDecayParameter (MTXDecay *mtx_decay_obj, t_float d_param) { d_param = (d_param > 0.0f)?d_param:0.0f; d_param = (d_param < 1.0f)?d_param:1.0f; mtx_decay_obj->decay_parameter = d_param; } static void mTXSetDecayDirection (MTXDecay *mtx_decay_obj, t_float c_dir) { int direction = (int) c_dir; mtx_decay_obj->decay_direction = (direction==-1)?direction:1; } static void mTXSetDecayMode (MTXDecay *mtx_decay_obj, t_symbol *c_mode) { mtx_decay_obj->decay_mode = c_mode; } static void *newMTXDecay (t_symbol *s, int argc, t_atom *argv) { MTXDecay *mtx_decay_obj = (MTXDecay *) pd_new (mtx_decay_class); int sym_count=0; int first_sym=argc; int n=0; mTXSetDecayMode (mtx_decay_obj, gensym(":")); mTXSetDecayDirection (mtx_decay_obj, 1); mTXSetDecayParameter (mtx_decay_obj, .9f); argc = ((argc<3)?argc:3); while (n < argc) { if (argv[n].a_type == A_SYMBOL) { sym_count++; first_sym = (first_sym= 1) mTXSetDecayMode (mtx_decay_obj, atom_getsymbol(argv+first_sym)); if (sym_count > 1) { post("mtx_decay: args after pos %d ignored. supposed to be non-symbolic",first_sym); argc = first_sym+1; } switch (argc) { case 3: if (first_sym < 2) mTXSetDecayDirection (mtx_decay_obj, atom_getfloat (argv+2)); case 2: if (first_sym < 1) mTXSetDecayParameter (mtx_decay_obj, atom_getfloat (argv+1)); else if (first_sym > 1) mTXSetDecayDirection (mtx_decay_obj, atom_getfloat(argv+1)); case 1: if (first_sym != 0) mTXSetDecayParameter (mtx_decay_obj, atom_getfloat (argv)); } mtx_decay_obj->list_outlet = outlet_new (&mtx_decay_obj->x_obj, gensym("matrix")); return ((void *) mtx_decay_obj); } static void mTXDecayBang (MTXDecay *mtx_decay_obj) { if (mtx_decay_obj->list_out) outlet_anything(mtx_decay_obj->list_outlet, gensym("matrix"), mtx_decay_obj->size+2, mtx_decay_obj->list_out); } static void writeFloatIntoList (int n, t_atom *l, t_float *f) { for (;n--;f++, l++) SETFLOAT (l, *f); } static void readFloatFromList (int n, t_atom *l, t_float *f) { while (n--) *f++ = atom_getfloat (l++); } static void readFloatFromListModulo (int n, int m, t_atom *l, t_float *f) { t_atom *ptr = l; int count1, count2; n /= m; count1 = m; while (count1--) for (count2 = n, ptr = l++; count2--; ptr += m, f++) *f = atom_getfloat (ptr); } static void writeFloatIntoListModulo (int n, int m, t_atom *l, t_float *f) { t_atom *ptr = l; int count1, count2; n /= m; count1 = m; while (count1--) for (count2 = n, ptr = l++; count2--; ptr += m, f++) SETFLOAT(ptr,*f); } static void deCay (int n, t_float *x, t_float *y, t_float alpha) { t_float decay = *x; t_float oneminusalpha = 1.0f-alpha; for (;n--; x++, y++) { decay = alpha * decay + oneminusalpha * *x; *y = decay = (decay < *x)? *x : decay; } } static void deCayReverse (int n, t_float *x, t_float *y, t_float alpha) { t_float decay = *x; t_float oneminusalpha = 1.0f-alpha; for (;n--; x--, y--) { decay = alpha * decay + oneminusalpha * *x; *y = decay = (decay < *x)? *x : decay; } } static void mTXDecayMatrix (MTXDecay *mtx_decay_obj, t_symbol *s, int argc, t_atom *argv) { int rows = atom_getint (argv++); int columns = atom_getint (argv++); int size = rows * columns; int list_size = argc - 2; t_atom *list_ptr = argv; t_atom *list_out = mtx_decay_obj->list_out; t_float *x = mtx_decay_obj->x; t_float *y = mtx_decay_obj->y; int count; /* size check */ if (!size) { post("mtx_decay: invalid dimensions"); return; } else if (list_sizesize) { x = (t_float *) resizebytes (x, sizeof (t_float) * (mtx_decay_obj->size), sizeof (t_float) * (size)); y = (t_float *) resizebytes (y, sizeof (t_float) * (mtx_decay_obj->size), sizeof (t_float) * (size)); list_out = (t_atom *) resizebytes (list_out, sizeof (t_atom) * (mtx_decay_obj->size+2), sizeof (t_atom) * (size + 2)); } mtx_decay_obj->size = size; mtx_decay_obj->rows = rows; mtx_decay_obj->columns = columns; mtx_decay_obj->list_out = list_out; mtx_decay_obj->x = x; mtx_decay_obj->y = y; /* main part */ /* reading matrix from inlet */ if ((mtx_decay_obj->decay_mode == col_sym) || (mtx_decay_obj->decay_mode == col_sym2)) { readFloatFromListModulo (size, columns, list_ptr, x); columns = mtx_decay_obj->rows; rows = mtx_decay_obj->columns; } else readFloatFromList (size, list_ptr, x); /* calculating decay */ if (mtx_decay_obj->decay_direction == -1) { if ((mtx_decay_obj->decay_mode == col_sym) || (mtx_decay_obj->decay_mode == col_sym2) || (mtx_decay_obj->decay_mode == row_sym)) { x += columns-1; y += columns-1; for (count = rows; count--; x += columns, y += columns) deCayReverse (columns,x,y,mtx_decay_obj->decay_parameter); } else { x += size-1; y += size-1; deCayReverse (size,x,y,mtx_decay_obj->decay_parameter); } } else { if ((mtx_decay_obj->decay_mode == col_sym) || (mtx_decay_obj->decay_mode == col_sym2) || (mtx_decay_obj->decay_mode == row_sym)) for (count = rows; count--; x += columns, y += columns) deCay (columns,x,y,mtx_decay_obj->decay_parameter); else deCay (size,x,y,mtx_decay_obj->decay_parameter); } x = mtx_decay_obj->x; y = mtx_decay_obj->y; /* writing matrix to outlet */ if ((mtx_decay_obj->decay_mode == col_sym) || (mtx_decay_obj->decay_mode == col_sym2)) { columns = mtx_decay_obj->columns; rows = mtx_decay_obj->rows; writeFloatIntoListModulo (size, columns, list_out+2, y); } else writeFloatIntoList (size, list_out+2, y); SETSYMBOL(list_out, gensym("matrix")); SETFLOAT(list_out, rows); SETFLOAT(&list_out[1], columns); outlet_anything(mtx_decay_obj->list_outlet, gensym("matrix"), mtx_decay_obj->size+2, list_out); } void mtx_decay_setup (void) { mtx_decay_class = class_new (gensym("mtx_decay"), (t_newmethod) newMTXDecay, (t_method) deleteMTXDecay, sizeof (MTXDecay), CLASS_DEFAULT, A_GIMME, 0); class_addbang (mtx_decay_class, (t_method) mTXDecayBang); class_addmethod (mtx_decay_class, (t_method) mTXDecayMatrix, gensym("matrix"), A_GIMME,0); class_addmethod (mtx_decay_class, (t_method) mTXSetDecayParameter, gensym("alpha"), A_DEFFLOAT,0); class_addmethod (mtx_decay_class, (t_method) mTXSetDecayMode, gensym("mode"), A_DEFSYMBOL,0); class_addmethod (mtx_decay_class, (t_method) mTXSetDecayDirection, gensym("direction"), A_DEFFLOAT,0); row_sym = gensym("row"); col_sym = gensym("col"); col_sym2 = gensym("column"); } void iemtx_decay_setup(void){ mtx_decay_setup(); } pd-iemmatrix-0.3/src/mtx_diag.c000066400000000000000000000034611262113134600165060ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, forum::für::umläute * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" /* mtx_diag */ static t_class *mtx_diag_class; static void mtx_diag_matrix(t_matrix *x, t_symbol *s, int argc, t_atom *argv) { int row=atom_getfloat(argv++); int col=atom_getfloat(argv++); int length=(colargc-2)post("mtx_diag: sparse matrices not yet supported : use \"mtx_check\""); else { for(n=0;nx_obj.ob_outlet, gensym("diag"), length, ap); } freebytes(ap, (length * sizeof(t_atom))); } static void *mtx_diag_new(t_symbol *s, int argc, t_atom *argv) { t_matrix *x = (t_matrix *)pd_new(mtx_diag_class); outlet_new(&x->x_obj, 0); x->row = x->col = 0; x->atombuffer = 0; if(!argc)return(x); x->atombuffer = (t_atom *)getbytes((argc*argc+2)*sizeof(t_atom)); setdimen(x, argc, argc); matrix_set(x, 0); argv+=argc-1; while(argc--)SETFLOAT(x->atombuffer+2+argc*(1+x->col), atom_getfloat(argv--)); return (x); } void mtx_diag_setup(void) { mtx_diag_class = class_new(gensym("mtx_diag"), (t_newmethod)mtx_diag_new, (t_method)matrix_free, sizeof(t_matrix), 0, A_GIMME, 0); class_addlist (mtx_diag_class, matrix_diag); class_addbang (mtx_diag_class, matrix_bang); class_addmethod(mtx_diag_class, (t_method)mtx_diag_matrix, gensym("matrix"), A_GIMME, 0); } void iemtx_diag_setup(void){ mtx_diag_setup(); } pd-iemmatrix-0.3/src/mtx_diegg.c000066400000000000000000000032511262113134600166560ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, forum::für::umläute * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" static t_class *mtx_diegg_class; static void mtx_diegg_matrix(t_matrix *x, t_symbol *s, int argc, t_atom *argv) { int row=atom_getfloat(argv++); int col=atom_getfloat(argv++); int length=(colargc-2)post("mtx_diegg: sparse matrices not yet supported : use \"mtx_check\""); else { for(n=0;nx_obj.ob_outlet, gensym("diegg"), length, ap); } freebytes(ap, (length * sizeof(t_atom))); } static void *mtx_diegg_new(t_symbol *s, int argc, t_atom *argv) { t_matrix *x = (t_matrix *)pd_new(mtx_diegg_class); outlet_new(&x->x_obj, 0); x->row = x->col = 0; x->atombuffer = 0; if(!argc)return(x); matrix_diegg(x, s, argc, argv); return (x); } void mtx_diegg_setup(void) { mtx_diegg_class = class_new(gensym("mtx_diegg"), (t_newmethod)mtx_diegg_new, (t_method)matrix_free, sizeof(t_matrix), 0, A_GIMME, 0); class_addlist (mtx_diegg_class, matrix_diegg); class_addbang (mtx_diegg_class, matrix_bang); class_addmethod(mtx_diegg_class, (t_method)mtx_diegg_matrix, gensym("matrix"), A_GIMME, 0); } void iemtx_diegg_setup(void){ mtx_diegg_setup(); } pd-iemmatrix-0.3/src/mtx_diff.c000066400000000000000000000162541262113134600165160ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) 2005, Franz Zotter * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" static t_class *mtx_diff_class; static t_symbol *row_sym; static t_symbol *col_sym; static t_symbol *col_sym2; typedef struct _MTXdiff_ MTXdiff; struct _MTXdiff_ { t_object x_obj; int rows; int columns; int size; int diff_direction; t_symbol *diff_mode; t_outlet *list_outlet; t_atom *list_out; t_atom *list_in; t_float *x; t_float *y; }; static void deleteMTXdiff (MTXdiff *mtx_diff_obj) { if (mtx_diff_obj->list_out) freebytes (mtx_diff_obj->list_out, sizeof(t_atom)*(mtx_diff_obj->size+2)); if (mtx_diff_obj->x) freebytes (mtx_diff_obj->x, sizeof(t_float)*(mtx_diff_obj->size)); if (mtx_diff_obj->y) freebytes (mtx_diff_obj->y, sizeof(t_float)*(mtx_diff_obj->size)); } static void mTXSetdiffDirection (MTXdiff *mtx_diff_obj, t_float c_dir) { int direction = (int) c_dir; mtx_diff_obj->diff_direction = (direction==-1)?direction:1; } static void mTXSetdiffMode (MTXdiff *mtx_diff_obj, t_symbol *c_mode) { mtx_diff_obj->diff_mode = c_mode; } static void *newMTXdiff (t_symbol *s, int argc, t_atom *argv) { MTXdiff *mtx_diff_obj = (MTXdiff *) pd_new (mtx_diff_class); mTXSetdiffMode (mtx_diff_obj, gensym(":")); mTXSetdiffDirection (mtx_diff_obj, 1.0f); if (argc>=1) { if (argv[0].a_type == A_SYMBOL) { mTXSetdiffMode (mtx_diff_obj, atom_getsymbol (argv)); if (argc>=2) { if (argv[1].a_type != A_SYMBOL) mTXSetdiffDirection (mtx_diff_obj, atom_getfloat (argv+1)); else post("mtx_diff: 2nd arg ignored. supposed to be float"); } } else { mTXSetdiffDirection (mtx_diff_obj, atom_getfloat (argv)); if (argc>=2) { if (argv[1].a_type == A_SYMBOL) mTXSetdiffMode (mtx_diff_obj, atom_getsymbol (argv+1)); else post("mtx_diff: 2nd arg ignored. supposed to be symbolic, e.g. \"row\", \"col\", \":\""); } } } mtx_diff_obj->list_outlet = outlet_new (&mtx_diff_obj->x_obj, gensym("matrix")); return ((void *) mtx_diff_obj); } static void mTXdiffBang (MTXdiff *mtx_diff_obj) { if (mtx_diff_obj->list_out) outlet_anything(mtx_diff_obj->list_outlet, gensym("matrix"), mtx_diff_obj->size+2, mtx_diff_obj->list_out); } static void writeFloatIntoList (int n, t_atom *l, t_float *f) { for (;n--;f++, l++) SETFLOAT (l, *f); } static void readFloatFromList (int n, t_atom *l, t_float *f) { while (n--) *f++ = atom_getfloat (l++); } static void readFloatFromListModulo (int n, int m, t_atom *l, t_float *f) { t_atom *ptr = l; int count1, count2; n /= m; count1 = m; while (count1--) for (count2 = n, ptr = l++; count2--; ptr += m, f++) *f = atom_getfloat (ptr); } static void writeFloatIntoListModulo (int n, int m, t_atom *l, t_float *f) { t_atom *ptr = l; int count1, count2; n /= m; count1 = m; while (count1--) for (count2 = n, ptr = l++; count2--; ptr += m, f++) SETFLOAT(ptr,*f); } static void diff (int n, t_float *x, t_float *y) { *y++ = *x++; for (;--n; x++, y++) *y = *x - *(x-1); } static void diffReverse (int n, t_float *x, t_float *y) { *y-- = *x--; for (;--n; x--, y--) *y = *x - *(x+1); } static void mTXdiffMatrix (MTXdiff *mtx_diff_obj, t_symbol *s, int argc, t_atom *argv) { int rows = atom_getint (argv++); int columns = atom_getint (argv++); int size = rows * columns; int list_size = argc - 2; t_atom *list_ptr = argv; t_atom *list_out = mtx_diff_obj->list_out; t_float *x = mtx_diff_obj->x; t_float *y = mtx_diff_obj->y; int count; /* size check */ if (!size) { post("mtx_diff: invalid dimensions"); return; } else if (list_sizesize) { x = (t_float *) resizebytes (x, sizeof (t_float) * (mtx_diff_obj->size), sizeof (t_float) * (size)); y = (t_float *) resizebytes (y, sizeof (t_float) * (mtx_diff_obj->size), sizeof (t_float) * (size)); list_out = (t_atom *) resizebytes (list_out, sizeof (t_atom) * (mtx_diff_obj->size+2), sizeof (t_atom) * (size + 2)); } mtx_diff_obj->size = size; mtx_diff_obj->rows = rows; mtx_diff_obj->columns = columns; mtx_diff_obj->list_out = list_out; mtx_diff_obj->x = x; mtx_diff_obj->y = y; /* main part */ /* reading matrix from inlet */ if ((mtx_diff_obj->diff_mode == col_sym) || (mtx_diff_obj->diff_mode == col_sym2)) { readFloatFromListModulo (size, columns, list_ptr, x); columns = mtx_diff_obj->rows; rows = mtx_diff_obj->columns; } else readFloatFromList (size, list_ptr, x); /* calculating diff */ if (mtx_diff_obj->diff_direction == -1) { if ((mtx_diff_obj->diff_mode == row_sym) || (mtx_diff_obj->diff_mode == col_sym) || (mtx_diff_obj->diff_mode == col_sym2)) { x += columns-1; y += columns-1; for (count = rows; count--; x += columns, y += columns) diffReverse (columns,x,y); } else { x += size-1; y += size-1; diffReverse (size, x, y); } } else if ((mtx_diff_obj->diff_mode == row_sym) || (mtx_diff_obj->diff_mode == col_sym) || (mtx_diff_obj->diff_mode == col_sym2)) { for (count = rows; count--; x += columns, y += columns) diff (columns,x,y); } else diff (size,x,y); x = mtx_diff_obj->x; y = mtx_diff_obj->y; /* writing matrix to outlet */ if ((mtx_diff_obj->diff_mode == col_sym) || (mtx_diff_obj->diff_mode == col_sym2)) { columns = mtx_diff_obj->columns; rows = mtx_diff_obj->rows; writeFloatIntoListModulo (size, columns, list_out+2, y); } else writeFloatIntoList (size, list_out+2, y); SETSYMBOL(list_out, gensym("matrix")); SETFLOAT(list_out, rows); SETFLOAT(&list_out[1], columns); outlet_anything(mtx_diff_obj->list_outlet, gensym("matrix"), mtx_diff_obj->size+2, list_out); } void mtx_diff_setup (void) { mtx_diff_class = class_new (gensym("mtx_diff"), (t_newmethod) newMTXdiff, (t_method) deleteMTXdiff, sizeof (MTXdiff), CLASS_DEFAULT, A_GIMME, 0); class_addbang (mtx_diff_class, (t_method) mTXdiffBang); class_addmethod (mtx_diff_class, (t_method) mTXdiffMatrix, gensym("matrix"), A_GIMME,0); class_addmethod (mtx_diff_class, (t_method) mTXSetdiffMode, gensym("mode"), A_DEFSYMBOL,0); class_addmethod (mtx_diff_class, (t_method) mTXSetdiffDirection, gensym("direction"), A_DEFFLOAT,0); row_sym = gensym("row"); col_sym = gensym("col"); col_sym2 = gensym("column"); } void iemtx_diff_setup(void){ mtx_diff_setup(); } pd-iemmatrix-0.3/src/mtx_dispersive_dline.c000066400000000000000000000151401262113134600211270ustar00rootroot00000000000000/****************************************************** * * warped delay line * * written by Franz Zotter * * 2007 * * institute of electronic music and acoustics (iem) * ****************************************************** * * license: GNU General Public License v.2 * ******************************************************/ /* ------------------------ mtx_dispersive_dline~ ----------------------------- */ /* builds a tap vector with first order all-passes A instead of unit delays. * 'ha *' denotes the convolution with the impulse response of A. The chain is of * length L {x[n]} -> {... ha * ha * x[n], ha * x[n], x[n]} especially useful for frequency warped ffts All-pass z-Transform A(z)=(1+lambda*z)/(z-lambda), lambda ... input parameter inlet: is a signal matrix with C rows (number of channels) and N columns (samples) outlet: C rows and L colums matrix with current state of the dispersive delay line after computing the N imput samples. It is possible to capture the list outlet every sample when using a column (sample) vector as input matrix. creation input parameters are: 1: L ... length of allpass chain 2: lambda ... alpass/warping parameter */ #include "iemmatrix.h" static t_class *mtx_dispersive_dline_class; typedef struct _mtx_dispersive_dline { t_object x_obj; t_float lambda; int length; int channels; int size; t_float *z; t_float *tap; t_atom *list_out; t_outlet *list_outlet; } t_mtx_dispersive_dline; static void mtx_dispersive_dline_bang (t_mtx_dispersive_dline *x) { int count; t_atom *list = x->list_out; SETFLOAT(list, (t_float) x->channels); SETFLOAT(list+1, (t_float) x->length); list+=2; for (count=0; count < x->size; count++) SETFLOAT(&list[count],x->tap[count]); outlet_anything (x->list_outlet, gensym("matrix"), x->size+2, x->list_out); } static void mtx_dispersive_dline_set_lambda(t_mtx_dispersive_dline *x, t_floatarg f) { if ((f<1.0f)&&(f>-1.0f)) x->lambda = f; else post("mtx_dispersive_dline: stable allpass coefficient must be -1size;count++) { x->tap[count]=0; x->z[count]=0; } } static void mtx_dispersive_dline_delete(t_mtx_dispersive_dline *x) { if(x->list_out)freebytes(x->list_out, sizeof(t_atom)*(x->size+2)); if(x->tap)freebytes(x->tap, sizeof(t_float)*x->size); if(x->z)freebytes(x->z, sizeof(t_float)*x->size); x->z=0; x->tap=0; x->list_out=0; } static void mtx_dispersive_dline_resize(t_mtx_dispersive_dline *x, t_symbol *s, int argc, t_atom *argv) { int length=(int)atom_getfloat(argv); int channels=x->channels; int size=length*channels; if (argc>1) { channels=(int)atom_getfloat(argv+1); size=length*channels; if ((channels<1)||(channels>1000)) { post("mtx_dispersive_dline: number of channels (input rows) must lie between 1 and 1000!"); return; } } if ((length<1)||(length>10000)) { post("mtx_dispersive_dline: length not between 1 and 10000!"); return; } if ((x->size!=size)) { mtx_dispersive_dline_delete(x); if(!(x->list_out=(t_atom*) getbytes(sizeof(t_atom)*(size+2)))) { post("mtx_dispersive_dline: out of memory"); mtx_dispersive_dline_delete(x); return; } if(!(x->tap=(t_float*) getbytes(sizeof(t_float)*size))) { post("mtx_dispersive_dline: out of memory"); mtx_dispersive_dline_delete(x); return; } if(!(x->z = (t_float*) getbytes(sizeof(t_float)*size))) { post("mtx_dispersive_dline: out of memory"); mtx_dispersive_dline_delete(x); return; } x->length=length; x->channels=channels; x->size=size; } } static void allpass_chain_cycle (t_float x, t_float *y, t_float *z, int n, t_float a) { t_float w, in; int c; in = y[0] = x; // z[0] unused here for (c=1; cargc) { post("mtx_dispersive_dline: corrupt matrix passed"); return; } post("%d samples, %d channels",samples,channels); SETFLOAT(resize_msg,(t_float)x->length); SETFLOAT(resize_msg+1,(t_float)channels); mtx_dispersive_dline_resize(x,gensym("resize"),2,resize_msg); post("%d new size",x->size); argv+=2; for (c=0, n2=0; csize; c+=x->length) { for (n=0; ntap+c,x->z+c,x->length,x->lambda); } } mtx_dispersive_dline_bang(x); } static void mtx_dispersive_dline_helper(void) { post("\n%c mtx_dispersive_dline~-object for warping a signal"); post("'help' : view this\n" "signal~"); post("outlet : signal~"); } static void *mtx_dispersive_dline_new(t_symbol *s, int argc, t_atom *argv) { t_mtx_dispersive_dline *x = (t_mtx_dispersive_dline *)pd_new(mtx_dispersive_dline_class); t_float length=1; t_float lambda=0; t_atom resize_msg[2]; x->list_outlet = outlet_new(&x->x_obj, &s_list); switch ((argc>2)?2:argc) { case 2: lambda=atom_getfloat(argv+1); case 1: length=atom_getfloat(argv); } x->length=0; x->channels=0; x->size=0; x->z=0; x->tap=0; x->list_out=0; mtx_dispersive_dline_set_lambda (x,lambda); SETFLOAT(resize_msg,(t_float)length); SETFLOAT(resize_msg+1,(t_float)1); mtx_dispersive_dline_resize (x,gensym("resize"),2,resize_msg); mtx_dispersive_dline_reset (x); return (x); } void mtx_dispersive_dline_setup(void) { mtx_dispersive_dline_class = class_new( gensym("mtx_dispersive_dline"), (t_newmethod)mtx_dispersive_dline_new, (t_method)mtx_dispersive_dline_delete, sizeof(t_mtx_dispersive_dline), CLASS_DEFAULT, A_GIMME,0); class_addmethod (mtx_dispersive_dline_class, (t_method) mtx_dispersive_dline_matrix, gensym("matrix"),A_GIMME,0); class_addmethod (mtx_dispersive_dline_class, (t_method) mtx_dispersive_dline_reset, gensym("reset"), 0); class_addmethod (mtx_dispersive_dline_class, (t_method) mtx_dispersive_dline_resize, gensym("resize"), A_GIMME,0); class_addmethod (mtx_dispersive_dline_class, (t_method) mtx_dispersive_dline_set_lambda, gensym("lambda"), A_DEFFLOAT,0); class_addmethod(mtx_dispersive_dline_class, (t_method)mtx_dispersive_dline_helper, gensym("help"), 0); } void iemtx_dispersive_dline_setup(void) { mtx_dispersive_dline_setup(); } pd-iemmatrix-0.3/src/mtx_distance2.c000066400000000000000000000052511262113134600174550ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, forum::für::umläute * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" /* mtx_distance2: gets the euclidian distances (squared) between 2 sets of n-dimensional vectors */ /* -­------------------------------------------------------------- */ /* matrix math */ /* mtx_distance2 */ static t_class *mtx_distance2_class; static void mtx_distance2_matrix(t_mtx_binmtx *x, t_symbol *s, int argc, t_atom *argv) { int row=atom_getfloat(argv); int col=atom_getfloat(argv+1); int row2=0, col2=0; t_atom *m; t_atom *m1 = argv+2; t_atom *m2 = x->m2.atombuffer+2; int i, j; if (argc<2){ post("mtx_distance2: crippled matrix"); return; } if ((col<1)||(row<1)) { post("mtx_distance2: invalid dimensions"); return; } if (col*row>argc-2){ post("sparse matrix not yet supported : use \"mtx_check\""); return; } row2=x->m2.row; col2=x->m2.col; if (!(col2*row2)) { /* 2nd matrix is NULL; take the 1st matrix instead (distance between it's own vectors) */ m2=argv+2; row2=row; col2=col; } else if (col!=col2){ post("mtx_distance2: matrix dimensions do not match"); return; } adjustsize(&x->m, row, row2); m = x->m.atombuffer+2; for(i=0; ix_obj.ob_outlet, gensym("matrix"), row*row2+2, x->m.atombuffer); } static void *mtx_distance2_new(void) { t_mtx_binmtx *x = (t_mtx_binmtx *)pd_new(mtx_distance2_class); inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("matrix"), gensym("")); outlet_new(&x->x_obj, 0); x->m.col = x->m.row = x->m2.col = x->m2.row = 0; x->m.atombuffer = x->m2.atombuffer = 0; return(x); } void mtx_distance2_setup(void) { mtx_distance2_class = class_new(gensym("mtx_distance2"), (t_newmethod)mtx_distance2_new, (t_method)mtx_binmtx_free, sizeof(t_mtx_binmtx), 0, A_NULL, 0); class_addmethod(mtx_distance2_class, (t_method)mtx_distance2_matrix, gensym("matrix"), A_GIMME, 0); class_addmethod(mtx_distance2_class, (t_method)mtx_bin_matrix2, gensym(""), A_GIMME, 0); class_addbang (mtx_distance2_class, mtx_binmtx_bang); } void iemtx_distance2_setup(void) { mtx_distance2_setup(); } pd-iemmatrix-0.3/src/mtx_egg.c000066400000000000000000000027001262113134600163370ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, forum::für::umläute * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" /* mtx_egg */ static t_class *mtx_egg_class; static void *mtx_egg_new(t_symbol *s, int argc, t_atom *argv) { t_matrix *x = (t_matrix *)pd_new(mtx_egg_class); int col=0, row=0; outlet_new(&x->x_obj, 0); x->row = x->col = 0; x->atombuffer = 0; switch(argc) { case 0: break; case 1: col=row=atom_getfloat(argv); break; default: row=atom_getfloat(argv++); col=atom_getfloat(argv); } if(col<0)col=0; if(row<0)row=0; if (col*row){ int n = (colatombuffer = (t_atom *)getbytes((col*row+2)*sizeof(t_atom)); setdimen(x, row, col); matrix_set(x, 0); while(n--)SETFLOAT(x->atombuffer+2+(n+1)*(col-1), 1); } return (x); } void mtx_egg_setup(void) { mtx_egg_class = class_new(gensym("mtx_egg"), (t_newmethod)mtx_egg_new, (t_method)matrix_free, sizeof(t_matrix), 0, A_GIMME, 0); class_addlist(mtx_egg_class, matrix_egg); class_addbang(mtx_egg_class, matrix_bang); class_addmethod(mtx_egg_class, (t_method)matrix_egg, gensym("matrix"), A_GIMME, 0); } void iemtx_egg_setup(void){ mtx_egg_setup(); } pd-iemmatrix-0.3/src/mtx_eig.c000066400000000000000000000133271262113134600163500ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * this functions depends on the GNU scientific library * * Copyright (c) 2009, Franz Zotter * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" #include #ifdef HAVE_LIBGSL #include #endif static t_class *mtx_eig_class; enum WithEigenVectors {WITHEVS=1, WITHOUTEVS=0}; typedef struct _MTXEig_ MTXEig; struct _MTXEig_ { t_object x_obj; #ifdef HAVE_GSL_EIGEN_NONSYMM gsl_matrix *a; gsl_matrix_complex *q; gsl_vector_complex *l; gsl_eigen_nonsymm_workspace *w; gsl_eigen_nonsymmv_workspace *wv; #endif t_outlet *list_q_out_re; t_outlet *list_q_out_im; t_outlet *list_l_out_re; t_outlet *list_l_out_im; t_atom *list_q_re; t_atom *list_q_im; t_atom *list_l_re; t_atom *list_l_im; int size; enum WithEigenVectors withevs; }; #ifdef HAVE_GSL_EIGEN_NONSYMM static void allocMTXqlw (MTXEig *x) { x->a=(gsl_matrix*)gsl_matrix_alloc(x->size,x->size); x->l=(gsl_vector_complex*)gsl_vector_complex_alloc(x->size); switch (x->withevs) { case WITHEVS: x->wv=(gsl_eigen_nonsymmv_workspace*)gsl_eigen_nonsymmv_alloc(x->size); x->q=(gsl_matrix_complex*)gsl_matrix_complex_alloc(x->size,x->size); break; case WITHOUTEVS: x->w=(gsl_eigen_nonsymm_workspace*)gsl_eigen_nonsymm_alloc(x->size); } x->list_q_re=(t_atom*)calloc(sizeof(t_atom),x->size*x->size+2); x->list_q_im=(t_atom*)calloc(sizeof(t_atom),x->size*x->size+2); x->list_l_re=(t_atom*)calloc(sizeof(t_atom),x->size); x->list_l_im=(t_atom*)calloc(sizeof(t_atom),x->size); } static void deleteMTXqlw (MTXEig *x) { if (x->list_q_re!=0) free(x->list_q_re); if (x->list_q_im!=0) free(x->list_q_im); if (x->list_l_re!=0) free(x->list_l_re); if (x->list_l_im!=0) free(x->list_l_im); x->list_q_re = 0; x->list_q_im = 0; x->list_l_re = 0; x->list_l_im = 0; if (x->a!=0) gsl_matrix_free(x->a); if (x->q!=0) gsl_matrix_complex_free(x->q); if (x->l!=0) gsl_vector_complex_free(x->l); if (x->w!=0) gsl_eigen_nonsymm_free(x->w); if (x->wv!=0) gsl_eigen_nonsymmv_free(x->wv); x->a = 0; x->q = 0; x->l = 0; x->w = 0; x->wv = 0; } #endif static void deleteMTXEig (MTXEig *x) { #ifdef HAVE_GSL_EIGEN_NONSYMM deleteMTXqlw(x); #endif } static void *newMTXEig (t_symbol *s, int argc, t_atom *argv) { MTXEig *x = (MTXEig *) pd_new (mtx_eig_class); x->list_l_out_re = outlet_new (&x->x_obj, gensym("list")); x->list_l_out_im = outlet_new (&x->x_obj, gensym("list")); if (atom_getsymbol(argv)==gensym("v")) { x->withevs=1; x->list_q_out_re = outlet_new (&x->x_obj, gensym("matrix")); x->list_q_out_im = outlet_new (&x->x_obj, gensym("matrix")); } x->list_l_re = 0; x->list_l_im = 0; x->list_q_re = 0; x->list_q_im = 0; #ifdef HAVE_GSL_EIGEN_NONSYMM x->a=0; x->q=0; x->l=0; x->w=0; x->wv=0; #endif return ((void *) x); } static void mTXEigBang (MTXEig *x) { if (x->list_l_re) { switch (x->withevs) { case WITHEVS: outlet_anything(x->list_q_out_im, gensym("matrix"), x->size*x->size+2, x->list_q_im); outlet_anything(x->list_q_out_re, gensym("matrix"), x->size*x->size+2, x->list_q_re); case WITHOUTEVS: outlet_anything(x->list_l_out_im, gensym("list"), x->size, x->list_l_im); outlet_anything(x->list_l_out_re, gensym("list"), x->size, x->list_l_re); } } } static void mTXEigMatrix (MTXEig *x, t_symbol *s, int argc, t_atom *argv) { int rows = atom_getint (argv++); int columns = atom_getint (argv++); int size = rows * columns; int in_size = argc-2; int n,m; float f; #ifdef HAVE_GSL_EIGEN_NONSYMM gsl_complex c; /* size check */ if (!size) post("mtx_eig: invalid dimensions"); else if (in_sizesize=size; deleteMTXqlw(x); allocMTXqlw(x); for (n=0;na->data[n]=(double) atom_getfloat(argv++); switch (x->withevs) { case WITHOUTEVS: gsl_eigen_nonsymm(x->a,x->l,x->w); break; case WITHEVS: gsl_eigen_nonsymmv(x->a,x->l,x->q,x->wv); SETFLOAT((x->list_q_re),(float) x->size); SETFLOAT((x->list_q_im),(float) x->size); SETFLOAT((x->list_q_re+1),(float) x->size); SETFLOAT((x->list_q_im+1),(float) x->size); for (n=0;nlist_q_im+2+n), (float) x->q->data[2*n+1]); SETFLOAT((x->list_q_re+2+n), (float) x->q->data[2*n]); } break; } for (n=0;nsize;n++) { f=(float) GSL_VECTOR_IMAG(x->l, n); SETFLOAT((x->list_l_im+n), f); f=(float) GSL_VECTOR_REAL(x->l, n); SETFLOAT((x->list_l_re+n), f); } mTXEigBang(x); } #else post("mtx_eig: implementation requires more recent gsl version to handle nonsymmetric matrices"); #endif } void mtx_eig_setup (void) { mtx_eig_class = class_new (gensym("mtx_eig"), (t_newmethod) newMTXEig, (t_method) deleteMTXEig, sizeof (MTXEig), CLASS_DEFAULT, A_GIMME, 0); class_addbang (mtx_eig_class, (t_method) mTXEigBang); class_addmethod (mtx_eig_class, (t_method) mTXEigMatrix, gensym("matrix"), A_GIMME,0); } void iemtx_eig_setup(void){ mtx_eig_setup(); } pd-iemmatrix-0.3/src/mtx_ei~.c000066400000000000000000000135311262113134600163740ustar00rootroot00000000000000#include "iemmatrix.h" static t_class *mtx_ei_tilde_class; typedef struct _mtx_ei_tilde { t_object x_obj; int bs; int sd; int sg; int se; t_float *g; t_float *sig_in_left; t_float *sig_in_right; t_float *sl; t_float *sr; t_float *ei; t_atom *list_out; t_outlet *message_outlet; } mtx_ei_tilde; void *newMtxEITilde(t_symbol *s, int argc, t_atom *argv) { int sd=1; int sg=1; mtx_ei_tilde *x = (mtx_ei_tilde*) pd_new(mtx_ei_tilde_class); x->sig_in_left=0; x->sig_in_right=0; x->ei=0; x->list_out=0; x->g=0; inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); x->message_outlet=(t_outlet*)outlet_new(&x->x_obj,&s_list); if (argc > 2) { sd = atom_getint(argv++); sg = argc-1; sg = (sg<0)?0:sg; sd = (sd<1)?1:sd; } x->sd=sd; x->sg=sg; x->se=(2*sd-1)*(2*sg-1); post("size delay %d, size gain %d",x->sd,x->sg); x->list_out = (t_atom*) getbytes ((x->se + 2) * sizeof(t_atom)); if (x->sg) { x->g = (t_float*) getbytes (x->sg*sizeof(t_float)); for (sg=0;sgsg;sg++){ x->g[sg] = atom_getfloat (argv++); post("g[%d]=%f",sg,x->g[sg]); } } x->ei = (t_float*) getbytes (x->se * sizeof(t_float)); return (void *) x; } void deleteMtxEITilde (mtx_ei_tilde *x) { if (x->sl) freebytes (x->sl, x->sd * sizeof (t_float)); if (x->sr) freebytes (x->sr, x->sd * sizeof (t_float)); if (x->list_out) freebytes (x->list_out, (x->se + 2) * sizeof(t_atom)); if (x->ei) freebytes (x->ei, x->se * sizeof(t_float)); } t_float computeEIBlock (t_float *sl, t_float gl, t_float *sr, t_float gr, int n) { t_float ei=0; t_float *exch; int n16 = (n >> 4); if ((gl!=1.0f)&&(gr!=1.0f)) { while(n16--) { ei += fabs(gl * *sl++ - gr * *sr++); ei += fabs(gl * *sl++ - gr * *sr++); ei += fabs(gl * *sl++ - gr * *sr++); ei += fabs(gl * *sl++ - gr * *sr++); ei += fabs(gl * *sl++ - gr * *sr++); ei += fabs(gl * *sl++ - gr * *sr++); ei += fabs(gl * *sl++ - gr * *sr++); ei += fabs(gl * *sl++ - gr * *sr++); ei += fabs(gl * *sl++ - gr * *sr++); ei += fabs(gl * *sl++ - gr * *sr++); ei += fabs(gl * *sl++ - gr * *sr++); ei += fabs(gl * *sl++ - gr * *sr++); ei += fabs(gl * *sl++ - gr * *sr++); ei += fabs(gl * *sl++ - gr * *sr++); ei += fabs(gl * *sl++ - gr * *sr++); ei += fabs(gl * *sl++ - gr * *sr++); n-=16; } while(n--) { ei += fabs(gl * *sl++ - gr * *sr++); } } else { if (gr==1.0f) { exch = sr; sr = sl; sl = exch; gr = gl; } while(n16--) { ei += fabs(*sl++ - gr * *sr++); ei += fabs(*sl++ - gr * *sr++); ei += fabs(*sl++ - gr * *sr++); ei += fabs(*sl++ - gr * *sr++); ei += fabs(*sl++ - gr * *sr++); ei += fabs(*sl++ - gr * *sr++); ei += fabs(*sl++ - gr * *sr++); ei += fabs(*sl++ - gr * *sr++); ei += fabs(*sl++ - gr * *sr++); ei += fabs(*sl++ - gr * *sr++); ei += fabs(*sl++ - gr * *sr++); ei += fabs(*sl++ - gr * *sr++); ei += fabs(*sl++ - gr * *sr++); ei += fabs(*sl++ - gr * *sr++); ei += fabs(*sl++ - gr * *sr++); ei += fabs(*sl++ - gr * *sr++); n-=16; } while(n--) { ei += fabs(*sl++ - gr * *sr++); } } return ei; } static t_int *mTxEITildePerform (t_int *arg) { mtx_ei_tilde *x = (mtx_ei_tilde *) (arg[1]); int gi,zi,eii = 0; t_float scale=1.0f/x->bs; SETFLOAT(x->list_out,(t_float)2*x->sg-1); SETFLOAT(x->list_out+1,(t_float)2*x->sd-1); memcpy(x->sl, x->sl+x->bs, sizeof(t_float)*x->sd); memcpy(x->sr, x->sr+x->bs, sizeof(t_float)*x->sd); memcpy(x->sl+x->sd, x->sig_in_left, sizeof(t_float)*x->bs); memcpy(x->sr+x->sd, x->sig_in_right, sizeof(t_float)*x->bs); for (gi=0; gisg; gi++) { if (gi>0) { for (zi=0; zisd; zi++) { if (zi>0) x->ei[eii++]=computeEIBlock(&x->sl[zi],x->g[gi], &x->sr[x->sd-zi],x->g[x->sg-gi], x->bs); x->ei[eii++]=computeEIBlock(&x->sl[zi],x->g[gi], &x->sr[x->sd-zi-1],x->g[x->sg-gi], x->bs); } } for (zi=0; zisd; zi++) { if (zi>0) x->ei[eii++]=computeEIBlock(&x->sl[zi],x->g[gi], &x->sr[x->sd-zi],x->g[x->sg-gi-1], x->bs); x->ei[eii++]=computeEIBlock(&x->sl[zi],x->g[gi], &x->sr[x->sd-zi-1],x->g[x->sg-gi-1], x->bs); } } for (eii=0; eiise; eii++) SETFLOAT(x->list_out+eii+2, x->ei[eii]*scale); outlet_anything(x->message_outlet,gensym("matrix"), x->se+2,x->list_out); return(arg+2); } static void mTxEITildeDsp (mtx_ei_tilde *x, t_signal **sp) { int chan; x->sig_in_left=sp[0]->s_vec; x->sig_in_right=sp[1]->s_vec; x->bs=sp[0]->s_n; if (x->sl) freebytes (x->sl, x->sd * sizeof (t_float)); if (x->sr) freebytes (x->sr, x->sd * sizeof (t_float)); if (x->sd) { x->sl = (t_float*) getbytes ((x->sd+x->bs)*sizeof(t_float)); x->sr = (t_float*) getbytes ((x->sd+x->bs)*sizeof(t_float)); } dsp_add(mTxEITildePerform,1,x); } void mtx_ei_tilde_setup (void) { mtx_ei_tilde_class = class_new(gensym("mtx_ei~"), (t_newmethod)newMtxEITilde, (t_method) deleteMtxEITilde, sizeof(mtx_ei_tilde), CLASS_NOINLET, A_GIMME, 0); class_addmethod (mtx_ei_tilde_class, (t_method) mTxEITildeDsp, gensym("dsp"),0); } void iemtx_ei__setup(void) { mtx_ei_tilde_setup(); } pd-iemmatrix-0.3/src/mtx_element.c000066400000000000000000000063501262113134600172330ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, forum::für::umläute * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" /* mtx_element */ static t_class *mtx_element_class; static void mtx_element_list2(t_matrix *x, t_floatarg f1, t_floatarg f2) { int r = f1, c= f2; if(r<0)r=0; if(c<0)c=0; x->current_row = r; x->current_col = c; } static void mtx_element_matrix(t_matrix *x, t_symbol *s, int argc, t_atom *argv) { int row, col; if (argc<2){ post("matrix : corrupt matrix passed"); return; } row = atom_getfloat(argv); col = atom_getfloat(argv+1); if ((row<1)||(col<1)){ post("matrix : corrupt matrix passed"); return; } if (row*col > argc-2){ post("matrix: sparse matrices not yet supported : use \"mtx_check\""); return; } matrix_matrix2(x, s, argc, argv); matrix_bang(x); } static void mtx_element_float(t_matrix *x, t_floatarg f) { if(x->current_col>x->col || x->current_row>x->row){ pd_error(x,"mtx_element: element position exceeds matrix dimensions"); return; } if(x->current_row == 0 && x->current_col == 0){ matrix_set(x, f); matrix_bang(x); return; } if(x->current_row*x->current_col)SETFLOAT(x->atombuffer+1+(x->current_row-1)*x->col+x->current_col, f); else { t_atom *ap=x->atombuffer+2; int count; if (!x->current_col){ ap+=x->col*(x->current_row-1); count=x->col; while(count--)SETFLOAT(&ap[count], f); } else { ap+=x->current_col-1; count=x->row; while(count--)SETFLOAT(&ap[count*x->col], f); } } matrix_bang(x); } static void *mtx_element_new(t_symbol *s, int argc, t_atom *argv) { t_matrix *x = (t_matrix *)pd_new(mtx_element_class); int i, j, q; outlet_new(&x->x_obj, 0); inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("float"), gensym("")); x->current_row=x->current_col=0; x->col=x->row=0; x->atombuffer=0; switch (argc) { case 1: i = atom_getfloat(argv); if (i<0)i=0; if(i)adjustsize(x, i, i); matrix_set(x, 0); break; case 2: i = atom_getfloat(argv++);if(i<0)i=0; j = atom_getfloat(argv++);if(j<0)j=0; if(i*j)adjustsize(x, i, j); matrix_set(x, 0); break; case 4: i = atom_getfloat(argv++);if(i<0)i=0; j = atom_getfloat(argv++);if(j<0)j=0; if(i*j)adjustsize(x, i, j); matrix_set(x, 0); q = atom_getfloat(argv++);if(q<0)q=0; x->current_row=q; q = atom_getfloat(argv++);if(q<0)q=0; x->current_col=q; break; default:; } return (x); } void mtx_element_setup(void) { mtx_element_class = class_new(gensym("mtx_element"), (t_newmethod)mtx_element_new, (t_method)matrix_free, sizeof(t_matrix), 0, A_GIMME, 0); class_addbang (mtx_element_class, matrix_bang); class_addfloat (mtx_element_class, mtx_element_float); class_addmethod(mtx_element_class, (t_method)mtx_element_matrix, gensym("matrix"), A_GIMME, 0); class_addmethod(mtx_element_class, (t_method)mtx_element_list2, gensym(""), A_FLOAT, A_FLOAT, 0); } void iemtx_element_setup(void) { mtx_element_setup(); } pd-iemmatrix-0.3/src/mtx_eq.c000066400000000000000000000012221262113134600162000ustar00rootroot00000000000000/* * iemmatrix * * objects fand manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, forum::für::umläute * IEM, Graz, Austria * * Fand infandmation on usage and redistribution, and fand a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ /* name of the object and the classes */ #define MTXBIN_GENERIC__NAME mtx_eq /* operator; also used for abbreviation of object */ #define MTXBIN_GENERIC__OPERATOR == /* the operator operates on integers instead of floats */ /* #define MTXBIN_GENERIC__INTEGEROP */ #include "mtx_binop_generic.h" pd-iemmatrix-0.3/src/mtx_exp.c000066400000000000000000000040521262113134600163730ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, forum::für::umläute * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" /* mtx_exp: B=exp(A); B[n,m]=e^A[n,m] */ static t_class *mtx_exp_class; static void mtx_exp_matrix(t_mtx_binmtx *x, t_symbol *s, int argc, t_atom *argv) { int row=atom_getfloat(argv++); int col=atom_getfloat(argv++); t_atom *m; int n = argc-2; if (argc<2){ post("mtx_exp: crippled matrix"); return; } if ((col<1)||(row<1)) { post("mtx_exp: invalid dimensions"); return; } if (col*row>argc-2){ post("sparse matrix not yet supported : use \"mtx_check\""); return; } adjustsize(&x->m, row, col); m = x->m.atombuffer+2; while(n--){ t_float f = (t_float)exp(atom_getfloat(argv++)); SETFLOAT(m, f); m++; } outlet_anything(x->x_obj.ob_outlet, gensym("matrix"), argc, x->m.atombuffer); } static void mtx_exp_list(t_mtx_binscalar *x, t_symbol *s, int argc, t_atom *argv) { int n=argc; t_atom *m; adjustsize(&x->m, 1, argc); m = x->m.atombuffer; while(n--){ m->a_type = A_FLOAT; (m++)->a_w.w_float = (t_float)exp(atom_getfloat(argv++)); } outlet_list(x->x_obj.ob_outlet, gensym("list"), argc, x->m.atombuffer); } static void *mtx_exp_new(t_symbol *s) { /* element exp */ t_matrix *x = (t_matrix *)pd_new(mtx_exp_class); outlet_new(&x->x_obj, 0); x->col = x->row = 0; x->atombuffer = 0; return(x); } void mtx_exp_setup(void) { mtx_exp_class = class_new(gensym("mtx_exp"), (t_newmethod)mtx_exp_new, (t_method)mtx_binmtx_free, sizeof(t_mtx_binmtx), 0, A_GIMME, 0); class_addmethod(mtx_exp_class, (t_method)mtx_exp_matrix, gensym("matrix"), A_GIMME, 0); class_addlist (mtx_exp_class, mtx_exp_list); class_addbang (mtx_exp_class, mtx_binmtx_bang); } void iemtx_exp_setup(void) { mtx_exp_setup(); } pd-iemmatrix-0.3/src/mtx_eye.c000066400000000000000000000030311262113134600163550ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, forum::für::umläute * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" /* ------------------------------------------------------------------------------------- */ /* mtx_eye */ static t_class *mtx_eye_class; static void *mtx_eye_new(t_symbol *s, int argc, t_atom *argv) { t_matrix *x = (t_matrix *)pd_new(mtx_eye_class); int col=0, row=0; outlet_new(&x->x_obj, 0); x->row = x->col = 0; x->atombuffer = 0; switch(argc) { case 0: break; case 1: col=row=atom_getfloat(argv); break; default: row=atom_getfloat(argv++); col=atom_getfloat(argv); } if(col<0)col=0; if(row<0)row=0; if (col*row){ int n = (colatombuffer = (t_atom *)getbytes((col*row+2)*sizeof(t_atom)); setdimen(x, row, col); matrix_set(x, 0); while(n--)SETFLOAT(x->atombuffer+2+n*(1+col), 1); } return (x); } void mtx_eye_setup(void) { mtx_eye_class = class_new(gensym("mtx_eye"), (t_newmethod)mtx_eye_new, (t_method)matrix_free, sizeof(t_matrix), 0, A_GIMME, 0); class_addlist(mtx_eye_class, matrix_eye); class_addbang(mtx_eye_class, matrix_bang); class_addmethod(mtx_eye_class, (t_method)matrix_eye, gensym("matrix"), A_GIMME, 0); } void iemtx_eye_setup(void){ mtx_eye_setup(); } pd-iemmatrix-0.3/src/mtx_fft.c000066400000000000000000000117651262113134600163670ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) 2005, Franz Zotter * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" #include static t_class *mtx_fft_class; typedef struct _MtxFFT_ MtxFFT; struct _MtxFFT_ { t_object x_obj; int size; t_float *f_re; t_float *f_im; t_outlet *list_re_out; t_outlet *list_im_out; t_atom *list_re; t_atom *list_im; }; static void deleteMtxFFT (MtxFFT *x) { if (x->f_re) free (x->f_re); if (x->f_im) free (x->f_im); if (x->list_re) free (x->list_re); if (x->list_im) free (x->list_im); } static void *newMtxFFT (t_symbol *s, int argc, t_atom *argv) { MtxFFT *x = (MtxFFT *) pd_new (mtx_fft_class); inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("matrix"),gensym("")); x->list_re_out = outlet_new (&x->x_obj, gensym("matrix")); x->list_im_out = outlet_new (&x->x_obj, gensym("matrix")); x->size=0; x->f_re=x->f_im=0; x->list_re=x->list_im=0; return ((void *) x); } static void mtxFFTBang (MtxFFT *x) { if (x->list_im) { outlet_anything(x->list_im_out, gensym("matrix"), x->size, x->list_im); outlet_anything(x->list_re_out, gensym("matrix"), x->size, x->list_re); } } static void zeroFloatArray (int n, t_float *f) { while (n--) *f++ = 0.0f; } static void writeFloatIntoList (int n, t_atom *l, t_float *f) { for (;n--;f++, l++) SETFLOAT (l, *f); } static void readFloatFromList (int n, t_atom *l, t_float *f) { while (n--) *f++ = atom_getfloat (l++); } static void mtxFFTMatrixCold (MtxFFT *x, t_symbol *s, int argc, t_atom *argv) { int rows = atom_getint (argv++); int columns = atom_getint (argv++); int size = rows * columns; int in_size = argc-2; t_atom *list_re = x->list_re; t_atom *list_im = x->list_im; t_float *f_re = x->f_re; t_float *f_im = x->f_im; /* fftsize check */ if (!size) post("mtx_fft: invalid dimensions"); else if (in_sizesize = size; x->list_im = list_im; x->list_re = list_re; x->f_re = f_re; x->f_im = f_im; /* main part */ readFloatFromList (size, argv, f_im); } else post("mtx_rowfft: rowvector size no power of 2!"); } static void mtxFFTMatrixHot (MtxFFT *x, t_symbol *s, int argc, t_atom *argv) { int rows = atom_getint (argv++); int columns = atom_getint (argv++); int size = rows * columns; int in_size = argc-2; int fft_count; t_atom *list_re = x->list_re; t_atom *list_im = x->list_im; t_float *f_re = x->f_re; t_float *f_im = x->f_im; /* fftsize check */ if (!size) post("mtx_fft: invalid dimensions"); else if (in_sizesize) post("mtx_fft: left matrix has other dimensions than right matrix"); else if (columns < 4){ post("mtx_fft: matrix must have at least 4 columns"); } else if (columns == (1 << ilog2(columns))) { /* ok, do the FFT! */ /* main part */ readFloatFromList (size, argv, f_re); fft_count = rows; list_re += 2; list_im += 2; while (fft_count--){ mayer_fft (columns, f_re, f_im); writeFloatIntoList (columns, list_re, f_re); writeFloatIntoList (columns, list_im, f_im); f_im += columns; f_re += columns; list_re += columns; list_im += columns; } list_re = x->list_re; list_im = x->list_im; SETSYMBOL(list_re, gensym("matrix")); SETSYMBOL(list_im, gensym("matrix")); SETFLOAT(list_re, rows); SETFLOAT(list_im, rows); SETFLOAT(list_re+1, columns); SETFLOAT(list_im+1, columns); outlet_anything(x->list_im_out, gensym("matrix"), x->size+2, list_im); outlet_anything(x->list_re_out, gensym("matrix"), x->size+2, list_re); } else post("mtx_rowfft: rowvector size no power of 2!"); } void mtx_fft_setup (void) { mtx_fft_class = class_new (gensym("mtx_fft"), (t_newmethod) newMtxFFT, (t_method) deleteMtxFFT, sizeof (MtxFFT), CLASS_DEFAULT, A_GIMME, 0); class_addbang (mtx_fft_class, (t_method) mtxFFTBang); class_addmethod (mtx_fft_class, (t_method) mtxFFTMatrixHot, gensym("matrix"), A_GIMME,0); class_addmethod (mtx_fft_class, (t_method) mtxFFTMatrixCold, gensym(""), A_GIMME,0); } void iemtx_fft_setup(void){ mtx_fft_setup(); } pd-iemmatrix-0.3/src/mtx_fill.c000066400000000000000000000216751262113134600165370ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) 2005, Franz Zotter * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" typedef enum { FILL_SUBMATRIX, FILL_INDEXED_ELEMENTS, DONT_FILL_JUST_PASS } FillStyle; static t_class *mtx_fill_class; typedef struct _MTXfill_ MTXfill; struct _MTXfill_ { t_object x_obj; int size; int rows; int columns; int fill_startcol; int fill_startrow; int *index; int index_size; int num_idcs_used; int max_index; FillStyle fill_type; t_outlet *list_outlet; t_atom *list_out; }; static void deleteMTXFill (MTXfill *mtx_fill_obj) { if (mtx_fill_obj->list_out) freebytes (mtx_fill_obj->list_out, sizeof(t_atom)*(mtx_fill_obj->size+2)); if (mtx_fill_obj->index) freebytes (mtx_fill_obj->index, sizeof(int)*(mtx_fill_obj->index_size)); } static void setListConstFloat (int size, t_float f, t_atom *y) { for(;size--;y++) SETFLOAT(y,f); } static void copyList (int size, t_atom *x, t_atom *y) { while(size--) *y++=*x++; } static int copyNonZeroAtomsToIntegerArrayMax (int *size, t_atom *x, int *y) { int idx; int n = *size; int max = atom_getint(x); *size = 0; for (;n--;x++) { idx = atom_getint (x); if (idx) { size[0]++; *y++ = idx; max = (idx > max)?idx:max; } } return max; } static void writeIndexedValuesIntoMatrix (int n, int *idx, t_atom *x, t_atom *y) { for (;n--;idx++,x++) if (*idx) y[*idx-1] = *x; } static void writeFloatIndexedIntoMatrix (int n, int *idx, t_float f, t_atom *y) { for (;n--;idx++) if (*idx) SETFLOAT(&y[*idx-1], f); } static void mTXFillIndexMatrix (MTXfill *mtx_fill_obj, t_symbol *s, int argc, t_atom *argv) { int rows = atom_getint (argv++); int columns = atom_getint (argv++); int size = rows * columns; int list_size = argc - 2; int *idx = mtx_fill_obj->index; /* size check */ if (!size) { mtx_fill_obj->fill_type = DONT_FILL_JUST_PASS; return; } if (list_size == 0) { if ((rows<1) || (columns<1)){ post("mtx_fill: row and column indices must be >0"); mtx_fill_obj->fill_type = DONT_FILL_JUST_PASS; return; } mtx_fill_obj->fill_startrow = rows; mtx_fill_obj->fill_startcol = columns; mtx_fill_obj->fill_type = FILL_SUBMATRIX; } else if (list_sizefill_type = DONT_FILL_JUST_PASS; return; } else { if (size > mtx_fill_obj->index_size) { if (!idx) idx = (int *) getbytes (sizeof (int) * (size + 2)); else idx = (int *) resizebytes (idx, sizeof (int) * (mtx_fill_obj->index_size+2), sizeof (t_atom) * (size + 2)); mtx_fill_obj->index_size = size; mtx_fill_obj->index = idx; } mtx_fill_obj->max_index = copyNonZeroAtomsToIntegerArrayMax (&size, argv++, idx); mtx_fill_obj->num_idcs_used = size; if (!size) mtx_fill_obj->fill_type = DONT_FILL_JUST_PASS; else mtx_fill_obj->fill_type = FILL_INDEXED_ELEMENTS; } } static void *newMTXFill (t_symbol *s, int argc, t_atom *argv) { MTXfill *mtx_fill_obj = (MTXfill *) pd_new (mtx_fill_class); mtx_fill_obj->size = 0; mtx_fill_obj->fill_startrow = 1; mtx_fill_obj->fill_startcol = 1; mtx_fill_obj->fill_type = DONT_FILL_JUST_PASS; error("[mtx_fill]: this object _might_ change in the future!"); if (argc) { if (atom_getsymbol(argv)==gensym("matrix")) mTXFillIndexMatrix (mtx_fill_obj, s, argc-1, argv+1); else pd_error(mtx_fill_obj, "mtx_fill: creation argument must be 'matrix ' for submatrix filling or 'matrix rows columns [...]' for indexed filling with scalar/matrices"); } mtx_fill_obj->list_outlet = outlet_new (&mtx_fill_obj->x_obj, gensym("matrix")); inlet_new(&mtx_fill_obj->x_obj, &mtx_fill_obj->x_obj.ob_pd, gensym("matrix"),gensym("fill_mtx")); inlet_new(&mtx_fill_obj->x_obj, &mtx_fill_obj->x_obj.ob_pd, gensym("matrix"),gensym("index")); return ((void *) mtx_fill_obj); } static void mTXBigMatrix (MTXfill *mtx_fill_obj, t_symbol *s, int argc, t_atom *argv) { int rows = atom_getint (argv); int columns = atom_getint (argv+1); int size = rows * columns; int list_size = argc - 2; t_atom *list_out = mtx_fill_obj->list_out; /* size check */ if (!size) { post("mtx_fill: invalid dimensions"); return; } else if (list_sizesize) { if (!list_out) list_out = (t_atom *) getbytes (sizeof (t_atom) * (size + 2)); else list_out = (t_atom *) resizebytes (list_out, sizeof (t_atom) * (mtx_fill_obj->size+2), sizeof (t_atom) * (size + 2)); } mtx_fill_obj->size = size; mtx_fill_obj->columns = columns; mtx_fill_obj->rows = rows; mtx_fill_obj->list_out = list_out; memcpy(list_out,argv,argc*sizeof(t_atom)); } static void mTXFillBang (MTXfill *mtx_fill_obj) { if (mtx_fill_obj->list_out) outlet_anything(mtx_fill_obj->list_outlet, gensym("matrix"), mtx_fill_obj->size+2, mtx_fill_obj->list_out); } static void writeFillMatrixIntoList (int fillrows, const int fillcols, int columns, t_atom *x, t_atom *y) { for (;fillrows--;x+=fillcols,y+=columns) copyList(fillcols, x, y); } static void mTXFillScalar (MTXfill *mtx_fill_obj, t_float f) { t_atom *list_out = mtx_fill_obj->list_out; int rows = mtx_fill_obj->rows; int columns = mtx_fill_obj->columns; switch (mtx_fill_obj->fill_type) { case FILL_SUBMATRIX: post("mtx_fill: scalar fill for submatrices not supported yet"); return; break; case FILL_INDEXED_ELEMENTS: if (mtx_fill_obj->max_index > mtx_fill_obj->size) { post("mtx_fill: index matrix index exceeds matrix borders"); return; } if (mtx_fill_obj->size == 0) { post("mtx_fill: no matrix defined for filling"); return; } /* main part */ writeFloatIndexedIntoMatrix (mtx_fill_obj->num_idcs_used, mtx_fill_obj->index, f,list_out+2); default: mTXFillBang(mtx_fill_obj); } } static void mTXFillMatrix (MTXfill *mtx_fill_obj, t_symbol *s, int argc, t_atom *argv) { int fill_rows = atom_getint (argv++); int fill_columns = atom_getint (argv++); int fill_size = fill_rows * fill_columns; int list_size = argc - 2; int rows = mtx_fill_obj->rows; int columns = mtx_fill_obj->columns; t_atom *fill_mtx = argv; t_atom *list_out = mtx_fill_obj->list_out; int stopcol = mtx_fill_obj->fill_startcol+fill_columns-1; int stoprow = mtx_fill_obj->fill_startrow+fill_rows-1; if (mtx_fill_obj->fill_type == DONT_FILL_JUST_PASS) { mTXFillBang(mtx_fill_obj); return; } /* size check */ if (!list_size) { post("mtx_fill: invalid dimensions"); return; } switch (mtx_fill_obj->fill_type) { case FILL_SUBMATRIX: if (list_size < fill_size) { post("mtx_fill: sparse matrix not yet supported: use \"mtx_check\""); return; } if ((stopcol > columns) || (stoprow > rows)) { post("mtx_fill: fill matrix index exceeds matrix borders"); return; } break; case FILL_INDEXED_ELEMENTS: if (list_size < mtx_fill_obj->num_idcs_used) { post("mtx_fill: fill matrix smaller than indexing vector"); return; } else if (mtx_fill_obj->max_index > mtx_fill_obj->size) { post("mtx_fill: index matrix index exceeds matrix borders"); return; } break; case DONT_FILL_JUST_PASS: break; } if (mtx_fill_obj->size == 0) { post("mtx_fill: no matrix defined for filling"); return; } /* main part */ switch (mtx_fill_obj->fill_type) { case FILL_SUBMATRIX: list_out += columns * (mtx_fill_obj->fill_startrow-1) + mtx_fill_obj->fill_startcol-1; writeFillMatrixIntoList (fill_rows, fill_columns, columns, fill_mtx, list_out+2); break; case FILL_INDEXED_ELEMENTS: writeIndexedValuesIntoMatrix (mtx_fill_obj->num_idcs_used, mtx_fill_obj->index, fill_mtx,list_out+2); break; case DONT_FILL_JUST_PASS: break; } mTXFillBang(mtx_fill_obj); } void mtx_fill_setup (void) { mtx_fill_class = class_new (gensym("mtx_fill"), (t_newmethod) newMTXFill, (t_method) deleteMTXFill, sizeof (MTXfill), CLASS_DEFAULT, A_GIMME, 0); class_addbang (mtx_fill_class, (t_method) mTXFillBang); class_addmethod (mtx_fill_class, (t_method) mTXFillMatrix, gensym("matrix"), A_GIMME,0); class_addmethod (mtx_fill_class, (t_method) mTXBigMatrix, gensym("fill_mtx"), A_GIMME,0); class_addmethod (mtx_fill_class, (t_method) mTXFillIndexMatrix, gensym("index"), A_GIMME,0); class_addfloat (mtx_fill_class, (t_method) mTXFillScalar); } void iemtx_fill_setup(void){ mtx_fill_setup(); } pd-iemmatrix-0.3/src/mtx_find.c000066400000000000000000000222571262113134600165260ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) 2005, Franz Zotter * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" static t_class *mtx_find_class; static t_symbol *row_sym; static t_symbol *col_sym; static t_symbol *col_sym2; static t_symbol *mtx_sym; static t_symbol *mtx_sym2; typedef struct _MTXfind_ MTXfind; struct _MTXfind_ { t_object x_obj; int size; int outsize; t_symbol *find_mode; int find_direction; t_outlet *list_outlet; t_atom *list_out; t_atom *list_in; }; static void deleteMTXFind (MTXfind *mtx_find_obj) { if (mtx_find_obj->list_out) freebytes (mtx_find_obj->list_out, sizeof(t_atom)*(mtx_find_obj->size+2)); } static void mTXSetFindDirection (MTXfind *mtx_find_obj, t_float c_dir) { int direction = (int) c_dir; if ((direction != -1) && (direction != 1)) direction = 1; mtx_find_obj->find_direction = direction; } /* static void mTXSetFindDimension (MTXfind *mtx_find_obj, t_float c_dim) { int dimension = (int) c_dim; dimension = (dimension > 0)?dimension:0; dimension = (dimension < 3)?dimension:3; mtx_find_obj->find_dimension = dimension; } */ static void mTXSetFindMode (MTXfind *mtx_find_obj, t_symbol *c_dim) { mtx_find_obj->find_mode = c_dim; } static void *newMTXFind (t_symbol *s, int argc, t_atom *argv) { MTXfind *mtx_find_obj = (MTXfind *) pd_new (mtx_find_class); mTXSetFindMode (mtx_find_obj, gensym(":")); mTXSetFindDirection (mtx_find_obj, 1); if (argc>=1) { if (argv[0].a_type == A_SYMBOL) { mTXSetFindMode (mtx_find_obj, atom_getsymbol (argv)); if (argc>=2) { if (argv[1].a_type != A_SYMBOL) mTXSetFindDirection (mtx_find_obj, atom_getfloat (argv+1)); else post("mtx_find: 2nd arg ignored. supposed to be float"); } } else { mTXSetFindDirection (mtx_find_obj, atom_getfloat (argv)); if (argc>=2) { if (argv[1].a_type == A_SYMBOL) mTXSetFindMode (mtx_find_obj, atom_getsymbol (argv+1)); else post("mtx_find: 2nd arg ignored. supposed to be symbolic, e.g. \"row\", \"col\", \":\", \"mtx\""); } } } /* switch ((argc>2)?2:argc) { case 2: c_dir = atom_getint(argv+1); case 1: c_dim = atom_getint(argv); } mTXSetFindDimension (mtx_find_obj, (t_float) c_dim); mTXSetFindDirection (mtx_find_obj, (t_float) c_dir); */ mtx_find_obj->list_outlet = outlet_new (&mtx_find_obj->x_obj, gensym("matrix")); error("[mtx_find]: this object is likely to change! not really for use yet"); return ((void *) mtx_find_obj); } static void mTXFindBang (MTXfind *mtx_find_obj) { if (mtx_find_obj->list_out) outlet_anything(mtx_find_obj->list_outlet, gensym("matrix"), mtx_find_obj->outsize+2, mtx_find_obj->list_out); } /* static void copyList (int size, t_atom *x, t_atom *y) { while(size--) *y++=*x++; } */ static int findPreviousNonZero (const int n, t_atom *x, int offset) { x+=offset; for (; offset > n; offset--, x--) if (atom_getfloat(x)) return offset; return -1; } static int findPreviousNonZeroStep (const int step, t_atom *x, int offset) { x += offset; for (; offset >= 0; offset-=step, x-=step) if (atom_getfloat(x)) return offset; return -1; } static int findNextNonZero (const int n, t_atom *x, int offset) { x+=offset; for (; offset < n; offset++, x++) if (atom_getfloat(x)) return offset; return -1; } static int findNextNonZeroStep (const int n, const int step, t_atom *x, int offset) { x += offset; for (; offset < n; offset+=step, x+=step) if (atom_getfloat(x)) return offset; return -1; } static void findFirstNonZeroRow (const int rows, const int columns, t_atom *x, t_atom *y) { int offset; int pos; const int size = rows*columns; for (offset = 0; offset < size; y++, offset+=columns) { pos = findNextNonZero(offset+columns,x,offset)+1; SETFLOAT(y,(t_float)pos); } } static void findLastNonZeroRow (const int rows, const int columns, t_atom *x, t_atom *y) { int offset; int pos; const int size = rows*columns; for (offset = columns-1; offset < size; y++, offset+=columns) { pos = findPreviousNonZero(offset-columns,x,offset)+1; SETFLOAT(y,(t_float)pos); } } static void findFirstNonZeroColumn (const int rows, const int columns, t_atom *x, t_atom *y) { int offset; int pos; const int size = rows*columns; for (offset = 0; offset < columns; y++, offset++) { pos = findNextNonZeroStep(size,columns,x,offset)+1; SETFLOAT(y,(t_float)pos); } } static void findLastNonZeroColumn (const int rows, const int columns, t_atom *x, t_atom *y) { int offset; int pos; const int size = rows*columns; for (offset = size-columns; offset < size; y++, offset++) { pos = findPreviousNonZeroStep(columns,x,offset)+1; SETFLOAT(y,(t_float)pos); } } static int findAllNonZeros (int n, t_atom *x, t_atom *y) { int outsize = 0; int pos = 0; while ((pos = findNextNonZero(n,x,pos)) != -1) { pos++; SETFLOAT(y,(t_float)pos); y++; outsize++; } return outsize; } static void zeroFloatList (int n, t_atom *x) { for (;n--;x++) SETFLOAT(x,0); } static void findReplaceNonZerosWithIndex (int n, t_atom *x, t_atom *y) { int pos = 0; zeroFloatList(n,y); while ((pos = findNextNonZero(n,x,pos)) != -1) { SETFLOAT(y+pos,(t_float)pos+1); pos++; } } static void mTXFindMatrix (MTXfind *mtx_find_obj, t_symbol *s, int argc, t_atom *argv) { int rows = atom_getint (argv++); int columns = atom_getint (argv++); int size = rows * columns; int list_size = argc - 2; t_atom *list_in = argv; t_atom *list_out = mtx_find_obj->list_out; int rows_out; int columns_out; /* size check */ if (!size) { post("mtx_find: invalid dimensions"); return; } else if (list_sizesize) { if (!list_out) list_out = (t_atom *) getbytes (sizeof (t_atom) * (size + 2)); else list_out = (t_atom *) resizebytes (list_out, sizeof (t_atom) * (mtx_find_obj->size+2), sizeof (t_atom) * (size + 2)); } mtx_find_obj->size = size; mtx_find_obj->list_out = list_out; /* main part */ list_out += 2; rows_out = 1; if (mtx_find_obj->find_mode == row_sym) { if (mtx_find_obj->find_direction == -1) findLastNonZeroRow (rows, columns, list_in, list_out); else findFirstNonZeroRow (rows, columns, list_in, list_out); rows_out = rows; columns_out = 1; } else if ((mtx_find_obj->find_mode == col_sym)|| (mtx_find_obj->find_mode == col_sym2)) { if (mtx_find_obj->find_direction == -1) findLastNonZeroColumn (rows, columns, list_in, list_out); else findFirstNonZeroColumn (rows, columns, list_in, list_out); columns_out = columns; rows_out = 1; } else if ((mtx_find_obj->find_mode == mtx_sym)|| (mtx_find_obj->find_mode == mtx_sym2)) { findReplaceNonZerosWithIndex (size, list_in, list_out); rows_out = rows; columns_out = columns; } else { columns_out = findAllNonZeros (size, list_in, list_out); rows_out = 1; } /* switch (mtx_find_obj->find_dimension) { case 0: columns_out = findAllNonZeros (size, list_in, list_out); rows_out = 1; break; case 3: findReplaceNonZerosWithIndex (size, list_in, list_out); rows_out = rows; columns_out = columns; break; case 2: if (mtx_find_obj->find_direction == -1) findLastNonZeroColumn (rows, columns, list_in, list_out); else findFirstNonZeroColumn (rows, columns, list_in, list_out); columns_out = columns; rows_out = 1; break; case 1: if (mtx_find_obj->find_direction == -1) findLastNonZeroRow (rows, columns, list_in, list_out); else findFirstNonZeroRow (rows, columns, list_in, list_out); rows_out = rows; columns_out = 1; break; } */ mtx_find_obj->outsize = columns_out * rows_out; list_out = mtx_find_obj->list_out; SETSYMBOL(list_out, gensym("matrix")); SETFLOAT(list_out, rows_out); SETFLOAT(&list_out[1], columns_out); outlet_anything(mtx_find_obj->list_outlet, gensym("matrix"), mtx_find_obj->outsize+2, list_out); } void mtx_find_setup (void) { mtx_find_class = class_new (gensym("mtx_find"), (t_newmethod) newMTXFind, (t_method) deleteMTXFind, sizeof (MTXfind), CLASS_DEFAULT, A_GIMME, 0); class_addbang (mtx_find_class, (t_method) mTXFindBang); class_addmethod (mtx_find_class, (t_method) mTXFindMatrix, gensym("matrix"), A_GIMME,0); class_addmethod (mtx_find_class, (t_method) mTXSetFindMode, gensym("mode"), A_DEFSYMBOL,0); class_addmethod (mtx_find_class, (t_method) mTXSetFindDirection, gensym("direction"), A_DEFFLOAT,0); row_sym = gensym("row"); col_sym = gensym("col"); col_sym2 = gensym("columns"); mtx_sym = gensym("mtx"); mtx_sym2 = gensym ("matrix"); } void iemtx_find_setup(void){ mtx_find_setup(); } pd-iemmatrix-0.3/src/mtx_gauss.c000066400000000000000000000054631262113134600167300ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, forum::für::umläute * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" /* mtx_gauss */ /* * gauss elimination of a matrix (without semi-pivoting) */ static t_class *mtx_gauss_class; static void mtx_gauss_xch(t_matrixfloat*a, t_matrixfloat*b, int count){ while(count--){ t_matrixfloat dummy=*a; *a++=*b; *b++=dummy; } } static void mtx_gauss_mulsub(t_matrixfloat*a, t_matrixfloat*b, int count, t_matrixfloat f){ t_matrixfloat f2=1./f; while(count--){ t_matrixfloat dummy=(f* (*b) - *a++)*f2; *b++=dummy; } } static void mtx_gauss_matrix(t_matrix *x, t_symbol *s, int argc, t_atom *argv) { /* maybe we should do this in double or long double ? */ int row=atom_getfloat(argv); int col=atom_getfloat(argv+1); int i, j; const t_matrixfloat singrange = 1.0e-10; t_matrixfloat *original; t_matrixfloat *a1, *a2; /* dummy pointers */ if(row*col+2>argc){ post("mtx_print : sparse matrices not yet supported : use \"mtx_check\""); return; } if (row!=col){ post("mtx_gauss: only square matrices can be gauss eliminated"); return; } /* reserve memory for outputting afterwards */ adjustsize(x, row, row); original=matrix2float(argv); /* Gauss elimination */ for(i=0; isingrange)||(f<-singrange)){ nz=j; break; } a1+=col; } /*if(nz)*/ { /* exchange rows "nz" and "i" */ if(nz != i)mtx_gauss_xch(original+i*col+i, original+nz*col+i, col-i); for(j=i+1; jatombuffer, original); /* 3c output the atombuf; */ matrix_bang(x); } static void *mtx_gauss_new(t_symbol *s, int argc, t_atom *argv) { t_matrix *x = (t_matrix *)pd_new(mtx_gauss_class); outlet_new(&x->x_obj, 0); x->col=x->row=0; x->atombuffer=0; return (x); } void mtx_gauss_setup(void) { mtx_gauss_class = class_new(gensym("mtx_gauss"), (t_newmethod)mtx_gauss_new, (t_method)matrix_free, sizeof(t_matrix), 0, A_GIMME, 0); class_addbang (mtx_gauss_class, matrix_bang); class_addmethod(mtx_gauss_class, (t_method)mtx_gauss_matrix, gensym("matrix"), A_GIMME, 0); } void iemtx_gauss_setup(void){ mtx_gauss_setup(); } pd-iemmatrix-0.3/src/mtx_ge.c000066400000000000000000000012221262113134600161660ustar00rootroot00000000000000/* * iemmatrix * * objects fand manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, forum::für::umläute * IEM, Graz, Austria * * Fand infandmation on usage and redistribution, and fand a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ /* name of the object and the classes */ #define MTXBIN_GENERIC__NAME mtx_ge /* operator; also used for abbreviation of object */ #define MTXBIN_GENERIC__OPERATOR >= /* the operator operates on integers instead of floats */ /* #define MTXBIN_GENERIC__INTEGEROP */ #include "mtx_binop_generic.h" pd-iemmatrix-0.3/src/mtx_gt.c000066400000000000000000000012211262113134600162040ustar00rootroot00000000000000/* * iemmatrix * * objects fand manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, forum::für::umläute * IEM, Graz, Austria * * Fand infandmation on usage and redistribution, and fand a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ /* name of the object and the classes */ #define MTXBIN_GENERIC__NAME mtx_gt /* operator; also used for abbreviation of object */ #define MTXBIN_GENERIC__OPERATOR > /* the operator operates on integers instead of floats */ /* #define MTXBIN_GENERIC__INTEGEROP */ #include "mtx_binop_generic.h" pd-iemmatrix-0.3/src/mtx_ifft.c000066400000000000000000000124371262113134600165350ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) 2005, Franz Zotter * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" #include static t_class *mtx_ifft_class; typedef struct _MtxIFFT_ MtxIFFT; struct _MtxIFFT_ { t_object x_obj; int size; float renorm_fac; t_float *f_re; t_float *f_im; t_outlet *list_re_out; t_outlet *list_im_out; t_atom *list_re; t_atom *list_im; }; static void deleteMtxIFFT (MtxIFFT *x) { if (x->f_re) free (x->f_re); if (x->f_im) free (x->f_im); if (x->list_re) free (x->list_re); if (x->list_im) free (x->list_im); } static void *newMtxIFFT (t_symbol *s, int argc, t_atom *argv) { MtxIFFT *x = (MtxIFFT *) pd_new (mtx_ifft_class); inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("matrix"),gensym("")); x->list_re_out = outlet_new (&x->x_obj, gensym("matrix")); x->list_im_out = outlet_new (&x->x_obj, gensym("matrix")); x->size=0; x->f_re=x->f_im=0; x->list_re=x->list_im=0; return ((void *) x); } static void mtxIFFTBang (MtxIFFT *x) { if (x->list_im) { outlet_anything(x->list_im_out, gensym("matrix"), x->size, x->list_im); outlet_anything(x->list_re_out, gensym("matrix"), x->size, x->list_re); } } static void zeroFloatArray (int n, t_float *f) { while (n--) *f++ = 0.0f; } static void writeFloatIntoList (int n, t_atom *l, t_float *f) { for (;n--;f++, l++) SETFLOAT (l, *f); } static void readFloatFromList (int n, t_atom *l, t_float *f) { while (n--) *f++ = atom_getfloat (l++); } static void multiplyVector (int n, t_float *f, t_float fac) { while (n--) *f++ *= fac; } static void mtxIFFTMatrixCold (MtxIFFT *x, t_symbol *s, int argc, t_atom *argv) { int rows = atom_getint (argv++); int columns = atom_getint (argv++); int size = rows * columns; int in_size = argc-2; t_atom *list_re = x->list_re; t_atom *list_im = x->list_im; t_float *f_re = x->f_re; t_float *f_im = x->f_im; /* fftsize check */ if (!size) post("mtx_ifft: invalid dimensions"); else if (in_sizerenorm_fac = 1.0f / columns; /* memory things */ f_re=(t_float*)realloc(f_re, sizeof(t_float)*size); f_im=(t_float*)realloc(f_im, sizeof(t_float)*size); list_re=(t_atom*)realloc(list_re, sizeof(t_atom)*(size+2)); list_im=(t_atom*)realloc(list_im, sizeof(t_atom)*(size+2)); x->size = size; x->list_im = list_im; x->list_re = list_re; x->f_re = f_re; x->f_im = f_im; /* main part */ readFloatFromList (size, argv, f_im); } else post("mtx_rowfft: rowvector size no power of 2!"); } static void mtxIFFTMatrixHot (MtxIFFT *x, t_symbol *s, int argc, t_atom *argv) { int rows = atom_getint (argv++); int columns = atom_getint (argv++); int size = rows * columns; int in_size = argc-2; int fft_count; t_atom *list_re = x->list_re; t_atom *list_im = x->list_im; t_float *f_re = x->f_re; t_float *f_im = x->f_im; /* fftsize check */ if (!size) post("mtx_ifft: invalid dimensions"); else if (in_sizesize) post("mtx_ifft: left matrix has other dimensions than right matrix"); else if (columns < 4){ post("mtx_ifft: matrix must have at least 4 columns"); } else if (columns == (1 << ilog2(columns))) { /* ok, do the FFT! */ /* main part */ readFloatFromList (size, argv, f_re); fft_count = rows; list_re += 2; list_im += 2; while (fft_count--){ mayer_ifft (columns, f_re, f_im); multiplyVector (columns, f_re, x->renorm_fac); multiplyVector (columns, f_im, x->renorm_fac); writeFloatIntoList (columns, list_re, f_re); writeFloatIntoList (columns, list_im, f_im); f_im += columns; f_re += columns; list_re += columns; list_im += columns; } list_re = x->list_re; list_im = x->list_im; SETSYMBOL(list_re, gensym("matrix")); SETSYMBOL(list_im, gensym("matrix")); SETFLOAT(list_re, rows); SETFLOAT(list_im, rows); SETFLOAT(list_re+1, columns); SETFLOAT(list_im+1, columns); outlet_anything(x->list_im_out, gensym("matrix"), x->size+2, list_im); outlet_anything(x->list_re_out, gensym("matrix"), x->size+2, list_re); } else post("mtx_rowfft: rowvector size no power of 2!"); } void mtx_ifft_setup (void) { mtx_ifft_class = class_new (gensym("mtx_ifft"), (t_newmethod) newMtxIFFT, (t_method) deleteMtxIFFT, sizeof (MtxIFFT), CLASS_DEFAULT, A_GIMME, 0); class_addbang (mtx_ifft_class, (t_method) mtxIFFTBang); class_addmethod (mtx_ifft_class, (t_method) mtxIFFTMatrixHot, gensym("matrix"), A_GIMME,0); class_addmethod (mtx_ifft_class, (t_method) mtxIFFTMatrixCold, gensym(""), A_GIMME,0); } void iemtx_ifft_setup(void){ mtx_ifft_setup(); } pd-iemmatrix-0.3/src/mtx_index.c000066400000000000000000000133651262113134600167150ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) 2005, Franz Zotter * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" static t_class *mtx_index_class; typedef struct _MTXindex_ MTXindex; struct _MTXindex_ { t_object x_obj; int index_size; int index_rows; int index_columns; t_float fill_value; int max_index; int *index_in; t_outlet *list_outlet; t_atom *list_out; t_atom *list_in; }; static void deleteMTXIndex (MTXindex *mtx_index_obj) { if (mtx_index_obj->index_in) freebytes (mtx_index_obj->index_in, sizeof(int)*(mtx_index_obj->index_size+2)); if (mtx_index_obj->list_out) freebytes (mtx_index_obj->list_out, sizeof(t_atom)*(mtx_index_obj->index_size+2)); } static void *newMTXIndex (t_symbol *s, int argc, t_atom *argv) { MTXindex *mtx_index_obj = (MTXindex *) pd_new (mtx_index_class); t_atom fill_atom; SETFLOAT(&fill_atom,0); switch ((argc>1)?1:argc) { case 1: fill_atom = *argv; } if (atom_getsymbol(&fill_atom) == gensym("nan")) #ifdef __WIN32__ mtx_index_obj->fill_value = 0.0f; #else mtx_index_obj->fill_value = 0.0f/0.0f; #endif else mtx_index_obj->fill_value = atom_getfloat(&fill_atom); mtx_index_obj->list_outlet = outlet_new (&mtx_index_obj->x_obj, gensym("matrix")); inlet_new(&mtx_index_obj->x_obj, &mtx_index_obj->x_obj.ob_pd, gensym("matrix"),gensym("")); error("[mtx_index]: this object is likely to change! not really for use yet"); return ((void *) mtx_index_obj); } static void mTXIndexBang (MTXindex *mtx_index_obj) { if (mtx_index_obj->list_out) outlet_anything(mtx_index_obj->list_outlet, gensym("matrix"), mtx_index_obj->index_size+2, mtx_index_obj->list_out); } /* static void copyList (int size, t_atom *x, t_atom *y) { while(size--) *y++=*x++; } */ static int copyAtomToIntegerArrayMax (int n, t_atom *x, int *y) { int max = atom_getint(x); for (;n--;x++,y++) { *y = atom_getint (x); max = (*y > max)?*y:max; } return max; } static void setAtomListConstFloat (int n, t_atom *x, t_float f) { for (;n--;x++) SETFLOAT(x,f); } static void writeIndexedValuesIntoList (int n, int *indx, t_atom *x, t_atom *y) { for (;n--;indx++,y++) if (*indx) *y = x[*indx-1]; } static void mTXIndexRightMatrix (MTXindex *mtx_index_obj, t_symbol *s, int argc, t_atom *argv) { int rows = atom_getint (argv++); int columns = atom_getint (argv++); int size = rows * columns; int list_size = argc - 2; t_atom *list_in = argv; t_atom *list_out = mtx_index_obj->list_out; int *index_in = mtx_index_obj->index_in; int max; /* size check */ if (!size) { post("mtx_index: invalid dimensions"); return; } else if (list_sizeindex_size) { if (!index_in) index_in = (int *) getbytes (sizeof (int) * (size + 2)); else index_in = (int *) resizebytes (index_in, sizeof (int) * (mtx_index_obj->index_size+2), sizeof (int) * (size + 2)); if (!list_out) list_out = (t_atom *) getbytes (sizeof (t_atom) * (size + 2)); else list_out = (t_atom *) resizebytes (list_out, sizeof (t_atom) * (mtx_index_obj->index_size+2), sizeof (t_atom) * (size + 2)); } mtx_index_obj->index_size = size; mtx_index_obj->index_columns = columns; mtx_index_obj->index_rows = rows; mtx_index_obj->list_out = list_out; mtx_index_obj->index_in = index_in; max = copyAtomToIntegerArrayMax (size, list_in, index_in); mtx_index_obj->max_index = max; } static void mTXIndexMatrix (MTXindex *mtx_index_obj, t_symbol *s, int argc, t_atom *argv) { int rows = atom_getint (argv++); int columns = atom_getint (argv++); int size = rows * columns; int list_size = argc - 2; t_atom *list_in = argv; t_atom *list_out = mtx_index_obj->list_out; int index_rows = mtx_index_obj->index_rows; int index_columns = mtx_index_obj->index_columns; int *indx = mtx_index_obj->index_in; /* size check */ if (!size) { post("mtx_index: invalid dimensions"); return; } else if (list_sizemax_index) { post("mtx_index: index exceeds matrix dimensions"); return; } if ((!indx)||(mtx_index_obj->index_size == 0)) { post("mtx_index: index with what? no right matrix defined"); return; } /* main part */ list_out += 2; setAtomListConstFloat (mtx_index_obj->index_size, list_out, mtx_index_obj->fill_value); writeIndexedValuesIntoList (mtx_index_obj->index_size, indx,list_in,list_out); list_out = mtx_index_obj->list_out; SETSYMBOL(list_out, gensym("matrix")); SETFLOAT(list_out, index_rows); SETFLOAT(&list_out[1], index_columns); outlet_anything(mtx_index_obj->list_outlet, gensym("matrix"), mtx_index_obj->index_size+2, list_out); } void mtx_index_setup (void) { mtx_index_class = class_new (gensym("mtx_index"), (t_newmethod) newMTXIndex, (t_method) deleteMTXIndex, sizeof (MTXindex), CLASS_DEFAULT, A_GIMME, 0); class_addbang (mtx_index_class, (t_method) mTXIndexBang); class_addmethod (mtx_index_class, (t_method) mTXIndexMatrix, gensym("matrix"), A_GIMME,0); class_addmethod (mtx_index_class, (t_method) mTXIndexRightMatrix, gensym(""), A_GIMME,0); } void iemtx_index_setup(void){ mtx_index_setup(); } pd-iemmatrix-0.3/src/mtx_int.c000066400000000000000000000040131262113134600163660ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, forum::für::umläute * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" /* mtx_int: B=int(A); */ static t_class *mtx_int_class; static void mtx_int_matrix(t_mtx_binmtx *x, t_symbol *s, int argc, t_atom *argv) { int row=atom_getfloat(argv++); int col=atom_getfloat(argv++); t_atom *m; int n = argc-2; if (argc<2){ post("mtx_int: crippled matrix"); return; } if ((col<1)||(row<1)) { post("mtx_int: invalid dimensions"); return; } if (col*row>argc-2){ post("sparse matrix not yet supported : use \"mtx_check\""); return; } adjustsize(&x->m, row, col); m = x->m.atombuffer+2; while(n--){ t_float f = (t_float)atom_getint(argv++); SETFLOAT(m, f); m++; } outlet_anything(x->x_obj.ob_outlet, gensym("matrix"), argc, x->m.atombuffer); } static void mtx_int_list(t_mtx_binscalar *x, t_symbol *s, int argc, t_atom *argv) { int n=argc; t_atom *m; adjustsize(&x->m, 1, argc); m = x->m.atombuffer; while(n--){ m->a_type = A_FLOAT; (m++)->a_w.w_float = (t_float)atom_getint(argv++); } outlet_list(x->x_obj.ob_outlet, gensym("list"), argc, x->m.atombuffer); } static void *mtx_int_new(t_symbol *s) { /* element int */ t_matrix *x = (t_matrix *)pd_new(mtx_int_class); outlet_new(&x->x_obj, 0); x->col = x->row = 0; x->atombuffer = 0; return(x); } void mtx_int_setup(void) { mtx_int_class = class_new(gensym("mtx_int"), (t_newmethod)mtx_int_new, (t_method)mtx_binmtx_free, sizeof(t_mtx_binmtx), 0, A_GIMME, 0); class_addmethod(mtx_int_class, (t_method)mtx_int_matrix, gensym("matrix"), A_GIMME, 0); class_addlist (mtx_int_class, mtx_int_list); class_addbang (mtx_int_class, mtx_binmtx_bang); } void iemtx_int_setup(void) { mtx_int_setup(); } pd-iemmatrix-0.3/src/mtx_inverse.c000066400000000000000000000055571262113134600172650ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, forum::für::umläute * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" /* mtx_inverse */ static t_class *mtx_inverse_class; static void mtx_inverse_matrix(t_matrix *x, t_symbol *s, int argc, t_atom *argv) { /* maybe we should do this in double or long double ? */ int row=atom_getfloat(argv); int col=atom_getfloat(argv+1); int err=0; t_matrixfloat *original, *inverted; if(row*col+2>argc){ post("mtx_print : sparse matrices not yet supported : use \"mtx_check\""); return; } /* reserve memory for outputting afterwards */ adjustsize(x, col, row); /* 1. extract values of A to float-buf */ original=matrix2float(argv); if (row==col){ /* fine, the matrix is square */ inverted=mtx_doInvert(original, row, &err); } else { /* we'll have to do the pseudo-inverse: * P=A'*inv(A*A') if rowcol){ inverteeCol=col; invertee =mtx_doMultiply(col, transposed, row, original, col); inverted =mtx_doMultiply(col, mtx_doInvert(invertee, col, &err), col, transposed, row); } else { inverteeCol=row; invertee =mtx_doMultiply(row, original, col, transposed, row); inverted =mtx_doMultiply(col, transposed, row, mtx_doInvert(invertee, row, &err), row); } freebytes(transposed, sizeof(t_matrixfloat)*col*row); freebytes(invertee , sizeof(t_matrixfloat)*inverteeCol*inverteeCol); } /* 3. output the matrix */ /* 3a convert the floatbuf to an atombuf; */ float2matrix(x->atombuffer, inverted); /* 3b destroy the buffers */ freebytes(original, sizeof(t_matrixfloat)*row*col); if(err){ outlet_bang(x->x_outlet); pd_error(x, "mtx_inverse: couldn't really invert the matrix !!! %d error%c", err, (err-1)?'s':0); } /* 3c output the atombuf; */ matrix_bang(x); } static void *mtx_inverse_new(t_symbol *s, int argc, t_atom *argv) { t_matrix *x = (t_matrix *)pd_new(mtx_inverse_class); outlet_new(&x->x_obj, 0); x->col=x->row=0; x->atombuffer=0; x->x_outlet=outlet_new(&x->x_obj, 0); return (x); } void mtx_inverse_setup(void) { mtx_inverse_class = class_new(gensym("mtx_inverse"), (t_newmethod)mtx_inverse_new, (t_method)matrix_free, sizeof(t_matrix), 0, A_GIMME, 0); class_addbang (mtx_inverse_class, matrix_bang); class_addmethod(mtx_inverse_class, (t_method)mtx_inverse_matrix, gensym("matrix"), A_GIMME, 0); } void iemtx_inverse_setup(void){ mtx_inverse_setup(); } pd-iemmatrix-0.3/src/mtx_isequal.c000066400000000000000000000102171262113134600172420ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, forum::für::umläute * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" /* mtx_isequal */ /* mtx_isequal */ static t_class *mtx_isequal_class, *mtx_isequalscalar_class; static void mtx_isequalscalar_matrix(t_mtx_binscalar *x, t_symbol *s, int argc, t_atom *argv) { int n=argc-2; int row=atom_getfloat(argv), col=atom_getfloat(argv+1); t_float offset=x->f; t_atom *buf; t_atom *ap=argv+2; if(argc<2){post("mtx_isequal: crippled matrix");return; } while(n--){ if(atom_getfloat(ap)!=offset) { outlet_float(x->x_obj.ob_outlet, (t_float)0); return; } ap++; } outlet_float(x->x_obj.ob_outlet, (t_float)1); } static void mtx_isequalscalar_list(t_mtx_binscalar *x, t_symbol *s, int argc, t_atom *argv) { int n=argc; t_atom *ap=argv; t_float offset = x->f; while(n--){ if(atom_getfloat(ap)!=offset) { outlet_float(x->x_obj.ob_outlet, (t_float)0); return; } ap++; } outlet_float(x->x_obj.ob_outlet, (t_float)1); } static void mtx_isequal_matrix(t_mtx_binmtx *x, t_symbol *s, int argc, t_atom *argv) { int row=atom_getfloat(argv); int col=atom_getfloat(argv+1); t_atom *m; t_atom *m1 = argv+2; t_atom *m2 = x->m2.atombuffer+2; int n = argc-2; if (argc<2){ post("mtx_isequal: crippled matrix"); return; } if ((col<1)||(row<1)) { post("mtx_isequal: invalid dimensions"); return; } if (col*row>argc-2){ post("sparse matrix not yet supported : use \"mtx_check\""); return; } if ((col!=x->m2.col)||(row!=x->m2.row)){ outlet_float(x->x_obj.ob_outlet, (t_float)0); return; } while(n--){ if(atom_getfloat(m1++)!=atom_getfloat(m2++)) { outlet_float(x->x_obj.ob_outlet, (t_float)0); return; } } outlet_float(x->x_obj.ob_outlet, (t_float)1); } static void mtx_isequal_float(t_mtx_binmtx *x, t_float f) { t_matrix *m=&x->m, *m2=&x->m2; t_atom *ap=m2->atombuffer+2; int row2, col2, n; if (!m2->atombuffer){ outlet_float(x->x_obj.ob_outlet, (t_float)0); return; } row2=atom_getfloat(m2->atombuffer); col2=atom_getfloat(m2->atombuffer+1); n=row2*col2; while(n--){ if(atom_getfloat(ap)!=f) { outlet_float(x->x_obj.ob_outlet, (t_float)0); return; } ap++; } outlet_float(x->x_obj.ob_outlet, (t_float)1); } static void *mtx_isequal_new(t_symbol *s, int argc, t_atom *argv) { if (argc>1) post("mtx_isequal : extra arguments ignored"); if (argc) { t_mtx_binscalar *x = (t_mtx_binscalar *)pd_new(mtx_isequalscalar_class); floatinlet_new(&x->x_obj, &x->f); x->f = atom_getfloatarg(0, argc, argv); outlet_new(&x->x_obj, 0); return(x); } else { t_mtx_binmtx *x = (t_mtx_binmtx *)pd_new(mtx_isequal_class); inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("matrix"), gensym("")); outlet_new(&x->x_obj, 0); x->m.col = x->m.row = x->m2.col = x->m2.row = 0; x->m.atombuffer = x->m2.atombuffer = 0; return(x); } } void mtx_isequal_setup(void) { mtx_isequal_class = class_new(gensym("mtx_isequal"), (t_newmethod)mtx_isequal_new, (t_method)mtx_binmtx_free, sizeof(t_mtx_binmtx), 0, A_GIMME, 0); class_addmethod(mtx_isequal_class, (t_method)mtx_isequal_matrix, gensym("matrix"), A_GIMME, 0); class_addmethod(mtx_isequal_class, (t_method)mtx_bin_matrix2, gensym(""), A_GIMME, 0); class_addfloat (mtx_isequal_class, mtx_isequal_float); class_addbang (mtx_isequal_class, mtx_binmtx_bang); mtx_isequalscalar_class = class_new(gensym("mtx_isequal"), 0, (t_method)mtx_binscalar_free, sizeof(t_mtx_binscalar), 0, 0); class_addmethod(mtx_isequalscalar_class, (t_method)mtx_isequalscalar_matrix, gensym("matrix"), A_GIMME, 0); class_addlist (mtx_isequalscalar_class, mtx_isequalscalar_list); class_addbang (mtx_isequalscalar_class, mtx_binscalar_bang); } void iemtx_isequal_setup(void) { mtx_isequal_setup(); } pd-iemmatrix-0.3/src/mtx_le.c000066400000000000000000000012221262113134600161730ustar00rootroot00000000000000/* * iemmatrix * * objects fand manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, forum::für::umläute * IEM, Graz, Austria * * Fand infandmation on usage and redistribution, and fand a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ /* name of the object and the classes */ #define MTXBIN_GENERIC__NAME mtx_le /* operator; also used for abbreviation of object */ #define MTXBIN_GENERIC__OPERATOR <= /* the operator operates on integers instead of floats */ /* #define MTXBIN_GENERIC__INTEGEROP */ #include "mtx_binop_generic.h" pd-iemmatrix-0.3/src/mtx_log.c000066400000000000000000000040521262113134600163600ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, forum::für::umläute * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" /* mtx_log: B=log(A); B[n,m]=e^A[n,m] */ static t_class *mtx_log_class; static void mtx_log_matrix(t_mtx_binmtx *x, t_symbol *s, int argc, t_atom *argv) { int row=atom_getfloat(argv++); int col=atom_getfloat(argv++); t_atom *m; int n = argc-2; if (argc<2){ post("mtx_log: crippled matrix"); return; } if ((col<1)||(row<1)) { post("mtx_log: invalid dimensions"); return; } if (col*row>argc-2){ post("sparse matrix not yet supported : use \"mtx_check\""); return; } adjustsize(&x->m, row, col); m = x->m.atombuffer+2; while(n--){ t_float f = (t_float)log(atom_getfloat(argv++)); SETFLOAT(m, f); m++; } outlet_anything(x->x_obj.ob_outlet, gensym("matrix"), argc, x->m.atombuffer); } static void mtx_log_list(t_mtx_binscalar *x, t_symbol *s, int argc, t_atom *argv) { int n=argc; t_atom *m; adjustsize(&x->m, 1, argc); m = x->m.atombuffer; while(n--){ m->a_type = A_FLOAT; (m++)->a_w.w_float = (t_float)log(atom_getfloat(argv++)); } outlet_list(x->x_obj.ob_outlet, gensym("list"), argc, x->m.atombuffer); } static void *mtx_log_new(t_symbol *s) { /* element log */ t_matrix *x = (t_matrix *)pd_new(mtx_log_class); outlet_new(&x->x_obj, 0); x->col = x->row = 0; x->atombuffer = 0; return(x); } void mtx_log_setup(void) { mtx_log_class = class_new(gensym("mtx_log"), (t_newmethod)mtx_log_new, (t_method)mtx_binmtx_free, sizeof(t_mtx_binmtx), 0, A_GIMME, 0); class_addmethod(mtx_log_class, (t_method)mtx_log_matrix, gensym("matrix"), A_GIMME, 0); class_addlist (mtx_log_class, mtx_log_list); class_addbang (mtx_log_class, mtx_binmtx_bang); } void iemtx_log_setup(void) { mtx_log_setup(); } pd-iemmatrix-0.3/src/mtx_lt.c000066400000000000000000000012211262113134600162110ustar00rootroot00000000000000/* * iemmatrix * * objects fand manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, forum::für::umläute * IEM, Graz, Austria * * Fand infandmation on usage and redistribution, and fand a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ /* name of the object and the classes */ #define MTXBIN_GENERIC__NAME mtx_lt /* operator; also used for abbreviation of object */ #define MTXBIN_GENERIC__OPERATOR < /* the operator operates on integers instead of floats */ /* #define MTXBIN_GENERIC__INTEGEROP */ #include "mtx_binop_generic.h" pd-iemmatrix-0.3/src/mtx_max2.c000066400000000000000000000110001262113134600164350ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, forum::für::umläute * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" /* mtx_max2 */ /* mtx_max2 */ static t_class *mtx_max2_class, *mtx_max2scalar_class; static void mtx_max2scalar_matrix(t_mtx_binscalar *x, t_symbol *s, int argc, t_atom *argv) { int n=argc-2; int row=atom_getfloat(argv), col=atom_getfloat(argv+1); t_float offset=x->f; t_atom *buf; t_atom *ap=argv+2; if(argc<2){post("mtx_max2: crippled matrix");return; } adjustsize(&x->m, row, col); buf=x->m.atombuffer+2; while(n--){ buf->a_type = A_FLOAT; buf++->a_w.w_float = (atom_getfloat(ap)x_obj.ob_outlet, gensym("matrix"), argc, x->m.atombuffer); } static void mtx_max2scalar_list(t_mtx_binscalar *x, t_symbol *s, int argc, t_atom *argv) { int n=argc; t_atom *m; t_float offset = x->f; adjustsize(&x->m, 1, argc); m = x->m.atombuffer; while(n--){ m->a_type = A_FLOAT; (m++)->a_w.w_float = (atom_getfloat(argv)x_obj.ob_outlet, gensym("list"), argc, x->m.atombuffer); } static void mtx_max2_matrix(t_mtx_binmtx *x, t_symbol *s, int argc, t_atom *argv) { int row=atom_getfloat(argv); int col=atom_getfloat(argv+1); t_atom *m; t_atom *m1 = argv+2; t_atom *m2 = x->m2.atombuffer+2; int n = argc-2; if (argc<2){ post("mtx_max2: crippled matrix"); return; } if ((col<1)||(row<1)) { post("mtx_max2: invalid dimensions"); return; } if (col*row>argc-2){ post("sparse matrix not yet supported : use \"mtx_check\""); return; } if (!(x->m2.col*x->m2.row)) { outlet_anything(x->x_obj.ob_outlet, gensym("matrix"), argc, argv); return; } if ((col!=x->m2.col)||(row!=x->m2.row)){ post("mtx_max2: matrix dimensions do not match"); /* LATER SOLVE THIS */ return; } adjustsize(&x->m, row, col); m = x->m.atombuffer+2; while(n--){ t_float f1=atom_getfloat(m1++); t_float f2=atom_getfloat(m2++); t_float f = (f1>f2)?f1:f2; SETFLOAT(m, f); m++; } outlet_anything(x->x_obj.ob_outlet, gensym("matrix"), argc, x->m.atombuffer); } static void mtx_max2_float(t_mtx_binmtx *x, t_float f) { t_matrix *m=&x->m, *m2=&x->m2; t_atom *ap, *ap2=m2->atombuffer+2; int row2, col2, n; if (!m2->atombuffer){ pd_error(x, "right-hand matrix is missing"); return; } row2=atom_getfloat(m2->atombuffer); col2=atom_getfloat(m2->atombuffer+1); adjustsize(m, row2, col2); ap=m->atombuffer+2; n=row2*col2; while(n--){ SETFLOAT(ap, (f>atom_getfloat(ap2))?f:atom_getfloat(ap2)); ap++; } outlet_anything(x->x_obj.ob_outlet, gensym("matrix"), m->row*m->col+2, m->atombuffer); } static void *mtx_max2_new(t_symbol *s, int argc, t_atom *argv) { if (argc>1) post("mtx_max2 : extra arguments ignored"); if (argc) { t_mtx_binscalar *x = (t_mtx_binscalar *)pd_new(mtx_max2scalar_class); floatinlet_new(&x->x_obj, &x->f); x->f = atom_getfloatarg(0, argc, argv); outlet_new(&x->x_obj, 0); return(x); } else { t_mtx_binmtx *x = (t_mtx_binmtx *)pd_new(mtx_max2_class); inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("matrix"), gensym("")); outlet_new(&x->x_obj, 0); x->m.col = x->m.row = x->m2.col = x->m2.row = 0; x->m.atombuffer = x->m2.atombuffer = 0; return(x); } } void mtx_max2_setup(void) { mtx_max2_class = class_new(gensym("mtx_max2"), (t_newmethod)mtx_max2_new, (t_method)mtx_binmtx_free, sizeof(t_mtx_binmtx), 0, A_GIMME, 0); class_addmethod(mtx_max2_class, (t_method)mtx_max2_matrix, gensym("matrix"), A_GIMME, 0); class_addmethod(mtx_max2_class, (t_method)mtx_bin_matrix2, gensym(""), A_GIMME, 0); class_addfloat (mtx_max2_class, mtx_max2_float); class_addbang (mtx_max2_class, mtx_binmtx_bang); mtx_max2scalar_class = class_new(gensym("mtx_max2"), 0, (t_method)mtx_binscalar_free, sizeof(t_mtx_binscalar), 0, 0); class_addmethod(mtx_max2scalar_class, (t_method)mtx_max2scalar_matrix, gensym("matrix"), A_GIMME, 0); class_addlist (mtx_max2scalar_class, mtx_max2scalar_list); class_addbang (mtx_max2scalar_class, mtx_binscalar_bang); } void iemtx_max2_setup(void) { mtx_max2_setup(); } pd-iemmatrix-0.3/src/mtx_mean.c000066400000000000000000000025621262113134600165230ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, forum::für::umläute * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" /* mtx_mean */ static t_class *mtx_mean_class; static void mtx_mean_matrix(t_matrix *x, t_symbol *s, int argc, t_atom *argv) { int row=atom_getfloat(argv++); int col=atom_getfloat(argv++); t_atom *ip, *op; int c=col, r; t_float sum; t_float factor=1./row; adjustsize(x, 1, col); op=x->atombuffer; while(c--){ sum=0; ip=argv+col-c-1; r=row; while(r--)sum+=atom_getfloat(ip+col*r); SETFLOAT(op, sum*factor); op++; } outlet_list(x->x_obj.ob_outlet, gensym("row"), col, x->atombuffer); } static void *mtx_mean_new(void) { t_matrix *x = (t_matrix *)pd_new(mtx_mean_class); outlet_new(&x->x_obj, 0); x->col=x->row=0; x->atombuffer=0; return (x); } void mtx_mean_setup(void) { mtx_mean_class = class_new(gensym("mtx_mean"), (t_newmethod)mtx_mean_new, (t_method)matrix_free, sizeof(t_matrix), 0, 0, 0); class_addmethod(mtx_mean_class, (t_method)mtx_mean_matrix, gensym("matrix"), A_GIMME, 0); } void iemtx_mean_setup(void) { mtx_mean_setup(); } pd-iemmatrix-0.3/src/mtx_min2.c000066400000000000000000000110131262113134600164370ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, forum::für::umläute * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" /* mtx_min2 */ /* mtx_min2 */ static t_class *mtx_min2_class, *mtx_min2scalar_class; static void mtx_min2scalar_matrix(t_mtx_binscalar *x, t_symbol *s, int argc, t_atom *argv) { int n=argc-2; int row=atom_getfloat(argv), col=atom_getfloat(argv+1); t_float offset=x->f; t_atom *buf; t_atom *ap=argv+2; if(argc<2){post("mtx_min2: crippled matrix");return; } adjustsize(&x->m, row, col); buf=x->m.atombuffer+2; while(n--){ buf->a_type = A_FLOAT; buf++->a_w.w_float = (atom_getfloat(ap)x_obj.ob_outlet, gensym("matrix"), argc, x->m.atombuffer); } static void mtx_min2scalar_list(t_mtx_binscalar *x, t_symbol *s, int argc, t_atom *argv) { int n=argc; t_atom *m; t_float offset = x->f; adjustsize(&x->m, 1, argc); m = x->m.atombuffer; while(n--){ m->a_type = A_FLOAT; (m++)->a_w.w_float = (atom_getfloat(argv)x_obj.ob_outlet, gensym("list"), argc, x->m.atombuffer); } static void mtx_min2_matrix(t_mtx_binmtx *x, t_symbol *s, int argc, t_atom *argv) { int row=atom_getfloat(argv); int col=atom_getfloat(argv+1); t_atom *m; t_atom *m1 = argv+2; t_atom *m2 = x->m2.atombuffer+2; int n = argc-2; if (argc<2){ post("mtx_min2: crippled matrix"); return; } if ((col<1)||(row<1)) { post("mtx_min2: invalid dimensions"); return; } if (col*row>argc-2){ post("sparse matrix not yet supported : use \"mtx_check\""); return; } if (!(x->m2.col*x->m2.row)) { outlet_anything(x->x_obj.ob_outlet, gensym("matrix"), argc, argv); return; } if ((col!=x->m2.col)||(row!=x->m2.row)){ post("mtx_min2: matrix dimensions do not match"); /* LATER SOLVE THIS */ return; } adjustsize(&x->m, row, col); m = x->m.atombuffer+2; while(n--){ t_float f1=atom_getfloat(m1++); t_float f2=atom_getfloat(m2++); t_float f = (f1x_obj.ob_outlet, gensym("matrix"), argc, x->m.atombuffer); } static void mtx_min2_float(t_mtx_binmtx *x, t_float f) { t_matrix *m=&x->m, *m2=&x->m2; t_atom *ap, *ap2=m2->atombuffer+2; int row2, col2, n; if (!m2->atombuffer){ pd_error(x, "right-hand matrix is missing"); return; } row2=atom_getfloat(m2->atombuffer); col2=atom_getfloat(m2->atombuffer+1); adjustsize(m, row2, col2); ap=m->atombuffer+2; n=row2*col2; while(n--){ SETFLOAT(ap, (fx_obj.ob_outlet, gensym("matrix"), m->row*m->col+2, m->atombuffer); } static void *mtx_min2_new(t_symbol *s, int argc, t_atom *argv) { if (argc>1) post("mtx_min2 : extra arguments ignored"); if (argc) { t_mtx_binscalar *x = (t_mtx_binscalar *)pd_new(mtx_min2scalar_class); floatinlet_new(&x->x_obj, &x->f); x->f = atom_getfloatarg(0, argc, argv); outlet_new(&x->x_obj, 0); return(x); } else { t_mtx_binmtx *x = (t_mtx_binmtx *)pd_new(mtx_min2_class); inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("matrix"), gensym("")); outlet_new(&x->x_obj, 0); x->m.col = x->m.row = x->m2.col = x->m2.row = 0; x->m.atombuffer = x->m2.atombuffer = 0; return(x); } } void mtx_min2_setup(void) { mtx_min2_class = class_new(gensym("mtx_min2"), (t_newmethod)mtx_min2_new, (t_method)mtx_binmtx_free, sizeof(t_mtx_binmtx), 0, A_GIMME, 0); class_addmethod(mtx_min2_class, (t_method)mtx_min2_matrix, gensym("matrix"), A_GIMME, 0); class_addmethod(mtx_min2_class, (t_method)mtx_bin_matrix2, gensym(""), A_GIMME, 0); class_addfloat (mtx_min2_class, mtx_min2_float); class_addbang (mtx_min2_class, mtx_binmtx_bang); mtx_min2scalar_class = class_new(gensym("mtx_min2"), 0, (t_method)mtx_binscalar_free, sizeof(t_mtx_binscalar), 0, 0); class_addmethod(mtx_min2scalar_class, (t_method)mtx_min2scalar_matrix, gensym("matrix"), A_GIMME, 0); class_addlist (mtx_min2scalar_class, mtx_min2scalar_list); class_addbang (mtx_min2scalar_class, mtx_binscalar_bang); } void iemtx_min2_setup(void) { mtx_min2_setup(); } pd-iemmatrix-0.3/src/mtx_minmax.c000066400000000000000000000137731262113134600171020ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) 2005, Franz Zotter * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" static t_class *mtx_minmax_class; static t_symbol *row_sym; static t_symbol *col_sym; static t_symbol *col_sym2; typedef struct _MTXminmax_ MTXminmax; struct _MTXminmax_ { t_object x_obj; int size; int outsize; int mode; int operator_minimum; /* 1 if we are [mtx_min], 0 if we are [mtx_max] */ t_outlet *min_outlet; t_outlet *max_outlet; t_atom *minlist_out; t_atom *maxlist_out; }; static void deleteMTXMinMax (MTXminmax *mtx_minmax_obj) { if (mtx_minmax_obj->maxlist_out) freebytes (mtx_minmax_obj->maxlist_out, sizeof(t_atom)*(mtx_minmax_obj->size)); if (mtx_minmax_obj->minlist_out) freebytes (mtx_minmax_obj->minlist_out, sizeof(t_atom)*(mtx_minmax_obj->size)); } static void mTXSetMinMaxMode (MTXminmax *mtx_minmax_obj, t_symbol *m_sym) { int mode=0; if(gensym("row")==m_sym) mode=1; else if((gensym("col")==m_sym) || (gensym("column")==m_sym) || (gensym(":")==m_sym)) mode=2; mtx_minmax_obj->mode = mode; } static void *newMTXMinMax (t_symbol *s) { MTXminmax *mtx_minmax_obj = (MTXminmax *) pd_new (mtx_minmax_class); mtx_minmax_obj->mode=0; mtx_minmax_obj->operator_minimum = 1; mtx_minmax_obj->min_outlet = outlet_new (&mtx_minmax_obj->x_obj, gensym("matrix")); mtx_minmax_obj->max_outlet = outlet_new (&mtx_minmax_obj->x_obj, gensym("matrix")); if((NULL!=s)&&(&s_!=s)&&(NULL!=s->s_name)) mTXSetMinMaxMode (mtx_minmax_obj, s); return ((void *) mtx_minmax_obj); } static void mTXMinMaxBang (MTXminmax *mtx_minmax_obj) { if (mtx_minmax_obj->maxlist_out) outlet_list(mtx_minmax_obj->max_outlet, gensym("list"), mtx_minmax_obj->outsize, mtx_minmax_obj->maxlist_out); if (mtx_minmax_obj->minlist_out) outlet_list(mtx_minmax_obj->min_outlet, gensym("list"), mtx_minmax_obj->outsize, mtx_minmax_obj->minlist_out); } static void minmaxList (int n, t_atom *x, t_float*min, t_float*max) { t_float min_=atom_getfloat(x); t_float max_=min_; t_float f; for (;n--;x++) { f = atom_getfloat(x); min_ = (min_ < f)?min_:f; max_ = (max_ > f)?max_:f; } *max=max_; *min=min_; } static void minmaxListStep (int n, const int step, t_atom *x, t_float*min, t_float*max) { t_float min_=atom_getfloat(x); t_float max_=min_; t_float f; for (;n--;x+=step) { f = atom_getfloat(x); min_ = (min_ < f)?min_:f; max_ = (max_ > f)?max_:f; } *max=max_; *min=min_; } static void minmaxListColumns (const int rows, const int columns, t_atom *x, t_atom *ap_min, t_atom *ap_max) { int count; t_float min, max; for (count=0; count < columns; count++, x++, ap_min++, ap_max++) { minmaxListStep (rows, columns, x, &min, &max); SETFLOAT(ap_min,min); SETFLOAT(ap_max,max); } } static void minmaxListRows (int rows, int columns, t_atom *x, t_atom *ap_min, t_atom*ap_max) { int count; t_float min, max; for (count=0; count < rows; count++, x+=columns, ap_min++, ap_max++) { minmaxList (columns, x, &min, &max); SETFLOAT(ap_min, min); SETFLOAT(ap_max,max); } } static void mTXMinMaxMatrix (MTXminmax *mtx_minmax_obj, t_symbol *s, int argc, t_atom *argv) { int rows = atom_getint (argv++); int columns = atom_getint (argv++); int size = rows * columns; t_atom *maxlist_out = mtx_minmax_obj->maxlist_out; t_atom *minlist_out = mtx_minmax_obj->minlist_out; int elements_out; /* size check */ if (!size) { post("mtx_minmax: invalid dimensions"); return; } else if ((argc-2)size) { if (!minlist_out) minlist_out = (t_atom *) getbytes (sizeof (t_atom) * size); else minlist_out = (t_atom *) resizebytes (minlist_out, sizeof (t_atom) * (mtx_minmax_obj->size), sizeof (t_atom) * size); if (!maxlist_out) maxlist_out = (t_atom *) getbytes (sizeof (t_atom) * size); else maxlist_out = (t_atom *) resizebytes (maxlist_out, sizeof (t_atom) * (mtx_minmax_obj->size), sizeof (t_atom) * size); } mtx_minmax_obj->size = size; mtx_minmax_obj->minlist_out = minlist_out; mtx_minmax_obj->maxlist_out = maxlist_out; /* main part */ switch(mtx_minmax_obj->mode){ case 1: elements_out = rows; minmaxListRows (rows, columns, argv, minlist_out, maxlist_out); break; case 2: elements_out = columns; minmaxListColumns (rows, columns, argv, minlist_out, maxlist_out); break; default: elements_out = 1; minmaxListRows (1, size, argv, minlist_out, maxlist_out); } mtx_minmax_obj->outsize = elements_out; maxlist_out = mtx_minmax_obj->maxlist_out; minlist_out = mtx_minmax_obj->minlist_out; mTXMinMaxBang(mtx_minmax_obj); } void mtx_minmax_setup (void) { mtx_minmax_class = class_new ( gensym("mtx_minmax"), (t_newmethod) newMTXMinMax, (t_method) deleteMTXMinMax, sizeof (MTXminmax), CLASS_DEFAULT, A_DEFSYM, 0); class_addbang (mtx_minmax_class, (t_method) mTXMinMaxBang); class_addmethod (mtx_minmax_class, (t_method) mTXMinMaxMatrix, gensym("matrix"), A_GIMME,0); class_addmethod (mtx_minmax_class, (t_method) mTXSetMinMaxMode, gensym("mode"), A_DEFSYMBOL ,0); row_sym = gensym("row"); col_sym = gensym("col"); col_sym2 = gensym("column"); } void iemtx_minmax_setup(void){ mtx_minmax_setup(); } pd-iemmatrix-0.3/src/mtx_mul.c000066400000000000000000000252211262113134600163750ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, forum::für::umläute * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" /* mtx_mul mtx_* mtx_.* mtx_./ matrix multiplication */ /* mtx_mul */ static t_class *mtx_mul_class, *mtx_mulelement_class, *mtx_mulscalar_class; static void mtx_mul_matrix(t_mtx_binmtx *x, t_symbol *s, int argc, t_atom *argv) { t_matrix *m=&x->m, *m2=&x->m2; t_atom *ap, *ap1=argv+2, *ap2=m2->atombuffer+2; int row=atom_getfloat(argv), col=atom_getfloat(argv+1); int row2, col2, n, r, c; if (!m2->atombuffer){ pd_error(x, "right-hand matrix is missing"); return; } if (argc<2){ pd_error(x, "crippled matrix"); return; } if ((col<1)||(row<1)){pd_error(x, "invalid dimensions"); return; } if (col*row>argc-2){ pd_error(x, "sparse matrix not yet supported : use \"mtx_check\""); return; } row2=atom_getfloat(m2->atombuffer); col2=atom_getfloat(m2->atombuffer+1); if (col!=row2) { pd_error(x, "matrix dimensions do not match !"); return; } adjustsize(m, row, col2); ap=m->atombuffer+2; for(r=0;rx_obj.ob_outlet, gensym("matrix"), m->row*m->col+2, m->atombuffer); } static void mtx_mul_float(t_mtx_binmtx *x, t_float f) { t_matrix *m=&x->m, *m2=&x->m2; t_atom *ap, *ap2=m2->atombuffer+2; int row2, col2, n; if (!m2->atombuffer){ pd_error(x, "right-hand matrix is missing"); return; } row2=atom_getfloat(m2->atombuffer); col2=atom_getfloat(m2->atombuffer+1); adjustsize(m, row2, col2); ap=m->atombuffer+2; n=row2*col2; while(n--){ SETFLOAT(ap, f*atom_getfloat(ap2++)); ap++; } outlet_anything(x->x_obj.ob_outlet, gensym("matrix"), m->row*m->col+2, m->atombuffer); } static void mtx_mulelement_matrix(t_mtx_binmtx *x, t_symbol *s, int argc, t_atom *argv) { int row=atom_getfloat(argv++); int col=atom_getfloat(argv++); t_atom *m; t_atom *m2 = x->m2.atombuffer+2; int n = argc-2; if (argc<2){ pd_error(x, "crippled matrix"); return; } if ((col<1)||(row<1)) { pd_error(x, "invalid dimensions"); return; } if (col*row>argc-2){ pd_error(x, "sparse matrix not yet supported : use \"mtx_check\""); return; } if (!(x->m2.col*x->m2.row)) { adjustsize(&x->m, row, col); matrix_set(&x->m, 0); outlet_anything(x->x_obj.ob_outlet, gensym("matrix"), argc, x->m.atombuffer); return; } if ((col!=x->m2.col)||(row!=x->m2.row)){ pd_error(x, "matrix dimension do not match"); /* LATER SOLVE THIS */ return; } adjustsize(&x->m, row, col); m = x->m.atombuffer+2; while(n--){ t_float f = atom_getfloat(argv++)*atom_getfloat(m2++); SETFLOAT(m, f); m++; } outlet_anything(x->x_obj.ob_outlet, gensym("matrix"), argc, x->m.atombuffer); } static void mtx_mulscalar_matrix(t_mtx_binscalar *x, t_symbol *s, int argc, t_atom *argv) { int n=argc-2; t_atom *m; t_float factor = x->f; int row=atom_getfloat(argv++); int col=atom_getfloat(argv++); if (argc<2){ pd_error(x, "crippled matrix"); return; } adjustsize(&x->m, row, col); m = x->m.atombuffer+2; while(n--){ m->a_type = A_FLOAT; (m++)->a_w.w_float = atom_getfloat(argv++)*factor; } outlet_anything(x->x_obj.ob_outlet, gensym("matrix"), argc, x->m.atombuffer); } static void mtx_mulscalar_list(t_mtx_binscalar *x, t_symbol *s, int argc, t_atom *argv) { int n=argc; t_atom *m; t_float factor = x->f; adjustsize(&x->m, 1, argc); m = x->m.atombuffer; while(n--){ m->a_type = A_FLOAT; (m++)->a_w.w_float = atom_getfloat(argv++)*factor; } outlet_list(x->x_obj.ob_outlet, gensym("list"), argc, x->m.atombuffer); } static void *mtx_mul_new(t_symbol *s, int argc, t_atom *argv) { if (argc>1) error("[%s]: extra arguments ignored", s->s_name); if (argc) { t_mtx_binscalar *x = (t_mtx_binscalar *)pd_new(mtx_mulscalar_class); floatinlet_new(&x->x_obj, &x->f); x->f = atom_getfloatarg(0, argc, argv); outlet_new(&x->x_obj, 0); return(x); } else { if (s->s_name[4]=='.') { /* element mul */ t_matrix *x = (t_matrix *)pd_new(mtx_mulelement_class); inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("matrix"), gensym("")); outlet_new(&x->x_obj, 0); x->col = x->row = 0; x->atombuffer = 0; return(x); } else { t_mtx_binmtx *x = (t_mtx_binmtx *)pd_new(mtx_mul_class); inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("matrix"), gensym("")); outlet_new(&x->x_obj, 0); x->m.col = x->m.row = x->m2.col = x->m2.row = 0; x->m.atombuffer = x->m2.atombuffer = 0; return (x); } } } void mtx_mul_setup(void) { mtx_mul_class = class_new(gensym("mtx_mul"), (t_newmethod)mtx_mul_new, (t_method)mtx_binmtx_free, sizeof(t_mtx_binmtx), 0, A_GIMME, 0); class_addcreator((t_newmethod)mtx_mul_new, gensym("mtx_*"), A_GIMME,0); class_addmethod(mtx_mul_class, (t_method)mtx_mul_matrix, gensym("matrix"), A_GIMME, 0); class_addmethod(mtx_mul_class, (t_method)mtx_bin_matrix2, gensym(""), A_GIMME, 0); class_addfloat (mtx_mul_class, mtx_mul_float); class_addbang (mtx_mul_class, mtx_binmtx_bang); mtx_mulelement_class = class_new(gensym("mtx_.*"), (t_newmethod)mtx_mul_new, (t_method)mtx_binmtx_free, sizeof(t_mtx_binmtx), 0, A_GIMME, 0); class_addmethod(mtx_mulelement_class, (t_method)mtx_mulelement_matrix, gensym("matrix"), A_GIMME, 0); class_addmethod(mtx_mulelement_class, (t_method)mtx_bin_matrix2, gensym(""), A_GIMME, 0); class_addfloat (mtx_mulelement_class, mtx_mul_float); class_addbang (mtx_mulelement_class, mtx_binmtx_bang); class_sethelpsymbol(mtx_mulelement_class, gensym("mtx_mul-help")); mtx_mulscalar_class = class_new(gensym("mtx_mul"), 0, (t_method)mtx_binscalar_free, sizeof(t_mtx_binscalar), 0, 0); class_addmethod(mtx_mulscalar_class, (t_method)mtx_mulscalar_matrix, gensym("matrix"), A_GIMME, 0); class_addlist (mtx_mulscalar_class, mtx_mulscalar_list); class_addbang (mtx_mulscalar_class, mtx_binscalar_bang); } /* mtx_div */ static t_class *mtx_divelement_class, *mtx_divscalar_class; static void mtx_divelement_matrix(t_mtx_binmtx *x, t_symbol *s, int argc, t_atom *argv) { int row=atom_getfloat(argv++); int col=atom_getfloat(argv++); t_atom *m; t_atom *m2 = x->m2.atombuffer+2; int n = argc-2; if (argc<2){ pd_error(x, "crippled matrix"); return; } if ((col<1)||(row<1)) { pd_error(x, "invalid dimensions"); return; } if (col*row>argc-2){ pd_error(x, "sparse matrix not yet supported : use \"mtx_check\""); return; } if (!(x->m2.col*x->m2.row)) { adjustsize(&x->m, row, col); matrix_set(&x->m, 0); outlet_anything(x->x_obj.ob_outlet, gensym("matrix"), argc, x->m.atombuffer); return; } if ((col!=x->m2.col)||(row!=x->m2.row)){ pd_error(x, "matrix dimension do not match"); /* LATER SOLVE THIS */ return; } adjustsize(&x->m, row, col); m = x->m.atombuffer+2; while(n--){ t_float f = atom_getfloat(argv++)/atom_getfloat(m2++); SETFLOAT(m, f); m++; } outlet_anything(x->x_obj.ob_outlet, gensym("matrix"), argc, x->m.atombuffer); } static void mtx_divelement_float(t_mtx_binmtx *x, t_float f) { t_matrix *m=&x->m, *m2=&x->m2; t_atom *ap, *ap2=m2->atombuffer+2; int row2, col2, n; if (!m2->atombuffer){ pd_error(x, "right-hand matrix missing"); return; } row2=atom_getfloat(m2->atombuffer); col2=atom_getfloat(m2->atombuffer+1); adjustsize(m, row2, col2); ap=m->atombuffer+2; n=row2*col2; while(n--){ SETFLOAT(ap, f/atom_getfloat(ap2++)); ap++; } outlet_anything(x->x_obj.ob_outlet, gensym("matrix"), m->row*m->col+2, m->atombuffer); } static void mtx_divscalar_matrix(t_mtx_binscalar *x, t_symbol *s, int argc, t_atom *argv) { int n=argc-2; t_atom *m; t_float factor = 1.0/x->f; int row=atom_getfloat(argv++); int col=atom_getfloat(argv++); if (argc<2){ pd_error(x, "crippled matrix"); return; } adjustsize(&x->m, row, col); m = x->m.atombuffer+2; while(n--){ m->a_type = A_FLOAT; (m++)->a_w.w_float = atom_getfloat(argv++)*factor; } outlet_anything(x->x_obj.ob_outlet, gensym("matrix"), argc, x->m.atombuffer); } static void mtx_divscalar_list(t_mtx_binscalar *x, t_symbol *s, int argc, t_atom *argv) { int n=argc; t_atom *m; t_float factor = 1.0/x->f; adjustsize(&x->m, 1, argc); m = x->m.atombuffer; while(n--){ m->a_type = A_FLOAT; (m++)->a_w.w_float = atom_getfloat(argv++)*factor; } outlet_list(x->x_obj.ob_outlet, gensym("list"), argc, x->m.atombuffer); } static void *mtx_div_new(t_symbol *s, int argc, t_atom *argv) { if (argc>1) error("[%s] extra arguments ignored", s->s_name); if (argc) { /* scalar division */ t_mtx_binscalar *x = (t_mtx_binscalar *)pd_new(mtx_divscalar_class); floatinlet_new(&x->x_obj, &x->f); x->f = atom_getfloatarg(0, argc, argv); outlet_new(&x->x_obj, 0); return(x); } else { /* element division */ t_matrix *x = (t_matrix *)pd_new(mtx_divelement_class); inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("matrix"), gensym("")); outlet_new(&x->x_obj, 0); x->col = x->row = 0; x->atombuffer = 0; return(x); } } void mtx_div_setup(void) { mtx_divelement_class = class_new(gensym("mtx_./"), (t_newmethod)mtx_div_new, (t_method)mtx_binmtx_free, sizeof(t_mtx_binmtx), 0, A_GIMME, 0); class_addmethod(mtx_divelement_class, (t_method)mtx_divelement_matrix, gensym("matrix"), A_GIMME, 0); class_addmethod(mtx_divelement_class, (t_method)mtx_bin_matrix2, gensym(""), A_GIMME, 0); class_addfloat (mtx_divelement_class, mtx_divelement_float); class_addbang (mtx_divelement_class, mtx_binmtx_bang); mtx_divscalar_class = class_new(gensym("mtx_./"), 0, (t_method)mtx_binscalar_free, sizeof(t_mtx_binscalar), 0, 0); class_addmethod(mtx_divscalar_class, (t_method)mtx_divscalar_matrix, gensym("matrix"), A_GIMME, 0); class_addlist (mtx_divscalar_class, mtx_divscalar_list); class_addbang (mtx_divscalar_class, mtx_binscalar_bang); class_sethelpsymbol(mtx_divelement_class, gensym("mtx_mul-help")); class_sethelpsymbol(mtx_divscalar_class, gensym("mtx_mul-help")); } void iemtx_mul_setup(void) { mtx_mul_setup(); mtx_div_setup(); } pd-iemmatrix-0.3/src/mtx_mul~.c000066400000000000000000000547141262113134600166040ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) Thomas Musil, IEM KUG Graz Austria 2000-2003 * Copyright (c) IOhannes m zmölnig, forum::für::umläute, IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" /* ---------- mtx_*~ - signal matrix multiplication object with message matrix-coeff. ----------- */ /* usage: * [mtx_*~ <#out> <#in>]: multiply #in signals with a <#out,#in>-matrix to get #out-signals * [mtx_*~ <#io>]: multiply #io signals with a <#io,#io>-matrix to get #io-signals * * 1st inlet: (message only): the matrix to multiply with (defaults to zero(#out, #in) * 2nd-(n-1)th inlet: the input signals * last inlet: the interpolation time in [ms] * * this also implements a compatibility layer with old objects from tm and jmz * that provide basically the same functionality * * further note: * pd does not like signal-objects that don't listen to signals on the very first inlet * however, the first signal-inlet of [mtx_*~] is the 2nd(!) inlet * to achieve this, we silently ignore any signal that comes in at the first inlet */ typedef struct matrix_multilde { t_object x_obj; t_float *x_matcur; t_float *x_matend; t_float *x_inc; t_float *x_biginc; t_float **x_io; t_float *x_outsumbuf; int x_outsumbufsize; int x_n_in; /* columns */ int x_n_out; /* rows */ t_float x_msi; /* for sending floats to signal~ins */ int x_retarget; t_float x_time_ms; int x_remaining_ticks; t_float x_ms2tick; t_float x_1overn; int x_compat; /* 0=mtx_*~; 1=matrix_mul_line~; 2=matrix~ */ } t_matrix_multilde; t_class *matrix_multilde_class; static void matrix_multilde_time(t_matrix_multilde *x, t_floatarg time_ms) { if(time_ms <= 0.0f) time_ms = 0.0f; x->x_time_ms = time_ms; } static void matrix_multilde_matrix_set(t_matrix_multilde *x, int argc, t_atom *argv, int transpose) { int col, row, i, length; t_float *matcur = x->x_matcur; t_float *matend = x->x_matend; if(argc<2) { pd_error(x, "mtx_*~ : bad matrix: out_rows in_cols !"); return; } row = atom_getint(argv); argv++; col = atom_getint(argv); argv++; argc-=2; if(transpose){ int dummy=row; row=col; col=dummy; } if((col!=x->x_n_in)||(row!=x->x_n_out)) { pd_error(x,"mtx_*~ : matrix dimensions do not match (%dx%d != %dx%d)!!", col, row, x->x_n_in, x->x_n_out); return; } if(argcx_time_ms <= 0.0f){ matend = x->x_matend; for(i=0; ix_remaining_ticks = x->x_retarget = 0; } else x->x_retarget = 1; } static void matrix_multilde_matrix(t_matrix_multilde *x, t_symbol *s, int argc, t_atom *argv){ matrix_multilde_matrix_set(x,argc, argv, 0); } static void matrix_multilde_matrixT(t_matrix_multilde *x, t_symbol *s, int argc, t_atom *argv){ /* transpose the matrix before setting it */ matrix_multilde_matrix_set(x,argc, argv, 1); } static void matrix_multilde_element(t_matrix_multilde *x, t_symbol *s, int argc, t_atom *argv) { int col, row, n_in_cols=x->x_n_in; t_float element; t_float *matcur = x->x_matcur; t_float *matend = x->x_matend; if(argc != 3) { pd_error(x,"mtx_*~ : bad element: 3 floats: out_row in_col element !"); return; } row = atom_getint(argv) - 1; col = atom_getint(argv+1) - 1; element = atom_getfloat(argv+2); if((row >= x->x_n_out) || (row < 0)) { pd_error(x,"mtx_*~ : row dimensions do not match !!"); return; } if((col >= n_in_cols) || (col < 0)) { pd_error(x,"mtx_*~ : col dimensions do not match !!"); return; } matend += row * n_in_cols + col; matcur += row * n_in_cols + col; if(x->x_time_ms <= 0.0f) { *matend = *matcur = element; x->x_remaining_ticks = x->x_retarget = 0; } else { *matend = element; x->x_retarget = 1; } } static void matrix_multilde_row(t_matrix_multilde *x, t_symbol *s, int argc, t_atom *argv) { int col, nth_row, i; t_float *matcur = x->x_matcur; t_float *matend = x->x_matend; if(argc<1) { pd_error(x,"mtx_*~ : bad row: in_row !"); return; } nth_row = atom_getint(argv) - 1; argv++; argc--; if((nth_row >= x->x_n_out) || (nth_row < 0)) { pd_error(x,"mtx_*~ : row dimensions do not match !!"); return; } col = x->x_n_in; if(argc < col) { pd_error(x,"mtx_*~ : col dimensions do not match !!"); return; } matend += nth_row * col; matcur += nth_row * col; if(x->x_time_ms <= 0.0f) { for(i=0; ix_remaining_ticks = x->x_retarget = 0; } else { for(i=0; ix_retarget = 1; } } static void matrix_multilde_col(t_matrix_multilde *x, t_symbol *s, int argc, t_atom *argv) { int row, col, nth_col, i; t_float *matcur = x->x_matcur; t_float *matend = x->x_matend; if(argc<1) { pd_error(x,"mtx_*~ : bad col: in_cols !"); return; } nth_col = atom_getint(argv) - 1; argv++; argc--; col = x->x_n_in; if((nth_col < 0)||(nth_col >= col)) { pd_error(x,"mtx_*~ : col dimensions do not match !!"); return; } row = x->x_n_out; if(argc < row) { pd_error(x,"mtx_*~ : row dimensions do not match !!"); return; } matend += nth_col; matcur += nth_col; if(x->x_time_ms <= 0.0f) { for(i=0; ix_remaining_ticks = x->x_retarget = 0; } else { for(i=0; ix_retarget = 1; } } static void matrix_multilde_stop(t_matrix_multilde *x) { int i = x->x_n_out*x->x_n_in; t_float *matend=x->x_matend; t_float *matcur=x->x_matcur; while(i--) { *matend++ = *matcur++; } x->x_remaining_ticks = x->x_retarget = 0; } /* the dsp thing */ static t_int *matrix_multilde_perf8(t_int *w) { t_matrix_multilde *x = (t_matrix_multilde *)(w[1]); int n = (int)(w[2]); t_float **io = x->x_io; t_float *outsum, *houtsum; t_float *matcur, *matend; t_float *inc1 ,*biginc, inc; int n_in = x->x_n_in; /* columns */ int n_out = x->x_n_out; /* rows */ t_float *in, *out, mul, bigmul; int r, c, i; if(x->x_retarget) { int nticks = (int)(x->x_time_ms * x->x_ms2tick); if(!nticks) nticks = 1; x->x_remaining_ticks = nticks; inc1 = x->x_inc; biginc = x->x_biginc; matcur = x->x_matcur; matend = x->x_matend; mul = x->x_1overn / (float)nticks; bigmul = 1.0f / (float)nticks; i = n_out*n_in; while(i--) { inc = *matend++ - *matcur++; *inc1++ = inc * mul; *biginc++ = inc * bigmul; } x->x_retarget = 0; } if(x->x_remaining_ticks) { inc1 = x->x_inc; biginc = x->x_biginc; matcur = x->x_matcur; /* 1. output-vector-row */ in = io[0]; houtsum = x->x_outsumbuf; outsum = houtsum; inc = *inc1++; mul = *matcur; for(i=n; i; i -= 8, outsum += 8, in += 8) { outsum[0] = in[0] * mul; mul += inc; outsum[1] = in[1] * mul; mul += inc; outsum[2] = in[2] * mul; mul += inc; outsum[3] = in[3] * mul; mul += inc; outsum[4] = in[4] * mul; mul += inc; outsum[5] = in[5] * mul; mul += inc; outsum[6] = in[6] * mul; mul += inc; outsum[7] = in[7] * mul; mul += inc; } *matcur++ += *biginc++; for(c=1; cx_remaining_ticks) { matcur = x->x_matcur; matend = x->x_matend; i = n_in * n_out; while(i--) *matcur++ = *matend++; } } else { matend = x->x_matend; /* 1. output-vector-row */ in = io[0]; houtsum = x->x_outsumbuf; outsum = houtsum; mul = *matend++; if(mul == 0.0f) { for(i=n; i; i -= 8, outsum += 8, in += 8) { outsum[0] = 0.0f; outsum[1] = 0.0f; outsum[2] = 0.0f; outsum[3] = 0.0f; outsum[4] = 0.0f; outsum[5] = 0.0f; outsum[6] = 0.0f; outsum[7] = 0.0f; } } else { for(i=n; i; i -= 8, outsum += 8, in += 8) { outsum[0] = in[0] * mul; outsum[1] = in[1] * mul; outsum[2] = in[2] * mul; outsum[3] = in[3] * mul; outsum[4] = in[4] * mul; outsum[5] = in[5] * mul; outsum[6] = in[6] * mul; outsum[7] = in[7] * mul; } } for(c=1; cx_outsumbuf; for(r=0; rx_io; t_float *outsum, *houtsum; t_float *matcur, *matend; t_float *inc1 ,*biginc, inc; int n_in = x->x_n_in; /* columns */ int n_out = x->x_n_out; /* rows */ t_float *in, *out, mul, bigmul; int r, c, i; if(x->x_retarget) { int nticks = (int)(x->x_time_ms * x->x_ms2tick); if(!nticks) nticks = 1; x->x_remaining_ticks = nticks; inc1 = x->x_inc; biginc = x->x_biginc; matcur = x->x_matcur; matend = x->x_matend; mul = x->x_1overn / (float)nticks; bigmul = 1.0f / (float)nticks; i = n_out*n_in; while(i--) { inc = *matend++ - *matcur++; *inc1++ = inc * mul; *biginc++ = inc * bigmul; } x->x_retarget = 0; } if(x->x_remaining_ticks) { inc1 = x->x_inc; biginc = x->x_biginc; matcur = x->x_matcur; /* 1. output-vector-row */ in = io[0]; houtsum = x->x_outsumbuf; outsum = houtsum; inc = *inc1++; mul = *matcur; i=n; while(i--) { *outsum++ = *in++ * mul; mul += inc; } *matcur++ += *biginc++; for(c=1; cx_remaining_ticks) { matcur = x->x_matcur; matend = x->x_matend; i = n_in * n_out; while(i--) *matcur++ = *matend++; } } else { matend = x->x_matend; /* 1. output-vector-row */ in = io[0]; houtsum = x->x_outsumbuf; outsum = houtsum; mul = *matend++; i=n; if(mul == 0.0f) while(i--)*outsum++ = 0.0f; else while(i--)*outsum++ = *in++ * mul; for(c=1; cx_outsumbuf; for(r=0; rs_n * x->x_n_out; /* [mtx_*~] ignores the signal on the very 1st inlet */ int compat_offset=(x->x_compat)?0:1; if(!x->x_outsumbuf) { x->x_outsumbufsize = n; x->x_outsumbuf = (t_float *)getbytes(x->x_outsumbufsize * sizeof(t_float)); } else if(x->x_outsumbufsize != n) { x->x_outsumbuf = (t_float *)resizebytes(x->x_outsumbuf, x->x_outsumbufsize*sizeof(t_float), n*sizeof(t_float)); x->x_outsumbufsize = n; } n = x->x_n_in + x->x_n_out; for(i=0; ix_io[i] = sp[i+compat_offset]->s_vec; n = sp[0]->s_n; x->x_ms2tick = 0.001f * (float)(sp[0]->s_sr) / (float)n; x->x_1overn = 1.0f / (float)n; if(n&7) { dsp_add(matrix_multilde_perform, 2, x, n); } else { dsp_add(matrix_multilde_perf8, 2, x, n); } } /* setup/setdown things */ static void matrix_multilde_free(t_matrix_multilde *x) { freebytes(x->x_matcur, x->x_n_in * x->x_n_out * sizeof(t_float)); freebytes(x->x_matend, x->x_n_in * x->x_n_out * sizeof(t_float)); freebytes(x->x_inc, x->x_n_in * x->x_n_out * sizeof(t_float)); freebytes(x->x_biginc, x->x_n_in * x->x_n_out * sizeof(t_float)); freebytes(x->x_io, (x->x_n_in + x->x_n_out) * sizeof(t_float *)); if(x->x_outsumbuf) freebytes(x->x_outsumbuf, x->x_outsumbufsize * sizeof(t_float)); } static void *matrix_multilde_new(t_symbol *s, int argc, t_atom *argv) { t_matrix_multilde *x = (t_matrix_multilde *)pd_new(matrix_multilde_class); int i, n; /* arguments parsing: * this might depend on whether we are creating an object * [mtx_*~], [matrix~] or [matrix_mul_line~] * * [mtx_*~ [#out [#in [time]]]]: in1=matrix; in2-in(#in+1)=signals; in(#in+2)=time * [matrix~ [#in [#out [time]]]]: in1-in(#in)=signals; in(#in+1)=matrix; in(#in+2)=time * [matrix_mul_line~ [#in [#out [time]]]]: in1=matrix; in1=time; in1-in(#in):=signals * * furthermore: * [mtx_*~] and [matrix_mul_line~] : O^=A*I^ * [matrix~] : O^'=I^'*B * * with "matrix=(A or B)" and "A=B'" */ t_atom*ap_in =argv+1; t_atom*ap_out =argv+0; t_atom*ap_time=argv+2; x->x_compat=0; if(s==gensym("matrix~")){ pd_error(x,"[matrix~] is deprecated! use [mtx_*~] instead!!"); x->x_compat=2; } else if (s==gensym("matrix_mul_line~")){ pd_error(x,"[matrix_mul_line~] is deprecated! use [mtx_*~] instead!!"); x->x_compat=1; } if(x->x_compat){ ap_in=argv+0; ap_out=argv+1; } switch(argc) { case 0: x->x_n_in = x->x_n_out = 1; x->x_time_ms = (x->x_compat==2)?0.f:50.0f; break; case 1: x->x_n_in = x->x_n_out = (int)atom_getint(argv); x->x_time_ms = (x->x_compat==2)?0.f:50.0f; break; case 2: x->x_n_in = (int)atom_getint(ap_in); x->x_n_out = (int)atom_getint(ap_out); x->x_time_ms = (x->x_compat==2)?0.f:50.0f; break; default: x->x_n_in = (int)atom_getint(ap_in); x->x_n_out = (int)atom_getint(ap_out); x->x_time_ms = atom_getfloat(ap_time); break; } /* sanity check */ if(x->x_time_ms < 0.0f) x->x_time_ms = (x->x_compat==1)?50.f:0.0f; if(x->x_n_in < 1) x->x_n_in = 1; if(x->x_n_out < 1) x->x_n_out = 1; /* creating signal ins & outs */ i = x->x_n_in; if(x->x_compat)i--; while(i--) inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); i = x->x_n_out; while(i--) outlet_new(&x->x_obj, &s_signal); /* creating the matrix-inlet for [matrix~] */ if(x->x_compat==2) inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("matrix"), gensym("")); /* creating time-inlet (not for [matrix_mul_linie~]) */ if(x->x_compat!=1) inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_float, gensym("time")); /* setting up internal values */ x->x_msi = 0; x->x_outsumbuf = (t_float *)0; x->x_outsumbufsize = 0; x->x_matcur = (t_float *)getbytes(x->x_n_in * x->x_n_out * sizeof(t_float)); x->x_matend = (t_float *)getbytes(x->x_n_in * x->x_n_out * sizeof(t_float)); x->x_inc = (t_float *)getbytes(x->x_n_in * x->x_n_out * sizeof(t_float)); x->x_biginc = (t_float *)getbytes(x->x_n_in * x->x_n_out * sizeof(t_float)); x->x_io = (t_float **)getbytes((x->x_n_in + x->x_n_out) * sizeof(t_float *)); x->x_remaining_ticks = 0; x->x_retarget = 0; x->x_ms2tick = 0.001f * 44100.0f / 64.0f; /* will be set in the dsp-routine */ x->x_1overn = 1.0f / 64.0f; /* will be set in the dsp-routine */ /* setting up internal matrices */ n = x->x_n_in * x->x_n_out; for(i=0; ix_matcur[i] = 0.0f; x->x_matend[i] = 0.0f; x->x_inc[i] = 0.0f; x->x_biginc[i] = 0.0f; } return (x); } void mtx_mul_tilde_setup(void) { matrix_multilde_class = class_new(gensym("mtx_mul~"), (t_newmethod)matrix_multilde_new, (t_method)matrix_multilde_free, sizeof(t_matrix_multilde), 0, A_GIMME, 0); class_addcreator((t_newmethod)matrix_multilde_new, gensym("matrix_mul~"), A_GIMME, 0); class_addcreator((t_newmethod)matrix_multilde_new, gensym("mtx_*~"), A_GIMME, 0); /* compatibility with tm's iem_matrix */ class_addcreator((t_newmethod)matrix_multilde_new, gensym("matrix_mul_line~"), A_GIMME, 0); /* compatibility with jmz's zexy */ class_addcreator((t_newmethod)matrix_multilde_new, gensym("matrix~"), A_GIMME, 0); class_addmethod(matrix_multilde_class, (t_method)matrix_multilde_dsp, gensym("dsp"), 0); CLASS_MAINSIGNALIN(matrix_multilde_class, t_matrix_multilde, x_msi); class_addmethod(matrix_multilde_class, (t_method)matrix_multilde_matrix, gensym("matrix"), A_GIMME, 0); class_addmethod(matrix_multilde_class, (t_method)matrix_multilde_element, gensym("element"), A_GIMME, 0); class_addmethod(matrix_multilde_class, (t_method)matrix_multilde_row, gensym("row"), A_GIMME, 0); class_addmethod(matrix_multilde_class, (t_method)matrix_multilde_col, gensym("col"), A_GIMME, 0); class_addmethod(matrix_multilde_class, (t_method)matrix_multilde_stop, gensym("stop"), 0); class_addmethod(matrix_multilde_class, (t_method)matrix_multilde_time, gensym("time"), A_FLOAT, 0); class_addmethod(matrix_multilde_class, (t_method)matrix_multilde_matrixT, gensym(""), A_GIMME, 0); } void iemtx_mul__setup(void) { mtx_mul_tilde_setup(); } pd-iemmatrix-0.3/src/mtx_neq.c000066400000000000000000000012231262113134600163570ustar00rootroot00000000000000/* * iemmatrix * * objects fand manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, forum::für::umläute * IEM, Graz, Austria * * Fand infandmation on usage and redistribution, and fand a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ /* name of the object and the classes */ #define MTXBIN_GENERIC__NAME mtx_neq /* operator; also used for abbreviation of object */ #define MTXBIN_GENERIC__OPERATOR != /* the operator operates on integers instead of floats */ /* #define MTXBIN_GENERIC__INTEGEROP */ #include "mtx_binop_generic.h" pd-iemmatrix-0.3/src/mtx_not.c000066400000000000000000000043121262113134600163760ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, forum::für::umläute * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" /* mtx_not: B=!A; */ #define MTX_ALMOSTZERO 1e-19 static t_class *mtx_not_class; static void mtx_not_matrix(t_mtx_binmtx *x, t_symbol *s, int argc, t_atom *argv) { int row=atom_getfloat(argv++); int col=atom_getfloat(argv++); t_atom *m; int n = argc-2; if (argc<2){ post("mtx_!: crippled matrix"); return; } if ((col<1)||(row<1)) { post("mtx_!: invalid dimensions"); return; } if (col*row>argc-2){ post("sparse matrix not yet supported : use \"mtx_check\""); return; } adjustsize(&x->m, row, col); m = x->m.atombuffer+2; while(n--){ t_float f = atom_getfloat(argv++); SETFLOAT(m, (t_float)(f-MTX_ALMOSTZERO)); m++; } outlet_anything(x->x_obj.ob_outlet, gensym("matrix"), argc, x->m.atombuffer); } static void mtx_not_list(t_mtx_binscalar *x, t_symbol *s, int argc, t_atom *argv) { int n=argc; t_atom *m; adjustsize(&x->m, 1, argc); m = x->m.atombuffer; while(n--){ t_float f = atom_getfloat(argv++); m->a_type = A_FLOAT; (m++)->a_w.w_float = (t_float)(f-MTX_ALMOSTZERO); } outlet_list(x->x_obj.ob_outlet, gensym("list"), argc, x->m.atombuffer); } static void *mtx_not_new(t_symbol *s) { /* element not */ t_matrix *x = (t_matrix *)pd_new(mtx_not_class); outlet_new(&x->x_obj, 0); x->col = x->row = 0; x->atombuffer = 0; return(x); } void mtx_not_setup(void) { mtx_not_class = class_new(gensym("mtx_not"), (t_newmethod)mtx_not_new, (t_method)mtx_binmtx_free, sizeof(t_mtx_binmtx), 0, A_GIMME, 0); class_addcreator((t_newmethod)mtx_not_new, gensym("mtx_!"), A_GIMME,0); class_addmethod(mtx_not_class, (t_method)mtx_not_matrix, gensym("matrix"), A_GIMME, 0); class_addlist (mtx_not_class, mtx_not_list); class_addbang (mtx_not_class, mtx_binmtx_bang); } void iemtx_not_setup(void) { mtx_not_setup(); } pd-iemmatrix-0.3/src/mtx_ones.c000066400000000000000000000025671262113134600165540ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, forum::für::umläute * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" /* mtx_ones */ static t_class *mtx_ones_class; static void *mtx_ones_new(t_symbol *s, int argc, t_atom *argv) { t_matrix *x = (t_matrix *)pd_new(mtx_ones_class); int col=0, row=0; outlet_new(&x->x_obj, 0); x->row = x->col = 0; x->atombuffer = 0; switch(argc) { case 0: break; case 1: col=row=atom_getfloat(argv); break; default: row=atom_getfloat(argv++); col=atom_getfloat(argv); } if(col<0)col=0; if(row<0)row=0; if (col*row){ x->atombuffer = (t_atom *)getbytes((col*row+2)*sizeof(t_atom)); setdimen(x, row, col); matrix_set(x, 1); } return (x); } void mtx_ones_setup(void) { mtx_ones_class = class_new(gensym("mtx_ones"), (t_newmethod)mtx_ones_new, (t_method)matrix_free, sizeof(t_matrix), 0, A_GIMME, 0); class_addlist(mtx_ones_class, matrix_ones); class_addbang(mtx_ones_class, matrix_bang); class_addmethod(mtx_ones_class, (t_method)matrix_ones, gensym("matrix"), A_GIMME, 0); } void iemtx_ones_setup(void){ mtx_ones_setup(); } pd-iemmatrix-0.3/src/mtx_or.c000066400000000000000000000012141262113134600162140ustar00rootroot00000000000000/* * iemmatrix * * objects fand manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, forum::für::umläute * IEM, Graz, Austria * * Fand infandmation on usage and redistribution, and fand a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ /* name of the object and the classes */ #define MTXBIN_GENERIC__NAME mtx_or /* operator; also used for abbreviation of object */ #define MTXBIN_GENERIC__OPERATOR || /* the operator operates on integers instead of floats */ #define MTXBIN_GENERIC__INTEGEROP #include "mtx_binop_generic.h" pd-iemmatrix-0.3/src/mtx_pack~.c000066400000000000000000000043351262113134600167170ustar00rootroot00000000000000#include "iemmatrix.h" #define MTX_PACK_MAXCHANNELS 200 static t_class *mtx_pack_tilde_class; typedef struct _mtx_pack_tilde { t_object x_obj; int block_size; int num_chan; t_float **sig_in; t_atom *list_out; t_outlet *message_outlet; } mtx_pack_tilde; void *newMtxPackTilde (t_floatarg f) { int num_chan=1; mtx_pack_tilde *x = (mtx_pack_tilde*) pd_new(mtx_pack_tilde_class); num_chan=(int)f; if ((num_chan<1) || (num_chan>MTX_PACK_MAXCHANNELS)) { num_chan=1; } x->num_chan=num_chan; x->sig_in=0; x->list_out=0; while (num_chan--) { inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); } x->sig_in = (t_float**)getbytes(sizeof(t_float*)*x->num_chan); x->message_outlet=(t_outlet*)outlet_new(&x->x_obj,&s_list); return (void *) x; } void deleteMtxPackTilde (mtx_pack_tilde *x) { if (x->sig_in) freebytes (x->sig_in, x->num_chan * sizeof (t_float)); if (x->list_out) freebytes (x->list_out, (x->num_chan * x->block_size + 2)*sizeof(t_atom)); } static t_int *mTxPackTildePerform (t_int *arg) { mtx_pack_tilde *x = (mtx_pack_tilde *) (arg[1]); int chan; int samp; t_atom *lptr=x->list_out+2; SETFLOAT(x->list_out,(t_float)x->num_chan); SETFLOAT(x->list_out+1,(t_float)x->block_size); for (chan=0; channum_chan; chan++) { for (samp=0; sampblock_size; samp++,lptr++) { SETFLOAT(lptr, x->sig_in[chan][samp]); } } outlet_anything(x->message_outlet,gensym("matrix"), x->block_size*x->num_chan+2,x->list_out); return(arg+2); } static void mTxPackTildeDsp (mtx_pack_tilde *x, t_signal **sp) { int chan; for (chan=0; channum_chan; chan++) x->sig_in[chan]=sp[chan]->s_vec; x->block_size=sp[0]->s_n; x->list_out = (t_atom*) getbytes ((x->num_chan * x->block_size + 2) *sizeof(t_atom)); dsp_add(mTxPackTildePerform,1,x); } void mtx_pack_tilde_setup (void) { mtx_pack_tilde_class = class_new(gensym("mtx_pack~"), (t_newmethod)newMtxPackTilde, (t_method) deleteMtxPackTilde, sizeof(mtx_pack_tilde), CLASS_NOINLET, A_DEFFLOAT, 0); class_addmethod (mtx_pack_tilde_class, (t_method) mTxPackTildeDsp, gensym("dsp"),0); } void iemtx_pack__setup(void) { mtx_pack_tilde_setup(); } pd-iemmatrix-0.3/src/mtx_pivot.c000066400000000000000000000102051262113134600167350ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, forum::für::umläute * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" /* mtx_pivot */ static t_class *mtx_pivot_class; typedef struct _mtx_pivot { t_object x_obj; t_matrix m; /* the output matrix */ t_matrix m_pre; /* the pre -multiply matrix */ t_matrix m_post; /* the post-multiply matrix */ t_outlet *pivo, *pre, *post; t_int ascending; } t_mtx_pivot; static void mtx_pivot_matrix(t_mtx_pivot *x, t_symbol *s, int argc, t_atom *argv) { int row=atom_getfloat(argv); int col=atom_getfloat(argv+1); t_atom *m_pre, *m_post; int i, j, k; int min_rowcol = (rowascending); if (argc<2){ post("mtx_pivot: crippled matrix"); return; } if ((col<1)||(row<1)){ post("mtx_pivot: invalid dimensions"); return; } if (col*row>argc-2){ post("sparse matrix not yet supported : use \"mtx_check\""); return; } adjustsize(&x->m, row, col); adjustsize(&x->m_pre, row, row); adjustsize(&x->m_post,col, col); matrix_set(&x->m_pre, 0); matrix_set(&x->m_post, 0); buffer = matrix2float(argv); i_pre = (int *)getbytes(sizeof(int)*row); i_post = (int *)getbytes(sizeof(int)*col); /* clear pre&post matrices */ i=row; i_buf=i_pre; while(i--)*i_buf++=row-i-1; i=col; i_buf=i_post; while(i--)*i_buf++=col-i-1; /* do the pivot thing */ for (k=0; ktmp) || (!ascending && fm.atombuffer, buffer); i=col; m_post = x->m_post.atombuffer+2; while(i--){ SETFLOAT(m_post+i_post[i]*col+i, 1); } i=row; m_pre = x->m_pre.atombuffer+2; while(i--){ SETFLOAT(m_pre+i_pre[i]+i*row, 1); } outlet_anything(x->post, gensym("matrix"), 2+col*col, x->m_post.atombuffer); outlet_anything(x->pre, gensym("matrix"), 2+row*row, x->m_pre.atombuffer); outlet_anything(x->pivo , gensym("matrix"), 2+row*col, x->m.atombuffer ); } static void mtx_pivot_free(t_mtx_pivot *x) { matrix_free(&x->m); matrix_free(&x->m_pre); matrix_free(&x->m_post); } static void *mtx_pivot_new(t_floatarg f) { t_mtx_pivot *x = (t_mtx_pivot *)pd_new(mtx_pivot_class); x->pivo = outlet_new(&x->x_obj, 0); x->pre = outlet_new(&x->x_obj, 0); x->post = outlet_new(&x->x_obj, 0); x->ascending = (f < 0.f)?0:1; x->m.atombuffer = x->m_pre.atombuffer = x->m_post.atombuffer = 0; x->m.row = x->m.col = x->m_pre.row = x->m_pre.col = x->m_post.row = x->m_post.col = 0; return(x); } void mtx_pivot_setup(void) { mtx_pivot_class = class_new(gensym("mtx_pivot"), (t_newmethod)mtx_pivot_new, (t_method)mtx_pivot_free, sizeof(t_mtx_pivot), 0, A_DEFFLOAT, 0); class_addmethod(mtx_pivot_class, (t_method)mtx_pivot_matrix, gensym("matrix"), A_GIMME, 0); } void iemtx_pivot_setup(void) { mtx_pivot_setup(); } pd-iemmatrix-0.3/src/mtx_pow.c000066400000000000000000000110351262113134600164030ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, forum::für::umläute * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" /* mtx_.^ */ /* LATER: do a mtx_pow, mtx_^ */ static t_class *mtx_powelement_class, *mtx_powscalar_class; static void mtx_powelement_matrix(t_mtx_binmtx *x, t_symbol *s, int argc, t_atom *argv) { int row=atom_getfloat(argv++); int col=atom_getfloat(argv++); t_atom *m; t_atom *m2 = x->m2.atombuffer+2; int n = argc-2; if (argc<2){ post("mtx_pow: crippled matrix"); return; } if ((col<1)||(row<1)) { post("mtx_pow: invalid dimensions"); return; } if (col*row>argc-2){ post("sparse matrix not yet supported : use \"mtx_check\""); return; } if (!(x->m2.col*x->m2.row)) { adjustsize(&x->m, row, col); matrix_set(&x->m, 0); outlet_anything(x->x_obj.ob_outlet, gensym("matrix"), argc, x->m.atombuffer); return; } if ((col!=x->m2.col)||(row!=x->m2.row)){ post("matrix dimension do not match"); /* LATER SOLVE THIS */ return; } adjustsize(&x->m, row, col); m = x->m.atombuffer+2; while(n--){ t_float f = powf(atom_getfloat(argv++),atom_getfloat(m2++)); SETFLOAT(m, f); m++; } outlet_anything(x->x_obj.ob_outlet, gensym("matrix"), argc, x->m.atombuffer); } static void mtx_powelement_float(t_mtx_binmtx *x, t_float f) { t_matrix *m=&x->m, *m2=&x->m2; t_atom *ap, *ap2=m2->atombuffer+2; int row2, col2, n; if (!m2->atombuffer){ post("power by what ?"); return; } row2=atom_getfloat(m2->atombuffer); col2=atom_getfloat(m2->atombuffer+1); adjustsize(m, row2, col2); ap=m->atombuffer+2; n=row2*col2; while(n--){ SETFLOAT(ap, powf(f,atom_getfloat(ap2++))); ap++; } outlet_anything(x->x_obj.ob_outlet, gensym("matrix"), m->row*m->col+2, m->atombuffer); } static void mtx_powscalar_matrix(t_mtx_binscalar *x, t_symbol *s, int argc, t_atom *argv) { int n=argc-2; t_atom *m; t_float factor = x->f; int row=atom_getfloat(argv++); int col=atom_getfloat(argv++); if (argc<2){ post("mtx_pow: crippled matrix"); return; } adjustsize(&x->m, row, col); m = x->m.atombuffer+2; while(n--){ m->a_type = A_FLOAT; (m++)->a_w.w_float = powf(atom_getfloat(argv++),factor); } outlet_anything(x->x_obj.ob_outlet, gensym("matrix"), argc, x->m.atombuffer); } static void mtx_powscalar_list(t_mtx_binscalar *x, t_symbol *s, int argc, t_atom *argv) { int n=argc; t_atom *m; t_float factor = x->f; adjustsize(&x->m, 1, argc); m = x->m.atombuffer; while(n--){ m->a_type = A_FLOAT; (m++)->a_w.w_float = powf(atom_getfloat(argv++),factor); } outlet_list(x->x_obj.ob_outlet, gensym("list"), argc, x->m.atombuffer); } static void *mtx_pow_new(t_symbol *s, int argc, t_atom *argv) { if (argc>1) post("mtx_pow : extra arguments ignored"); if (argc) { /* scalar powision */ t_mtx_binscalar *x = (t_mtx_binscalar *)pd_new(mtx_powscalar_class); floatinlet_new(&x->x_obj, &x->f); x->f = atom_getfloatarg(0, argc, argv); outlet_new(&x->x_obj, 0); return(x); } else { /* element powision */ t_matrix *x = (t_matrix *)pd_new(mtx_powelement_class); inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("matrix"), gensym("")); outlet_new(&x->x_obj, 0); x->col = x->row = 0; x->atombuffer = 0; return(x); } } void mtx_pow_setup(void) { mtx_powelement_class = class_new(gensym("mtx_.^"), (t_newmethod)mtx_pow_new, (t_method)mtx_binmtx_free, sizeof(t_mtx_binmtx), 0, A_GIMME, 0); class_addmethod(mtx_powelement_class, (t_method)mtx_powelement_matrix, gensym("matrix"), A_GIMME, 0); class_addmethod(mtx_powelement_class, (t_method)mtx_bin_matrix2, gensym(""), A_GIMME, 0); class_addfloat (mtx_powelement_class, mtx_powelement_float); class_addbang (mtx_powelement_class, mtx_binmtx_bang); mtx_powscalar_class = class_new(gensym("mtx_.^"), 0, (t_method)mtx_binscalar_free, sizeof(t_mtx_binscalar), 0, 0); class_addmethod(mtx_powscalar_class, (t_method)mtx_powscalar_matrix, gensym("matrix"), A_GIMME, 0); class_addlist (mtx_powscalar_class, mtx_powscalar_list); class_addbang (mtx_powscalar_class, mtx_binscalar_bang); class_sethelpsymbol(mtx_powelement_class, gensym("mtx_pow-help")); class_sethelpsymbol(mtx_powscalar_class, gensym("mtx_pow-help")); } void iemtx_pow_setup(void) { mtx_pow_setup(); } pd-iemmatrix-0.3/src/mtx_powtodb.c000066400000000000000000000043441262113134600172610ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, forum::für::umläute * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" #define LOGTEN 2.302585092994 /* mtx_powtodb: B=log(A); B[n,m]=e^A[n,m] */ static t_class *mtx_powtodb_class; static void mtx_powtodb_matrix(t_mtx_binmtx *x, t_symbol *s, int argc, t_atom *argv) { int row=atom_getfloat(argv++); int col=atom_getfloat(argv++); t_atom *m; int n = argc-2; if (argc<2){ post("mtx_powtodb: crippled matrix"); return; } if ((col<1)||(row<1)) { post("mtx_powtodb: invalid dimensions"); return; } if (col*row>argc-2){ post("sparse matrix not yet supported : use \"mtx_check\""); return; } adjustsize(&x->m, row, col); m = x->m.atombuffer+2; while(n--){ t_float f=atom_getfloat(argv++); t_float v=(f<0)?0.:(100+10./LOGTEN * log(f)); SETFLOAT(m, (v<0)?0:v); m++; } outlet_anything(x->x_obj.ob_outlet, gensym("matrix"), argc, x->m.atombuffer); } static void mtx_powtodb_list(t_mtx_binscalar *x, t_symbol *s, int argc, t_atom *argv) { int n=argc; t_atom *m; adjustsize(&x->m, 1, argc); m = x->m.atombuffer; while(n--){ t_float f=atom_getfloat(argv++); t_float v=(f<0)?0.:(100+10./LOGTEN * log(f)); SETFLOAT(m, (v<0)?0:v); m++; } outlet_list(x->x_obj.ob_outlet, gensym("list"), argc, x->m.atombuffer); } static void *mtx_powtodb_new(t_symbol *s) { /* element log */ t_matrix *x = (t_matrix *)pd_new(mtx_powtodb_class); outlet_new(&x->x_obj, 0); x->col = x->row = 0; x->atombuffer = 0; return(x); } void mtx_powtodb_setup(void) { mtx_powtodb_class = class_new(gensym("mtx_powtodb"), (t_newmethod)mtx_powtodb_new, (t_method)mtx_binmtx_free, sizeof(t_mtx_binmtx), 0, A_GIMME, 0); class_addmethod(mtx_powtodb_class, (t_method)mtx_powtodb_matrix, gensym("matrix"), A_GIMME, 0); class_addlist (mtx_powtodb_class, mtx_powtodb_list); class_addbang (mtx_powtodb_class, mtx_binmtx_bang); } void iemtx_powtodb_setup(void) { mtx_powtodb_setup(); } pd-iemmatrix-0.3/src/mtx_print.c000066400000000000000000000026271262113134600167410ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, forum::für::umläute * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" typedef struct _mtxprint { t_object x_obj; t_symbol *x_s; } t_mtxprint; /* mtx_print */ static t_class *mtx_print_class; static void mtx_print(t_mtxprint *x, t_symbol *s, int argc, t_atom *argv) { int col, row; if (argc<2){ post("mtx_print : crippled matrix"); return; } row = atom_getfloat(argv++); col = atom_getfloat(argv++); if(row*col>argc-2){ post("mtx_print : sparse matrices not yet supported : use \"mtx_check\""); return; } post("%s:", x->x_s->s_name); while(row--){ postatom(col, argv); argv+=col; endpost(); } endpost(); } static void *mtx_print_new(t_symbol*s) { t_mtxprint *x = (t_mtxprint *)pd_new(mtx_print_class); x->x_s=(s&&s!=&s_)?s:gensym("matrix"); return (x); } void mtx_print_setup(void) { mtx_print_class = class_new(gensym("mtx_print"), (t_newmethod)mtx_print_new, 0, sizeof(t_mtxprint), 0, A_DEFSYM, 0); class_addmethod (mtx_print_class, (t_method)mtx_print, gensym("matrix"), A_GIMME, 0); } void iemtx_print_setup(void){ mtx_print_setup(); } pd-iemmatrix-0.3/src/mtx_prod.c000066400000000000000000000034111262113134600165410ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, forum::für::umläute * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" /* mtx_prod */ /* column-wise product */ static t_class *mtx_prod_class; static void mtx_prod_matrix(t_matrix *x, t_symbol *s, int argc, t_atom *argv) { int row=atom_getfloat(argv++); int col=atom_getfloat(argv++); int n; if(row*col>argc-2)post("mtx_prod: sparse matrices not yet supported : use \"mtx_check\""); else { t_atom *ap = (t_atom *)getbytes(col * sizeof(t_atom)), *dummy=ap; for(n=0;nx_obj.ob_outlet, gensym("prod"), col, ap); freebytes(ap, (col * sizeof(t_atom))); } } static void mtx_prod_list(t_matrix *x, t_symbol *s, int argc, t_atom *argv){ t_float f=1.f; while(argc--)f*=atom_getfloat(argv++); outlet_float(x->x_obj.ob_outlet, f); } static void *mtx_prod_new(void) { t_matrix *x = (t_matrix *)pd_new(mtx_prod_class); outlet_new(&x->x_obj, 0); x->row = x->col = 0; x->atombuffer = 0; return (x); } void mtx_prod_setup(void) { mtx_prod_class = class_new(gensym("mtx_prod"), (t_newmethod)mtx_prod_new, (t_method)matrix_free, sizeof(t_matrix), 0, A_GIMME, 0); class_addlist (mtx_prod_class, mtx_prod_list); class_addmethod(mtx_prod_class, (t_method)mtx_prod_matrix, gensym("matrix"), A_GIMME, 0); } void iemtx_prod_setup(void){ mtx_prod_setup(); } pd-iemmatrix-0.3/src/mtx_qhull.c000066400000000000000000000110241262113134600167210ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * own qhull algorithm implementation * * Copyright (c) 2012, Franz Zotter * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" #include #include "mtx_qhull/zhull.h" static t_class *mtx_qhull_class; typedef struct MTXQhull_ MTXQhull; struct MTXQhull_ { t_object x_obj; t_outlet *outl; t_outlet *outl_fl; t_atom *list; size_t size; size_t hull_size; // int iter; zhull_t *zh; }; static void deleteMTXQhull(MTXQhull *xo) { if (xo->zh!=0) { free(xo->zh); xo->zh=0; } if (xo->list!=0) { free(xo->list); xo->list=0; xo->size=0; } } /*void mTXQhullSetIterations(MTXQhull *xo, t_float f) { xo->iter=(int)f; if (xo->iter<0) xo->iter=0; }*/ static void *newMTXQhull(t_symbol *s, int argc, t_atom *argv) { int nmax; MTXQhull *xo = (MTXQhull *) pd_new (mtx_qhull_class); xo->outl = outlet_new (&xo->x_obj, gensym("matrix")); xo->outl_fl = outlet_new (&xo->x_obj, gensym("float")); xo->zh=0; xo->list=0; xo->size=0; // xo->iter=0; // if (argc>0) // mTXQhullSetIterations(xo,atom_getfloat(argv)); return ((void *) xo); } static void mTXQhullMatrix(MTXQhull *xo, t_symbol *s, int argc, t_atom *argv) { int i; int rows=atom_getint(argv++); int columns=atom_getint(argv++); int size=rows*columns; int in_size=argc-2; float *x; float *y; float *z; /* size check */ if (!size) post("mtx_qhull: invalid dimensions"); else if (in_size=4"); else { xo->zh = (zhull_t*)malloc(sizeof(zhull_t)); x=(float*)malloc(rows*sizeof(float)); y=(float*)malloc(rows*sizeof(float)); z=(float*)malloc(rows*sizeof(float)); if ((x!=0)&&(y!=0)&&(z!=0)&&(xo->zh!=0)) { for (i=0; izh)=zhullInitPoints(x,y,z,rows); i=calculateZHull(xo->zh); outlet_float(xo->outl_fl, (float)i); free(x); free(y); free(z); xo->hull_size=getLength(xo->zh->facets); if (xo->list==0) { xo->list = (t_atom*)malloc((xo->hull_size*3+2)*sizeof(t_atom)); } else { xo->list = (t_atom*)realloc(xo->list,(xo->hull_size*3+2)*sizeof(t_atom)); } if(xo->list!=0) { xo->size=(xo->hull_size*3+2); SETFLOAT(xo->list,(float)xo->hull_size); SETFLOAT(xo->list+1,(float)3); for (i=0; ihull_size; i++) { SETFLOAT(xo->list+2+3*i, (float)getTriangleCorner(xo->zh,i,0)+1); SETFLOAT(xo->list+3+3*i, (float)getTriangleCorner(xo->zh,i,1)+1); SETFLOAT(xo->list+4+3*i, (float)getTriangleCorner(xo->zh,i,2)+1); } outlet_anything(xo->outl, gensym("matrix"), xo->size, xo->list); freeZhull(xo->zh); free(xo->zh); xo->zh=0; } else { post("mtx_qhull: memory problem, no operation!"); xo->size=0; freeZhull(xo->zh); free(xo->zh); xo->zh=0; } } else { if(x!=0) free(x); if(y!=0) free(y); if(z!=0) free(z); if(xo->zh!=0) free(xo->zh); xo->zh=0; post("mtx_qhull: memory error, no operation!"); } } } static void mtx_qhull_setup (void) { mtx_qhull_class = class_new ( gensym("mtx_qhull"), (t_newmethod) newMTXQhull, (t_method) deleteMTXQhull, sizeof(MTXQhull), CLASS_DEFAULT, A_GIMME, 0); class_addmethod(mtx_qhull_class, (t_method) mTXQhullMatrix, gensym("matrix"), A_GIMME, 0); // class_addfloat(mtx_qhull_class, (t_method) mTXQhullSetIterations); } void iemtx_qhull_setup(void){ mtx_qhull_setup(); } pd-iemmatrix-0.3/src/mtx_qhull/000077500000000000000000000000001262113134600165575ustar00rootroot00000000000000pd-iemmatrix-0.3/src/mtx_qhull/convhull.pd000066400000000000000000000163571262113134600207520ustar00rootroot00000000000000#N canvas 516 162 809 477 12; #N canvas 361 7 823 746 alltriangles 0; #X obj 90 -47 t a a; #X obj 90 -21 mtx_size; #X obj 90 48 until; #X obj 132 48 f; #X obj 168 49 + 1; #X msg 150 26 1; #X obj 331 370 mtx; #X obj 273 370 mtx; #X obj 216 370 mtx; #X msg 216 348 row \$1; #X obj 132 154 until; #X obj 174 154 f; #X obj 202 154 + 1; #X obj 132 68 + 1; #X obj 132 110 -; #X obj 90 -1 t f b f; #X obj 132 88 t f f f; #X obj 216 283 pack f f f; #X obj 132 132 * -1; #X obj 90 27 - 2; #X obj 186 112 - 1; #X obj 174 262 until; #X obj 216 262 f; #X obj 244 262 + 1; #X obj 174 218 -; #X obj 174 196 t f f f; #X obj 174 240 * -1; #X obj 228 220 - 1; #X obj 174 176 + 1; #X obj 206 176 + 1; #X obj 90 -71 inlet; #X obj 216 508 outlet; #X obj 216 433 list append; #X obj 273 403 list append; #X obj 216 455 mtx 3 3; #X text 218 54 n=1...L; #X text 249 158 m=n+1...L; #X text 302 267 k=m+1...L; #X text 351 285 [k m n(; #X text 312 451 comment; #X obj 216 482 mtx_transpose; #X text 330 482 [ak \, am \, an]; #X obj 462 511 outlet kmn; #X msg 273 348 row \$2; #X msg 331 348 row \$3; #X obj 216 304 t l l l; #X connect 0 0 1 0; #X connect 0 1 6 1; #X connect 0 1 7 1; #X connect 0 1 8 1; #X connect 1 0 15 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 3 0 13 0; #X connect 4 0 3 1; #X connect 5 0 3 1; #X connect 6 0 33 1; #X connect 7 0 33 0; #X connect 8 0 32 0; #X connect 9 0 8 0; #X connect 10 0 11 0; #X connect 11 0 12 0; #X connect 11 0 17 1; #X connect 11 0 28 0; #X connect 12 0 11 1; #X connect 13 0 16 0; #X connect 14 0 18 0; #X connect 15 0 19 0; #X connect 15 1 5 0; #X connect 15 2 14 1; #X connect 15 2 29 0; #X connect 16 0 14 0; #X connect 16 1 11 1; #X connect 16 2 20 0; #X connect 17 0 42 0; #X connect 17 0 45 0; #X connect 18 0 10 0; #X connect 19 0 2 0; #X connect 20 0 17 2; #X connect 21 0 22 0; #X connect 22 0 23 0; #X connect 22 0 17 0; #X connect 23 0 22 1; #X connect 24 0 26 0; #X connect 25 0 24 0; #X connect 25 1 22 1; #X connect 25 2 27 0; #X connect 26 0 21 0; #X connect 27 0 22 1; #X connect 28 0 25 0; #X connect 29 0 24 1; #X connect 30 0 0 0; #X connect 32 0 34 0; #X connect 33 0 32 1; #X connect 34 0 40 0; #X connect 40 0 31 0; #X connect 43 0 7 0; #X connect 44 0 6 0; #X connect 45 0 9 0; #X connect 45 1 43 0; #X connect 45 2 44 0; #X restore 107 124 pd alltriangles; #X obj 107 96 t a a; #X obj 16 16 inlet; #X obj 16 389 outlet; #N canvas 0 0 450 474 normalizepoints 0; #X obj 94 39 inlet; #X obj 94 63 t a a; #X obj 139 133 mtx_.^ 2; #X obj 139 156 mtx_sum; #X obj 139 180 t l l; #X obj 139 207 mtx; #X obj 185 180 length; #X obj 94 308 outlet; #X obj 94 282 mtx_./; #X obj 139 230 mtx_.^ 0.5; #X msg 240 180 size \$1 1; #X obj 138 254 mtx_repmat 1 3; #X obj 138 108 mtx_transpose; #X connect 0 0 1 0; #X connect 1 0 8 0; #X connect 1 1 12 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 4 0 5 0; #X connect 4 1 6 0; #X connect 5 0 9 0; #X connect 6 0 10 0; #X connect 8 0 7 0; #X connect 9 0 11 0; #X connect 10 0 5 0; #X connect 11 0 8 1; #X connect 12 0 2 0; #X restore 107 69 pd normalizepoints; #X obj 98 270 t l; #X obj 16 297 list; #X obj 16 321 t l l; #X obj 16 355 mtx; #X obj 70 321 length; #X obj 130 321 / 3; #X msg 164 321 size \$1 3; #X obj 59 270 list; #X obj 16 42 t b a b; #X text 308 55 \$1 allows to specify the algorithmic exactness; #X text 329 73 if \$1>0 \, triangles that are not strictly; #X text 330 91 part of the convex hull can be enclosed; #X text 329 109 it is recommended for numerical reasons to use; #X text 331 126 0.001 to ensure all triangles can be found; #N canvas 25 51 450 300 normal_vector 0; #X obj 47 32 inlet; #X obj 47 228 outlet; #X obj 109 166 mtx_-; #X obj 47 148 t a a; #X obj 47 59 t a a; #X obj 47 171 mtx_-; #X text 128 194 n_kmn = (am-ak) x (am-an); #X obj 95 84 mtx_slice 1 3 end 3; #X obj 79 105 mtx_slice 1 1 end 1; #X obj 47 128 mtx_slice 1 2 end 2; #X obj 47 193 mtx_xprod; #X connect 0 0 4 0; #X connect 2 0 10 1; #X connect 3 0 5 0; #X connect 3 1 2 0; #X connect 4 0 9 0; #X connect 4 1 7 0; #X connect 4 1 8 0; #X connect 5 0 10 0; #X connect 7 0 2 1; #X connect 8 0 5 1; #X connect 9 0 3 0; #X connect 10 0 1 0; #X restore 107 153 pd normal_vector; #N canvas 93 179 470 520 normal_distances 0; #X obj 16 21 inlet; #X obj 16 489 outlet; #X obj 333 24 inlet Punkte; #X obj 214 28 inlet k; #X obj 16 318 mtx_*; #X obj 16 183 t a a; #X obj 333 199 mtx_transpose; #X obj 214 155 mtx; #X msg 214 128 row \$1; #X obj 213 178 mtx 3 1; #X obj 69 349 mtx_*; #X text 30 290 n_kmn^T * P; #X text 116 348 n_kmn^T * ak; #X obj 16 153 mtx_transpose; #X obj 16 438 mtx_- 0; #X msg 69 378 \$3; #N canvas 612 2 450 474 normalizepoints2 0; #X obj 94 19 inlet; #X obj 94 43 t a a; #X obj 139 93 mtx_.^ 2; #X obj 139 116 mtx_sum; #X obj 139 140 t l l; #X obj 139 167 mtx; #X obj 185 140 length; #X obj 94 268 outlet; #X obj 94 242 mtx_./; #X obj 139 190 mtx_.^ 0.5; #X msg 240 141 size 1 \$1; #X obj 138 212 mtx_repmat 3 1; #X connect 0 0 1 0; #X connect 1 0 8 0; #X connect 1 1 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 4 0 5 0; #X connect 4 1 6 0; #X connect 5 0 9 0; #X connect 6 0 10 0; #X connect 8 0 7 0; #X connect 9 0 11 0; #X connect 10 0 5 0; #X connect 11 0 8 1; #X restore 16 98 pd normalizepoints2; #X connect 0 0 16 0; #X connect 2 0 6 0; #X connect 2 0 7 1; #X connect 3 0 8 0; #X connect 4 0 14 0; #X connect 5 0 4 0; #X connect 5 1 10 0; #X connect 6 0 4 1; #X connect 7 0 9 0; #X connect 8 0 7 0; #X connect 9 0 10 1; #X connect 10 0 15 0; #X connect 13 0 5 0; #X connect 14 0 1 0; #X connect 15 0 14 1; #X connect 16 0 13 0; #X restore 107 186 pd normal_distances; #N canvas 0 0 678 377 filter_triangle_of_hull 0; #X obj 23 11 inlet; #X text 32 -8 normalabstaende; #X obj 241 12 inlet; #X text 246 -7 k m n; #X obj 23 58 t a a; #X obj 146 142 mtx_* -1; #X obj 146 188 mtx_prod; #X obj 23 36 mtx_transpose; #X obj 23 178 mtx_prod; #X obj 23 202 sel 1; #X obj 146 211 sel 1; #X obj 146 238 list; #X msg 23 278 \$3 \$2 \$1; #X obj 23 232 list; #X obj 23 325 outlet; #X text 419 40 \$1 adds some inaccuracy; #X text 446 57 to "convex"; #X text 265 202 of the regarded triangle?; #X text 298 265 hull; #X obj 365 14 loadbang; #X obj 146 165 mtx_>= 0; #X obj 23 142 mtx_>= 0; #X obj 365 36 f \$1; #X obj 365 57 abs; #X obj 364 79 * -1; #X text 264 185 are all points on one or the other side; #X text 296 248 then it is part of the convex; #X text 261 218 (or at least close to that); #X connect 0 0 7 0; #X connect 2 0 11 1; #X connect 2 0 13 1; #X connect 4 0 21 0; #X connect 4 1 5 0; #X connect 5 0 20 0; #X connect 6 0 10 0; #X connect 7 0 4 0; #X connect 8 0 9 0; #X connect 9 0 13 0; #X connect 10 0 11 0; #X connect 11 0 14 0; #X connect 12 0 14 0; #X connect 13 0 12 0; #X connect 19 0 22 0; #X connect 20 0 6 0; #X connect 21 0 8 0; #X connect 22 0 23 0; #X connect 23 0 24 0; #X connect 24 0 20 1; #X connect 24 0 21 1; #X restore 107 218 pd filter_triangle_of_hull; #X connect 0 0 19 0; #X connect 0 1 20 1; #X connect 0 1 21 1; #X connect 1 0 0 0; #X connect 1 1 20 2; #X connect 2 0 13 0; #X connect 4 0 1 0; #X connect 5 0 12 1; #X connect 6 0 7 0; #X connect 7 0 8 0; #X connect 7 1 9 0; #X connect 8 0 3 0; #X connect 9 0 10 0; #X connect 10 0 11 0; #X connect 11 0 8 0; #X connect 12 0 5 0; #X connect 12 0 6 1; #X connect 13 0 6 0; #X connect 13 1 4 0; #X connect 13 2 6 1; #X connect 13 2 12 1; #X connect 19 0 20 0; #X connect 20 0 21 0; #X connect 21 0 12 0; pd-iemmatrix-0.3/src/mtx_qhull/entry.h000066400000000000000000000030301262113134600200650ustar00rootroot00000000000000#ifndef QHULL_ENTRY_H #define QHULL_ENTRY_H #include #include /* * variable entry types for * list operations in zhull * * Copyright (c) 2012, IOhannes zmoelnig, * with friendly help from * IEM, Graz, Austria * * */ typedef size_t index_t; typedef union { index_t i; void*p; } entryvalu_t; typedef enum { INDEX, POINTER, INVALID } entrytype_t; typedef struct entry_ { entrytype_t typ; entryvalu_t val; } entry_t; static void entry_setIndex(entry_t*e, index_t i) { e->typ=INDEX; e->val.i=i; } static void entry_setPointer(entry_t*e, void*p) { e->typ=POINTER; e->val.p=p; } static entry_t entry_makeIndex(index_t i) { entry_t result; entry_setIndex(&result, i); return result; } static entry_t entry_makePointer(void*p) { entry_t result; entry_setPointer(&result, p); return result; } static index_t entry_getIndex(const entry_t*e) { return (INDEX==e->typ)?e->val.i:0; } static void*entry_getPointer(const entry_t*e) { return (POINTER==e->typ)?e->val.p:0; } static int entry_equals(const entry_t*e1, const entry_t*e2) { if(e1->typ!=e2->typ)return 0; switch(e1->typ) { case INDEX: return (e1->val.i == e2->val.i); case POINTER: return (e1->val.p == e2->val.p); default: return 0; } return 0; } static void print_entry(const entry_t e) { switch(e.typ) { case INDEX: printf("%lu", (unsigned long)(e.val.i)); return; case POINTER: printf("0x%p", e.val.p); return; default: printf(""); return; } } #endif pd-iemmatrix-0.3/src/mtx_qhull/list.c000066400000000000000000000204631262113134600177030ustar00rootroot00000000000000#include "list.h" #include #include /* * list operations for zhull * * Copyright (c) 2012, Franz Zotter, * with friendly help from * IOhannes zmoelnig * for variable entry types * in entry.h * IEM, Graz, Austria * * */ // memory things: list_t emptyList(void) { list_t generated_list; generated_list.length=0; generated_list.entries=0; return generated_list; } list_t allocateList(const size_t length) { list_t generated_list = emptyList(); if (length>0) { generated_list.entries= (entry_t*) malloc(length*sizeof(entry_t)); if (generated_list.entries!=0) { generated_list.length=length; } } return generated_list; } void reallocateList(list_t *list, const size_t length) { entry_t *old_entries = list->entries; if (length>0) { if (getLength(*list)==0) *list = allocateList(length); else { if (list->length != length) list->entries = (entry_t*) realloc(list->entries,length*sizeof(entry_t)); if (list->entries!=0) list->length=length; else *list=emptyList(); } } else freeList(list); } void freeList(list_t *list) { if (list->entries!=0) { free(list->entries); } list->entries=0; list->length=0; } // programming interface: size_t getLength(const list_t list) { return list.length; } entry_t getEntry(const list_t list, const index_t index) { if ((index>=0)&&(index=0)&&(index=start) { length=(size_t) (stop-start+1); incr=1; } else { length=(size_t) (start-stop+1); incr=-1; } list_t l = allocateList(length); if (getLength(l)!=0) { for (i=0,c=start; i=getLength(list1)) { for (i=0; i0)&&(stop>0)&&(startstop) { incr=-1; new_list=allocateList(start-stop+1); } else { incr=1; new_list=allocateList(start-stop+1); } for (j=start,i=0; ii) { setEntry(*list,i,entry); } } void removeIndexFromList(list_t *list, const index_t index) { index_t i,j; for (i=j=0; i0) for (i=0, j=getLength(*list)-1; ientries[j]; entry_t e2=list->entries[i]; if(entry_equals(&e1, &e2)) break; } if (i==k) { list->entries[i++]=list->entries[j]; k++; } } reallocateList(list, k); } list_t findValueListInList(const list_t value_list, const list_t list) { list_t l=emptyList(); index_t i,j; for (i=0; i0) { print_entry(getEntry(list,0)); } for (i=1; i #include #include #include "entry.h" /* * list operations for zhull * * Copyright (c) 2012, Franz Zotter, * with friendly help from * IOhannes zmoelnig * for variable entry types * in entry.h * IEM, Graz, Austria * * */ typedef struct list_ { entry_t *entries; size_t length; } list_t; // memory things: list_t emptyList(void); void freeList(list_t *list); // programming interface: size_t getLength(const list_t list); entry_t getEntry(const list_t list, const index_t index); void setEntry(const list_t list, const index_t index, const entry_t entry); list_t initList(const entry_t *entries, const size_t length); list_t initListIndex(const index_t *entries, const size_t length); list_t initListFromTo(const index_t start, const index_t stop); list_t initConstantList(const entry_t c, const size_t length); list_t duplicateList(const list_t list_in); list_t mergeLists(const list_t list1, const list_t list2); list_t getSubList(const list_t list, const list_t indices); list_t getSubListFromTo(const list_t list, const index_t start, const index_t stop); void appendToList(list_t *list, const entry_t entry); void removeValueFromList(list_t *list, const entry_t entry); void removeIndexFromList(list_t *list, const index_t index); void appendListToList(list_t *list1, const list_t list2); void removeValueListFromList(list_t *list, const list_t excl_list); void removeEntryListFromList(list_t *list, const list_t indices); void reverseList(list_t * const list); int inList(const entry_t entry, const list_t list); int notInList(const entry_t entry, const list_t list); list_t findValueListInList(const list_t value_list, const list_t list); index_t findValueInList(const entry_t entry, const list_t list); void uniquefyListEntries(list_t *list); void printList(const list_t list); #endif /* QHULL_LIST_H */ pd-iemmatrix-0.3/src/mtx_qhull/mtx_xprod.pd000066400000000000000000000015061262113134600211320ustar00rootroot00000000000000#N canvas 502 62 631 420 12; #X obj 73 53 inlet; #X obj 473 54 inlet; #X obj 73 81 t a a; #X obj 73 202 mtx_.*; #X obj 197 201 mtx_.*; #X obj 73 239 mtx_-; #X obj 73 287 outlet; #X text 180 34 mtx: cross product; #X text 291 206 matrix1: 3xN; #X text 291 227 matrix2: 3xN; #X text 291 252 ============; #X text 299 273 matrix: 3xN; #X text 407 206 [a1 a2 a3 ...]; #X text 408 227 [b1 b2 b3 ...]; #X text 410 272 [a1 x b1 \, a2 x b2 \, ...]; #X obj 73 114 mtx_scroll -1; #X obj 197 114 mtx_scroll 1; #X obj 345 112 mtx_scroll 1; #X obj 473 113 mtx_scroll -1; #X connect 0 0 2 0; #X connect 1 0 17 0; #X connect 1 0 18 0; #X connect 2 0 15 0; #X connect 2 1 16 0; #X connect 3 0 5 0; #X connect 4 0 5 1; #X connect 5 0 6 0; #X connect 15 0 3 0; #X connect 16 0 4 0; #X connect 17 0 3 1; #X connect 18 0 4 1; pd-iemmatrix-0.3/src/mtx_qhull/test_list.c000066400000000000000000000042251262113134600207400ustar00rootroot00000000000000#include #include #include "list.h" int main(char **argv, int argc) { list_t l1=emptyList(); list_t l2=emptyList(); list_t l3=emptyList(); index_t x[]={0, 2, 4, 6}; printf("\nempty list:\n"); printList(l1); freeList(&l1); printf("\nconstant list with 10 1 entries:\n"); l1=initConstantList(entry_makeIndex(1),10); printList(l1); freeList(&l1); printf("\nlist from 2 to 3:\n"); l1=initListFromTo(2,3); printList(l1); printf("\nlist from 7 to 1:\n"); l2=initListFromTo(7,1); printList(l2); printf("\nduplicate list from 2 to 3:\n"); l3=duplicateList(l1); printList(l3); freeList(&l3); printf("\nmerge list from 2..3 with list 7..1:\n"); l3=mergeLists(l1,l2); printList(l3); printf("\nremove value 6 list from list:\n"); removeValueFromList(&l3,entry_makeIndex(6)); printList(l3); printf("\nremove values [2, 3] from list:\n"); removeValueListFromList(&l3,l1); printList(l3); printf("\nreverse list:\n"); reverseList (&l2); printList(l2); printf("\nappend entry 8 to list:\n"); appendToList(&l3,entry_makeIndex(8)); printList(l3); printf("\nis 8 not in list?: %d\n",notInList(entry_makeIndex(8),l3)); printf("is 3 not in list?: %d\n",notInList(entry_makeIndex(3),l3)); printf("\nremove index 4 from list\n"); removeIndexFromList(&l3,4); printList(l3); printf("\nremove index 1 from list\n"); removeIndexFromList(&l3,1); printList(l3); printf("\nremove index 0 from list\n"); removeIndexFromList(&l3,0); printList(l3); printf("\n...taking a longer list\n"); printList(l2); freeList(&l3); l3=initListIndex(x,4); printf("\nremoving index list "); printList(l3); removeEntryListFromList(&l2,l3); printList(l2); freeList(&l1); freeList(&l2); freeList(&l3); l1=initListFromTo(1,3); l2=initListFromTo(0,5); printf("\n...taking a longer list\n"); printList(l1); printf("\nfinding indices of values in list"); printList(l2); l3=findValueListInList(l2,l1); printList(l3); freeList(&l1); freeList(&l2); freeList(&l3); } // gcc list.c test_list.c && ./a.out pd-iemmatrix-0.3/src/mtx_qhull/test_write_conv_hull_obj.pd000066400000000000000000000206441262113134600242060ustar00rootroot00000000000000#N canvas 468 416 824 552 10; #N canvas 69 11 539 331 writeobject 0; #X obj 163 270 textfile; #X obj 163 161 mtx; #X obj 163 123 until; #X obj 200 123 f; #X obj 226 123 + 1; #X msg 225 102 1; #X obj 163 81 t a a b; #X obj 163 102 mtx_size; #X obj 143 32 inlet; #X obj 373 44 inlet; #X msg 199 142 row \$1; #X obj 163 238 list trim; #X msg 269 196 add \$1; #X msg 329 174 symbol v; #X obj 373 65 t a b; #X obj 143 54 t b a b; #X msg 45 230 write test.obj cr; #X msg 399 108 clear; #X obj 164 218 list prepend; #X msg 269 174 symbol f; #X connect 1 0 18 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 3 0 10 0; #X connect 4 0 3 1; #X connect 5 0 3 1; #X connect 6 0 7 0; #X connect 6 1 1 1; #X connect 6 2 5 0; #X connect 7 0 2 0; #X connect 8 0 15 0; #X connect 9 0 14 0; #X connect 10 0 1 0; #X connect 11 0 0 0; #X connect 12 0 18 1; #X connect 13 0 12 0; #X connect 14 0 6 0; #X connect 14 1 13 0; #X connect 14 1 17 0; #X connect 15 0 16 0; #X connect 15 1 6 0; #X connect 15 2 19 0; #X connect 16 0 0 0; #X connect 17 0 0 0; #X connect 18 0 11 0; #X connect 19 0 12 0; #X restore 217 444 pd writeobject; #N canvas 4 49 450 300 gemwin 0; #X obj 132 136 gemwin; #X obj 67 89 outlet; #X obj 67 10 inlet; #X obj 67 41 route create; #X msg 67 70 set destroy; #X msg 142 68 set create; #X msg 132 112 create \, 1 \, lighting 1; #X msg 298 112 destroy \, reset; #X msg 256 79 color 0.78 0.8 1; #X obj 256 57 loadbang; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 3 0 6 0; #X connect 3 1 5 0; #X connect 3 1 7 0; #X connect 4 0 1 0; #X connect 5 0 1 0; #X connect 6 0 0 0; #X connect 7 0 0 0; #X connect 8 0 0 0; #X connect 9 0 8 0; #X restore 376 128 pd gemwin; #X msg 376 109 destroy; #X obj 488 109 gemhead; #X obj 494 129 world_light; #X obj -11 319 gemhead; #X obj 79 452 model; #X floatatom 6 382 5 0 0 0 - - -; #X floatatom 49 383 5 0 0 0 - - -; #X floatatom 89 383 5 0 0 0 - - -; #X msg 33 333 open test.obj; #X msg 129 400 rescale 0; #X obj -9 358 color 0.9 0.9 0.9; #X obj 335 426 mtx_* 1.5; #X obj -10 338 ortho; #X obj 137 309 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1; #X obj 112 358 f; #X obj 167 358 % 360; #X obj 129 329 metro 50; #X msg 9 452 smooth 0; #X obj 213 386 mtx; #X obj 212 421 mtx_slice; #X msg 251 400 1 1 \$1 end; #X floatatom 73 276 5 0 0 0 - - -; #X obj 334 402 mtx; #X obj 113 277 t b b f b; #X obj 253 369 mtx_size; #X obj 229 350 t a a; #X msg 312 371 set \$1; #X obj -16 404 rotateXYZ -74 0 0; #X obj 140 358 + 3; #X obj 46 429 t b a; #X obj 335 317 convhull 0.001; #X obj 231 271 t a a; #X msg 151 83 4 40; #X msg 188 66 5 67; #X msg 149 67 3 26; #X msg 43 124 read designsN/N\$1_\$2.mtx \, bang; #X obj 41 205 mtx; #X obj 236 294 demux; #X obj 123 182 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1; #X obj 71 180 t b f; #X msg 190 85 9 180; #X msg 97 66 2 14; #X msg 46 88 2.5 12; #X floatatom 323 249 5 0 0 0 - - -; #X obj 317 269 t b f; #X msg -123 202 read Rls.mtx \, bang; #X msg 100 85 2.5 20; #X obj 107 239 mtx_size; #X obj 42 235 t b a a; #X obj 175 238 * 2; #X obj 207 238 - 4; #X floatatom 236 237 5 0 0 0 - - -; #X obj 396 64 mtx_print; #X msg 278 37 matrix 8 3 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1; #X obj 388 256 mtx_print; #N canvas 0 0 624 397 makepolygon 0; #X obj 75 114 mtx_:; #X obj 80 44 t f f; #X obj 83 70 - 1; #X msg 83 90 0 \$1; #X obj 89 139 mtx_./ 1; #X obj 87 187 mtx_* 3.14159; #X obj 92 163 mtx_* 2; #X obj 94 208 t a a a; #X obj 150 210 mtx_size; #X msg 218 208 1 \$1; #X obj 258 208 mtx_zeros; #X obj 103 238 mtx_cos; #X obj 136 265 mtx_sin; #X obj 143 341 mtx_transpose; #X obj 147 363 outlet; #X obj 114 17 inlet; #X obj 279 340 mtx_print; #X obj 135 317 mtx_concat col; #X obj 173 291 mtx_concat col; #X msg 68 19 5; #X connect 0 0 4 0; #X connect 1 0 2 0; #X connect 1 1 4 1; #X connect 2 0 3 0; #X connect 3 0 0 0; #X connect 4 0 6 0; #X connect 5 0 7 0; #X connect 6 0 5 0; #X connect 7 0 11 0; #X connect 7 1 12 0; #X connect 7 2 8 0; #X connect 8 1 9 0; #X connect 9 0 10 0; #X connect 10 0 18 1; #X connect 11 0 17 0; #X connect 12 0 18 0; #X connect 13 0 14 0; #X connect 13 0 16 0; #X connect 15 0 1 0; #X connect 17 0 13 0; #X connect 18 0 17 1; #X connect 19 0 1 0; #X restore 376 163 pd makepolygon; #X obj 387 207 mtx_concat; #X msg 432 186 matrix 1 3 0 0 1; #X obj 382 187 t a b; #X msg 48 161 matrix 5 3 0 0 0 1 0 0 0 1 0 1 1 0 0.5 0.5 0; #X msg 322 136 9; #X obj -102 271 ../../abs/mtx_randperm; #X obj -103 229 t a a; #X obj -103 250 mtx_size; #X obj -101 293 mtx_*; #X obj -32 342 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1; #X msg 251 5 matrix 4 3 0 0 0 1 0 0 2 0 0 0 1 0; #X obj -115 -11 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1; #N canvas 547 27 715 363 combine_objects 1; #X obj -127 48 mtx; #X obj -124 69 t a a; #X obj -74 31 mtx_size; #X obj -68 53 pack; #X obj -69 72 mtx_rand; #X obj -89 131 mtx_+; #X obj -86 175 mtx_+; #X obj -41 175 mtx_* 0.94; #X obj -89 152 mtx_* 0.06; #X obj -67 92 mtx_* -2; #X obj -37 131 mtx_* 0.3; #X obj -99 8 metro 38; #X obj 264 5 inlet; #X obj -100 -13 inlet; #X obj -81 256 outlet; #X obj 204 2 inlet; #X obj 87 106 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj -52 112 mtx_+ 1; #X obj 73 225 mtx_concat; #X obj 56 63; #X obj 150 205 mtx_* 1; #X obj 78 204 mtx; #X obj 270 127 max 0.1; #X obj 238 46 t b f; #X obj 271 82 f; #X obj 192 64 delay 50; #X obj 243 106 t b b f; #X msg 434 97 4 40; #X obj 166 178 mtx; #X msg 473 99 9 180; #X msg 326 138 read designsN/N\$1_\$2.mtx; #X msg 374 75 1 4; #X msg 373 104 1.5 6; #X obj 380 51 loadbang; #X connect 0 0 1 0; #X connect 1 0 5 0; #X connect 1 1 2 0; #X connect 2 0 3 0; #X connect 2 1 3 1; #X connect 3 0 4 0; #X connect 4 0 9 0; #X connect 5 0 8 0; #X connect 6 0 7 0; #X connect 6 0 14 0; #X connect 7 0 6 1; #X connect 8 0 6 0; #X connect 9 0 17 0; #X connect 10 0 5 1; #X connect 11 0 0 0; #X connect 12 0 23 0; #X connect 13 0 11 0; #X connect 15 0 0 1; #X connect 15 0 7 0; #X connect 15 0 21 1; #X connect 16 0 0 0; #X connect 17 0 10 0; #X connect 18 0 14 0; #X connect 20 0 18 1; #X connect 21 0 18 0; #X connect 22 0 20 1; #X connect 23 0 25 0; #X connect 23 1 24 1; #X connect 24 0 26 0; #X connect 25 0 24 0; #X connect 26 0 21 0; #X connect 26 1 28 0; #X connect 26 2 22 0; #X connect 27 0 30 0; #X connect 28 0 20 0; #X connect 29 0 30 0; #X connect 30 0 28 0; #X connect 31 0 30 0; #X connect 32 0 30 0; #X connect 33 0 31 0; #X restore -108 23 pd combine_objects; #X obj -95 -12 hsl 128 15 0 3 0 0 empty empty empty -2 -8 0 10 -262144 -1 -1 0 1; #X msg 48 69 1.5 6; #X floatatom 58 14 5 0 0 0 - - -; #X msg 20 46 0.573; #X obj 236 316 mtx_qhull; #X floatatom 302 333 5 0 0 0 - - -; #X obj 441 382 mtx_print; #X connect 1 0 2 0; #X connect 2 0 1 0; #X connect 3 0 4 0; #X connect 5 0 14 0; #X connect 7 0 29 1; #X connect 8 0 29 2; #X connect 9 0 29 3; #X connect 10 0 31 0; #X connect 11 0 6 0; #X connect 12 0 29 0; #X connect 13 0 0 1; #X connect 14 0 12 0; #X connect 15 0 18 0; #X connect 16 0 9 0; #X connect 16 0 30 0; #X connect 17 0 16 1; #X connect 18 0 16 0; #X connect 19 0 6 0; #X connect 20 0 21 0; #X connect 21 0 0 0; #X connect 22 0 21 1; #X connect 23 0 25 0; #X connect 24 0 13 0; #X connect 25 0 10 0; #X connect 25 1 20 0; #X connect 25 2 22 0; #X connect 25 3 24 0; #X connect 26 0 22 0; #X connect 26 0 28 0; #X connect 27 0 20 0; #X connect 27 1 26 0; #X connect 28 0 23 0; #X connect 29 0 6 0; #X connect 30 0 17 0; #X connect 31 0 19 0; #X connect 31 1 6 0; #X connect 32 0 27 0; #X connect 33 0 39 0; #X connect 33 1 24 0; #X connect 34 0 37 0; #X connect 35 0 37 0; #X connect 36 0 37 0; #X connect 37 0 38 0; #X connect 38 0 50 0; #X connect 38 0 70 1; #X connect 39 0 75 0; #X connect 39 1 32 0; #X connect 40 0 41 0; #X connect 41 0 38 0; #X connect 41 1 39 1; #X connect 42 0 37 0; #X connect 43 0 37 0; #X connect 44 0 37 0; #X connect 45 0 46 0; #X connect 46 0 38 0; #X connect 46 1 75 0; #X connect 47 0 38 0; #X connect 48 0 37 0; #X connect 49 0 51 0; #X connect 50 0 10 0; #X connect 50 1 33 0; #X connect 50 2 49 0; #X connect 51 0 52 0; #X connect 52 0 53 0; #X connect 55 0 38 0; #X connect 57 0 60 0; #X connect 58 0 38 0; #X connect 59 0 58 1; #X connect 60 0 58 0; #X connect 60 1 59 0; #X connect 61 0 38 0; #X connect 62 0 57 0; #X connect 63 0 66 0; #X connect 64 0 65 0; #X connect 64 1 66 1; #X connect 65 0 63 0; #X connect 66 0 50 0; #X connect 67 0 14 0; #X connect 68 0 38 0; #X connect 69 0 70 0; #X connect 70 0 50 0; #X connect 71 0 70 2; #X connect 71 0 73 0; #X connect 72 0 37 0; #X connect 74 0 70 2; #X connect 75 0 27 0; #X connect 75 0 77 0; #X connect 75 1 76 0; pd-iemmatrix-0.3/src/mtx_qhull/vectors.c000066400000000000000000000170451262113134600204170ustar00rootroot00000000000000#include "vectors.h" /* * vector operations for zhull * * Copyright (c) 2012, Franz Zotter * IEM, Graz, Austria * * */ vector_t initVector (const float x, const float y, const float z) { vector_t vec={x, y, z}; return vec; } float lengthVector(const vector_t v) { return sqrtf(v.c[0]*v.c[0]+v.c[1]*v.c[1]+v.c[2]*v.c[2]); } vector_t normalizeVector(vector_t v) { float r=lengthVector(v); v.c[0]/=r; v.c[1]/=r; v.c[2]/=r; return v; } plane_t initPlane (vector_t normal, const vector_t point) { plane_t plane; plane.point = point; plane.normal = normalizeVector(normal); return plane; } line_t initLine (vector_t direction, const vector_t point) { line_t line; line.point = point; line.direction = normalizeVector(direction); return line; } points_t allocatePoints (const size_t num_points) { points_t points; points.v = (vector_t *) malloc(sizeof(vector_t)*num_points); if (points.v!=0) points.num_points = num_points; return points; } points_t initPoints (const float *x, const float *y, const float *z, const size_t num_points) { points_t points = allocatePoints(num_points); size_t i; for (i=0; iv); if (points!=0) { if (points->v!=0) free(points->v); points->v = 0; points->num_points = 0; } } void reallocatePoints (points_t *points, const size_t num_points) { if ((num_points>0)&&(points!=0)) { if (getNumPoints(*points)==0) *points=allocatePoints(num_points); else { points->v = (vector_t *) realloc(points->v,sizeof(vector_t)*num_points); if (points->v!=0) points->num_points=num_points; else points->num_points=0; } if (points->v!=0) points->num_points = num_points; } else freePoints(points); } void appendPoints(points_t *points, const float *x, const float *y, const float *z, const size_t num_points) { const size_t n=getNumPoints(*points); size_t i,j; reallocatePoints(points,getNumPoints(*points)+num_points); for (i=n,j=0; iv[i] = initVector(x[j],y[j],z[j]); } } vector_t crossProduct (const vector_t v1, const vector_t v2) { vector_t cp; cp.c[0]= v1.c[1]*v2.c[2]-v1.c[2]*v2.c[1]; cp.c[1]=-v1.c[0]*v2.c[2]+v1.c[2]*v2.c[0]; cp.c[2]= v1.c[0]*v2.c[1]-v1.c[1]*v2.c[0]; return cp; } float innerProduct (const vector_t v1, const vector_t v2) { return v1.c[0]*v2.c[0] + v1.c[1]*v2.c[1] + v1.c[2]*v2.c[2]; } float distancePointPoint(const vector_t a, const vector_t b) { vector_t d=subtractVectors(b,a); return lengthVector(d); } float distancePointPlane (const vector_t point, const plane_t plane) { return innerProduct(point, plane.normal) - innerProduct(plane.point, plane.normal); } float distancePointLine (const vector_t point, const line_t line) { return lengthVector(crossProduct(line.direction, subtractVectors(point,line.point))); } float distancePointLineOnPlane (vector_t const point, const line_t line, const plane_t plane) { vector_t normal_in_plane = normalizeVector(crossProduct( line.direction, plane.normal)); return innerProduct(subtractVectors(point,line.point),normal_in_plane); } vector_t addVectors(const vector_t v1, const vector_t v2) { vector_t v3; v3.c[0]=v1.c[0]+v2.c[0]; v3.c[1]=v1.c[1]+v2.c[1]; v3.c[2]=v1.c[2]+v2.c[2]; return v3; } vector_t subtractVectors(const vector_t v1, const vector_t v2) { vector_t v3; v3.c[0]=v1.c[0]-v2.c[0]; v3.c[1]=v1.c[1]-v2.c[1]; v3.c[2]=v1.c[2]-v2.c[2]; return v3; } vector_t scaleVector(vector_t v1, const float f) { vector_t v2; v2.c[0]=f*v1.c[0]; v2.c[1]=f*v1.c[1]; v2.c[2]=f*v1.c[2]; return v2; } /* vector_t averagePoints(points_t points) { vector_t m = initVector(0.0f, 0.0f, 0.0f); size_t i; for (i=0; i=0)&&(index #include #include /* * vector operations for zhull * * Copyright (c) 2012, Franz Zotter * IEM, Graz, Austria * * */ typedef struct vec_ { float c[3]; } vector_t; typedef struct points_ { vector_t *v; size_t num_points; } points_t; typedef struct plane_ { vector_t normal; vector_t point; } plane_t; typedef struct line_ { vector_t direction; vector_t point; } line_t; vector_t initVector (const float x, const float y, const float z); float lengthVector(const vector_t v); vector_t normalizeVector(const vector_t v); plane_t initPlane (vector_t normal, const vector_t point); line_t initLine (vector_t direction, const vector_t point); points_t initPoints (const float *x, const float *y, const float *z, const size_t num_points); void freePoints (points_t *points); size_t getNumPoints(const points_t points); vector_t getPoint(const points_t points, const index_t index); vector_t crossProduct (const vector_t v1, const vector_t v2); float innerProduct (const vector_t v1, const vector_t v2); float distancePointPoint(const vector_t a, const vector_t b); float distancePointPlane (const vector_t point, const plane_t plane); float distancePointLine (const vector_t point, const line_t line); float distancePointLineOnPlane (const vector_t point, const line_t line, const plane_t plane); vector_t addVectors(const vector_t v1, const vector_t v2); vector_t subtractVectors(const vector_t v1, const vector_t v2); vector_t scaleVector(vector_t v1, const float f); /*vector_t averagePoints(points_t points); vector_t normalOfPoints(points_t points); plane_t planeFromPoints(points_t points);*/ plane_t planeFromThreePoints (const vector_t a, const vector_t b, const vector_t c); line_t lineFromTwoPoints (const vector_t a, const vector_t b); vector_t averageListedPoints(const points_t points, const list_t list); vector_t normalOfListedPoints(const points_t points, const list_t list); vector_t directionOfListedPoints(const points_t points, const list_t list); plane_t planeFromListedPoints(const points_t points, const list_t list); line_t lineFromListedPoints(const points_t points, const list_t list); void printPlane(const plane_t p); void printLine(const line_t l); void printVector(const vector_t v); #endif /* QHULL_VECTOR_H */ pd-iemmatrix-0.3/src/mtx_qhull/zhull.c000066400000000000000000000652661262113134600201000ustar00rootroot00000000000000#include "zhull.h" /* * zhull * * own qhull algorithm implementation * * Copyright (c) 2012, Franz Zotter * with friendly help from * IOhannes zmoelnig * IEM, Graz, Austria * * own Implementation after the QHULL algorithm * that is documented in * Barber, C.B., Dobkin, D.P., and Huhdanpaa, H.T., * "The Quickhull algorithm for convex hulls," ACM Trans. * on Mathematical Software, 22(4):469-483, Dec 1996, * http://www.qhull.org * */ /* facets, memory things */ static void freeFacet(facet_t *facet) { /* printf("deleting facet %li\n",facet); printList(facet->corners); printList(facet->outsideset); printList(facet->insideset); printList(facet->neighbors);*/ freeList(&(facet->corners)); freeList(&(facet->outsideset)); freeList(&(facet->insideset)); freeList(&(facet->neighbors)); } static list_t appendNewFacets(zhull_t * const zh, const size_t num_facets) { facet_t *new_facet; index_t i; entry_t e0=entry_makeIndex(0); list_t new_facets; new_facets=initConstantList(e0, num_facets); for (i=0; ineighbors=emptyList(); new_facet->corners=emptyList(); new_facet->outsideset=emptyList(); new_facet->insideset=emptyList(); new_facet->maxdistance=0; new_facet->farthest_outside_point=0; // printf("%li, %li\n", new_facet, entry_makePointer(new_facet)); setEntry(new_facets,i,entry_makePointer(new_facet)); // printf("created facet %li\n",new_facet); } appendListToList(&(zh->facets),new_facets); return new_facets; } /* facets, interface */ /*entry_t getFacetCornerByIndex(const facet_t *facet, index_t index_corner) { if (facet!=0) return getEntry(facet->corners, index_corner%getLength(facet->corners)); else return 0; } */ static facet_t *getFacetByIndex(const list_t facets, const index_t index) { entry_t e=getEntry(facets,index); return ((facet_t*)entry_getPointer(&e)); } index_t getTriangleCorner(const zhull_t * const zh, const index_t triangle_idx, const index_t corner_idx) { if (triangle_idxfacets)) { entry_t e=getEntry(getFacetByIndex(zh->facets,triangle_idx)->corners,corner_idx); return entry_getIndex(&e); } else return 0; } static facet_t *getFacetByPointer(const entry_t e) { return (facet_t*) entry_getPointer(&e); } static void getHorizonEdgeByIndex(index_t *corners, const list_t horizon_fcts, const list_t horizon_fcts_edges, const list_t other_horizon_edges, const index_t index) { index_t i=(index+getLength(horizon_fcts_edges)) %getLength(horizon_fcts_edges); entry_t e = getEntry(horizon_fcts_edges,i); facet_t *f = getFacetByIndex(horizon_fcts,i); index_t j= entry_getIndex(&e); if (f==0) { e=getEntry(horizon_fcts_edges,i); corners[0]=entry_getIndex(&e); e=getEntry(other_horizon_edges,i); corners[1]=entry_getIndex(&e); } else { e=getEntry(f->corners, j); corners[0]=entry_getIndex(&e); if (getLength(f->corners)>0) { e=getEntry(f->corners, (j+1) % getLength(f->corners)); corners[1]=entry_getIndex(&e); } else corners[1]=corners[0]; } } static void removeFacetByPointer(zhull_t * const zh, facet_t * const pointer) { removeValueFromList(&(zh->facets), entry_makePointer(pointer)); removeValueFromList(&(zh->facets_with_outsidepoints), entry_makePointer(pointer)); removeValueFromList(&(zh->facets_with_insidepoints), entry_makePointer(pointer)); freeFacet(pointer); } static void removeFacetByPointerList(zhull_t * const zh, const list_t pointers) { index_t i; for (i=0; ifacets, index)); } static void removeFacetByIndexList(zhull_t * const zh, const list_t indices) { facet_t *f; index_t i; for (i=0; ifacets, entry_getIndex(&e)); removeFacetByPointer(zh,f); } } static void freeFacets(zhull_t * const zh) { int i; facet_t *f; if (getLength(zh->facets)>0) { for (i=0; ifacets); i++) { f=getFacetByIndex(zh->facets,i); // printf("deleting facet %li\n",i); freeFacet(f); } freeList(&(zh->facets)); } } void freeZhull(zhull_t *zh) { if (zh!=0) { // printf("free zhull\n"); freeFacets(zh); freeList(&(zh->facets_with_insidepoints)); freeList(&(zh->facets_with_outsidepoints)); freeList(&(zh->used_pts)); freePoints(&(zh->pts)); } } // *********************************** // // interface static line_t getLine(const zhull_t * const zh, const facet_t * const f, const index_t corner) { vector_t a, b; entry_t e = getEntry(f->corners, (corner)%getLength(f->corners)); a=getPoint(zh->pts, entry_getIndex(&e)); e=getEntry(f->corners,(corner+1)%getLength(f->corners)); b=getPoint(zh->pts, entry_getIndex(&e)); return lineFromTwoPoints(a,b); } zhull_t zhullInitPoints(const float *x, const float *y, const float *z, const size_t num_points) { zhull_t zh; zh.pts=initPoints(x,y,z,num_points); zh.facets=emptyList(); zh.facets_with_outsidepoints=emptyList(); zh.facets_with_insidepoints=emptyList(); zh.used_pts=emptyList(); return zh; } static void dividePointsBetweenNewFacets ( zhull_t * const zh, const list_t assoc, const list_t new_facets) { index_t i,j; facet_t *f; list_t point_inside_facet_list=emptyList(); float d; entry_t e; for (i=0; ipts,idx), f->plane); if (d>=TOL_OUTSIDEPOINT) break; else if (d>=TOL_INSIDEPOINT) { appendToList(&point_inside_facet_list,entry_makePointer(f)); } } if (d>=TOL_OUTSIDEPOINT) { appendToList(&(f->outsideset), e); if (notInList(entry_makePointer(f),zh->facets_with_outsidepoints)) appendToList(&(zh->facets_with_outsidepoints),entry_makePointer(f)); if (f->maxdistancemaxdistance=d; f->farthest_outside_point=idx; } } else { if (getLength(point_inside_facet_list)>0) { for (j=0; jinsideset)) { appendToList(&(f->insideset),e); } } appendListToList(&(zh->facets_with_insidepoints),point_inside_facet_list); uniquefyListEntries(&(zh->facets_with_insidepoints)); } } } freeList(&point_inside_facet_list); } static void zhullInitialFacets(zhull_t *zh) { list_t assoc = emptyList(); list_t new_facets = emptyList(); index_t i; index_t idx[3]={0,1,2}; list_t list=initListIndex(idx,3); if (getNumPoints(zh->pts)>= 3) { // printf("initListFromTo: %d..%d\n", 0,getNumPoints(zh->pts)-1); assoc = initListFromTo(0,getNumPoints(zh->pts)-1); // printList(assoc); new_facets = appendNewFacets(zh,2); if (getLength(new_facets)==2) { do { // circumvent coincident points if (distancePointPoint( getPoint(zh->pts,idx[0]), getPoint(zh->pts,idx[1]) )>TOL_DEGENERATE) break; else idx[1]++; } while (idx[1]pts)); if (idx[1]pts)) { do { // circumvent degenerate triangles list=initListIndex(idx,3); if (lengthVector(normalOfListedPoints(zh->pts,list))>TOL_DEGENERATE) break; else { idx[2]++; freeList(&list); } } while (idx[2]pts)); if (idx[2]pts)) { getFacetByIndex(new_facets,0)->corners = list; appendListToList(&(zh->used_pts),list); list=initListIndex(idx,3); reverseList(&list); getFacetByIndex(new_facets,1)->corners = list; getFacetByIndex(new_facets,0)->neighbors = initConstantList(entry_makePointer(getFacetByIndex(new_facets,1)),3); getFacetByIndex(new_facets,1)->neighbors = initConstantList(entry_makePointer(getFacetByIndex(new_facets,0)),3); for (i=0; i<2; i++) { getFacetByIndex(new_facets,i)->plane = planeFromListedPoints(zh->pts, getFacetByIndex(new_facets,i)->corners); getFacetByIndex(new_facets,i)->outsideset = emptyList(); getFacetByIndex(new_facets,i)->insideset = emptyList(); getFacetByIndex(new_facets,i)->maxdistance = 0.0f; //printf("removing facests\n"); //printList(getFacetByIndex(new_facets,i)->corners); removeValueListFromList(&assoc,getFacetByIndex(new_facets,i)->corners); } //printf("dividePoints..."); //printList(assoc); dividePointsBetweenNewFacets(zh, assoc, new_facets); } } } freeList(&new_facets); freeList(&assoc); } } static void printHorizonEdges(list_t *horizon_fcts, list_t *horizon_fcts_edges, list_t *other_horizon_edges) { index_t i; index_t c1[2]; list_t list_for_printing=emptyList(); printf("horizon : "); printList(*horizon_fcts); printList(*horizon_fcts_edges); printList(*other_horizon_edges); printf("\n horizon edges: "); for (i=0; i%lu",(unsigned long)c1[0],(unsigned long)c1[1]); } printf("\n"); } static void sortHorizonEdges(list_t *horizon_fcts, list_t *horizon_fcts_edges, list_t *other_horizon_edges) { index_t i,j; facet_t *fi; entry_t ei; index_t c1[2]; index_t c2[2]; if (getLength(*horizon_fcts_edges)==0) return; for (i=0; ipts,point_index),f->plane); // printf("distance %5.2f\n",d); appendToList(&fcts_to_visit,entry_makePointer(f)); if (d>=TOL_OUTSIDEPOINT) { while (getLength(fcts_to_visit)>0) { // visiting only visible facets // horizon: edges to invisible or coincident neighbors f=getFacetByIndex(fcts_to_visit,0); appendToList(&visible_fcts,entry_makePointer(f)); appendListToList(avail_points, f->outsideset); for (j=0; jneighbors); j++) { n=getFacetByIndex(f->neighbors,j); d=distancePointPlane(getPoint(zh->pts,point_index),n->plane); if (d>=TOL_OUTSIDEPOINT) { // visit visible neighbors appendToList(&fcts_to_visit,entry_makePointer(n)); } else { // horizon: coincident or invisible neighbors k=findValueInList(getEntry(f->corners,(j+1)%getLength(f->corners)), n->corners); appendToList(horizon_fcts,entry_makePointer(n)); appendToList(horizon_fcts_edges,entry_makeIndex(k)); appendToList(other_horizon_edges,entry_makeIndex(getNumPoints(zh->pts))); } } removeValueFromList(&fcts_to_visit,entry_makePointer(f)); appendToList(&fcts_visited,entry_makePointer(f)); removeValueListFromList(&fcts_to_visit,fcts_visited); } // printf("removing facets\n"); // list_for_printing=findValueListInList(visible_fcts,zh->facets); // printList(list_for_printing); // freeList(&list_for_printing); removeFacetByPointerList(zh,visible_fcts); freeList(&visible_fcts); freeList(&fcts_to_visit); freeList(&fcts_visited); sortHorizonEdges(horizon_fcts, horizon_fcts_edges, other_horizon_edges); //printHorizonEdges(horizon_fcts,horizon_fcts_edges,other_horizon_edges); } else if (d>=TOL_INSIDEPOINT) { // all coincident surfaces shall be removed // horizon might not be defined by facets while (getLength(fcts_to_visit)>0) { f=getFacetByIndex(fcts_to_visit,0); appendToList(&visible_fcts,entry_makePointer(f)); appendListToList(avail_points, f->outsideset); appendListToList(avail_points, f->insideset); for (j=0;jneighbors);j++) { n=getFacetByIndex(f->neighbors,j); d=distancePointPlane(getPoint(zh->pts,point_index),n->plane); if (d>=TOL_INSIDEPOINT) { // coincident facet if (notInList(entry_makePointer(n),visible_fcts)) appendToList(&fcts_to_visit,entry_makePointer(n)); if ((innerProduct(f->plane.normal,n->plane.normal)< -1.0f+TOL_DEGENERATE)&& (distancePointLineOnPlane(getPoint(zh->pts,point_index), getLine(zh,f,j), f->plane)corners,j)); appendToList(horizon_fcts_edges, getEntry(f->corners,(j+1)%getLength(f->corners))); } } else { // invisible facet forms horizon that persists k=findValueInList(getEntry(f->corners,(j+1)%getLength(f->corners)), n->corners); appendToList(horizon_fcts,entry_makePointer(n)); appendToList(horizon_fcts_edges,entry_makeIndex(k)); appendToList(other_horizon_edges,entry_makeIndex(getNumPoints(zh->pts))); } } removeValueFromList(&fcts_to_visit,entry_makePointer(f)); appendToList(&fcts_visited,entry_makePointer(f)); removeValueListFromList(&fcts_to_visit,fcts_visited); } // printf("removing facets\n"); // list_for_printing=findValueListInList(visible_fcts,zh->facets); // printList(list_for_printing); // freeList(&list_for_printing); removeFacetByPointerList(zh,visible_fcts); sortHorizonEdges(horizon_fcts, horizon_fcts_edges,other_horizon_edges); //printHorizonEdges(horizon_fcts,horizon_fcts_edges,other_horizon_edges); freeList(&visible_fcts); freeList(&fcts_to_visit); freeList(&fcts_visited); } } static void initNewFacets(zhull_t *zh, index_t point_index, list_t new_facets, list_t horizon_fcts, list_t horizon_fcts_edges, list_t other_horizon_edges) { index_t i,j; entry_t entry_array[3]; index_t array[3]; index_t temp; entry_t e; facet_t*f; //array[0]=entry_makeIndex(point_index); for (i=0; icorners=initListIndex(array,3); // neighbors // previous new neighbor j=(getLength(horizon_fcts)+i-1) % getLength(horizon_fcts); entry_array[1]=getEntry(new_facets,j); // next new neighbor j=(i+1) % getLength(horizon_fcts); entry_array[2]=getEntry(new_facets,j); // old neighbor e=getEntry(horizon_fcts,i); if (entry_getPointer(&e)!=0) { e=getEntry(horizon_fcts_edges,i); entry_array[0]=getEntry(horizon_fcts,i); setEntry(getFacetByIndex(horizon_fcts,i)->neighbors, entry_getIndex(&e), getEntry(new_facets,i)); } else { // registring at new neighbor where there // is no old one: degenerate 2D case for (j=0;jneighbors; setEntry(neighbors, 0, getEntry(new_facets,i)); } getFacetByIndex(new_facets,i)->neighbors= initList(entry_array,3); // removing inside points at (potential) horizon facet if point index is one if (getFacetByIndex(horizon_fcts,i)!=0) { removeValueFromList(&(getFacetByIndex(horizon_fcts,i)->insideset),entry_makeIndex(point_index)); if (getLength(getFacetByIndex(horizon_fcts,i)->insideset)==0) { removeValueFromList(&(zh->facets_with_insidepoints), entry_makePointer(getFacetByIndex(horizon_fcts,i))); } } // initializing normal vectors and lists getFacetByIndex(new_facets,i)->plane = planeFromListedPoints(zh->pts, getFacetByIndex(new_facets,i)->corners); // printf("new facet %d ",findValueInList(getEntry(new_facets,i),zh->facets)); // printFacet(zh, getFacetByIndex(new_facets,i)); } } static void makePyramidFacetsToHorizon(zhull_t *zh, index_t point_index, list_t horizon_fcts, list_t horizon_fcts_edges, list_t other_horizon_edges, list_t avail_points) { list_t new_facets = appendNewFacets(zh, getLength(horizon_fcts_edges)); // printf("making new pyramid of %d facets\n",getLength(horizon_fcts_edges)); initNewFacets(zh,point_index,new_facets,horizon_fcts,horizon_fcts_edges,other_horizon_edges); appendToList(&(zh->used_pts),entry_makeIndex(point_index)); /* printf("available points: "); printList(avail_points); printf("new facets : "); printList(new_facets);*/ dividePointsBetweenNewFacets(zh, avail_points, new_facets); freeList(&new_facets); } static void appendExteriorPoints(zhull_t *zh) { index_t i; vector_t center = initVector(0.0f,0.0f,0.0f); list_t facet_delete_list=emptyList(); facet_t *f; center=averageListedPoints(zh->pts,zh->used_pts); printf("central point\n"); printVector(center); printf("\n"); for (i=0; ifacets); i++) { f=getFacetByIndex(zh->facets,i); printf("distance of plane %lu, d=%5.2f\n",(unsigned long)i, distancePointPlane(center,f->plane)); if (distancePointPlane(center,f->plane)>-0.5f) { appendToList(&facet_delete_list,entry_makePointer(f)); } } printList(facet_delete_list); removeFacetByPointerList(zh,facet_delete_list); freeList(&facet_delete_list); } int calculateZHull(zhull_t *zh) { index_t fli=0; index_t pi; facet_t *f; list_t outsideset; int cnt=0; int maxit=getNumPoints(zh->pts); list_t horizon_fcts=emptyList(); list_t horizon_fcts_edges=emptyList(); list_t other_horizon_edges=emptyList(); list_t available_points=emptyList(); entry_t e; // if (maxit>MAXIT) // maxit=MAXIT; if (getNumPoints(zh->pts)!=0){ zhullInitialFacets(zh); //printZhull(zh); while(((getLength(zh->facets_with_insidepoints)>0) ||(getLength(zh->facets_with_outsidepoints)>0)) &&(cnt++facets_with_insidepoints)>0) { fli%=getLength(zh->facets_with_insidepoints); f=getFacetByIndex(zh->facets_with_insidepoints,fli); e=getEntry(f->insideset, 0); pi=entry_getIndex(&e); // printf("insidepoint\n"); // printList(zh->facets_with_insidepoints); } else { fli%=getLength(zh->facets_with_outsidepoints); f=getFacetByIndex(zh->facets_with_outsidepoints,fli); pi=f->farthest_outside_point; } // printf("point %d\n",pi); removeVisibleFacetsGetHorizonAndAvailablePoints(zh,pi,f, &horizon_fcts, &horizon_fcts_edges,&other_horizon_edges, &available_points); removeValueFromList(&available_points, entry_makeIndex(pi)); makePyramidFacetsToHorizon(zh,pi,horizon_fcts,horizon_fcts_edges, other_horizon_edges,available_points); // printZhull(zh); freeList(&horizon_fcts); freeList(&horizon_fcts_edges); freeList(&other_horizon_edges); freeList(&available_points); fli++; } // appendExteriorPoints(zh); } return cnt; } void printZhull(const zhull_t * const zh) { index_t fi; list_t indices = emptyList(); /* printf("zhull from %d points\n", getNumPoints(zh->pts)); printf("facets with outsidepoints: "); indices=findValueListInList(zh->facets_with_outsidepoints,zh->facets); printList(indices); freeList(&indices); printf("facets with insidepoints: "); indices=findValueListInList(zh->facets_with_insidepoints,zh->facets); printList(indices); freeList(&indices); */ printf("zhull has %lu facets\n", (unsigned long)getLength(zh->facets)); for (fi=0; fifacets); fi++) { printf("facet %lu<%p>: ",(unsigned long)fi,getFacetByIndex(zh->facets,fi)); printFacet(zh,getFacetByIndex(zh->facets,fi)); } } void printFacet(const zhull_t * const zh, const facet_t * const f) { list_t indices=emptyList(); indices=findValueListInList(f->neighbors,zh->facets); printf("plane: "); printPlane(f->plane); printf("\n"); printf("corners: "); printList(f->corners); printf("outsideset: "); printList(f->outsideset); printf("insideset: "); printList(f->insideset); printf("neighbors: "); printList(indices); freeList(&indices); printf("pt %lu with maxdist %5.2f\n",(unsigned long)(f->farthest_outside_point), f->maxdistance); } pd-iemmatrix-0.3/src/mtx_qhull/zhull.h000066400000000000000000000027341262113134600200740ustar00rootroot00000000000000#ifndef QHULL_ZHULL_H #define QHULL_ZHULL_H #include "vectors.h" #include "list.h" #include #include #include #define TOL_OUTSIDEPOINT 1e-7 #define TOL_INSIDEPOINT -1e-7 #define TOL_DEGENERATE 1e-6 #define MAXIT 1000000 /* * zhull * * own qhull algorithm implementation * * Copyright (c) 2012, Franz Zotter * with friendly help from * IOhannes zmoelnig * IEM, Graz, Austria * * own Implementation after the QHULL algorithm * that is documented in * Barber, C.B., Dobkin, D.P., and Huhdanpaa, H.T., * "The Quickhull algorithm for convex hulls," ACM Trans. * on Mathematical Software, 22(4):469-483, Dec 1996, * http://www.qhull.org * */ typedef struct facet_ { plane_t plane; list_t corners; list_t outsideset; list_t insideset; size_t farthest_outside_point; list_t neighbors; float maxdistance; } facet_t; typedef struct zhull_ { points_t pts; list_t used_pts; list_t facets; list_t facets_with_outsidepoints; list_t facets_with_insidepoints; } zhull_t; int calculateZHull(zhull_t *zh); index_t getTriangleCorner(const zhull_t * const zh, const index_t triangle_idx, const index_t corner_idx); void printZhull(const zhull_t * const zh); void freeZhull(zhull_t *zh); zhull_t zhullInitPoints(const float *x, const float *y, const float *z, const size_t num_points); void printFacet(const zhull_t * const zh, const facet_t * const f); #endif /* QHULL_ZHULL_H */ pd-iemmatrix-0.3/src/mtx_qr.c000066400000000000000000000104411262113134600162200ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * this functions depends on the GNU scientific library * * Copyright (c) 2009, Franz Zotter * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" #include #ifdef HAVE_LIBGSL #include #endif static t_class *mtx_qr_class; typedef struct _MTXQr_ MTXQr; struct _MTXQr_ { t_object x_obj; #ifdef HAVE_LIBGSL gsl_matrix *a; gsl_vector *tau; #endif t_outlet *list_q_out; t_outlet *list_r_out; t_atom *list_q; t_atom *list_r; int rows; int columns; }; #ifdef HAVE_LIBGSL static void allocMTXqr (MTXQr *x) { x->a=(gsl_matrix*)gsl_matrix_alloc(x->rows,x->columns); x->tau=(gsl_vector*)gsl_vector_alloc( ((x->columnsrows)?x->columns:x->rows)); x->list_q=(t_atom*)calloc(sizeof(t_atom),x->rows*x->rows+2); x->list_r=(t_atom*)calloc(sizeof(t_atom),x->rows*x->columns+2); } static void deleteMTXqr (MTXQr *x) { if (x->list_q!=0) free(x->list_q); if (x->list_r!=0) free(x->list_r); x->list_q = x->list_r = 0; if (x->a!=0) gsl_matrix_free(x->a); if (x->tau!=0) gsl_vector_free(x->tau); x->a = 0; x->tau = 0; } #endif static void deleteMTXQr (MTXQr *x) { #ifdef HAVE_LIBGSL deleteMTXqr(x); #endif } static void *newMTXQr (t_symbol *s, int argc, t_atom *argv) { MTXQr *x = (MTXQr *) pd_new (mtx_qr_class); x->list_q_out = outlet_new (&x->x_obj, gensym("matrix")); x->list_r_out = outlet_new (&x->x_obj, gensym("matrix")); x->list_q = 0; x->list_r = 0; #ifdef HAVE_LIBGSL x->a=0; x->tau=0; #endif return ((void *) x); } static void mTXQrBang (MTXQr *x) { if (x->list_q) { outlet_anything(x->list_r_out, gensym("matrix"), x->rows*x->columns+2, x->list_r); post("mtx_qr: implementation outputs only R currently! Q has to be implemented..."); // outlet_anything(x->list_q_out, gensym("matrix"), x->rows*x->rows+2, x->list_q); } } static void mTXQrMatrix (MTXQr *x, t_symbol *s, int argc, t_atom *argv) { int rows = atom_getint (argv++); int columns = atom_getint (argv++); int size = rows * columns; int in_size = argc-2; int m,n; #ifdef HAVE_LIBGSL /* size check */ if (!size) post("mtx_qr: invalid dimensions"); else if (in_sizerows=rows; x->columns=columns; deleteMTXqr(x); allocMTXqr(x); for (n=0;na->data[n]=(double) atom_getfloat(argv++); gsl_linalg_QR_decomp(x->a,x->tau); SETFLOAT((x->list_r),(float) x->rows); SETFLOAT((x->list_r+1),(float) x->columns); for (n=0,in_size=0;nrows;n++) { for (m=0;mlist_r+2+in_size), 0); in_size++; } for (;mcolumns;m++) { SETFLOAT((x->list_r+2+in_size), (float) x->a->data[in_size]); in_size++; } } SETFLOAT((x->list_q),(float) x->rows); SETFLOAT((x->list_q+1),(float) x->rows); // TODO: Housholder transformations have to be decoded from // // x->tau and lower triangular part of x->a. // // with L=min(rows,columns) // // Matrix multiplications have to be done: // // Q=QL QL-1 ... Q1 // // using the matrix factors // // Qi = I - tau[i] vi^T vi // // employing the dyadic vector product of // // [ 0 ] // [ : ] // [ 0 ] // vi=[A[i+1,i]] // [A[i+1,i]] // [ : ] // [ A[L,i] ] // // on itself (out of x->a), // and the scalar tau[i] in the vector x->tau. mTXQrBang(x); } #else post("mtx_qr: implementation requires gsl"); #endif } void mtx_qr_setup (void) { mtx_qr_class = class_new (gensym("mtx_qr"), (t_newmethod) newMTXQr, (t_method) deleteMTXQr, sizeof (MTXQr), CLASS_DEFAULT, A_GIMME, 0); class_addbang (mtx_qr_class, (t_method) mTXQrBang); class_addmethod (mtx_qr_class, (t_method) mTXQrMatrix, gensym("matrix"), A_GIMME,0); } void iemtx_qr_setup(void){ mtx_qr_setup(); } pd-iemmatrix-0.3/src/mtx_rand.c000066400000000000000000000047351262113134600165330ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, forum::für::umläute * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" /* mtx_rand */ static t_class *mtx_rand_class; static void mtx_rand_seed(t_matrix *x, t_float f) { x->current_row=f; } static int makeseed(void) { static unsigned int random_nextseed = 1489853723; random_nextseed = random_nextseed * 435898247 + 938284287; return (random_nextseed & 0x7fffffff); } static inline t_float getrand(int *val) { t_float f=(((t_float)(((*val=*val*435898247+382842987)&0x7fffffff)-0x40000000))*(t_float)(0.5/0x40000000)+0.5); return f; } static void mtx_rand_random(t_matrix *x) { long size = x->row * x->col; t_atom *ap=x->atombuffer+2; while(size--)SETFLOAT(ap+size, getrand(&x->current_row)); } static void mtx_rand_list(t_matrix *x, t_symbol *s, int argc, t_atom *argv) { int row = atom_getfloat(argv++); int col = atom_getfloat(argv++); if(!argv)return; if(argc==1)col=row; adjustsize(x, row, col); mtx_rand_random(x); matrix_bang(x); } static void mtx_rand_matrix(t_matrix *x, t_symbol *s, int argc, t_atom *argv) { matrix_matrix2(x, s, argc, argv); mtx_rand_random(x); matrix_bang(x); } static void mtx_rand_bang(t_matrix *x) { if(0==x->col || 0==x->row) { outlet_float(x->x_obj.ob_outlet, getrand(&x->current_row)); } else { mtx_rand_random(x); matrix_bang(x); } } static void *mtx_rand_new(t_symbol *s, int argc, t_atom *argv) { t_matrix *x = (t_matrix *)pd_new(mtx_rand_class); int row, col; outlet_new(&x->x_obj, 0); x->col=x->row=0; x->atombuffer=0; x->current_row=makeseed(); if (argc) { row=atom_getfloat(argv); col=(argc>1)?atom_getfloat(argv+1):row; adjustsize(x, row, col); mtx_rand_random(x); } return (x); } void mtx_rand_setup(void) { mtx_rand_class = class_new(gensym("mtx_rand"), (t_newmethod)mtx_rand_new, (t_method)matrix_free, sizeof(t_matrix), 0, A_GIMME, 0); class_addmethod(mtx_rand_class, (t_method)mtx_rand_matrix, gensym("matrix"), A_GIMME, 0); class_addlist (mtx_rand_class, mtx_rand_list); class_addbang (mtx_rand_class, mtx_rand_bang); class_addmethod(mtx_rand_class, (t_method)mtx_rand_seed, gensym("seed"), A_FLOAT, 0); } void iemtx_rand_setup(void){ mtx_rand_setup(); } pd-iemmatrix-0.3/src/mtx_repmat.c000066400000000000000000000105741262113134600170750ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) 2005, Franz Zotter * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" static t_class *mtx_repmat_class; typedef struct _MTXrepmat_ MTXrepmat; struct _MTXrepmat_ { t_object x_obj; int size; int repeat_rows; int repeat_cols; t_outlet *list_outlet; t_atom *list_out; }; static void deleteMTXRepmat (MTXrepmat *mtx_repmat_obj) { if (mtx_repmat_obj->list_out) freebytes (mtx_repmat_obj->list_out, sizeof(t_atom)*(mtx_repmat_obj->size+2)); } static void mTXRepmatList (MTXrepmat *mtx_repmat_obj, t_symbol *s, int argc, t_atom *argv) { if (argc!=2) { post("mtx_repmat: there have to be exactly 2 arguments"); return; } mtx_repmat_obj->repeat_rows = atom_getint(argv++); mtx_repmat_obj->repeat_cols = atom_getint(argv); } static void *newMTXRepmat (t_symbol *s, int argc, t_atom *argv) { MTXrepmat *mtx_repmat_obj = (MTXrepmat *) pd_new (mtx_repmat_class); mtx_repmat_obj->repeat_cols = 1; mtx_repmat_obj->repeat_rows = 1; if (argc) mTXRepmatList (mtx_repmat_obj, gensym("list"), argc, argv); mtx_repmat_obj->list_outlet = outlet_new (&mtx_repmat_obj->x_obj, gensym("matrix")); inlet_new(&mtx_repmat_obj->x_obj, &mtx_repmat_obj->x_obj.ob_pd, gensym("list"),gensym("")); return ((void *) mtx_repmat_obj); } static void mTXRepmatBang (MTXrepmat *mtx_repmat_obj) { if (mtx_repmat_obj->list_out) outlet_anything(mtx_repmat_obj->list_outlet, gensym("matrix"), mtx_repmat_obj->size+2, mtx_repmat_obj->list_out); } static void copyList (int n, t_atom *x, t_atom *y) { while (n--) *y++=*x++; } static void writeRepeatIntoMatrix (int repeat_rows, int repeat_cols, int rows, int columns, t_atom *x, t_atom *y) { int row_cnt; int col_cnt; int new_col = columns * repeat_cols; t_atom *ptr = y; /* writing each row repeatedly (repeat_col times) into output array */ /* so that : row1#1 row1#2 ... row1#RN | ... | rowN#1 rowN#2 ... rowN#RN */ for (row_cnt=rows;row_cnt--;x+=columns) for(col_cnt=repeat_cols;col_cnt--;ptr+=columns) copyList (columns, x, ptr); /* repeating the above written long lines repeat row_repeat times in output array */ for (;--repeat_rows;) for (row_cnt=rows;row_cnt--;y+=new_col,ptr+=new_col) copyList (new_col, y, ptr); } static void mTXRepmatMatrix (MTXrepmat *mtx_repmat_obj, t_symbol *s, int argc, t_atom *argv) { int rows = atom_getint (argv++); int columns = atom_getint (argv++); int rep_rows = mtx_repmat_obj->repeat_rows; int rep_cols = mtx_repmat_obj->repeat_cols; int mrows = rows * rep_rows; int mcolumns = columns * rep_cols; int size = rows * columns; int list_size = argc - 2; t_atom *list_in = argv; t_atom *list_out = mtx_repmat_obj->list_out; /* size check */ if (!size) { post("mtx_repmat: invalid dimensions"); return; } else if (list_sizesize) { if (list_out) list_out = (t_atom*) resizebytes (list_out, sizeof(t_atom)*(mtx_repmat_obj->size+2), sizeof(t_atom)*(size+2)); else list_out = (t_atom*) getbytes (sizeof(t_atom)*(size+2)); mtx_repmat_obj->list_out = list_out; mtx_repmat_obj->size = size; } /* main part */ writeRepeatIntoMatrix (rep_rows, rep_cols, rows, columns, list_in, list_out+2); SETFLOAT(list_out, mrows); SETFLOAT(&list_out[1], mcolumns); mTXRepmatBang (mtx_repmat_obj); } void mtx_repmat_setup (void) { mtx_repmat_class = class_new (gensym("mtx_repmat"), (t_newmethod) newMTXRepmat, (t_method) deleteMTXRepmat, sizeof (MTXrepmat), CLASS_DEFAULT, A_GIMME, 0); class_addbang (mtx_repmat_class, (t_method) mTXRepmatBang); class_addmethod (mtx_repmat_class, (t_method) mTXRepmatMatrix, gensym("matrix"), A_GIMME,0); class_addmethod (mtx_repmat_class, (t_method) mTXRepmatList, gensym(""), A_GIMME,0); } void iemtx_repmat_setup(void){ mtx_repmat_setup(); } pd-iemmatrix-0.3/src/mtx_resize.c000066400000000000000000000052051262113134600171010ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, forum::für::umläute * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" /* mtx_resize */ static t_class *mtx_resize_class; static void mtx_resize_list2(t_matrix *x, t_symbol *s, int argc, t_atom *argv) { int r, c; if (argc<1)return; if (argc>2)pd_error(x, "mtx_resize : only rows & cols are needed, skipping the rest"); if (argc==1)r=c=atom_getfloat(argv++); else{ r=atom_getfloat(argv++); c=atom_getfloat(argv++); } if (r<0)r=0; if (c<0)c=0; x->current_row = r; x->current_col = c; } static void mtx_resize_matrix(t_matrix *x, t_symbol *s, int argc, t_atom *argv) { int row=atom_getfloat(argv); int col=atom_getfloat(argv+1); int r = x->current_row, c = x->current_col; int R=0, ROW, COL; if (argc<2){ post("mtx_add: crippled matrix"); return; } if ((col<1)||(row<1)) { post("mtx_add: invalid dimensions"); return; } if (col*row>argc-2){ post("sparse matrix not yet supported : use \"mtx_check\""); return; } if (!r)r=row; if (!c)c=col; if (r==row && c==col) { /* no need to change */ outlet_anything(x->x_obj.ob_outlet, gensym("matrix"), argc, argv); return; } x->atombuffer=(t_atom *)getbytes((c*r+2)*sizeof(t_atom)); setdimen(x, r, c); matrix_set(x, 0); ROW=(ratombuffer+2+(ROW-R-1)*c, argv+2+(ROW-R-1)*col, COL*sizeof(t_atom)); matrix_bang(x); freebytes(x->atombuffer, (c*r+2)*sizeof(t_atom)); } static void *mtx_resize_new(t_symbol *s, int argc, t_atom *argv) { t_matrix *x = (t_matrix *)pd_new(mtx_resize_class); int c=0, r=0; if(argc){ if(argc-1){ r=atom_getfloat(argv); c=atom_getfloat(argv+1); } else r=c=atom_getfloat(argv); if(c<0)c=0; if(r<0)r=0; } inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("float"), gensym("")); outlet_new(&x->x_obj, 0); x->current_row = r; x->current_col = c; x->row = x->col= 0; x->atombuffer = 0; return (x); } void mtx_resize_setup(void) { mtx_resize_class = class_new(gensym("mtx_resize"), (t_newmethod)mtx_resize_new, 0, sizeof(t_matrix), 0, A_GIMME, 0); class_addmethod (mtx_resize_class, (t_method)mtx_resize_matrix, gensym("matrix"), A_GIMME, 0); class_addmethod (mtx_resize_class, (t_method)mtx_resize_list2, gensym(""), A_GIMME, 0); } void iemtx_resize_setup(void){ mtx_resize_setup(); } pd-iemmatrix-0.3/src/mtx_reverse.c000066400000000000000000000110741262113134600172540ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) 2005, Franz Zotter * Copyright (c) 2006, IOhannes m zmölnig * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" static t_class *mtx_reverse_class; typedef struct _MTXreverse_ MTXreverse; struct _MTXreverse_ { t_object x_obj; int size; int reverse_mode; /* 0=col; 1=row */ t_outlet *list_outlet; t_atom *list_out; t_atom *list_in; }; static void deleteMTXreverse (MTXreverse *mtx_reverse_obj) { if (mtx_reverse_obj->list_out) freebytes (mtx_reverse_obj->list_out, sizeof(t_atom)*(mtx_reverse_obj->size+2)); } static void mTXSetReverseMode (MTXreverse *mtx_reverse_obj, t_symbol *c_mode) { char c=*c_mode->s_name; switch(c){ case 'c': case 'C': case ':': /* "column" */ mtx_reverse_obj->reverse_mode = 1; break; case 'r': case 'R': /* "row" */ mtx_reverse_obj->reverse_mode = 0; break; case 'e': case 'E': case '.': /* "element" just revert the whole matrix as if it was a list */ mtx_reverse_obj->reverse_mode = -1; break; default: error("mtx_reverse: invalid mode '%s'", c_mode->s_name); break; } } static void *newMTXreverse (t_symbol *s, int argc, t_atom *argv) { MTXreverse *mtx_reverse_obj = (MTXreverse *) pd_new (mtx_reverse_class); if(argc&&(A_SYMBOL==argv->a_type)) mTXSetReverseMode (mtx_reverse_obj, atom_getsymbol (argv)); else mTXSetReverseMode (mtx_reverse_obj, gensym(":")); mtx_reverse_obj->list_outlet = outlet_new (&mtx_reverse_obj->x_obj, gensym("matrix")); return ((void *) mtx_reverse_obj); } static void mTXreverseBang (MTXreverse *mtx_reverse_obj) { if (mtx_reverse_obj->list_out) outlet_anything(mtx_reverse_obj->list_outlet, gensym("matrix"), mtx_reverse_obj->size+2, mtx_reverse_obj->list_out); } static void copyList (int n, t_atom *x, t_atom *y) { for (;n--;) *y++ = *x++; } static void reverseList (int n, t_atom *y) { t_atom *read = y+n-1; t_atom tmp; n >>= 1; while(n-->0) { tmp = *y; *y++ = *read; *read-- = tmp; } } static void reverseListStep (int n, int step, t_atom *y) { t_atom *read = y; t_atom tmp; n /= step; y += (n-1) * step; n >>= 1; for (;n--; y-=step, read+=step) { tmp = *y; *y = *read; *read = tmp; } } static void mTXreverseMatrix (MTXreverse *mtx_reverse_obj, t_symbol *s, int argc, t_atom *argv) { int rows = atom_getint (argv++); int columns = atom_getint (argv++); int size = rows * columns; int list_size = argc - 2; t_atom *list_out = mtx_reverse_obj->list_out; int count; /* size check */ if (!size) { error("mtx_reverse: invalid dimensions"); return; } else if (list_sizesize) { if (!list_out) list_out = (t_atom *) getbytes (sizeof (t_atom) * (size + 2)); else list_out = (t_atom *) resizebytes (list_out, sizeof (t_atom) * (mtx_reverse_obj->size+2), sizeof (t_atom) * (size + 2)); } mtx_reverse_obj->size = size; mtx_reverse_obj->list_out = list_out; /* main part */ list_out += 2; copyList (size, argv, list_out); switch(mtx_reverse_obj->reverse_mode) { case 0: for (count = columns; count--; list_out++) reverseListStep (size, columns, list_out); break; case 1: for (count = rows; count--; list_out += columns) reverseList (columns, list_out); break; default: reverseList (size, list_out); } list_out = mtx_reverse_obj->list_out; SETSYMBOL(list_out, gensym("matrix")); SETFLOAT(list_out, rows); SETFLOAT(&list_out[1], columns); outlet_anything(mtx_reverse_obj->list_outlet, gensym("matrix"), mtx_reverse_obj->size+2, list_out); } void mtx_reverse_setup (void) { mtx_reverse_class = class_new (gensym("mtx_reverse"), (t_newmethod) newMTXreverse, (t_method) deleteMTXreverse, sizeof (MTXreverse), CLASS_DEFAULT, A_GIMME, 0); class_addbang (mtx_reverse_class, (t_method) mTXreverseBang); class_addmethod (mtx_reverse_class, (t_method) mTXreverseMatrix, gensym("matrix"), A_GIMME,0); class_addmethod (mtx_reverse_class, (t_method) mTXSetReverseMode, gensym("mode"), A_DEFSYMBOL,0); } void iemtx_reverse_setup(void){ mtx_reverse_setup(); } pd-iemmatrix-0.3/src/mtx_rfft.c000066400000000000000000000146271262113134600165510ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) 2005, Franz Zotter * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" #include #ifdef USE_FFTW #include #endif static t_class *mtx_rfft_class; #ifdef USE_FFTW enum ComplexPart { REALPART=0, IMAGPART=1}; #endif typedef struct _MTXRfft_ MTXRfft; struct _MTXRfft_ { t_object x_obj; int size; int size2; #ifdef USE_FFTW int fftn; int rows; fftw_plan *fftplan; fftw_complex *f_out; double *f_in; #else t_float *f_re; t_float *f_im; #endif t_outlet *list_re_out; t_outlet *list_im_out; t_atom *list_re; t_atom *list_im; }; static void deleteMTXRfft (MTXRfft *x) { #ifdef USE_FFTW int n; if (x->fftplan) { for (n=0; nrows; n++) fftw_destroy_plan(x->fftplan[n]); free(x->fftplan); } if (x->f_out) free(x->f_out); if (x->f_in) free(x->f_in); #else if (x->f_re) free (x->f_re); if (x->f_im) free (x->f_im); #endif if (x->list_re) free (x->list_re); if (x->list_im) free (x->list_im); } static void *newMTXRfft (t_symbol *s, int argc, t_atom *argv) { MTXRfft *x = (MTXRfft *) pd_new (mtx_rfft_class); x->list_re_out = outlet_new (&x->x_obj, gensym("matrix")); x->list_im_out = outlet_new (&x->x_obj, gensym("matrix")); x->size=x->size2=0; #ifdef USE_FFTW x->fftn=0; x->rows=0; x->f_in=0; x->f_out=0; x->fftplan=0; #else x->f_re=x->f_im=0; #endif x->list_re=x->list_im=0; return ((void *) x); } static void mTXRfftBang (MTXRfft *x) { if (x->list_im) { outlet_anything(x->list_im_out, gensym("matrix"), x->size2, x->list_im); outlet_anything(x->list_re_out, gensym("matrix"), x->size2, x->list_re); } } static void fftRestoreImag (int n, t_float *re, t_float *im) { t_float *im2; n >>= 1; *im=0; re += n; im += n; im2 = im; *im=0; while (--n) { *--im = -*++re; *++im2 = 0; *re = 0; } } static void zeroFloatArray (int n, t_float *f) { while (n--) *f++ = 0.0f; } static void writeFloatIntoList (int n, t_atom *l, t_float *f) { for (;n--;f++, l++) SETFLOAT (l, *f); } static void readFloatFromList (int n, t_atom *l, t_float *f) { while (n--) *f++ = atom_getfloat (l++); } #ifdef USE_FFTW static void writeFFTWComplexPartIntoList (int n, t_atom *l, fftw_complex *c, enum ComplexPart p) { t_float f; while (n--) { f=(t_float)c[n][p]; SETFLOAT (l+n, f); } } static void readDoubleFromList (int n, t_atom *l, double *f) { while (n--) *f++ = (double)atom_getfloat (l++); } #endif static void mTXRfftMatrix (MTXRfft *x, t_symbol *s, int argc, t_atom *argv) { int rows = atom_getint (argv++); int columns = atom_getint (argv++); int columns_re = (columns>>1)+1; /* N/2+1 samples needed for real part of realfft */ int size = rows * columns; int in_size = argc-2; int size2 = columns_re * rows + 2; /* +2 since the list also contains matrix row+col */ int fft_count; t_atom *list_re = x->list_re; t_atom *list_im = x->list_im; #ifdef USE_FFTW fftw_complex *f_out = x->f_out; double *f_in = x->f_in; #else t_float *f_re = x->f_re; t_float *f_im = x->f_im; #endif /* fftsize check */ if (!size) post("mtx_rfft: invalid dimensions"); else if (in_sizerows!=rows)||(columns!=x->fftn)){ f_out=(fftw_complex*)realloc(f_out, sizeof(fftw_complex)*(size2-2)); f_in=(double*)realloc(f_in, sizeof(double)*size); x->f_in = f_in; x->f_out = f_out; for (fft_count=0; fft_countrows; fft_count++) { fftw_destroy_plan(x->fftplan[fft_count]); } x->fftplan = (fftw_plan*)realloc(x->fftplan, sizeof(fftw_plan)*rows); for (fft_count=0; fft_countfftplan[fft_count] = fftw_plan_dft_r2c_1d (columns,f_in,f_out,FFTW_ESTIMATE); } x->fftn=columns; x->rows=rows; f_in=x->f_in; f_out=x->f_out; } #else f_re=(t_float*)realloc(f_re, sizeof(t_float)*size); f_im=(t_float*)realloc(f_im, sizeof(t_float)*size); x->f_re = f_re; x->f_im = f_im; #endif list_re=(t_atom*)realloc(list_re, sizeof(t_atom)*size2); list_im=(t_atom*)realloc(list_im, sizeof(t_atom)*size2); x->size = size; x->size2 = size2; x->list_im = list_im; x->list_re = list_re; /* main part */ #ifdef USE_FFTW readDoubleFromList (size, argv, f_in); #else readFloatFromList (size, argv, f_re); #endif list_re += 2; list_im += 2; for (fft_count=0;fft_countfftplan[fft_count]); writeFFTWComplexPartIntoList(columns_re,list_re,f_out,REALPART); writeFFTWComplexPartIntoList(columns_re,list_im,f_out,IMAGPART); f_out+=columns_re; #else mayer_realfft (columns, f_re); fftRestoreImag (columns, f_re, f_im); writeFloatIntoList (columns_re, list_re, f_re); writeFloatIntoList (columns_re, list_im, f_im); f_im += columns; f_re += columns; #endif list_re += columns_re; list_im += columns_re; } list_re = x->list_re; list_im = x->list_im; SETSYMBOL(list_re, gensym("matrix")); SETSYMBOL(list_im, gensym("matrix")); SETFLOAT(list_re, rows); SETFLOAT(list_im, rows); SETFLOAT(list_re+1, columns_re); SETFLOAT(list_im+1, columns_re); outlet_anything(x->list_im_out, gensym("matrix"), x->size2, list_im); outlet_anything(x->list_re_out, gensym("matrix"), x->size2, list_re); } else post("mtx_rowfft: rowvector size no power of 2!"); } void mtx_rfft_setup (void) { mtx_rfft_class = class_new (gensym("mtx_rfft"), (t_newmethod) newMTXRfft, (t_method) deleteMTXRfft, sizeof (MTXRfft), CLASS_DEFAULT, A_GIMME, 0); class_addbang (mtx_rfft_class, (t_method) mTXRfftBang); class_addmethod (mtx_rfft_class, (t_method) mTXRfftMatrix, gensym("matrix"), A_GIMME,0); } void iemtx_rfft_setup(void){ mtx_rfft_setup(); } pd-iemmatrix-0.3/src/mtx_rifft.c000066400000000000000000000167131262113134600167200ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) 2005, Franz Zotter * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" #include #ifdef USE_FFTW #include #endif static t_class *mtx_rifft_class; #ifdef USE_FFTW enum ComplexPart { REALPART=0, IMAGPART=1}; #endif typedef struct _MTXRifft_ { t_object x_obj; int rows; int columns; int columns_re; int size; int size2; t_float renorm_fac; #ifdef USE_FFTW fftw_plan *fftplan; fftw_complex *f_in; double *f_out; #else t_float *f_re; t_float *f_im; #endif t_outlet *list_re_out; t_outlet *list_im_out; t_atom *list_re; t_atom *list_im; } MTXRifft; /* helper functions: these should really go into a separate file! */ static void zeroFloatArray (int n, t_float *f) { while (n--) *f++ = 0.0f; } static void writeFloatIntoList (int n, t_atom *l, t_float *f) { for (;n--;f++, l++) SETFLOAT (l, *f); } static void readFloatFromList (int n, t_atom *l, t_float *f) { while (n--) *f++ = atom_getfloat (l++); } /*--------------inverse real fft */ static void multiplyVector (int n, t_float *f, t_float fac) { while (n--) *f++ *= fac; } static void ifftPrepareReal (int n, t_float *re, t_float *im) { n >>= 1; re += n; im += n; while (--n) *++re = -*--im; } #ifdef USE_FFTW static void readFFTWComplexPartFromList (int n, t_atom *l, fftw_complex *f, enum ComplexPart p) { for (;n--;) f[n][p] = (double) atom_getfloat (l+n); } static void writeDoubleIntoList (int n, t_atom *l, double *d) { t_float f; while (n--) { f=(t_float) d[n]; SETFLOAT (l+n,f); } } static void multiplyDoubleVector (int n, double *f, t_float fac) { double fd=(double)fac; while (n--) *f++ *= (double)fd; } #endif static void *newMTXRifft (t_symbol *s, int argc, t_atom *argv) { MTXRifft *x = (MTXRifft *) pd_new (mtx_rifft_class); inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("matrix"),gensym("")); x->list_re_out = outlet_new (&x->x_obj, gensym("matrix")); return ((void *) x); } static void mTXRifftMatrixCold (MTXRifft *x, t_symbol *s, int argc, t_atom *argv) { int rows = atom_getint (argv++); int columns_re = atom_getint (argv++); int in_size = argc-2; int columns = (columns_re-1)<<1; int size2 = columns_re * rows; int size = rows * columns; int ifft_count; t_atom *list_re = x->list_re; #ifdef USE_FFTW fftw_complex *f_in = x->f_in; double *f_out = x->f_out; #else t_float *f_re = x->f_re; t_float *f_im = x->f_im; #endif /* ifftsize check */ if (columns_re < 3) post("mtx_rifft: matrix must have at least 3 columns"); else if (!size) post("mtx_rifft: invalid dimensions"); else if (in_size < size2) post("mtx_rifft: sparse matrix not yet supported: use \"mtx_check\""); else if (columns<4) post("mtx_rifft: too small matrices"); else if (columns == (1 << ilog2(columns))) { /* memory things */ #ifdef USE_FFTW if ((x->rows!=rows)||(columns!=x->columns)){ for (ifft_count=0;ifft_countrows;ifft_count++) { fftw_destroy_plan(x->fftplan[ifft_count]); } x->fftplan=(fftw_plan*)realloc(x->fftplan,sizeof(fftw_plan)*rows); f_in=(fftw_complex*)realloc(f_in,sizeof(fftw_complex)*size2); f_out=(double*)realloc(f_out,sizeof(double)*size); list_re=(t_atom*)realloc(list_re, sizeof(t_atom)*(size+2)); x->list_re = list_re; x->f_out = f_out; x->f_in = f_in; for (ifft_count=0;ifft_countfftplan[ifft_count]=fftw_plan_dft_c2r_1d(columns,f_in,f_out,FFTW_ESTIMATE); f_out+=columns; f_in+=columns_re; } f_in=x->f_in; f_out=x->f_out; } #else f_re=(t_float*)realloc(f_re, sizeof(t_float)*size); f_im=(t_float*)realloc(f_im, sizeof(t_float)*size); x->f_re = f_re; x->f_im = f_im; list_re=(t_atom*)realloc(list_re, sizeof(t_atom)*(size+2)); x->list_re = list_re; #endif x->size = size; x->size2 = size2; x->rows = rows; x->columns = columns; x->columns_re = columns_re; /* main part: reading imaginary part */ ifft_count = rows; x->renorm_fac = 1.0f / columns; for (ifft_count=0;ifft_countcolumns; int size = x->size; int in_size = argc-2; int size2 = x->size2; int ifft_count; #ifdef USE_FFTW fftw_complex *f_in = x->f_in; #else t_float *f_re = x->f_re; t_float *f_im = x->f_im; #endif t_float renorm_fac = x->renorm_fac; /* ifftsize check */ if ((rows != x->rows) || (columns_re != x->columns_re)) post("mtx_rifft: matrix dimensions do not match"); else if (in_sizesize2) post("mtx_rifft: invalid right side matrix"); else { /* main part */ for (ifft_count=0;ifft_countfftplan[ifft_count]); f_in+=columns_re; #else readFloatFromList (columns_re, argv, f_re); ifftPrepareReal (columns, f_re, f_im); mayer_realifft (columns, f_re); f_im += columns; f_re += columns; #endif argv += columns_re; } #ifndef USE_FFTW f_re = x->f_re; #endif size2 = x->size2; SETFLOAT(x->list_re, rows); SETFLOAT(x->list_re+1, x->columns); #ifdef USE_FFTW multiplyDoubleVector (size, x->f_out, renorm_fac); writeDoubleIntoList (size, x->list_re+2, x->f_out); #else multiplyVector (size, f_re, renorm_fac); writeFloatIntoList (size, x->list_re+2, f_re); #endif outlet_anything(x->list_re_out, gensym("matrix"), size+2, x->list_re); } } static void mTXRifftBang (MTXRifft *x) { if (x->list_re) outlet_anything(x->list_re_out, gensym("matrix"), x->size+2, x->list_re); } static void deleteMTXRifft (MTXRifft *x) { #ifdef USE_FFTW int n; if (x->fftplan) { for (n=0; nrows; n++) fftw_destroy_plan(x->fftplan[n]); free(x->fftplan); } if (x->f_out) free(x->f_out); if (x->f_in) free(x->f_in); #else if (x->f_re) free(x->f_re); if (x->f_im) free(x->f_im); #endif if (x->list_re) free(x->list_re); if (x->list_im) free(x->list_im); } void mtx_rifft_setup (void) { mtx_rifft_class = class_new (gensym("mtx_rifft"), (t_newmethod) newMTXRifft, (t_method) deleteMTXRifft, sizeof (MTXRifft), CLASS_DEFAULT, A_GIMME, 0); class_addbang (mtx_rifft_class, (t_method) mTXRifftBang); class_addmethod (mtx_rifft_class, (t_method) mTXRifftMatrixHot, gensym("matrix"), A_GIMME,0); class_addmethod (mtx_rifft_class, (t_method) mTXRifftMatrixCold, gensym(""), A_GIMME,0); } void iemtx_rifft_setup(void){ mtx_rifft_setup(); } pd-iemmatrix-0.3/src/mtx_rmstodb.c000066400000000000000000000043441262113134600172550ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, forum::für::umläute * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" #define LOGTEN 2.302585092994 /* mtx_rmstodb: B=log(A); B[n,m]=e^A[n,m] */ static t_class *mtx_rmstodb_class; static void mtx_rmstodb_matrix(t_mtx_binmtx *x, t_symbol *s, int argc, t_atom *argv) { int row=atom_getfloat(argv++); int col=atom_getfloat(argv++); t_atom *m; int n = argc-2; if (argc<2){ post("mtx_rmstodb: crippled matrix"); return; } if ((col<1)||(row<1)) { post("mtx_rmstodb: invalid dimensions"); return; } if (col*row>argc-2){ post("sparse matrix not yet supported : use \"mtx_check\""); return; } adjustsize(&x->m, row, col); m = x->m.atombuffer+2; while(n--){ t_float f=atom_getfloat(argv++); t_float v=(f<0)?0.:(100+20./LOGTEN * log(f)); SETFLOAT(m, (v<0)?0:v); m++; } outlet_anything(x->x_obj.ob_outlet, gensym("matrix"), argc, x->m.atombuffer); } static void mtx_rmstodb_list(t_mtx_binscalar *x, t_symbol *s, int argc, t_atom *argv) { int n=argc; t_atom *m; adjustsize(&x->m, 1, argc); m = x->m.atombuffer; while(n--){ t_float f=atom_getfloat(argv++); t_float v=(f<0)?0.:(100+20./LOGTEN * log(f)); SETFLOAT(m, (v<0)?0:v); m++; } outlet_list(x->x_obj.ob_outlet, gensym("list"), argc, x->m.atombuffer); } static void *mtx_rmstodb_new(t_symbol *s) { /* element log */ t_matrix *x = (t_matrix *)pd_new(mtx_rmstodb_class); outlet_new(&x->x_obj, 0); x->col = x->row = 0; x->atombuffer = 0; return(x); } void mtx_rmstodb_setup(void) { mtx_rmstodb_class = class_new(gensym("mtx_rmstodb"), (t_newmethod)mtx_rmstodb_new, (t_method)mtx_binmtx_free, sizeof(t_mtx_binmtx), 0, A_GIMME, 0); class_addmethod(mtx_rmstodb_class, (t_method)mtx_rmstodb_matrix, gensym("matrix"), A_GIMME, 0); class_addlist (mtx_rmstodb_class, mtx_rmstodb_list); class_addbang (mtx_rmstodb_class, mtx_binmtx_bang); } void iemtx_rmstodb_setup(void) { mtx_rmstodb_setup(); } pd-iemmatrix-0.3/src/mtx_roll.c000066400000000000000000000032461262113134600165530ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, forum::für::umläute * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" /* mtx_roll */ /* roll the rows */ static t_class *mtx_roll_class; static void mtx_roll_matrix(t_matrix *x, t_symbol *s, int argc, t_atom *argv) { int row=atom_getfloat(argv++); int col=atom_getfloat(argv++); t_atom *ap; int colroll = ((int)x->f%col+col)%col; int c; if(row*col>argc-2) { post("mtx_roll: sparse matrices not yet supported : use \"mtx_check\""); return; } adjustsize(x, row, col); ap = x->atombuffer+2; c=col; while(c--){ t_atom *in = argv+col-c-1; t_atom *out = ap +(col-c-1+colroll)%col; int r = row; while (r--){ SETFLOAT(out, atom_getfloat(in)); out+=col; in+=col; } } matrix_bang(x); } static void *mtx_roll_new(t_symbol *s, int argc, t_atom *argv) { t_matrix *x = (t_matrix *)pd_new(mtx_roll_class); floatinlet_new(&x->x_obj, &(x->f)); outlet_new(&x->x_obj, 0); x->f=argc?atom_getfloat(argv):0; x->col=x->row=0; x->atombuffer=0; return (x); } void mtx_roll_setup(void) { mtx_roll_class = class_new(gensym("mtx_roll"), (t_newmethod)mtx_roll_new, (t_method)matrix_free, sizeof(t_matrix), 0, A_GIMME, 0); class_addbang (mtx_roll_class, matrix_bang); class_addmethod(mtx_roll_class, (t_method)mtx_roll_matrix, gensym("matrix"), A_GIMME, 0); } void iemtx_roll_setup(void){ mtx_roll_setup(); } pd-iemmatrix-0.3/src/mtx_row.c000066400000000000000000000062141262113134600164100ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, forum::für::umläute * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" /* mtx_row */ static t_class *mtx_row_class; static void mtx_row_float(t_matrix *x, t_floatarg f) { int i = f; if(i<0)i=0; x->current_row = i; } static void mtx_row_matrix(t_matrix *x, t_symbol *s, int argc, t_atom *argv) { int row, col; if (argc<2){ post("matrix : corrupt matrix passed"); return; } row = atom_getfloat(argv); col = atom_getfloat(argv+1); if ((row<1)||(col<1)){ post("matrix : corrupt matrix passed"); return; } if (row*col > argc-2){ post("matrix: sparse matrices not yet supported : use \"mtx_check\""); return; } matrix_matrix2(x, s, argc, argv); matrix_bang(x); } static void mtx_row_list(t_matrix *x, t_symbol *s, int argc, t_atom *argv) { if (argc==1){ t_float f=atom_getfloat(argv); t_atom *ap=x->atombuffer+2+(x->current_row-1)*x->col; if (x->current_row>x->row){ post("mtx_row : too high a row is to be set"); return; } if (x->current_row){ int n=x->col; while(n--){ SETFLOAT(ap, f); ap++; } } matrix_bang(x); return; } if (argccol){ post("mtx_row : row length is too small for %dx%d-matrix", x->row, x->col); return; } if (x->current_row>x->row){ post("mtx_row : too high a row is to be set"); return; } if(x->current_row) {memcpy(x->atombuffer+2+(x->current_row-1)*x->col, argv, x->col*sizeof(t_atom)); } else { int r=x->row; while(r--)memcpy(x->atombuffer+2+r*x->col, argv, x->col*sizeof(t_atom)); } matrix_bang(x); } static void *mtx_row_new(t_symbol *s, int argc, t_atom *argv) { t_matrix *x = (t_matrix *)pd_new(mtx_row_class); int i, j, q; outlet_new(&x->x_obj, 0); inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("float"), gensym("")); x->current_row=0; x->col=x->row=0; x->atombuffer=0; switch (argc) { case 0:break; case 1: i = atom_getfloat(argv); if (i<0)i=0; if(i)adjustsize(x, i, i); matrix_set(x, 0); break; case 2: i = atom_getfloat(argv++);if(i<0)i=0; j = atom_getfloat(argv++);if(j<0)j=0; if(i*j)adjustsize(x, i, j); matrix_set(x, 0); break; default: i = atom_getfloat(argv++);if(i<0)i=0; j = atom_getfloat(argv++);if(j<0)j=0; q = atom_getfloat(argv++);if(q<0)q=0; if(i*j)adjustsize(x, i, j); matrix_set(x, 0); x->current_row=q; } return (x); } void mtx_row_setup(void) { mtx_row_class = class_new(gensym("mtx_row"), (t_newmethod)mtx_row_new, (t_method)matrix_free, sizeof(t_matrix), 0, A_GIMME, 0); class_addbang (mtx_row_class, matrix_bang); class_addlist (mtx_row_class, mtx_row_list); class_addmethod(mtx_row_class, (t_method)mtx_row_matrix, gensym("matrix"), A_GIMME, 0); class_addmethod(mtx_row_class, (t_method)mtx_row_float, gensym(""), A_FLOAT, 0); } void iemtx_row_setup(void) { mtx_row_setup(); } pd-iemmatrix-0.3/src/mtx_scroll.c000066400000000000000000000031451262113134600170770ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, forum::für::umläute * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" /* mtx_scroll */ /* scroll the rows */ static t_class *mtx_scroll_class; static void mtx_scroll_matrix(t_matrix *x, t_symbol *s, int argc, t_atom *argv) { int row=atom_getfloat(argv++); int col=atom_getfloat(argv++); int rowscroll = ((int)x->f%row+row)%row; if(row*col>argc-2) { post("mtx_scroll: sparse matrices not yet supported : use \"mtx_check\""); return; } adjustsize(x, row, col); memcpy(x->atombuffer+2, argv+(row-rowscroll)*col, rowscroll*col*sizeof(t_atom)); memcpy(x->atombuffer+2+rowscroll*col, argv, (row-rowscroll)*col*sizeof(t_atom)); matrix_bang(x); } static void *mtx_scroll_new(t_symbol *s, int argc, t_atom *argv) { t_matrix *x = (t_matrix *)pd_new(mtx_scroll_class); floatinlet_new(&x->x_obj, &(x->f)); outlet_new(&x->x_obj, 0); x->f=argc?atom_getfloat(argv):0; x->col=x->row=0; x->atombuffer=0; return (x); } void mtx_scroll_setup(void) { mtx_scroll_class = class_new(gensym("mtx_scroll"), (t_newmethod)mtx_scroll_new, (t_method)matrix_free, sizeof(t_matrix), 0, A_GIMME, 0); class_addbang (mtx_scroll_class, matrix_bang); class_addmethod(mtx_scroll_class, (t_method)mtx_scroll_matrix, gensym("matrix"), A_GIMME, 0); } void iemtx_scroll_setup(void){ mtx_scroll_setup(); } pd-iemmatrix-0.3/src/mtx_sin.c000066400000000000000000000040311262113134600163650ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, forum::für::umläute * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" /* mtx_sin: B=sin(A); */ static t_class *mtx_sin_class; static void mtx_sin_matrix(t_mtx_binmtx *x, t_symbol *s, int argc, t_atom *argv) { int row=atom_getfloat(argv++); int col=atom_getfloat(argv++); t_atom *m; int n = argc-2; if (argc<2){ post("mtx_sin: crippled matrix"); return; } if ((col<1)||(row<1)) { post("mtx_sin: invalid dimensions"); return; } if (col*row>argc-2){ post("sparse matrix not yet supported : use \"mtx_check\""); return; } adjustsize(&x->m, row, col); m = x->m.atombuffer+2; while(n--){ t_float f = (t_float)sin(atom_getfloat(argv++)); SETFLOAT(m, f); m++; } outlet_anything(x->x_obj.ob_outlet, gensym("matrix"), argc, x->m.atombuffer); } static void mtx_sin_list(t_mtx_binscalar *x, t_symbol *s, int argc, t_atom *argv) { int n=argc; t_atom *m; adjustsize(&x->m, 1, argc); m = x->m.atombuffer; while(n--){ m->a_type = A_FLOAT; (m++)->a_w.w_float = (t_float)sin(atom_getfloat(argv++)); } outlet_list(x->x_obj.ob_outlet, gensym("list"), argc, x->m.atombuffer); } static void *mtx_sin_new(t_symbol *s) { /* element sin */ t_matrix *x = (t_matrix *)pd_new(mtx_sin_class); outlet_new(&x->x_obj, 0); x->col = x->row = 0; x->atombuffer = 0; return(x); } void mtx_sin_setup(void) { mtx_sin_class = class_new(gensym("mtx_sin"), (t_newmethod)mtx_sin_new, (t_method)mtx_binmtx_free, sizeof(t_mtx_binmtx), 0, A_GIMME, 0); class_addmethod(mtx_sin_class, (t_method)mtx_sin_matrix, gensym("matrix"), A_GIMME, 0); class_addlist (mtx_sin_class, mtx_sin_list); class_addbang (mtx_sin_class, mtx_binmtx_bang); } void iemtx_sin_setup(void) { mtx_sin_setup(); } pd-iemmatrix-0.3/src/mtx_size.c000066400000000000000000000023601262113134600165510ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, forum::für::umläute * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" /* mtx_size */ static t_class *mtx_size_class; typedef struct _mtx_size { t_object x_obj; int row; int col; t_outlet *left, *right; } t_mtx_size; static void mtx_size_matrix(t_mtx_size *x, t_symbol *s, int argc, t_atom *argv) { if(argc<2)return; outlet_float(x->right, atom_getfloat(argv+1)); outlet_float(x->left, atom_getfloat(argv)); } static void *mtx_size_new(t_symbol *s, int argc, t_atom *argv) { t_mtx_size *x = (t_mtx_size *)pd_new(mtx_size_class); x->left = outlet_new(&x->x_obj, 0); x->right = outlet_new(&x->x_obj, 0); return (x); } void mtx_size_setup(void) { mtx_size_class = class_new(gensym("mtx_size"), (t_newmethod)mtx_size_new, 0, sizeof(t_mtx_size), 0, A_GIMME, 0); class_addmethod(mtx_size_class, (t_method)mtx_size_matrix, gensym("matrix"), A_GIMME, 0); } void iemtx_size_setup(void){ mtx_size_setup(); } pd-iemmatrix-0.3/src/mtx_slice.c000066400000000000000000000137211262113134600167010ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) 2005, Franz Zotter * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" static t_class *mtx_slice_class; typedef struct _MTXslice_ MTXslice; struct _MTXslice_ { t_object x_obj; int slice_size; int slice_startcol; int slice_startrow; int slice_stopcol; int slice_stoprow; t_outlet *list_outlet; t_atom *list_out; }; static void deleteMTXSlice (MTXslice *mtx_slice_obj) { if (mtx_slice_obj->list_out) freebytes (mtx_slice_obj->list_out, sizeof(t_atom)*(mtx_slice_obj->slice_size+2)); } static void mTXSliceIndexList (MTXslice *mtx_slice_obj, t_symbol *s, int argc, t_atom *argv) { int startcol; int startrow; int stopcol; int stoprow; t_symbol *endsym = gensym("end"); if (argc<4) { post("mtx_slice: invalid index vector: "); return; } startrow = atom_getint(&argv[0]); startcol = atom_getint(&argv[1]); stoprow = atom_getint(&argv[2]); stopcol = atom_getint(&argv[3]); if (atom_getsymbol(&argv[0])==endsym) { startrow = -1; } if (atom_getsymbol(&argv[1])==endsym) { startcol = -1; } if (atom_getsymbol(&argv[2])==endsym) { stoprow = -1; } if (atom_getsymbol(&argv[3])==endsym) { stopcol = -1; } if (((startrow<1) && (atom_getsymbol(&argv[0])!=endsym)) || ((startcol<1) && (atom_getsymbol(&argv[1])!=endsym))) { post("mtx_slice: row and column indices must be >0, or misused \"end\" keyword"); return; } if (((startrow>stoprow) && (atom_getsymbol(&argv[2])!=endsym)) || ((startcol>stopcol) && (atom_getsymbol (&argv[3])!=endsym))) { post("mtx_slice: start_indexslice_startrow = startrow; mtx_slice_obj->slice_startcol = startcol; mtx_slice_obj->slice_stoprow = stoprow; mtx_slice_obj->slice_stopcol = stopcol; } static void *newMTXSlice (t_symbol *s, int argc, t_atom *argv) { MTXslice *mtx_slice_obj = (MTXslice *) pd_new (mtx_slice_class); if (argc==4) mTXSliceIndexList (mtx_slice_obj, gensym("list"),argc,argv); else { mtx_slice_obj->slice_startrow = 1; mtx_slice_obj->slice_startcol = 1; mtx_slice_obj->slice_stopcol = -1; mtx_slice_obj->slice_stoprow = -1; } mtx_slice_obj->list_outlet = outlet_new (&mtx_slice_obj->x_obj, gensym("matrix")); inlet_new(&mtx_slice_obj->x_obj, &mtx_slice_obj->x_obj.ob_pd, gensym("list"),gensym("")); return ((void *) mtx_slice_obj); } static void mTXSliceBang (MTXslice *mtx_slice_obj) { if (mtx_slice_obj->list_out) outlet_anything(mtx_slice_obj->list_outlet, gensym("matrix"), mtx_slice_obj->slice_size+2, mtx_slice_obj->list_out); } /* static void copyList (int size, t_atom *x, t_atom *y) { while(size--) *y++=*x++; } */ static void writeVectorIntoList (int n, t_atom *x, t_atom *y) { for (;n--;x++,y++) *y = *x; } static void writeSliceIntoList (int slicerows, const int slicecols, int columns, t_atom *x, t_atom *y) { for (;slicerows--;x+=columns,y+=slicecols) writeVectorIntoList(slicecols, x, y); } static void mTXSliceMatrix (MTXslice *mtx_slice_obj, t_symbol *s, int argc, t_atom *argv) { int rows = atom_getint (argv++); int columns = atom_getint (argv++); int size = rows * columns; int list_size = argc - 2; t_atom *list_in = argv; t_atom *list_out = mtx_slice_obj->list_out; int stopcol = mtx_slice_obj->slice_stopcol; int stoprow = mtx_slice_obj->slice_stoprow; int startrow = mtx_slice_obj->slice_startrow; int startcol = mtx_slice_obj->slice_startcol; int slicecols, slicerows, slicesize; /* size check */ if (!size) { post("mtx_slice: invalid dimensions"); return; } else if (list_size0"); return; } if ((stopcol > columns) || (stoprow > rows)) { post("mtx_slice: slice index exceeds matrix dimensions"); return; } if ((stoprowslice_size) { if (!list_out) list_out = (t_atom *) getbytes (sizeof (t_atom) * (slicesize + 2)); else list_out = (t_atom *) resizebytes (list_out, sizeof (t_atom) * (mtx_slice_obj->slice_size+2), sizeof (t_atom) * (slicesize + 2)); mtx_slice_obj->slice_size = slicesize; mtx_slice_obj->list_out = list_out; } list_out += 2; list_in += columns * (startrow-1) + startcol-1; writeSliceIntoList (slicerows, slicecols, columns, list_in,list_out); list_out = mtx_slice_obj->list_out; SETSYMBOL(list_out, gensym("matrix")); SETFLOAT(list_out, slicerows); SETFLOAT(&list_out[1], slicecols); outlet_anything(mtx_slice_obj->list_outlet, gensym("matrix"), slicesize+2, list_out); } void mtx_slice_setup (void) { mtx_slice_class = class_new (gensym("mtx_slice"), (t_newmethod) newMTXSlice, (t_method) deleteMTXSlice, sizeof (MTXslice), CLASS_DEFAULT, A_GIMME, 0); class_addbang (mtx_slice_class, (t_method) mTXSliceBang); class_addmethod (mtx_slice_class, (t_method) mTXSliceMatrix, gensym("matrix"), A_GIMME,0); class_addmethod (mtx_slice_class, (t_method) mTXSliceIndexList, gensym(""), A_GIMME,0); } void iemtx_slice_setup(void){ mtx_slice_setup(); } pd-iemmatrix-0.3/src/mtx_sndfileread.c000066400000000000000000000242441262113134600200640ustar00rootroot00000000000000 #include "iemmatrix.h" #ifdef HAVE_SNDFILE_H # include #endif #ifdef __WIN32__ # include # include #else # include #endif // SNDFILE* sf_open_fd (int fd, int mode, SF_INFO *sfinfo, int close_desc); // mode // SFM_READ - read only mode // SFM_WRITE - write only mode // SFM_RDWR - read/write mode // close_desc=0 if file shouldn't be closed, =1 if the file shall be closed // in sf_close() // // typedef struct // { sf_count_t frames ; /* Used to be called samples. */ // int samplerate ; // int channels ; // int format ; // int sections ; // int seekable ; // } SF_INFO ; // // int sf_close (SNDFILE *sndfile); // // format //enum // { /* Major formats. */ // SF_FORMAT_WAV = 0x010000, /* Microsoft WAV format (little endian). */ // SF_FORMAT_AIFF = 0x020000, /* Apple/SGI AIFF format (big endian). */ // SF_FORMAT_AU = 0x030000, /* Sun/NeXT AU format (big endian). */ // SF_FORMAT_RAW = 0x040000, /* RAW PCM data. */ // SF_FORMAT_PAF = 0x050000, /* Ensoniq PARIS file format. */ // SF_FORMAT_SVX = 0x060000, /* Amiga IFF / SVX8 / SV16 format. */ // SF_FORMAT_NIST = 0x070000, /* Sphere NIST format. */ // SF_FORMAT_VOC = 0x080000, /* VOC files. */ // SF_FORMAT_IRCAM = 0x0A0000, /* Berkeley/IRCAM/CARL */ // SF_FORMAT_W64 = 0x0B0000, /* Sonic Foundry's 64 bit RIFF/WAV */ // SF_FORMAT_MAT4 = 0x0C0000, /* Matlab (tm) V4.2 / GNU Octave 2.0 */ // SF_FORMAT_MAT5 = 0x0D0000, /* Matlab (tm) V5.0 / GNU Octave 2.1 */ // SF_FORMAT_PVF = 0x0E0000, /* Portable Voice Format */ // SF_FORMAT_XI = 0x0F0000, /* Fasttracker 2 Extended Instrument */ // SF_FORMAT_HTK = 0x100000, /* HMM Tool Kit format */ // SF_FORMAT_SDS = 0x110000, /* Midi Sample Dump Standard */ // SF_FORMAT_AVR = 0x120000, /* Audio Visual Research */ // SF_FORMAT_WAVEX = 0x130000, /* MS WAVE with WAVEFORMATEX */ // SF_FORMAT_SD2 = 0x160000, /* Sound Designer 2 */ // SF_FORMAT_FLAC = 0x170000, /* FLAC lossless file format */ // SF_FORMAT_CAF = 0x180000, /* Core Audio File format */ // // /* Subtypes from here on. */ // // SF_FORMAT_PCM_S8 = 0x0001, /* Signed 8 bit data */ // SF_FORMAT_PCM_16 = 0x0002, /* Signed 16 bit data */ // SF_FORMAT_PCM_24 = 0x0003, /* Signed 24 bit data */ // SF_FORMAT_PCM_32 = 0x0004, /* Signed 32 bit data */ // // SF_FORMAT_PCM_U8 = 0x0005, /* Unsigned 8 bit data (WAV and RAW only) */ // // SF_FORMAT_FLOAT = 0x0006, /* 32 bit float data */ // SF_FORMAT_DOUBLE = 0x0007, /* 64 bit float data */ // // SF_FORMAT_ULAW = 0x0010, /* U-Law encoded. */ // SF_FORMAT_ALAW = 0x0011, /* A-Law encoded. */ // SF_FORMAT_IMA_ADPCM = 0x0012, /* IMA ADPCM. */ // SF_FORMAT_MS_ADPCM = 0x0013, /* Microsoft ADPCM. */ // // SF_FORMAT_GSM610 = 0x0020, /* GSM 6.10 encoding. */ // SF_FORMAT_VOX_ADPCM = 0x0021, /* Oki Dialogic ADPCM encoding. */ // // SF_FORMAT_G721_32 = 0x0030, /* 32kbs G721 ADPCM encoding. */ // SF_FORMAT_G723_24 = 0x0031, /* 24kbs G723 ADPCM encoding. */ // SF_FORMAT_G723_40 = 0x0032, /* 40kbs G723 ADPCM encoding. */ // // SF_FORMAT_DWVW_12 = 0x0040, /* 12 bit Delta Width Variable Word encoding. */ // SF_FORMAT_DWVW_16 = 0x0041, /* 16 bit Delta Width Variable Word encoding. */ // SF_FORMAT_DWVW_24 = 0x0042, /* 24 bit Delta Width Variable Word encoding. */ // SF_FORMAT_DWVW_N = 0x0043, /* N bit Delta Width Variable Word encoding. */ // // SF_FORMAT_DPCM_8 = 0x0050, /* 8 bit differential PCM (XI only) */ // SF_FORMAT_DPCM_16 = 0x0051, /* 16 bit differential PCM (XI only) */ // // /* Endian-ness options. */ // // SF_ENDIAN_FILE = 0x00000000, /* Default file endian-ness. */ // SF_ENDIAN_LITTLE = 0x10000000, /* Force little endian-ness. */ // SF_ENDIAN_BIG = 0x20000000, /* Force big endian-ness. */ // SF_ENDIAN_CPU = 0x30000000, /* Force CPU endian-ness. */ // // SF_FORMAT_SUBMASK = 0x0000FFFF, // SF_FORMAT_TYPEMASK = 0x0FFF0000, // SF_FORMAT_ENDMASK = 0x30000000 // }; // static t_class *mtx_sndfileread_class; typedef struct mtx_sndfileread { t_object x_ob; #ifdef HAVE_SNDFILE_H SNDFILE *x_sndfileread; SF_INFO x_sfinfo; #endif t_outlet *x_message_outlet; t_outlet *x_readybang_outlet; t_canvas *x_canvas; float *x_float; t_atom *x_outlist; int num_chan; int num_frames; } t_mtx_sndfileread; static void mtx_sndfileread_close (t_mtx_sndfileread *x) { #ifdef HAVE_SNDFILE_H if(x->x_sndfileread) sf_close (x->x_sndfileread); x->x_sndfileread=0; #endif if(x->x_outlist) freebytes(x->x_outlist, sizeof(t_atom)*(2+x->num_chan*x->num_frames)); x->x_outlist=0; if(x->x_float) freebytes(x->x_float, sizeof(float)*(x->num_chan*x->num_frames)); x->x_float=0; } static void mtx_sndfileread_open (t_mtx_sndfileread *x, t_symbol *s, t_symbol*type) { #ifdef HAVE_SNDFILE_H char filenamebuf[MAXPDSTRING], *filenamebufptr; int fd; mtx_sndfileread_close(x); /* directory, filename, extension, dirresult, nameresult, unsigned int size, int bin */ fd=canvas_open(x->x_canvas, s->s_name, "", filenamebuf, &filenamebufptr, MAXPDSTRING, 1); if(fd<0){ pd_error(x, "failed to open %s : %s", s->s_name, filenamebuf); return; } iemmatrix_fdclose(fd); if(!filenamebufptr[-1]) filenamebufptr[-1]='/'; if (!(x->x_sndfileread = sf_open (filenamebuf, SFM_READ, &x->x_sfinfo))) { pd_error(x, "failed to sfopen %s : %s", s->s_name, filenamebuf); mtx_sndfileread_close(x); return; } x->num_chan = x->x_sfinfo.channels; #endif } static void mtx_sndfileread_frame (t_mtx_sndfileread *x) { #ifdef HAVE_SNDFILE_H int n; t_atom *ptr; if ((!x->x_sndfileread)||(x->num_chan<=0)) { pd_error(x, "read_frame: no or damaged file opened for reading"); return; } if (!(x->x_float)||(x->num_frames<1)) { if(!(x->x_outlist=(t_atom*)getbytes(sizeof(t_atom)*(2+x->num_chan)))) { pd_error(x,"read_frame: out of memory!"); return; } if (!(x->x_float=(float*)getbytes(sizeof(float)*x->num_chan))) { freebytes(x->x_outlist,sizeof(t_atom)*(2+x->num_chan)); x->x_outlist=0; pd_error(x,"read_frame: out of memory!!"); return; } x->num_frames=1; } if (sf_readf_float(x->x_sndfileread, x->x_float, (sf_count_t)1)<1) { mtx_sndfileread_close(x); outlet_bang(x->x_readybang_outlet); } else { SETFLOAT(x->x_outlist,(t_float)x->num_chan); SETFLOAT(x->x_outlist+1,(t_float)1); ptr=x->x_outlist+2; for (n=0;nnum_chan;n++) { SETFLOAT(&ptr[n],x->x_float[n]); } outlet_anything(x->x_message_outlet,gensym("matrix"),x->num_chan+2,x->x_outlist); } #endif } static void mtx_sndfileread_frames (t_mtx_sndfileread *x, t_float f) { #ifdef HAVE_SNDFILE_H int n,n2,c; sf_count_t frames_read; int num_frames=(int)f; t_atom *ptr; if ((!x->x_sndfileread)||(x->num_chan<=0)) { pd_error(x, "read_frames: no or damaged file opened for reading"); return; } if (!(x->x_float)||(x->num_framesx_outlist=(t_atom*)getbytes(sizeof(t_atom)*(2+num_frames*x->num_chan)))) { pd_error(x,"read_frames: out of memory!"); return; } if (!(x->x_float=(float*)getbytes(sizeof(float)*num_frames*x->num_chan))) { freebytes(x->x_outlist,sizeof(t_atom)*(2+num_frames*x->num_chan)); x->x_outlist=0; pd_error(x,"read_frames: out of memory!!"); return; } x->num_frames=num_frames; } if ((frames_read=sf_readf_float(x->x_sndfileread, x->x_float, (sf_count_t)num_frames))<1) { mtx_sndfileread_close(x); outlet_bang(x->x_readybang_outlet); } else { SETFLOAT(x->x_outlist,(t_float)x->num_chan); SETFLOAT(x->x_outlist+1,(t_float)frames_read); ptr=x->x_outlist+2; for (n=0,c=0;cnum_chan;c++) { for (n2=c; n2num_chan; n++, n2+=x->num_chan) { SETFLOAT(&ptr[n],x->x_float[n2]); } } outlet_anything(x->x_message_outlet,gensym("matrix"),frames_read*x->num_chan+2,x->x_outlist); if (frames_readx_readybang_outlet); } } #endif } static void mtx_sndfileread_free (t_mtx_sndfileread *x) { mtx_sndfileread_close(x); outlet_free (x->x_message_outlet); outlet_free (x->x_readybang_outlet); } static void *mtx_sndfileread_new(void) { t_mtx_sndfileread *x = (t_mtx_sndfileread *)pd_new(mtx_sndfileread_class); x->x_message_outlet = outlet_new(&x->x_ob, &s_list); x->x_readybang_outlet = outlet_new(&x->x_ob, &s_bang); #ifdef HAVE_SNDFILE_H x->x_sndfileread=0; #else pd_error(x,"[mtx_sndfileread] won't work: compiled without libsndfile!"); #endif x->num_chan=0; x->num_frames=0; x->x_canvas = canvas_getcurrent(); return (void *)x; } void mtx_sndfileread_setup(void) { mtx_sndfileread_class = class_new(gensym("mtx_sndfileread"), (t_newmethod)mtx_sndfileread_new, (t_method) mtx_sndfileread_free, sizeof(t_mtx_sndfileread), 0, 0); class_addmethod(mtx_sndfileread_class, (t_method)mtx_sndfileread_open, gensym("open"), A_SYMBOL, A_DEFSYM, 0); class_addmethod(mtx_sndfileread_class, (t_method)mtx_sndfileread_close, gensym("close"), A_NULL, 0); class_addbang(mtx_sndfileread_class, (t_method)mtx_sndfileread_frame); class_addfloat(mtx_sndfileread_class, (t_method)mtx_sndfileread_frames); } void iemtx_sndfileread_setup (void) { mtx_sndfileread_setup(); } pd-iemmatrix-0.3/src/mtx_sort.c000066400000000000000000000241101262113134600165630ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) 2005, Franz Zotter * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" static t_class *mtx_sort_class; static t_symbol *row_sym; static t_symbol *col_sym; static t_symbol *col_sym2; typedef struct _MTXSort_ MTXSort; struct _MTXSort_ { t_object x_obj; int rows; int columns; int size; t_symbol *sort_mode; int sort_direction; t_outlet *list_outlet1; t_outlet *list_outlet2; t_atom *list_out1; t_atom *list_out2; t_atom *list_in; t_float *x; t_float *i; }; static void deleteMTXSort (MTXSort *mtx_sort_obj) { if (mtx_sort_obj->list_out1) freebytes (mtx_sort_obj->list_out1, sizeof(t_atom)*(mtx_sort_obj->size+2)); if (mtx_sort_obj->list_out2) freebytes (mtx_sort_obj->list_out2, sizeof(t_atom)*(mtx_sort_obj->size+2)); if (mtx_sort_obj->x) freebytes (mtx_sort_obj->x, sizeof(t_float)*(mtx_sort_obj->size)); /* if (mtx_sort_obj->y) freebytes (mtx_sort_obj->y, sizeof(t_float)*(mtx_sort_obj->size)); */ if (mtx_sort_obj->i) freebytes (mtx_sort_obj->i, sizeof(t_float)*(mtx_sort_obj->size)); } static void mTXSetSortDirection (MTXSort *mtx_sort_obj, t_float s_dir) { int direction = (int) s_dir; mtx_sort_obj->sort_direction = (direction==-1)?direction:1; } static void mTXSetSortMode (MTXSort *mtx_sort_obj, t_symbol *m_sym) { mtx_sort_obj->sort_mode = m_sym; } static void *newMTXSort (t_symbol *s, int argc, t_atom *argv) { MTXSort *mtx_sort_obj = (MTXSort *) pd_new (mtx_sort_class); /* defaults: */ mTXSetSortMode (mtx_sort_obj, gensym(":")); mTXSetSortDirection (mtx_sort_obj, 1.0f); if (argc>=1) { if (argv[0].a_type == A_SYMBOL) { mTXSetSortMode (mtx_sort_obj, atom_getsymbol (argv)); if (argc>=2) { if (argv[1].a_type != A_SYMBOL) mTXSetSortDirection (mtx_sort_obj, atom_getfloat (argv+1)); else post("mtx_sort: 2nd arg ignored. supposed to be float"); } } else { mTXSetSortDirection (mtx_sort_obj, atom_getfloat (argv)); if (argc>=2) { if (argv[1].a_type == A_SYMBOL) mTXSetSortMode (mtx_sort_obj, atom_getsymbol (argv+1)); else post("mtx_sort: 2nd arg ignored. supposed to be symbolic, e.g. \"row\", \"col\", \":\""); } } } mtx_sort_obj->list_outlet1 = outlet_new (&mtx_sort_obj->x_obj, gensym("matrix")); mtx_sort_obj->list_outlet2 = outlet_new (&mtx_sort_obj->x_obj, gensym("matrix")); return ((void *) mtx_sort_obj); } static void mTXSortBang (MTXSort *mtx_sort_obj) { if (mtx_sort_obj->list_out2) outlet_anything(mtx_sort_obj->list_outlet2, gensym("matrix"), mtx_sort_obj->size+2, mtx_sort_obj->list_out2); if (mtx_sort_obj->list_out1) outlet_anything(mtx_sort_obj->list_outlet1, gensym("matrix"), mtx_sort_obj->size+2, mtx_sort_obj->list_out1); } static void writeFloatIntoList (int n, t_atom *l, t_float *f) { for (;n--;f++, l++) SETFLOAT (l, *f); } static void readFloatFromList (int n, t_atom *l, t_float *f) { while (n--) *f++ = atom_getfloat (l++); } static void readFloatFromListModulo (int n, int m, t_atom *l, t_float *f) { t_atom *ptr = l; int count1, count2; n /= m; count1 = m; while (count1--) for (count2 = n, ptr = l++; count2--; ptr += m, f++) *f = atom_getfloat (ptr); } static void writeFloatIntoListModulo (int n, int m, t_atom *l, t_float *f) { t_atom *ptr = l; int count1, count2; n /= m; count1 = m; while (count1--) for (count2 = n, ptr = l++; count2--; ptr += m, f++) SETFLOAT(ptr,*f); } static void sortVector (int n, t_float *x, t_float *i, int direction) { int step = n; int size = n; int k, loops = 1; int i_tmp; t_float x_tmp; switch (direction) { case -1: while (step > 1) { step = (step % 2)?(step+1)/2:step/2; k = loops; loops += 2; while(k--) { /* there might be some optimization in here */ for (n=0; n<(size-step); n++) if (x[n] < x[n+step]) { i_tmp = i[n]; x_tmp = x[n]; x[n] = x[n+step]; x[n+step] = x_tmp; i[n] = i[n+step]; i[n+step] = i_tmp; } } } break; default: case 1: while (step > 1) { step = (step % 2)?(step+1)/2:step/2; k = loops; loops += 2; while(k--) { /* there might be some optimization in here */ for (n=0; n<(size-step); n++) if (x[n] > x[n+step]) { i_tmp = i[n]; x_tmp = x[n]; x[n] = x[n+step]; x[n+step] = x_tmp; i[n] = i[n+step]; i[n+step] = i_tmp; } } } } } /* static void indexingVector (int n, int m, int dimension, t_float *i) { int count; int count2; int idx = n; t_float *ptr; i += n; switch (dimension) { case 2: n /= m; for (count = m; count--;) { ptr = --i; for (count2 = n; count2--; ptr -= m) *ptr = idx--; } break; default: case 1: for (; idx;) *--i = idx--; } } */ static void indexingVector (int n, int m, t_symbol *sort_mode, t_float *i) { int count; int count2; int idx = n; t_float *ptr; i += n; if ((sort_mode == col_sym)||(sort_mode == col_sym2)) { n /= m; for (count = m; count--;) { ptr = --i; for (count2 = n; count2--; ptr -= m) *ptr = idx--; } } else { for (; idx;) *--i = idx--; } } static void mTXSortMatrix (MTXSort *mtx_sort_obj, t_symbol *s, int argc, t_atom *argv) { int rows = atom_getint (argv++); int columns = atom_getint (argv++); int size = rows * columns; int list_size = argc - 2; t_atom *list_ptr = argv; t_atom *list_out1 = mtx_sort_obj->list_out1; t_atom *list_out2 = mtx_sort_obj->list_out2; t_float *x = mtx_sort_obj->x; t_float *i = mtx_sort_obj->i; int count; /* size check */ if (!size) { post("mtx_sort: invalid dimensions"); return; } else if (list_sizesize) { x = (t_float *) resizebytes (x, sizeof (t_float) * (mtx_sort_obj->size), sizeof (t_float) * (size)); i = (t_float *) resizebytes (i, sizeof (t_float) * (mtx_sort_obj->size), sizeof (t_float) * (size)); list_out1 = (t_atom *) resizebytes (list_out1, sizeof (t_atom) * (mtx_sort_obj->size+2), sizeof (t_atom) * (size + 2)); list_out2 = (t_atom *) resizebytes (list_out2, sizeof (t_atom) * (mtx_sort_obj->size+2), sizeof (t_atom) * (size + 2)); } mtx_sort_obj->list_out1 = list_out1; mtx_sort_obj->list_out2 = list_out2; mtx_sort_obj->x = x; mtx_sort_obj->i = i; mtx_sort_obj->size = size; mtx_sort_obj->rows = rows; mtx_sort_obj->columns = columns; /* generating indexing vector */ indexingVector (size, columns, mtx_sort_obj->sort_mode, i); /* main part */ /* reading matrix from inlet */ if ((mtx_sort_obj->sort_mode == col_sym)|| (mtx_sort_obj->sort_mode == col_sym2)) { readFloatFromListModulo (size, columns, list_ptr, x); columns = mtx_sort_obj->rows; rows = mtx_sort_obj->columns; } else readFloatFromList (size, list_ptr, x); /* calculating sort */ if ((mtx_sort_obj->sort_mode != col_sym) && (mtx_sort_obj->sort_mode != col_sym2) && (mtx_sort_obj->sort_mode != row_sym)) sortVector (size,x,i,mtx_sort_obj->sort_direction); else for (count = rows; count--;x+=columns,i+=columns) sortVector (columns,x,i,mtx_sort_obj->sort_direction); x = mtx_sort_obj->x; i = mtx_sort_obj->i; /* writing matrix to outlet */ if ((mtx_sort_obj->sort_mode == col_sym)|| (mtx_sort_obj->sort_mode == col_sym2)) { columns = mtx_sort_obj->columns; rows = mtx_sort_obj->rows; writeFloatIntoListModulo (size, columns, list_out1+2, x); writeFloatIntoListModulo (size, columns, list_out2+2, i); } else { writeFloatIntoList (size, list_out1+2, x); writeFloatIntoList (size, list_out2+2, i); } /* writing indices */ SETSYMBOL(list_out2, gensym("matrix")); SETFLOAT(list_out2, rows); SETFLOAT(&list_out2[1], columns); outlet_anything(mtx_sort_obj->list_outlet2, gensym("matrix"), mtx_sort_obj->size+2, list_out2); /* writing sorted values */ SETSYMBOL(list_out1, gensym("matrix")); SETFLOAT(list_out1, rows); SETFLOAT(&list_out1[1], columns); outlet_anything(mtx_sort_obj->list_outlet1, gensym("matrix"), mtx_sort_obj->size+2, list_out1); } void mtx_sort_setup (void) { mtx_sort_class = class_new (gensym("mtx_sort"), (t_newmethod) newMTXSort, (t_method) deleteMTXSort, sizeof (MTXSort), CLASS_DEFAULT, A_GIMME, 0); class_addbang (mtx_sort_class, (t_method) mTXSortBang); class_addmethod (mtx_sort_class, (t_method) mTXSortMatrix, gensym("matrix"), A_GIMME,0); class_addmethod (mtx_sort_class, (t_method) mTXSetSortMode, gensym("mode"), A_DEFSYMBOL,0); class_addmethod (mtx_sort_class, (t_method) mTXSetSortDirection, gensym("direction"), A_DEFFLOAT,0); row_sym = gensym("row"); col_sym = gensym("col"); col_sym2 = gensym("column"); } void iemtx_sort_setup(void){ mtx_sort_setup(); } pd-iemmatrix-0.3/src/mtx_spherical_harmonics.c000066400000000000000000000145641262113134600216250ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * this functions depends on the GNU scientific library * * Copyright (c) 2009, Franz Zotter * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" #include #include "mtx_spherical_harmonics/sharmonics.c" #include "mtx_spherical_harmonics/legendre_a.c" #include "mtx_spherical_harmonics/chebyshev12.c" #include "mtx_spherical_harmonics/sharmonics_normalization.c" static t_class *mtx_spherical_harmonics_class; typedef struct _MTXSh_ MTXSh; struct _MTXSh_ { t_object x_obj; t_outlet *list_sh_out; t_atom *list_sh; double *phi; double *theta; SHWorkSpace *ws; size_t nmax; size_t l; }; static t_class *mtx_circular_harmonics_class; typedef struct _MTXCh_ MTXCh; struct _MTXCh_ { t_object x_obj; t_outlet *list_ch_out; t_atom *list_ch; double *phi; Cheby12WorkSpace *wc; size_t nmax; size_t l; }; static void allocMTXShdata (MTXSh *x) { x->phi=(double*)calloc(x->l,sizeof(double)); x->theta=(double*)calloc(x->l,sizeof(double)); x->ws=sharmonics_alloc(x->nmax,x->l); x->list_sh=(t_atom*)calloc(x->l*(x->nmax+1)*(x->nmax+1)+2,sizeof(t_atom)); } static void deleteMTXShdata (MTXSh *x) { if (x->phi!=0) free(x->phi); if (x->theta!=0) free(x->theta); if (x->list_sh!=0) free(x->list_sh); sharmonics_free(x->ws); x->ws=0; x->list_sh=0; x->theta=0; x->phi=0; } static void *newMTXSh (t_symbol *s, int argc, t_atom *argv) { int nmax; MTXSh *x = (MTXSh *) pd_new (mtx_spherical_harmonics_class); x->list_sh_out = outlet_new (&x->x_obj, gensym("matrix")); x->list_sh = 0; x->phi = 0; x->theta = 0; x->ws = 0; x->l=0; nmax=(int) atom_getfloat(argv); if (nmax<0) nmax=0; x->nmax=nmax; return ((void *) x); } static void mTXShBang (MTXSh *x) { if (x->list_sh!=0) { outlet_anything(x->list_sh_out, gensym("matrix"), x->l*(x->nmax+1)*(x->nmax+1)+2, x->list_sh); } } static void mTXShMatrix (MTXSh *x, t_symbol *s, int argc, t_atom *argv) { int rows = atom_getint (argv++); int columns = atom_getint (argv++); int size = rows * columns; int in_size = argc-2; unsigned int n; /* size check */ if (!size) post("mtx_spherical_harmonics: invalid dimensions"); else if (in_sizel!=columns) { deleteMTXShdata(x); x->l=columns; allocMTXShdata(x); } for (n=0;nl;n++) { x->phi[n]=(double) atom_getfloat(argv+n); x->theta[n]=(double) atom_getfloat(argv+columns+n); } if (x->ws!=0) { int n; sharmonics(x->phi, x->theta, x->ws); in_size=x->l*(x->nmax+1)*(x->nmax+1); SETFLOAT(x->list_sh,(float)x->l); SETFLOAT(x->list_sh+1,(float)(x->nmax+1)*(x->nmax+1)); for (n=0;nlist_sh+n+2,(float)x->ws->y[n]); mTXShBang(x); } else post("mtx_spherical_harmonics: memory error, no operation"); } } static void allocMTXChdata (MTXCh *x) { x->phi=(double*)calloc(x->l,sizeof(double)); x->wc=chebyshev12_alloc(x->nmax,x->l); x->list_ch=(t_atom*)calloc(x->l*(2*x->nmax+1)+2,sizeof(t_atom)); } static void deleteMTXChdata (MTXCh *x) { if (x->phi!=0) free(x->phi); if (x->list_ch!=0) free(x->list_ch); chebyshev12_free(x->wc); x->wc=0; x->list_ch=0; x->phi=0; } static void *newMTXCh (t_symbol *s, int argc, t_atom *argv) { int nmax; MTXCh *x = (MTXCh *) pd_new (mtx_circular_harmonics_class); x->list_ch_out = outlet_new (&x->x_obj, gensym("matrix")); x->list_ch = 0; x->phi = 0; x->wc = 0; x->l=0; nmax=(int) atom_getfloat(argv); if (nmax<0) nmax=0; x->nmax=nmax; return ((void *) x); } static void mTXChBang (MTXCh *x) { if (x->list_ch!=0) { outlet_anything(x->list_ch_out, gensym("matrix"), x->l*(2*x->nmax+1)+2, x->list_ch); } } static void mTXChMatrix (MTXCh *x, t_symbol *s, int argc, t_atom *argv) { int rows = atom_getint (argv++); int columns = atom_getint (argv++); int size = rows * columns; int in_size = argc-2; unsigned int n; /* size check */ if (!size) post("mtx_circular_harmonics: invalid dimensions"); else if (in_sizel!=columns) { deleteMTXChdata(x); x->l=columns; allocMTXChdata(x); } for (n=0;nl;n++) { x->phi[n]=(double) atom_getfloat(argv+n); } if (x->wc!=0) { int n; chebyshev12(x->phi, x->wc); in_size=x->l*(2*x->nmax+1); SETFLOAT(x->list_ch,(float)x->l); SETFLOAT(x->list_ch+1,(float)(2*x->nmax+1)); for (n=0;nlist_ch+n+2,(float)x->wc->t[n]); mTXChBang(x); } else post("mtx_circular_harmonics: memory error, no operation"); } } void mtx_spherical_harmonics_setup (void) { mtx_spherical_harmonics_class = class_new (gensym("mtx_spherical_harmonics"), (t_newmethod) newMTXSh, (t_method) deleteMTXShdata, sizeof (MTXSh), CLASS_DEFAULT, A_GIMME, 0); class_addbang (mtx_spherical_harmonics_class, (t_method) mTXShBang); class_addmethod (mtx_spherical_harmonics_class, (t_method) mTXShMatrix, gensym("matrix"), A_GIMME,0); } void mtx_circular_harmonics_setup (void) { mtx_circular_harmonics_class = class_new (gensym("mtx_circular_harmonics"), (t_newmethod) newMTXCh, (t_method) deleteMTXChdata, sizeof (MTXCh), CLASS_DEFAULT, A_GIMME, 0); class_addbang (mtx_circular_harmonics_class, (t_method) mTXChBang); class_addmethod (mtx_circular_harmonics_class, (t_method) mTXChMatrix, gensym("matrix"), A_GIMME,0); } void iemtx_spherical_harmonics_setup(void){ mtx_circular_harmonics_setup(); mtx_spherical_harmonics_setup(); } pd-iemmatrix-0.3/src/mtx_spherical_harmonics/000077500000000000000000000000001262113134600214475ustar00rootroot00000000000000pd-iemmatrix-0.3/src/mtx_spherical_harmonics/AUTHORS000066400000000000000000000002241262113134600225150ustar00rootroot00000000000000Franz Zotter, zotter@iem.at, Institute of Electronic Music and Acoustics, University of Music and dramatic Arts (KUG), http://iem.at/Members/zotter pd-iemmatrix-0.3/src/mtx_spherical_harmonics/COPYING000066400000000000000000000431221262113134600225040ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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. Copyright (C) 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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) year 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. , 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. pd-iemmatrix-0.3/src/mtx_spherical_harmonics/ChangeLog000066400000000000000000000000001262113134600232070ustar00rootroot00000000000000pd-iemmatrix-0.3/src/mtx_spherical_harmonics/LICENSE000066400000000000000000001045131262113134600224600ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. 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 them 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 prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. 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. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey 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; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If 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 convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU 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 that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. 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. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 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. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. 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 state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 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 3 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, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program 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, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU 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 Lesser General Public License instead of this License. But first, please read . pd-iemmatrix-0.3/src/mtx_spherical_harmonics/Makefile.am000066400000000000000000000004201262113134600234770ustar00rootroot00000000000000SUBDIRS = . cmdline lib_LIBRARIES = libsharmonics.a libsharmonics_a_CPPFLAGS = -I$(top_srcdir)/.. libsharmonics_a_SOURCES = \ legendre_a.c \ sharmonics_normalization.c \ chebyshev12.c \ sharmonics.c include_HEADERS = \ legendre_a.h \ sharmonics_normalization.h pd-iemmatrix-0.3/src/mtx_spherical_harmonics/NEWS000066400000000000000000000000001262113134600221340ustar00rootroot00000000000000pd-iemmatrix-0.3/src/mtx_spherical_harmonics/README000066400000000000000000000013451262113134600223320ustar00rootroot00000000000000This directory contains the "sphbase" library C-files implementing the Legendre-polynomials, spherical harmonics, normalization constants, spherical Hankel and Bessel functions. The rotation/translation operations are currently not implemented and will be added soon. The C-code is published under the Gnu General Public License. To make the c-sources, use: /c_src$ make You will get some test routines (legendre_a, sh_normalization, sh) and the library file (sh.o). To test the functions, use e.g. ./legendre_a 3 ./sh_normalization 3 ./sh 3 1 0.5 0.5 The radial functions are currently not part of the Makefile. The near-field approximation for the spherical Bessel function hasn't been added yet. Franz Zotter, 2008. pd-iemmatrix-0.3/src/mtx_spherical_harmonics/chebyshev12.c000066400000000000000000000042221262113134600237360ustar00rootroot00000000000000/* Evaluates all fully normalized circular harmonics at the angles phi up to the order nmax. using the recurrence for the Chebyshev polynomials of the first and second kind T has the dimensions length(phi) x 2nmax+1 Implementation by Franz Zotter, Institute of Electronic Music and Acoustics (IEM), University of Music and Dramatic Arts (KUG), Graz, Austria http://iem.at/Members/zotter, 2008. This code is published under the Gnu General Public License, see "LICENSE.txt" */ #include "mtx_spherical_harmonics/chebyshev12.h" Cheby12WorkSpace *chebyshev12_alloc(const size_t nmax, const size_t l) { Cheby12WorkSpace *wc; // memory allocation if ((wc=(Cheby12WorkSpace*)calloc(1,sizeof(Cheby12WorkSpace)))!=0) { wc->l=l; wc->nmax=nmax; if ((wc->t=(double*)calloc(l*(2*nmax+1),sizeof(double)))==0) { free(wc); return 0; } return wc; } return 0; } void chebyshev12_free(Cheby12WorkSpace *wc) { if (wc!=0) { free(wc->t); free(wc); } } void chebyshev12(double *phi, Cheby12WorkSpace *wc) { unsigned int l,l0,n; const int incr=2*wc->nmax+1; double *cosphi; double *sinphi; const double oneoversqrt2pi=1.0/sqrt(2.0*M_PI); const double oneoversqrtpi=1.0/sqrt(M_PI); // memory allocation if ((wc!=0)&&(phi!=0)) { if ((cosphi=(double*)calloc(wc->l,sizeof(double)))==0) { return; } if ((sinphi=(double*)calloc(wc->l,sizeof(double)))==0) { free(cosphi); return; } // constants and initialization for (l=0, l0=wc->nmax; ll; l++, l0+=incr) { cosphi[l]=cos(phi[l]); sinphi[l]=sin(phi[l]); // initial value T_0=1 wc->t[l0]=oneoversqrt2pi; wc->t[l0+1]=cosphi[l]*oneoversqrtpi; wc->t[l0-1]=sinphi[l]*oneoversqrtpi; } // recurrence for n>1 for (n=2; n<=wc->nmax; n++) { for (l=0, l0=wc->nmax; ll; l++, l0+=incr) { wc->t[l0+n]=cosphi[l]* wc->t[l0+n-1] - sinphi[l]* wc->t[l0-n+1]; wc->t[l0-n]=sinphi[l]* wc->t[l0+n-1] + cosphi[l]* wc->t[l0-n+1]; } } free(cosphi); free(sinphi); } } pd-iemmatrix-0.3/src/mtx_spherical_harmonics/chebyshev12.h000066400000000000000000000015171262113134600237470ustar00rootroot00000000000000/* Evaluates all circular harmonics at the angles phi up to the order nmax. using the recurrence for the Chebyshev polynomials of the first and second kind T has the dimensions length(phi) x 2nmax+1 Implementation by Franz Zotter, Institute of Electronic Music and Acoustics (IEM), University of Music and Dramatic Arts (KUG), Graz, Austria http://iem.at/Members/zotter, 2008. This code is published under the Gnu General Public License, see "LICENSE.txt" */ #ifndef _chebyshev12_h__ #define _chebyshev12_h__ #include #include typedef struct _Cheby12WorkSpace_ { size_t nmax; size_t l; double *t; } Cheby12WorkSpace; Cheby12WorkSpace *chebyshev12_alloc(const size_t nmax, const size_t l); void chebyshev12_free(Cheby12WorkSpace *wc); void chebyshev12(double *phi, Cheby12WorkSpace *wc); #endif pd-iemmatrix-0.3/src/mtx_spherical_harmonics/cmdline/000077500000000000000000000000001262113134600230625ustar00rootroot00000000000000pd-iemmatrix-0.3/src/mtx_spherical_harmonics/cmdline/Makefile.am000066400000000000000000000011021262113134600251100ustar00rootroot00000000000000#check_PROGRAMS = \ # bin_PROGRAMS = \ legendre_a_cmd \ sharmonics_normalization_cmd \ chebyshev12_cmd \ sharmonics_cmd #TESTS = $(check_PROGRAMS) AM_CPPFLAGS = -I$(top_srcdir) legendre_a_cmd_LDADD = ../libsharmonics.a sharmonics_normalization_cmd_LDADD = ../libsharmonics.a chebyshev12_cmd_LDADD = ../libsharmonics.a sharmonics_cmd_LDADD = ../libsharmonics.a legendre_a_cmd_SOURCES = legendre_a_cmd.c sharmonics_normalization_cmd_SOURCES = sharmonics_normalization_cmd.c chebyshev12_cmd_SOURCES = chebyshev12_cmd.c sharmonics_cmd_SOURCES = sharmonics_cmd.c pd-iemmatrix-0.3/src/mtx_spherical_harmonics/cmdline/chebyshev12_cmd.c000066400000000000000000000017741262113134600262050ustar00rootroot00000000000000 /* command line test for chebyshev12.c * Franz Zotter, 2009, see ../LICENSE.txt */ #include #include "chebyshev12.h" int main (int argc, char *argv[]) { int nmax, l, lc, n, m; Cheby12WorkSpace *wc=0; double *ptr,*phi; if (argc <3) { printf("chebyshev12 requires nmax as input argument followed by phi values\n"); return 0; } nmax=atoi(argv[1]); l=argc-2; if ((phi=(double*)calloc(l,sizeof(double)))==0) { printf("chebyshev12 could not allocate memory for %d phi-values\n",l); return 0; } if ((wc=chebyshev12_alloc(nmax,l))==0) { printf("chebyshev12 could not allocate memory for n=%d\n and l=%d\n",nmax,l); return 0; } for (n=0;nt; for (lc=0;lc #include "legendre_a.h" int main (int argc, char *argv[]) { int nmax, l, lc, n, m; LegendreWorkSpace *wl=0; double *ptr,*theta; if (argc <3) { printf("legendre_a requires nmax as input argument followed by theta values\n"); return 0; } nmax=atoi(argv[1]); l=argc-2; if ((theta=(double*)calloc(l,sizeof(double)))==0) { printf("legendre_a could not allocate memory for %d theta-values\n",l); return 0; } if ((wl=legendre_a_alloc(nmax,l))==0) { printf("legendre_a could not allocate memory for n=%d\n and l=%d\n",nmax,l); free(theta); return 0; } for (n=0;np; for (lc=0;lc #include "sharmonics.h" int main (int argc, char *argv[]) { int nmax, l, lc, n, m; SHWorkSpace *ws=0; double *ptr,*phi,*theta; if (argc <4) { printf("sharmonics requires nmax as input argument followed by phi theta value pairs\n"); return 0; } nmax=atoi(argv[1]); l=(argc-2)/2; if ((phi=(double*)calloc(l,sizeof(double)))==0) { printf("sharmonics could not allocate memory for %d phi-values\n",l); return 0; } if ((theta=(double*)calloc(l,sizeof(double)))==0) { printf("sharmonics could not allocate memory for %d theta-values\n",l); free(phi); return 0; } if ((ws=sharmonics_alloc(nmax,l))==0) { printf("sharmonics could not allocate memory for n=%d\n and l=%d\n",nmax,l); free(theta); free(phi); return 0; } for (n=0;ny; for (lc=0;lc #include "sharmonics_normalization.h" int main (int argc, char *argv[]) { int nmax, n, m; SHNorml *ws=0; double *ptr; if (argc!=2) { printf("sharmonics_normalization requires nmax as input argument\n"); return 0; } nmax=atoi(argv[1]); if ((ws=sharmonics_normalization_new(nmax))==0) { printf("sharmonics_normalization could not allocate memory for n=%d",nmax); return 0; } ptr=ws->n; for (n=0;n<=nmax;n++) { for (m=0;m<=n;m++) { printf("N[%2d][%2d]=%7.4f\n",n,m,*ptr++); } } sharmonics_normalization_free(ws); return 1; } pd-iemmatrix-0.3/src/mtx_spherical_harmonics/configure.ac000066400000000000000000000012231262113134600237330ustar00rootroot00000000000000# -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_PREREQ(2.61) AC_INIT([sh], [0.1], [zotter@iem.at]) AM_INIT_AUTOMAKE([-Wall]) AC_CONFIG_SRCDIR([legendre_a.h]) # Checks for programs. AC_PROG_CC AC_PROG_RANLIB # Checks for libraries. # FIXME: Replace `main' with a function in `-lm': AC_CHECK_LIB([m], [cos]) # Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS([stdlib.h]) # Checks for typedefs, structures, and compiler characteristics. # Checks for library functions. AC_FUNC_MALLOC AC_CHECK_FUNCS([pow]) AC_CONFIG_FILES([Makefile cmdline/Makefile]) AC_OUTPUT pd-iemmatrix-0.3/src/mtx_spherical_harmonics/legendre_a.c000066400000000000000000000060231262113134600237010ustar00rootroot00000000000000/* Evaluates all associated legendre functions at the angles theta up to the order nmax using the three-term recurrence of the Legendre functions. P has dimensions length(theta) x (nmax+1)(nmax+2) Implementation by Franz Zotter, Institute of Electronic Music and Acoustics (IEM), University of Music and Dramatic Arts (KUG), Graz, Austria http://iem.at/Members/zotter, 2008. This code is published under the Gnu General Public License, see "LICENSE.txt" */ #include "mtx_spherical_harmonics/legendre_a.h" static void legendre_first_recurrence (double *sintheta, LegendreWorkSpace *wl) { int n; unsigned int l,l0; int nmo0=0; int n0=1; const int incr=(wl->nmax+1)*(wl->nmax+2)/2; // computes the legendre functions P_n^m(costheta) for m=n // from P_0^0 for (n=1; n<=wl->nmax; n++) { for (l=0,l0=0; ll; l++,l0+=incr) { wl->p[l0+n0+n] = -(2*n-1) * wl->p[l0+nmo0+n-1] * sintheta[l]; } nmo0=n0; n0+=n+1; } } static void legendre_second_recurrence (double *costheta, LegendreWorkSpace *wl) { unsigned int m,n,l,l0; int nmt0=-1; int nmo0=0; int n0=1; const int incr=(wl->nmax+1)*(wl->nmax+2)/2; // computes the Legendre functions P_n^m(costheta) from // P_n^m with m=n for (n=1; n<=wl->nmax; n++) { for (m=0; ml; l++,l0+=incr) { wl->p[l0+n0+m] = ( (2*n-1) * costheta[l] * wl->p[l0+nmo0+m] - (n+m-1) * wl->p[l0+nmt0+m] ) / (n-m); } } else { for (l=0,l0=0; ll; l++,l0+=incr) { wl->p[l0+n0+m] = ( (2*n-1) * costheta[l] * wl->p[l0+nmo0+m] ) / (n-m); } } } nmt0=nmo0; nmo0=n0; n0+=n+1; } } LegendreWorkSpace *legendre_a_alloc(const size_t nmax, const size_t l) { LegendreWorkSpace *wl; // memory allocation if ((wl=(LegendreWorkSpace*)calloc(1,sizeof(LegendreWorkSpace)))!=0) { wl->l=l; wl->nmax=nmax; if ((wl->p=(double*)calloc(l*(nmax+1)*(nmax+2)/2,sizeof(double)))==0) { free(wl); wl = 0; } } return wl; } void legendre_a_free(LegendreWorkSpace *wl) { if (wl!=0) { free(wl->p); free(wl); } } void legendre_a(double *theta, LegendreWorkSpace *wl) { unsigned int l,l0; const int incr=(wl->nmax+1)*(wl->nmax+2)/2; double *costheta; double *sintheta; // memory allocation if ((wl!=0)&&(theta!=0)) { if ((costheta=(double*)calloc(wl->l,sizeof(double)))==0) { return; } if ((sintheta=(double*)calloc(wl->l,sizeof(double)))==0) { free(costheta); return; } // constants and initialization for (l=0, l0=0; ll; l++, l0+=incr) { costheta[l]=cos(theta[l]); sintheta[l]=sin(theta[l]); // initial value P_0^0=1 wl->p[l0]=1; } // recurrences evaluating all the Legendre functions legendre_first_recurrence(sintheta,wl); legendre_second_recurrence(costheta,wl); free(sintheta); free(costheta); } } pd-iemmatrix-0.3/src/mtx_spherical_harmonics/legendre_a.h000066400000000000000000000015161262113134600237100ustar00rootroot00000000000000/* Evaluates all associated legendre functions at the angles theta up to the order nmax using the three-term recurrence of the Legendre functions. P has dimensions length(theta) x (nmax+1)(nmax+2) Implementation by Franz Zotter, Institute of Electronic Music and Acoustics (IEM), University of Music and Dramatic Arts (KUG), Graz, Austria http://iem.at/Members/zotter, 2008. This code is published under the Gnu General Public License, see "LICENSE.txt" */ #ifndef _legendre_a_h__ #define _legendre_a_h__ #include #include typedef struct _LegendreWorkSpace_ { size_t nmax; size_t l; double *p; } LegendreWorkSpace; LegendreWorkSpace *legendre_a_alloc(const size_t nmax, const size_t l); void legendre_a_free(LegendreWorkSpace *wl); void legendre_a(double *theta, LegendreWorkSpace *wl); #endif pd-iemmatrix-0.3/src/mtx_spherical_harmonics/sharmonics.c000066400000000000000000000113561262113134600237670ustar00rootroot00000000000000/* * Recursive computation of (arbitrary degree) spherical harmonics, * according to Gumerov and Duraiswami, * "The Fast Multipole Methods for the Helmholtz Equation in Three Dimensions", * Elsevier, 2005. * * Implementation by Franz Zotter, Institute of Electronic Music and Acoustics * (IEM), University of Music and Dramatic Arts (KUG), Graz, Austria * http://iem.at/Members/zotter, 2008. * * This code is published under the Gnu General Public License, see * "LICENSE.txt" */ #include "mtx_spherical_harmonics/sharmonics.h" // HELPER ROUTINES // preliminarily writing normalized Legendre functions into the result // Y_n^m(theta) = N_n^m * P_n^m(cos(theta)) // ny0 and np0 denote where the position (n,m)=(n,0) is in the arrays // ly0 and lp0 denote the starting position for one vertex in the arrays // see below to find out how the data is arranged static void sharmonics_initlegendrenormlzd(SHWorkSpace *ws) { unsigned int n,m,ny0,np0; unsigned int l,ly0,lp0; const int pincr=(ws->nmax+1)*(ws->nmax+2)/2; const int yincr=(ws->nmax+1)*(ws->nmax+1); for (n=0,ny0=0,np0=0; n<=ws->nmax; n++) { for (m=0; m<=n; m++) { ly0=0; lp0=0; for (l=0; ll; l++) { ws->y[ly0+ny0+m] = ws->wn->n[np0+m] * ws->wl->p[lp0+np0+m]; ws->y[ly0+ny0-m] = ws->y[ly0+ny0+m]; ly0+=yincr; lp0+=pincr; } } ny0+=2*n+2; np0+=n+1; } } // multiplying normalized Chebyshev sin/cos to the preliminary result // Y_n^m(phi,theta) = Y_n^m(theta) * T_m(phi) // ny0 and nt0 denote where the position (n,m)=(n,0) or m=0 is in the arrays // ly0 and lt0 denote the starting position for one vertex in the arrays // see below to find out how the data is arranged static void sharmonics_multcheby12(SHWorkSpace *ws) { unsigned int n,m,ny0; const int nt0=ws->nmax; unsigned int l,ly0,lt0; const int tincr=2*ws->nmax+1; const int yincr=(ws->nmax+1)*(ws->nmax+1); for (n=0,ny0=0; n<=ws->nmax; n++) { m=0; ly0=0; lt0=nt0; for (l=0; ll; l++) { ws->y[ly0+ny0+m]*= ws->wc->t[lt0+m]; ly0+=yincr; lt0+=tincr; } for (m=1; m<=n; m++) { ly0=0; lt0=nt0; for (l=0; ll; l++) { ws->y[ly0+ny0-m]*= -ws->wc->t[lt0-m]; ws->y[ly0+ny0+m]*= ws->wc->t[lt0+m]; ly0+=yincr; lt0+=tincr; } } ny0+=2*n+2; } } /* MAIN PROGRAM. IMPORTANT EXPRESSIONS p... vector containing Legendre functions evaluated at the vector z=cos(theta) structure [P_0^0(z1) P_1^0(z1) P_1^1(z1) P_2^0(z1) .... Pnmax^nmax(z1) P_0^0(z2) P_1^0(z1) P_1^1(z2) P_2^0(z2) .... Pnmax^nmax(z2) ... P_0^0(zL) P_1^0(zL) P_1^1(zL) P_2^0(zL) .... Pnmax^nmax(zL)] with length L X (nmax+1)*(nmax+2)/2 t... vector containing Chebyshev polynomials sin/cos evaluated at the vector phi structure [T_-nmax(phi1) ... T_-1(phi1) T_0(phi1) T_1(phi1) ... T_nmax(phi1) T_-nmax(phi2) ... T_-1(phi2) T_0(phi2) T_1(phi2) ... T_nmax(phi2) ... T_-nmax(phiL) ... T_-1(phiL) T_0(phiL) T_1(phiL) ... T_nmax(phiL)] with length L X (2*nmax+1); negative indices are sine, positive ones cosine terms norml ... vector containing normalization terms structure [N_0^0 N_1^0 N_1^1 N_2^0 N_2^1 N_2^2 .... N_nmax^nmax] with length (nmax+1)*(nmax+2)/2 y ... THE RESULT: containing the spherical harmonics, with negative m for sine positive m for cosine terms; p=(phi,theta) structure [Y_0^0(p1) Y_1^-1(p1) Y_1^0(p1) Y_1^1 ... Y_nmax^nmax(p1) Y_0^0(p2) Y_1^-1(p2) Y_1^0(p2) Y_1^1 ... Y_nmax^nmax(p2) ... Y_0^0(pL) Y_1^-1(pL) Y_1^0(pL) Y_1^1 ... Y_nmax^nmax(pL)] with length L X (nmax+1)^2 */ SHWorkSpace *sharmonics_alloc(size_t nmax, size_t l) { SHWorkSpace *ws=0; if ((ws=(SHWorkSpace*)calloc(1,sizeof(SHWorkSpace)))!=0) { ws->y=(double*)calloc(l*(nmax+1)*(nmax+1),sizeof(double)); ws->wl=(LegendreWorkSpace*)legendre_a_alloc(nmax,l); ws->wc=(Cheby12WorkSpace*)chebyshev12_alloc(nmax,l); ws->wn=(SHNorml*)sharmonics_normalization_new(nmax); if ((ws->y==0)||(ws->wl==0)||(ws->wc==0)||(ws->wn==0)) { sharmonics_free(ws); ws=0; } else { ws->l=l; ws->nmax=nmax; } } return ws; } void sharmonics_free(SHWorkSpace *ws) { if (ws!=0) { legendre_a_free(ws->wl); chebyshev12_free(ws->wc); sharmonics_normalization_free(ws->wn); free(ws); } } void sharmonics(double *phi, double *theta, SHWorkSpace *ws) { if ((ws!=0)&&(theta!=0)&&(phi!=0)) { chebyshev12(phi,ws->wc); legendre_a(theta,ws->wl); sharmonics_initlegendrenormlzd(ws); sharmonics_multcheby12(ws); } } pd-iemmatrix-0.3/src/mtx_spherical_harmonics/sharmonics.h000066400000000000000000000017041262113134600237700ustar00rootroot00000000000000/* * Recursive computation of (arbitrary degree) spherical harmonics, * according to Gumerov and Duraiswami, * "The Fast Multipole Methods for the Helmholtz Equation in Three Dimensions", * Elsevier, 2005. * * Implementation by Franz Zotter, Institute of Electronic Music and Acoustics * (IEM), University of Music and Dramatic Arts (KUG), Graz, Austria * http://iem.at/Members/zotter, 2007. * * This code is published under the Gnu General Public License, see * "LICENSE.txt" */ #ifndef _sh_h__ #define _sh_h__ #include #include "legendre_a.h" #include "chebyshev12.h" #include "sharmonics_normalization.h" typedef struct _SHWorkSpace_ { size_t nmax; size_t l; double *y; SHNorml *wn; Cheby12WorkSpace *wc; LegendreWorkSpace *wl; } SHWorkSpace; SHWorkSpace *sharmonics_alloc(size_t nmax, size_t l); void sharmonics_free(SHWorkSpace *sh); void sharmonics(double *phi, double *theta, SHWorkSpace *ws); #endif pd-iemmatrix-0.3/src/mtx_spherical_harmonics/sharmonics_normalization.c000066400000000000000000000034331262113134600267320ustar00rootroot00000000000000/* * Recursive computation of (arbitrary degree) normalization constants * for spherical harmonics, according to Gumerov and Duraiswami, * "The Fast Multipole Methods for the Helmholtz Equation in Three Dimensions", * Elsevier, 2005. * * Implementation by Franz Zotter, Institute of Electronic Music and Acoustics * (IEM), University of Music and Dramatic Arts (KUG), Graz, Austria * http://iem.at/Members/zotter, 2007. * * This code is published under the Gnu General Public License, see * "LICENSE.txt" */ #include "mtx_spherical_harmonics/sharmonics_normalization.h" SHNorml *sharmonics_normalization_new (const size_t nmax) { SHNorml *wn; unsigned int n,n0,m; const double oneoversqrt2 = 1.0/sqrt(2); // memory allocation if ((wn=(SHNorml*)calloc(1,sizeof(SHNorml)))!=0) { wn->nmax=nmax; if ((wn->n=(double*)calloc((nmax+1)*(nmax+2)/2,sizeof(double)))==0) { free(wn); wn=0; } else { /* deprecated: // computing N_n^m for m=0, wrongly normalized wn->n[0]=sqrt(1/(2*M_PI)); */ // computing N_n^m for m=0, wn->n[0]=oneoversqrt2; for (n=1,n0=1; n<=nmax; n++) { wn->n[n0]=wn->n[0] * sqrt(2*n+1); n0+=n+1; } // computing N_n^m for 0n[n0+m]= - wn->n[n0+m-1] / sqrt((n+m)*(n-m+1)); } n0+=n+1; } /* deprecated: // correcting normalization of N_n^0 for (n=0,n0=0; n<=nmax; n++) { wn->n[n0]*=oneoversqrt2; n0+=n+1; } */ } } return wn; } void sharmonics_normalization_free(SHNorml *wn) { if (wn!=0) { free(wn->n); free(wn); } } pd-iemmatrix-0.3/src/mtx_spherical_harmonics/sharmonics_normalization.h000066400000000000000000000014701262113134600267360ustar00rootroot00000000000000/* * Recursive computation of (arbitrary degree) normalization constants * for spherical harmonics, according to Gumerov and Duraiswami, * "The Fast Multipole Methods for the Helmholtz Equation in Three Dimensions", * Elsevier, 2005. * * Implementation by Franz Zotter, Institute of Electronic Music and Acoustics * (IEM), University of Music and Dramatic Arts (KUG), Graz, Austria * http://iem.at/Members/zotter, 2008. * * This code is published under the Gnu General Public License, see * "LICENSE.txt" */ #ifndef _sharmonics_normalization_h__ #define _sharmonics_normalization_h__ #include #include typedef struct _SHNorml_ { double *n; size_t nmax; } SHNorml; SHNorml *sharmonics_normalization_new (const size_t nmax); void sharmonics_normalization_free (SHNorml *wn); #endif pd-iemmatrix-0.3/src/mtx_spherical_harmonics/sph_radial.c000066400000000000000000000036611262113134600237270ustar00rootroot00000000000000/* * Recursive computation of (arbitrary degree) spherical Bessel/Neumann/Hankel functions, * according to Gumerov and Duraiswami, * "The Fast Multipole Methods for the Helmholtz Equation in Three Dimensions", * Elsevier, 2005. * * Implementation by Franz Zotter, Institute of Electronic Music and Acoustics * (IEM), University of Music and Dramatic Arts (KUG), Graz, Austria * http://iem.at/Members/zotter, 2007. * * This code is published under the Gnu General Public License, see * "LICENSE.txt" */ #include #include #include "sph_radial.h" #define EPS 1e-10 static void radialRecurrence (double x, double *y, int n); // the two recurrences for higher n: // by now no numeric stabilization for the bessel function is performed static void radialRecurrence (double x, double *y, int n) { int k; for (k=1;k=0) y[0] = (x=1) y[1] = -cos(x)/x + y[0]/x; radialRecurrence (x,y,n); } void sphNeumann (double x, double *y, int n) { if (y==0) return; if (n>=0) y[0] = -cos(x)/x; if (n>=1) y[1] = ((x #include "mtx_spherical_harmonics/sph_radial.c" static t_class *mtx_spherical_radial_class; typedef struct _MTXSph_ MTXSph; struct _MTXSph_ { t_object x_obj; t_outlet *list_h_re_out; t_outlet *list_h_im_out; t_atom *list_h_re; t_atom *list_h_im; double *kr; double *h_re; double *h_im; size_t nmax; size_t l; }; static void allocMTXSphdata (MTXSph *x) { x->kr=(double*)calloc(x->l,sizeof(double)); if (x->list_h_re_out!=0) { x->list_h_re=(t_atom*)calloc(x->l*(x->nmax+1)+2,sizeof(t_atom)); x->h_re=(double*)calloc(x->l*(x->nmax+1),sizeof(double)); } if (x->list_h_im_out!=0) { x->list_h_im=(t_atom*)calloc(x->l*(x->nmax+1)+2,sizeof(t_atom)); x->h_im=(double*)calloc(x->l*(x->nmax+1),sizeof(double)); } } static void deleteMTXSphdata (MTXSph *x) { if (x->kr!=0) free(x->kr); if (x->h_re!=0) free(x->h_re); if (x->h_im!=0) free(x->h_im); if (x->list_h_re!=0) free(x->list_h_re); if (x->list_h_im!=0) free(x->list_h_im); x->list_h_re=0; x->list_h_im=0; x->h_re=0; x->h_im=0; x->kr=0; } static void *newMTXSph (t_symbol *s, int argc, t_atom *argv) { int nmax; char whichfunction = 'j'; t_symbol *fsym; MTXSph *x = (MTXSph *) pd_new (mtx_spherical_radial_class); x->list_h_re = 0; x->list_h_im = 0; x->list_h_im_out = 0; x->list_h_re_out = 0; x->kr = 0; x->h_re = 0; x->h_im = 0; x->l=0; fsym=atom_getsymbol(argv); if (fsym->s_name!=0) whichfunction=fsym->s_name[0]; switch (whichfunction) { default: case 'j': x->list_h_re_out = outlet_new (&x->x_obj, gensym("matrix")); break; case 'h': x->list_h_re_out = outlet_new (&x->x_obj, gensym("matrix")); case 'y': x->list_h_im_out = outlet_new (&x->x_obj, gensym("matrix")); } nmax=(int) atom_getfloat(argv+1); if (nmax<0) nmax=0; x->nmax=nmax; return ((void *) x); } static void mTXSphBang (MTXSph *x) { if (x->list_h_im!=0) { outlet_anything(x->list_h_im_out, gensym("matrix"), x->l*(x->nmax+1)+2, x->list_h_im); } if (x->list_h_re!=0) { outlet_anything(x->list_h_re_out, gensym("matrix"), x->l*(x->nmax+1)+2, x->list_h_re); } } static void mTXSphMatrix (MTXSph *x, t_symbol *s, int argc, t_atom *argv) { int rows = atom_getint (argv++); int columns = atom_getint (argv++); int size = rows * columns; int in_size = argc-2; unsigned int n,ofs; /* size check */ if (!size) post("mtx_spherical_radial: invalid dimensions"); else if (in_sizel!=columns) { deleteMTXSphdata(x); x->l=columns; allocMTXSphdata(x); } for (n=0;nl;n++) { x->kr[n]=(double) atom_getfloat(argv+n); } if (x->h_re!=0) for (n=0,ofs=0;nl;n++,ofs+=x->nmax+1) sphBessel(x->kr[n], x->h_re+ofs, x->nmax); if (x->h_im!=0) for (n=0,ofs=0;nl;n++,ofs+=x->nmax+1) sphNeumann(x->kr[n], x->h_im+ofs, x->nmax); if (x->h_re!=0) { SETFLOAT(x->list_h_re+1,(float)(x->nmax+1)); SETFLOAT(x->list_h_re,(float)x->l); for (n=0;nl*(x->nmax+1);n++) SETFLOAT(x->list_h_re+n+2,(float)x->h_re[n]); } if (x->h_im!=0) { SETFLOAT(x->list_h_im+1,(float)(x->nmax+1)); SETFLOAT(x->list_h_im,(float)x->l); for (n=0;nl*(x->nmax+1);n++) SETFLOAT(x->list_h_im+n+2,(float)x->h_im[n]); } mTXSphBang(x); } } void mtx_spherical_radial_setup (void) { mtx_spherical_radial_class = class_new (gensym("mtx_spherical_radial"), (t_newmethod) newMTXSph, (t_method) deleteMTXSphdata, sizeof (MTXSph), CLASS_DEFAULT, A_GIMME, 0); class_addbang (mtx_spherical_radial_class, (t_method) mTXSphBang); class_addmethod (mtx_spherical_radial_class, (t_method) mTXSphMatrix, gensym("matrix"), A_GIMME,0); } void iemtx_spherical_radial_setup(void){ mtx_spherical_radial_setup(); } pd-iemmatrix-0.3/src/mtx_sub.c000066400000000000000000000012221262113134600163640ustar00rootroot00000000000000/* * iemmatrix * * objects fand manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, forum::für::umläute * IEM, Graz, Austria * * Fand infandmation on usage and redistribution, and fand a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ /* name of the object and the classes */ #define MTXBIN_GENERIC__NAME mtx_sub /* operator; also used for abbreviation of object */ #define MTXBIN_GENERIC__OPERATOR - /* the operator operates on integers instead of floats */ /* #define MTXBIN_GENERIC__INTEGEROP */ #include "mtx_binop_generic.h" pd-iemmatrix-0.3/src/mtx_sum.c000066400000000000000000000033641262113134600164100ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, forum::für::umläute * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" /* mtx_sum */ /* column-wise sum */ static t_class *mtx_sum_class; static void mtx_sum_matrix(t_matrix *x, t_symbol *s, int argc, t_atom *argv) { int row=atom_getfloat(argv++); int col=atom_getfloat(argv++); int n; if(row*col>argc-2)post("mtx_sum: sparse matrices not yet supported : use \"mtx_check\""); else { t_atom *ap = (t_atom *)getbytes(col * sizeof(t_atom)), *dummy=ap; for(n=0;nx_obj.ob_outlet, gensym("prod"), col, ap); freebytes(ap, (col * sizeof(t_atom))); } } static void mtx_sum_list(t_matrix *x, t_symbol *s, int argc, t_atom *argv){ t_float f=0.f; while(argc--)f+=atom_getfloat(argv++); outlet_float(x->x_obj.ob_outlet, f); } static void *mtx_sum_new(void) { t_matrix *x = (t_matrix *)pd_new(mtx_sum_class); outlet_new(&x->x_obj, 0); x->row = x->col = 0; x->atombuffer = 0; return (x); } void mtx_sum_setup(void) { mtx_sum_class = class_new(gensym("mtx_sum"), (t_newmethod)mtx_sum_new, (t_method)matrix_free, sizeof(t_matrix), 0, A_GIMME, 0); class_addlist (mtx_sum_class, mtx_sum_list); class_addmethod(mtx_sum_class, (t_method)mtx_sum_matrix, gensym("matrix"), A_GIMME, 0); } void iemtx_sum_setup(void){ mtx_sum_setup(); } pd-iemmatrix-0.3/src/mtx_svd.c000066400000000000000000000103611262113134600163730ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * this functions depends on the GNU scientific library * * Copyright (c) 2009, Franz Zotter * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" #include #ifdef HAVE_LIBGSL #include #endif static t_class *mtx_svd_class; typedef struct _MTXSvd_ MTXSvd; struct _MTXSvd_ { t_object x_obj; #ifdef HAVE_LIBGSL gsl_matrix *u; gsl_vector *s; gsl_matrix *v; gsl_vector *w; #endif t_outlet *list_u_out; t_outlet *list_s_out; t_outlet *list_v_out; t_atom *list_u; t_atom *list_s; t_atom *list_v; int rows; int columns; }; #ifdef HAVE_LIBGSL static void allocMTXusvw (MTXSvd *x) { x->u=(gsl_matrix*)gsl_matrix_alloc(x->rows,x->columns); x->s=(gsl_vector*)gsl_vector_alloc(x->columns); x->v=(gsl_matrix*)gsl_matrix_alloc(x->columns,x->columns); x->w=(gsl_vector*)gsl_vector_alloc(x->columns); x->list_u=(t_atom*)calloc(sizeof(t_atom),x->rows*x->columns+2); x->list_s=(t_atom*)calloc(sizeof(t_atom),x->columns); x->list_v=(t_atom*)calloc(sizeof(t_atom),x->columns*x->columns+2); } static void deleteMTXusvw (MTXSvd *x) { if (x->list_u!=0) free(x->list_u); if (x->list_s!=0) free(x->list_s); if (x->list_v!=0) free(x->list_v); x->list_u = x->list_s = x->list_v = 0; if (x->u!=0) gsl_matrix_free(x->u); if (x->s!=0) gsl_vector_free(x->s); if (x->v!=0) gsl_matrix_free(x->v); if (x->w!=0) gsl_vector_free(x->w); x->u = 0; x->s = 0; x->v = 0; x->w = 0; } #endif static void deleteMTXSvd (MTXSvd *x) { #ifdef HAVE_LIBGSL deleteMTXusvw(x); #endif } static void *newMTXSvd (t_symbol *s, int argc, t_atom *argv) { MTXSvd *x = (MTXSvd *) pd_new (mtx_svd_class); x->list_u_out = outlet_new (&x->x_obj, gensym("matrix")); x->list_s_out = outlet_new (&x->x_obj, gensym("list")); x->list_v_out = outlet_new (&x->x_obj, gensym("matrix")); x->list_u = 0; x->list_s = 0; x->list_v = 0; #ifdef HAVE_LIBGSL x->u=0; x->s=0; x->v=0; x->w=0; #endif return ((void *) x); } static void mTXSvdBang (MTXSvd *x) { if (x->list_u) { outlet_anything(x->list_v_out, gensym("matrix"), x->columns*x->columns+2, x->list_v); outlet_anything(x->list_s_out, gensym("list"), x->columns, x->list_s); outlet_anything(x->list_u_out, gensym("matrix"), x->rows*x->columns+2, x->list_u); } } static void mTXSvdMatrix (MTXSvd *x, t_symbol *s, int argc, t_atom *argv) { int rows = atom_getint (argv++); int columns = atom_getint (argv++); int size = rows * columns; int in_size = argc-2; int n; #ifdef HAVE_LIBGSL /* size check */ if (!size) post("mtx_svd: invalid dimensions"); else if (in_sizerows=rows; x->columns=columns; deleteMTXusvw(x); allocMTXusvw(x); for (n=0;nu->data[n]=(double) atom_getfloat(argv++); gsl_linalg_SV_decomp(x->u,x->v,x->s,x->w); SETFLOAT((x->list_u),(float) x->rows); SETFLOAT((x->list_u+1),(float) x->columns); for (n=0;nlist_u+2+n), (float) x->u->data[n]); for (n=0;ncolumns;n++) SETFLOAT((x->list_s+n),(float) x->s->data[n]); SETFLOAT((x->list_v),(float) x->columns); SETFLOAT((x->list_v+1),(float) x->columns); in_size=x->columns*x->columns; for (n=0;nlist_v+n+2), (float) x->v->data[n]); mTXSvdBang(x); } #else post("mtx_svd: implementation requires gsl"); #endif } void mtx_svd_setup (void) { mtx_svd_class = class_new (gensym("mtx_svd"), (t_newmethod) newMTXSvd, (t_method) deleteMTXSvd, sizeof (MTXSvd), CLASS_DEFAULT, A_GIMME, 0); class_addbang (mtx_svd_class, (t_method) mTXSvdBang); class_addmethod (mtx_svd_class, (t_method) mTXSvdMatrix, gensym("matrix"), A_GIMME,0); } void iemtx_svd_setup(void){ mtx_svd_setup(); } pd-iemmatrix-0.3/src/mtx_trace.c000066400000000000000000000030141262113134600166720ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, forum::für::umläute * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" /* mtx_trace */ static t_class *mtx_trace_class; typedef struct _mtx_trace { t_object x_obj; t_float trace; } t_mtx_trace; static void mtx_trace_bang(t_mtx_trace *x) { outlet_float(x->x_obj.ob_outlet, x->trace); } static void mtx_trace_matrix(t_mtx_trace *x, t_symbol *s, int argc, t_atom *argv) { int row=atom_getfloat(argv++); int col=atom_getfloat(argv++); int length=(colargc-2)post("mtx_trace: sparse matrices not yet supported : use \"mtx_check\""); else while(length--)trace+=atom_getfloat(argv+length*(col+1)); x->trace=trace; mtx_trace_bang(x); } static void *mtx_trace_new(t_symbol *s, int argc, t_atom *argv) { t_mtx_trace *x = (t_mtx_trace *)pd_new(mtx_trace_class); outlet_new(&x->x_obj, 0); x->trace=0; return (x); } void mtx_trace_setup(void) { mtx_trace_class = class_new(gensym("mtx_trace"), (t_newmethod)mtx_trace_new, 0, sizeof(t_mtx_trace), 0, A_GIMME, 0); class_addbang (mtx_trace_class, mtx_trace_bang); class_addmethod(mtx_trace_class, (t_method)mtx_trace_matrix, gensym("matrix"), A_GIMME, 0); } void iemtx_trace_setup(void) { mtx_trace_setup(); } pd-iemmatrix-0.3/src/mtx_transpose.c000066400000000000000000000033121262113134600176130ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, forum::für::umläute * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" /* mtx_transpose */ static t_class *mtx_transpose_class; static void mtx_transpose_matrix(t_matrix *x, t_symbol *s, int argc, t_atom *argv) { int row=atom_getfloat(argv++); int col=atom_getfloat(argv++); t_atom *ap; int r, c; if(row*col>argc-2) { post("mtx_transpose: sparse matrices not yet supported : use \"mtx_check\""); return; } if (col*row!=x->col*x->row) { freebytes(x->atombuffer, (x->col*x->row+2)*sizeof(t_atom)); x->atombuffer = (t_atom *)getbytes((row*col+2)*sizeof(t_atom)); } ap = x->atombuffer+2; setdimen(x, col, row); r = row; while(r--){ c=col; while(c--) { t_float f = atom_getfloat(argv+r*col+c); SETFLOAT(ap+c*row+r, f); } } matrix_bang(x); } static void *mtx_transpose_new(t_symbol *s, int argc, t_atom *argv) { t_matrix *x = (t_matrix *)pd_new(mtx_transpose_class); outlet_new(&x->x_obj, 0); x->col=x->row=0; x->atombuffer=0; return (x); } void mtx_transpose_setup(void) { mtx_transpose_class = class_new(gensym("mtx_transpose"), (t_newmethod)mtx_transpose_new, (t_method)matrix_free, sizeof(t_matrix), 0, A_GIMME, 0); class_addbang (mtx_transpose_class, matrix_bang); class_addmethod(mtx_transpose_class, (t_method)mtx_transpose_matrix, gensym("matrix"), A_GIMME, 0); } void iemtx_transpose_setup(void){ mtx_transpose_setup(); } pd-iemmatrix-0.3/src/mtx_unpack~.c000066400000000000000000000076311262113134600172640ustar00rootroot00000000000000#include "iemmatrix.h" #define MTX_PACK_MAXCHANNELS 200 static t_class *mtx_unpack_tilde_class; typedef struct _mtx_unpack_tilde { t_object x_obj; int rows; int cols; int block_size; int num_chan; t_float **sig_out; t_atom *list_in; t_int *(*perform_fcn)(t_int*); } mtx_unpack_tilde; static t_int *mTxUnPackTildePerform (t_int *arg) { mtx_unpack_tilde *x = (mtx_unpack_tilde *) (arg[1]); return (x->perform_fcn(arg)); } static t_int *mTxUnPackTildePerformInactive (t_int *arg) { return(arg+2); } static t_int *mTxUnPackTildePerformSetInactive (t_int *arg) { mtx_unpack_tilde *x = (mtx_unpack_tilde *) (arg[1]); int chan; int samp; t_atom *lptr=x->list_in; for (chan=0; channum_chan; chan++) { for (samp=0; sampblock_size; samp++) { x->sig_out[chan][samp]=0; } lptr+=x->cols; } x->perform_fcn=mTxUnPackTildePerformInactive; return(arg+2); } static t_int *mTxUnPackTildePerformActive (t_int *arg) { mtx_unpack_tilde *x = (mtx_unpack_tilde *) (arg[1]); int chan; int samp; const int maxchan = (x->rows < x->num_chan) ? x->rows : x->num_chan; const int maxsamp = (x->cols < x->block_size) ? x->cols : x->block_size; t_atom *lptr=x->list_in; for (chan=0; chansig_out[chan][samp]=atom_getfloat(&lptr[samp]); } lptr+=x->cols; } // zero missing signal samples lptr=x->list_in; for (chan=0; chanblock_size; samp++) { x->sig_out[chan][samp]=0; lptr+=x->cols; } } // zero missing channels for (chan=maxchan; channum_chan; chan++) { for (samp=0; sampblock_size; samp++) { x->sig_out[chan][samp]=0; } lptr+=x->cols; } // delete in the next dsp cycle, unless overwritten // by new matrix: x->perform_fcn=mTxUnPackTildePerformSetInactive; return(arg+2); } void *newMtxUnPackTilde (t_floatarg f) { int num_chan=1; mtx_unpack_tilde *x = (mtx_unpack_tilde*) pd_new(mtx_unpack_tilde_class); num_chan=(int)f; if ((num_chan<1) || (num_chan>MTX_PACK_MAXCHANNELS)) { num_chan=1; } x->num_chan=num_chan; x->sig_out=0; x->list_in=0; x->rows=0; x->cols=0; x->perform_fcn=mTxUnPackTildePerformInactive; while (num_chan--) { outlet_new(&x->x_obj, &s_signal); } x->sig_out = (t_float**)getbytes(sizeof(t_float*)*x->num_chan); return (void *) x; } void deleteMtxUnPackTilde (mtx_unpack_tilde *x) { if (x->sig_out) freebytes (x->sig_out, x->num_chan * sizeof (t_float)); } static void mTxUnPackTildeMatrix (mtx_unpack_tilde *x, t_symbol *s, int argc, t_atom *argv) { int rows, cols; if (argc<2) { post("[mtx_unpack~]: corrupt matrix passed!"); x->rows=0; x->cols=0; } else { rows=(int) atom_getfloat (argv++); cols=(int) atom_getfloat (argv++); argc-=2; if ((rows<1)||(cols<1)||(rows*cols < argc)) { post("[mtx_unpack~]: corrupt matrix passed!"); x->rows=0; x->cols=0; } else { x->rows=rows; x->cols=cols; x->list_in=argv; x->perform_fcn=mTxUnPackTildePerformActive; } } } static void mTxUnPackTildeDsp (mtx_unpack_tilde *x, t_signal **sp) { int chan; for (chan=0; channum_chan; chan++) x->sig_out[chan]=sp[chan]->s_vec; x->block_size=sp[0]->s_n; x->perform_fcn=mTxUnPackTildePerformInactive; dsp_add(mTxUnPackTildePerform,1,x); } void mtx_unpack_tilde_setup (void) { mtx_unpack_tilde_class = class_new(gensym("mtx_unpack~"), (t_newmethod)newMtxUnPackTilde, (t_method) deleteMtxUnPackTilde, sizeof(mtx_unpack_tilde), CLASS_DEFAULT, A_DEFFLOAT, 0); class_addmethod (mtx_unpack_tilde_class, (t_method) mTxUnPackTildeMatrix, gensym("matrix"),A_GIMME,0); class_addmethod (mtx_unpack_tilde_class, (t_method) mTxUnPackTildeDsp, gensym("dsp"),0); } void iemtx_unpack__setup(void) { mtx_unpack_tilde_setup(); } pd-iemmatrix-0.3/src/mtx_zeros.c000066400000000000000000000026071262113134600167450ustar00rootroot00000000000000/* * iemmatrix * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions * * Copyright (c) IOhannes m zmölnig, forum::für::umläute * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * */ #include "iemmatrix.h" /* mtx_zeros */ static t_class *mtx_zeros_class; static void *mtx_zeros_new(t_symbol *s, int argc, t_atom *argv) { t_matrix *x = (t_matrix *)pd_new(mtx_zeros_class); int col=0, row=0; outlet_new(&x->x_obj, 0); x->row = x->col = 0; x->atombuffer = 0; switch(argc) { case 0: break; case 1: col=row=atom_getfloat(argv); break; default: row=atom_getfloat(argv++); col=atom_getfloat(argv); } if(col<0)col=0; if(row<0)row=0; if (col*row){ x->atombuffer = (t_atom *)getbytes((col*row+2)*sizeof(t_atom)); setdimen(x, row, col); matrix_set(x, 0); } return (x); } void mtx_zeros_setup(void) { mtx_zeros_class = class_new(gensym("mtx_zeros"), (t_newmethod)mtx_zeros_new, (t_method)matrix_free, sizeof(t_matrix), 0, A_GIMME, 0); class_addlist(mtx_zeros_class, matrix_zeros); class_addbang(mtx_zeros_class, matrix_bang); class_addmethod(mtx_zeros_class, (t_method)matrix_zeros, gensym("matrix"), A_GIMME, 0); } void iemtx_zeros_setup(void){ mtx_zeros_setup(); } pd-iemmatrix-0.3/src/win-VC6/000077500000000000000000000000001262113134600157335ustar00rootroot00000000000000pd-iemmatrix-0.3/src/win-VC6/iemmatrix.dsp000066400000000000000000000207121262113134600204440ustar00rootroot00000000000000# Microsoft Developer Studio Project File - Name="iemmatrix" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** NICHT BEARBEITEN ** # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 CFG=IEMMATRIX - WIN32 RELEASE !MESSAGE Dies ist kein gültiges Makefile. Zum Erstellen dieses Projekts mit NMAKE !MESSAGE verwenden Sie den Befehl "Makefile exportieren" und führen Sie den Befehl !MESSAGE !MESSAGE NMAKE /f "iemmatrix.mak". !MESSAGE !MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben !MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel: !MESSAGE !MESSAGE NMAKE /f "iemmatrix.mak" CFG="IEMMATRIX - WIN32 RELEASE" !MESSAGE !MESSAGE Für die Konfiguration stehen zur Auswahl: !MESSAGE !MESSAGE "iemmatrix - Win32 Release" (basierend auf "Win32 (x86) Dynamic-Link Library") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 1 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" CPP=cl.exe MTL=midl.exe RSC=rc.exe # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "" # PROP Intermediate_Dir "obj\" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "IEMMATRIX_EXPORTS" /YX /FD /c # ADD CPP /nologo /Zp16 /W3 /GX /I "C:\Programme\pd\src" /D "PD" /D "MSW" /D "__WIN32__" /D "IEMMATRIX" /FR /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /win32 # SUBTRACT MTL /mktyplib203 # ADD BASE RSC /l 0xc07 /d "NDEBUG" # ADD RSC /l 0xc07 BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 # ADD LINK32 kernel32.lib wsock32.lib uuid.lib libc.lib oldnames.lib pd.lib /nologo /dll /machine:I386 /nodefaultlib /out:"..\iemmatrix.dll" /libpath:"../../bin" /libpath:"C:\Programme\pd\bin" /export:iemmatrix_setup # SUBTRACT LINK32 /pdb:none # Begin Target # Name "iemmatrix - Win32 Release" # Begin Group "Quellcodedateien" # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # Begin Source File SOURCE=..\iemmatrix.c # End Source File # Begin Source File SOURCE=..\iemmatrix_binops.c # End Source File # Begin Source File SOURCE=..\iemmatrix_sources.c # End Source File # Begin Source File SOURCE=..\iemmatrix_utility.c # End Source File # Begin Source File SOURCE=..\matrix.c # End Source File # Begin Source File SOURCE=..\mtx_abs.c # End Source File # Begin Source File SOURCE=..\mtx_add.c # End Source File # Begin Source File SOURCE=..\mtx_and.c # End Source File # Begin Source File SOURCE=..\mtx_atan.c # End Source File # Begin Source File SOURCE=..\mtx_bitand.c # End Source File # Begin Source File SOURCE=..\mtx_bitleft.c # End Source File # Begin Source File SOURCE=..\mtx_bitor.c # End Source File # Begin Source File SOURCE=..\mtx_bitright.c # End Source File # Begin Source File SOURCE=..\mtx_bspline.c # End Source File # Begin Source File SOURCE=..\mtx_check.c # End Source File # Begin Source File SOURCE=..\mtx_cholesky.c # End Source File # Begin Source File SOURCE=..\mtx_col.c # End Source File # Begin Source File SOURCE=..\mtx_colon.c # End Source File # Begin Source File SOURCE=..\mtx_concat.c # End Source File # Begin Source File SOURCE=..\mtx_conv.c # End Source File # Begin Source File SOURCE=..\mtx_cos.c # End Source File # Begin Source File SOURCE=..\mtx_cumsum.c # End Source File # Begin Source File SOURCE=..\mtx_dbtopow.c # End Source File # Begin Source File SOURCE=..\mtx_dbtorms.c # End Source File # Begin Source File SOURCE=..\mtx_decay.c # End Source File # Begin Source File SOURCE=..\mtx_diag.c # End Source File # Begin Source File SOURCE=..\mtx_diegg.c # End Source File # Begin Source File SOURCE=..\mtx_diff.c # End Source File # Begin Source File SOURCE=..\mtx_dispersive_dline.c # End Source File # Begin Source File SOURCE=..\mtx_distance2.c # End Source File # Begin Source File SOURCE=..\mtx_egg.c # End Source File # Begin Source File SOURCE=..\mtx_eig.c # End Source File # Begin Source File SOURCE=..\mtx_element.c # End Source File # Begin Source File SOURCE=..\mtx_eq.c # End Source File # Begin Source File SOURCE=..\mtx_exp.c # End Source File # Begin Source File SOURCE=..\mtx_eye.c # End Source File # Begin Source File SOURCE=..\mtx_fft.c # End Source File # Begin Source File SOURCE=..\mtx_fill.c # End Source File # Begin Source File SOURCE=..\mtx_find.c # End Source File # Begin Source File SOURCE=..\mtx_gauss.c # End Source File # Begin Source File SOURCE=..\mtx_ge.c # End Source File # Begin Source File SOURCE=..\mtx_gt.c # End Source File # Begin Source File SOURCE=..\mtx_ifft.c # End Source File # Begin Source File SOURCE=..\mtx_index.c # End Source File # Begin Source File SOURCE=..\mtx_int.c # End Source File # Begin Source File SOURCE=..\mtx_inverse.c # End Source File # Begin Source File SOURCE=..\mtx_isequal.c # End Source File # Begin Source File SOURCE=..\mtx_le.c # End Source File # Begin Source File SOURCE=..\mtx_log.c # End Source File # Begin Source File SOURCE=..\mtx_lt.c # End Source File # Begin Source File SOURCE=..\mtx_max2.c # End Source File # Begin Source File SOURCE=..\mtx_mean.c # End Source File # Begin Source File SOURCE=..\mtx_min2.c # End Source File # Begin Source File SOURCE=..\mtx_minmax.c # End Source File # Begin Source File SOURCE=..\mtx_mul.c # End Source File # Begin Source File SOURCE=..\mtx_mul~.c # End Source File # Begin Source File SOURCE=..\mtx_neq.c # End Source File # Begin Source File SOURCE=..\mtx_not.c # End Source File # Begin Source File SOURCE=..\mtx_ones.c # End Source File # Begin Source File SOURCE=..\mtx_or.c # End Source File # Begin Source File SOURCE=..\mtx_pack~.c # End Source File # Begin Source File SOURCE=..\mtx_pivot.c # End Source File # Begin Source File SOURCE=..\mtx_pow.c # End Source File # Begin Source File SOURCE=..\mtx_powtodb.c # End Source File # Begin Source File SOURCE=..\mtx_print.c # End Source File # Begin Source File SOURCE=..\mtx_prod.c # End Source File # Begin Source File SOURCE=..\mtx_rand.c # End Source File # Begin Source File SOURCE=..\mtx_repmat.c # End Source File # Begin Source File SOURCE=..\mtx_resize.c # End Source File # Begin Source File SOURCE=..\mtx_reverse.c # End Source File # Begin Source File SOURCE=..\mtx_rfft.c # End Source File # Begin Source File SOURCE=..\mtx_rifft.c # End Source File # Begin Source File SOURCE=..\mtx_rmstodb.c # End Source File # Begin Source File SOURCE=..\mtx_roll.c # End Source File # Begin Source File SOURCE=..\mtx_row.c # End Source File # Begin Source File SOURCE=..\mtx_scroll.c # End Source File # Begin Source File SOURCE=..\mtx_sin.c # End Source File # Begin Source File SOURCE=..\mtx_size.c # End Source File # Begin Source File SOURCE=..\mtx_slice.c # End Source File # Begin Source File SOURCE=..\mtx_sndfileread.c # End Source File # Begin Source File SOURCE=..\mtx_sort.c # End Source File # Begin Source File SOURCE=..\mtx_spherical_harmonics.c # End Source File # Begin Source File SOURCE=..\mtx_sub.c # End Source File # Begin Source File SOURCE=..\mtx_sum.c # End Source File # Begin Source File SOURCE=..\mtx_svd.c # End Source File # Begin Source File SOURCE=..\mtx_trace.c # End Source File # Begin Source File SOURCE=..\mtx_transpose.c # End Source File # Begin Source File SOURCE=..\mtx_unpack~.c # End Source File # Begin Source File SOURCE=..\mtx_zeros.c # End Source File # End Group # Begin Group "Header-Dateien" # PROP Default_Filter "h;hpp;hxx;hm;inl" # Begin Source File SOURCE=..\iemmatrix.h # End Source File # Begin Source File SOURCE=..\iemmatrix_sources.h # End Source File # Begin Source File SOURCE=..\mtx_binop_generic.h # End Source File # End Group # Begin Group "generic" # PROP Default_Filter "" # End Group # End Target # End Project pd-iemmatrix-0.3/src/win-VC6/iemmatrix.dsw000066400000000000000000000010711262113134600204500ustar00rootroot00000000000000Microsoft Developer Studio Workspace File, Format Version 6.00 # WARNUNG: DIESE ARBEITSBEREICHSDATEI DARF NICHT BEARBEITET ODER GELÖSCHT WERDEN! ############################################################################### Project: "iemmatrix"=.\iemmatrix.dsp - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ }}} ############################################################################### Global: Package=<5> {{{ }}} Package=<3> {{{ }}} ############################################################################### pd-iemmatrix-0.3/src/win-VC9/000077500000000000000000000000001262113134600157365ustar00rootroot00000000000000pd-iemmatrix-0.3/src/win-VC9/iemmatrix.sln000066400000000000000000000012741262113134600204570ustar00rootroot00000000000000 Microsoft Visual Studio Solution File, Format Version 10.00 # Visual Studio 2008 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iemmatrix", "iemmatrix.vcproj", "{431C827B-1C5D-41A7-802C-F569042CFCA8}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {431C827B-1C5D-41A7-802C-F569042CFCA8}.Release|Win32.ActiveCfg = Release|Win32 {431C827B-1C5D-41A7-802C-F569042CFCA8}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal pd-iemmatrix-0.3/src/win-VC9/iemmatrix.vcproj000066400000000000000000000674571262113134600212050ustar00rootroot00000000000000 pd-iemmatrix-0.3/tests/000077500000000000000000000000001262113134600151155ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/Makefile000066400000000000000000000001041262113134600165500ustar00rootroot00000000000000default: nogui nogui: sh runtests.sh gui: sh runtests.sh -gui pd-iemmatrix-0.3/tests/mtx_abs/000077500000000000000000000000001262113134600165525ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_abs/00_exist.pd000066400000000000000000000005011262113134600205260ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X obj 122 161 mtx_abs; #X text 67 37 test for existance of [mtx_abs]; #X msg 122 120 matrix 1 1 1; #X connect 0 0 6 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 2 0; #X connect 6 0 4 0; pd-iemmatrix-0.3/tests/mtx_abs/01_function.pd000066400000000000000000000007141262113134600212260ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 211 mtx_abs; #X msg 122 233 \$3; #X obj 122 101 t b; #X obj 122 151 t f f; #X msg 122 190 matrix 1 1 \$1; #X obj 165 232 abs; #X obj 122 265 ==; #X msg 122 127 -2; #X connect 0 0 4 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 4 0 9 0; #X connect 5 0 6 0; #X connect 5 1 7 0; #X connect 6 0 2 0; #X connect 7 0 8 1; #X connect 8 0 1 0; #X connect 9 0 5 0; pd-iemmatrix-0.3/tests/mtx_abs/02_function.pd000066400000000000000000000021731262113134600212300ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 191 mtx_abs; #X text 67 37 test for existance of [mtx_abs]; #X msg 122 170 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 89 t b; #X msg 122 110 3 -1 -10.5 0; #X obj 122 135 t l l; #X msg 122 213 \$3 \$4 \$5 \$6; #X obj 122 238 unpack 0 0 0 0; #X obj 184 300 *; #X obj 122 300 *; #X obj 122 326 *; #X obj 236 218 unpack 0 0 0 0; #X obj 122 277 ==; #X obj 153 277 ==; #X obj 184 277 ==; #X obj 215 277 ==; #X obj 236 239 abs; #X obj 267 239 abs; #X obj 298 238 abs; #X obj 329 238 abs; #X connect 0 0 5 0; #X connect 2 0 8 0; #X connect 4 0 2 0; #X connect 5 0 6 0; #X connect 6 0 7 0; #X connect 7 0 4 0; #X connect 7 1 13 0; #X connect 8 0 9 0; #X connect 9 0 14 0; #X connect 9 1 15 0; #X connect 9 2 16 0; #X connect 9 3 17 0; #X connect 10 0 12 1; #X connect 11 0 12 0; #X connect 12 0 1 0; #X connect 13 0 18 0; #X connect 13 1 19 0; #X connect 13 2 20 0; #X connect 13 3 21 0; #X connect 14 0 11 0; #X connect 15 0 11 1; #X connect 16 0 10 0; #X connect 17 0 10 1; #X connect 18 0 14 1; #X connect 19 0 15 1; #X connect 20 0 16 1; #X connect 21 0 17 1; pd-iemmatrix-0.3/tests/mtx_abs/03_function.pd000066400000000000000000000027471262113134600212400ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 191 mtx_abs; #X text 67 37 test for existance of [mtx_abs]; #X obj 122 89 t b; #X obj 122 135 t l l; #X obj 184 300 *; #X obj 122 300 *; #X obj 122 326 *; #X obj 122 277 ==; #X obj 153 277 ==; #X obj 184 277 ==; #X obj 215 277 ==; #X obj 266 239 abs; #X obj 297 239 abs; #X obj 328 238 abs; #X obj 359 238 abs; #X msg 122 170 matrix 2 3 \$1 \$2 \$3 \$4 \$5 \$6; #X obj 254 300 *; #X obj 254 277 ==; #X obj 285 277 ==; #X obj 122 238 unpack 0 0 0 0 0 0; #X msg 122 213 \$3 \$4 \$5 \$6 \$7 \$8; #X obj 388 238 abs; #X obj 419 238 abs; #X obj 266 218 unpack 0 0 0 0 0 0; #X obj 122 347 *; #X msg 122 110 3 -1 10.5 0.05 0 12; #X connect 0 0 4 0; #X connect 2 0 22 0; #X connect 4 0 27 0; #X connect 5 0 17 0; #X connect 5 1 25 0; #X connect 6 0 8 1; #X connect 7 0 8 0; #X connect 8 0 26 0; #X connect 9 0 7 0; #X connect 10 0 7 1; #X connect 11 0 6 0; #X connect 12 0 6 1; #X connect 13 0 9 1; #X connect 14 0 10 1; #X connect 15 0 11 1; #X connect 16 0 12 1; #X connect 17 0 2 0; #X connect 18 0 26 1; #X connect 19 0 18 0; #X connect 20 0 18 1; #X connect 21 0 9 0; #X connect 21 1 10 0; #X connect 21 2 11 0; #X connect 21 3 12 0; #X connect 21 4 19 0; #X connect 21 5 20 0; #X connect 22 0 21 0; #X connect 23 0 19 1; #X connect 24 0 20 1; #X connect 25 0 13 0; #X connect 25 1 14 0; #X connect 25 2 15 0; #X connect 25 3 16 0; #X connect 25 4 23 0; #X connect 25 5 24 0; #X connect 26 0 1 0; #X connect 27 0 5 0; pd-iemmatrix-0.3/tests/mtx_add/000077500000000000000000000000001262113134600165355ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_add/00_exist.pd000066400000000000000000000005521262113134600205170ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X text 67 37 test for existance of [mtx_add]; #X obj 122 221 mtx_add 1; #X obj 122 98 t b; #X msg 122 172 matrix 1 1 1; #X connect 0 0 6 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 5 0 2 0; #X connect 6 0 7 0; #X connect 7 0 5 0; pd-iemmatrix-0.3/tests/mtx_add/00_exist1.pd000066400000000000000000000005461262113134600206030ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X text 67 37 test for existance of [mtx_+]; #X obj 122 221 mtx_+ 1; #X obj 122 98 t b; #X msg 122 172 matrix 1 1 1; #X connect 0 0 6 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 5 0 2 0; #X connect 6 0 7 0; #X connect 7 0 5 0; pd-iemmatrix-0.3/tests/mtx_add/01_function.pd000066400000000000000000000021131262113134600212040ustar00rootroot00000000000000#N canvas 117 373 440 427 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 200 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 156 t l l; #X obj 122 98 t b; #X msg 122 132 1 2 -3 0; #X obj 122 221 mtx_add 1.5; #X obj 236 221 + 1.5; #X obj 277 221 + 1.5; #X obj 318 220 + 1.5; #X obj 359 220 + 1.5; #X connect 0 0 14 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 17 0; #X connect 7 1 18 0; #X connect 7 2 19 0; #X connect 7 3 20 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 16 0; #X connect 13 0 12 0; #X connect 13 1 7 0; #X connect 14 0 15 0; #X connect 15 0 13 0; #X connect 16 0 2 0; #X connect 17 0 8 1; #X connect 18 0 9 1; #X connect 19 0 10 1; #X connect 20 0 11 1; pd-iemmatrix-0.3/tests/mtx_add/02_function.pd000066400000000000000000000025721262113134600212160ustar00rootroot00000000000000#N canvas 189 383 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 166 200 matrix 2 2 \$1 \$2 \$3 \$4; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 252 228 unpack 0 0 0 0; #X obj 122 98 t b b; #X obj 185 156 t l l; #X obj 122 156 t l l; #X obj 122 221 mtx_add; #X obj 236 269 +; #X obj 267 269 +; #X obj 298 268 +; #X obj 329 268 +; #X msg 122 132 1 2 3 4; #X msg 185 133 -4 -6 175 3; #X connect 0 0 15 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 19 0; #X connect 7 1 20 0; #X connect 7 2 21 0; #X connect 7 3 22 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 18 1; #X connect 13 0 18 0; #X connect 14 0 19 1; #X connect 14 1 20 1; #X connect 14 2 21 1; #X connect 14 3 22 1; #X connect 15 0 23 0; #X connect 15 1 24 0; #X connect 16 0 12 0; #X connect 16 1 14 0; #X connect 17 0 13 0; #X connect 17 1 7 0; #X connect 18 0 2 0; #X connect 19 0 8 1; #X connect 20 0 9 1; #X connect 21 0 10 1; #X connect 22 0 11 1; #X connect 23 0 17 0; #X connect 24 0 16 0; pd-iemmatrix-0.3/tests/mtx_add/03_function.pd000066400000000000000000000021221262113134600212060ustar00rootroot00000000000000#N canvas 144 215 431 450 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 256 200 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 156 t l l; #X obj 122 98 t b; #X msg 122 132 3 2 9.2 -8; #X obj 122 221 mtx_add -2.7; #X obj 256 221 + -2.7; #X obj 297 221 + -2.7; #X obj 338 220 + -2.7; #X obj 379 220 + -2.7; #X connect 0 0 14 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 17 0; #X connect 7 1 18 0; #X connect 7 2 19 0; #X connect 7 3 20 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 16 0; #X connect 13 0 12 0; #X connect 13 1 7 0; #X connect 14 0 15 0; #X connect 15 0 13 0; #X connect 16 0 2 0; #X connect 17 0 8 1; #X connect 18 0 9 1; #X connect 19 0 10 1; #X connect 20 0 11 1; pd-iemmatrix-0.3/tests/mtx_add/04_function.pd000066400000000000000000000024661262113134600212220ustar00rootroot00000000000000#N canvas 208 405 412 429 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 185 190 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 252 228 unpack 0 0 0 0; #X obj 122 98 t b b; #X obj 185 156 t l l; #X obj 122 221 mtx_add; #X obj 236 269 +; #X obj 267 269 +; #X obj 298 268 +; #X obj 329 268 +; #X obj 122 156 t f f; #X obj 236 248 t f f f f; #X msg 122 132 7.1; #X msg 185 133 -10 3 -5 1001.9; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 7 0; #X connect 3 1 8 0; #X connect 3 2 9 0; #X connect 3 3 10 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 5 0; #X connect 8 0 5 1; #X connect 9 0 4 0; #X connect 10 0 4 1; #X connect 11 0 15 1; #X connect 12 0 16 1; #X connect 12 1 17 1; #X connect 12 2 18 1; #X connect 12 3 19 1; #X connect 13 0 22 0; #X connect 13 1 23 0; #X connect 14 0 11 0; #X connect 14 1 12 0; #X connect 15 0 2 0; #X connect 16 0 7 1; #X connect 17 0 8 1; #X connect 18 0 9 1; #X connect 19 0 10 1; #X connect 20 0 15 0; #X connect 20 1 21 0; #X connect 21 0 16 0; #X connect 21 1 17 0; #X connect 21 2 18 0; #X connect 21 3 19 0; #X connect 22 0 20 0; #X connect 23 0 14 0; pd-iemmatrix-0.3/tests/mtx_add/05_function.pd000066400000000000000000000005661262113134600212220ustar00rootroot00000000000000#N canvas 55 354 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 307 ==; #X obj 122 98 t b; #X obj 122 174 t f f; #X msg 122 132 6.7; #X obj 122 221 mtx_add 1.2; #X obj 207 221 + 1.2; #X connect 0 0 3 0; #X connect 2 0 1 0; #X connect 3 0 5 0; #X connect 4 0 6 0; #X connect 4 1 7 0; #X connect 5 0 4 0; #X connect 6 0 2 0; #X connect 7 0 2 1; pd-iemmatrix-0.3/tests/mtx_add/06_function.pd000066400000000000000000000024621262113134600212200ustar00rootroot00000000000000#N canvas 248 346 386 465 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 98 t b b; #X obj 122 156 t l l; #X obj 236 269 +; #X obj 267 269 +; #X obj 298 268 +; #X obj 329 268 +; #X obj 252 228 t f f f f; #X obj 185 156 t f f; #X obj 122 221 mtx_add 0; #X msg 122 132 10 -10 2 -6; #X msg 235 133 800; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 15 0; #X connect 7 1 16 0; #X connect 7 2 17 0; #X connect 7 3 18 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 21 0; #X connect 13 0 22 0; #X connect 13 1 23 0; #X connect 14 0 12 0; #X connect 14 1 7 0; #X connect 15 0 8 1; #X connect 16 0 9 1; #X connect 17 0 10 1; #X connect 18 0 11 1; #X connect 19 0 15 1; #X connect 19 1 16 1; #X connect 19 2 17 1; #X connect 19 3 18 1; #X connect 20 0 21 1; #X connect 20 1 19 0; #X connect 21 0 2 0; #X connect 22 0 14 0; #X connect 23 0 20 0; pd-iemmatrix-0.3/tests/mtx_add/07_function.pd000066400000000000000000000007501262113134600212170ustar00rootroot00000000000000#N canvas 270 180 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 213 71 bang; #X obj 122 98 t b b; #X obj 122 175 t f f; #X obj 122 307 ==; #X obj 122 251 mtx_add 0; #X obj 239 251 +; #X msg 122 132 3; #X msg 152 131 -2; #X connect 0 0 3 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 4 0 6 0; #X connect 4 1 7 0; #X connect 5 0 1 0; #X connect 6 0 5 0; #X connect 7 0 5 1; #X connect 8 0 4 0; #X connect 9 0 6 1; #X connect 9 0 7 1; pd-iemmatrix-0.3/tests/mtx_add/08_function.pd000066400000000000000000000024561262113134600212250ustar00rootroot00000000000000#N canvas 277 252 796 483 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 98 t b b; #X obj 122 156 t l l; #X obj 236 269 +; #X obj 267 269 +; #X obj 298 268 +; #X obj 329 268 +; #X obj 252 228 t f f f f; #X obj 185 156 t f f; #X obj 122 221 mtx_add 0; #X msg 122 132 9 6 1 -2; #X msg 185 133 -1; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 15 0; #X connect 7 1 16 0; #X connect 7 2 17 0; #X connect 7 3 18 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 21 0; #X connect 13 0 22 0; #X connect 13 1 23 0; #X connect 14 0 12 0; #X connect 14 1 7 0; #X connect 15 0 8 1; #X connect 16 0 9 1; #X connect 17 0 10 1; #X connect 18 0 11 1; #X connect 19 0 15 1; #X connect 19 1 16 1; #X connect 19 2 17 1; #X connect 19 3 18 1; #X connect 20 0 21 1; #X connect 20 1 19 0; #X connect 21 0 2 0; #X connect 22 0 14 0; #X connect 23 0 20 0; pd-iemmatrix-0.3/tests/mtx_add/09_function.pd000066400000000000000000000025531262113134600212240ustar00rootroot00000000000000#N canvas 311 295 379 440 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 98 t b b; #X obj 185 156 t l l; #X obj 122 156 t l l; #X obj 122 221 mtx_add; #X obj 236 269 +; #X obj 267 269 +; #X obj 298 268 +; #X obj 329 268 +; #X msg 186 200 matrix 1 2 \$1 \$2; #X obj 252 228 unpack 0 0; #X msg 122 132 4 -1 0.12 9; #X msg 215 133 45 1; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 17 0; #X connect 7 1 18 0; #X connect 7 2 19 0; #X connect 7 3 20 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 16 0; #X connect 13 0 23 0; #X connect 13 1 24 0; #X connect 14 0 21 0; #X connect 14 1 22 0; #X connect 15 0 12 0; #X connect 15 1 7 0; #X connect 16 0 2 0; #X connect 17 0 8 1; #X connect 18 0 9 1; #X connect 19 0 10 1; #X connect 20 0 11 1; #X connect 21 0 16 1; #X connect 22 0 17 1; #X connect 22 0 19 1; #X connect 22 1 18 1; #X connect 22 1 20 1; #X connect 23 0 15 0; #X connect 24 0 14 0; pd-iemmatrix-0.3/tests/mtx_add/10_function.pd000066400000000000000000000025531262113134600212140ustar00rootroot00000000000000#N canvas 182 266 409 472 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 98 t b b; #X obj 185 156 t l l; #X obj 122 156 t l l; #X obj 122 221 mtx_add; #X obj 236 269 +; #X obj 267 269 +; #X obj 298 268 +; #X obj 329 268 +; #X msg 166 200 matrix 2 1 \$1 \$2; #X obj 252 226 unpack 0 0; #X msg 122 132 1 2 -12 5; #X msg 185 133 10 -55; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 17 0; #X connect 7 1 18 0; #X connect 7 2 19 0; #X connect 7 3 20 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 16 0; #X connect 13 0 23 0; #X connect 13 1 24 0; #X connect 14 0 21 0; #X connect 14 1 22 0; #X connect 15 0 12 0; #X connect 15 1 7 0; #X connect 16 0 2 0; #X connect 17 0 8 1; #X connect 18 0 9 1; #X connect 19 0 10 1; #X connect 20 0 11 1; #X connect 21 0 16 1; #X connect 22 0 17 1; #X connect 22 0 18 1; #X connect 22 1 19 1; #X connect 22 1 20 1; #X connect 23 0 15 0; #X connect 24 0 14 0; pd-iemmatrix-0.3/tests/mtx_and/000077500000000000000000000000001262113134600165475ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_and/00_exist.pd000066400000000000000000000005031262113134600205250ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X text 67 37 test for existance of [mtx_and]; #X obj 122 161 mtx_and 1; #X msg 122 122 matrix 1 1 1; #X connect 0 0 6 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 5 0 2 0; #X connect 6 0 5 0; pd-iemmatrix-0.3/tests/mtx_and/01_function.pd000066400000000000000000000021041262113134600212160ustar00rootroot00000000000000#N canvas 117 373 440 427 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 200 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 156 t l l; #X obj 122 98 t b; #X msg 122 132 0 1 0 2; #X obj 122 221 mtx_and 4; #X obj 236 221 && 4; #X obj 277 221 && 4; #X obj 318 220 && 4; #X obj 359 220 && 4; #X connect 0 0 14 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 17 0; #X connect 7 1 18 0; #X connect 7 2 19 0; #X connect 7 3 20 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 16 0; #X connect 13 0 12 0; #X connect 13 1 7 0; #X connect 14 0 15 0; #X connect 15 0 13 0; #X connect 16 0 2 0; #X connect 17 0 8 1; #X connect 18 0 9 1; #X connect 19 0 10 1; #X connect 20 0 11 1; pd-iemmatrix-0.3/tests/mtx_and/02_function.pd000066400000000000000000000025721262113134600212300ustar00rootroot00000000000000#N canvas 721 420 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 166 200 matrix 2 2 \$1 \$2 \$3 \$4; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 252 228 unpack 0 0 0 0; #X obj 122 98 t b b; #X obj 185 156 t l l; #X obj 122 156 t l l; #X obj 122 221 mtx_and; #X obj 236 269 &&; #X obj 267 269 &&; #X obj 298 268 &&; #X obj 329 268 &&; #X msg 122 132 0 1 0 1; #X msg 185 133 1 1 0 0; #X connect 0 0 15 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 19 0; #X connect 7 1 20 0; #X connect 7 2 21 0; #X connect 7 3 22 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 18 1; #X connect 13 0 18 0; #X connect 14 0 19 1; #X connect 14 1 20 1; #X connect 14 2 21 1; #X connect 14 3 22 1; #X connect 15 0 23 0; #X connect 15 1 24 0; #X connect 16 0 12 0; #X connect 16 1 14 0; #X connect 17 0 13 0; #X connect 17 1 7 0; #X connect 18 0 2 0; #X connect 19 0 8 1; #X connect 20 0 9 1; #X connect 21 0 10 1; #X connect 22 0 11 1; #X connect 23 0 17 0; #X connect 24 0 16 0; pd-iemmatrix-0.3/tests/mtx_and/03_function.pd000066400000000000000000000021041262113134600212200ustar00rootroot00000000000000#N canvas 144 215 431 450 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 256 200 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 156 t l l; #X obj 122 98 t b; #X msg 122 132 0 1 2 3; #X obj 122 221 mtx_and 2; #X obj 256 221 && 2; #X obj 297 221 && 2; #X obj 338 220 && 2; #X obj 379 220 && 2; #X connect 0 0 14 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 17 0; #X connect 7 1 18 0; #X connect 7 2 19 0; #X connect 7 3 20 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 16 0; #X connect 13 0 12 0; #X connect 13 1 7 0; #X connect 14 0 15 0; #X connect 15 0 13 0; #X connect 16 0 2 0; #X connect 17 0 8 1; #X connect 18 0 9 1; #X connect 19 0 10 1; #X connect 20 0 11 1; pd-iemmatrix-0.3/tests/mtx_and/04_function.pd000066400000000000000000000024601262113134600212260ustar00rootroot00000000000000#N canvas 385 142 412 429 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 185 190 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 252 228 unpack 0 0 0 0; #X obj 122 98 t b b; #X obj 185 156 t l l; #X obj 122 221 mtx_and; #X obj 122 156 t f f; #X obj 236 248 t f f f f; #X msg 122 132 2; #X obj 236 269 &&; #X obj 267 269 &&; #X obj 298 268 &&; #X obj 329 268 &&; #X msg 185 133 1 0 3 2; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 7 0; #X connect 3 1 8 0; #X connect 3 2 9 0; #X connect 3 3 10 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 5 0; #X connect 8 0 5 1; #X connect 9 0 4 0; #X connect 10 0 4 1; #X connect 11 0 15 1; #X connect 12 0 19 1; #X connect 12 1 20 1; #X connect 12 2 21 1; #X connect 12 3 22 1; #X connect 13 0 18 0; #X connect 13 1 23 0; #X connect 14 0 11 0; #X connect 14 1 12 0; #X connect 15 0 2 0; #X connect 16 0 15 0; #X connect 16 1 17 0; #X connect 17 0 19 0; #X connect 17 1 20 0; #X connect 17 2 21 0; #X connect 17 3 22 0; #X connect 18 0 16 0; #X connect 19 0 7 1; #X connect 20 0 8 1; #X connect 21 0 9 1; #X connect 22 0 10 1; #X connect 23 0 14 0; pd-iemmatrix-0.3/tests/mtx_and/05_function.pd000066400000000000000000000005671262113134600212350ustar00rootroot00000000000000#N canvas 55 354 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 307 ==; #X obj 122 98 t b; #X obj 122 174 t f f; #X msg 122 132 6.2; #X obj 122 221 mtx_and 1.1; #X obj 207 222 && 1.1; #X connect 0 0 3 0; #X connect 2 0 1 0; #X connect 3 0 5 0; #X connect 4 0 6 0; #X connect 4 1 7 0; #X connect 5 0 4 0; #X connect 6 0 2 0; #X connect 7 0 2 1; pd-iemmatrix-0.3/tests/mtx_and/06_function.pd000066400000000000000000000024661262113134600212360ustar00rootroot00000000000000#N canvas 385 142 386 465 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 98 t b b; #X obj 122 156 t l l; #X obj 236 269 &&; #X obj 267 269 &&; #X obj 298 268 &&; #X obj 329 268 &&; #X obj 252 228 t f f f f; #X obj 185 156 t f f; #X obj 122 221 mtx_and 0; #X msg 82 132 -1 0 2.2 0.1; #X msg 185 133 3.1; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 15 0; #X connect 7 1 16 0; #X connect 7 2 17 0; #X connect 7 3 18 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 21 0; #X connect 13 0 22 0; #X connect 13 1 23 0; #X connect 14 0 12 0; #X connect 14 1 7 0; #X connect 15 0 8 1; #X connect 16 0 9 1; #X connect 17 0 10 1; #X connect 18 0 11 1; #X connect 19 0 15 1; #X connect 19 1 16 1; #X connect 19 2 17 1; #X connect 19 3 18 1; #X connect 20 0 21 1; #X connect 20 1 19 0; #X connect 21 0 2 0; #X connect 22 0 14 0; #X connect 23 0 20 0; pd-iemmatrix-0.3/tests/mtx_and/07_function.pd000066400000000000000000000007501262113134600212310ustar00rootroot00000000000000#N canvas 270 180 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 213 71 bang; #X obj 122 98 t b b; #X obj 122 175 t f f; #X obj 122 307 ==; #X obj 122 251 mtx_and 0; #X obj 239 251 &&; #X msg 122 132 2; #X msg 152 131 0; #X connect 0 0 3 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 4 0 6 0; #X connect 4 1 7 0; #X connect 5 0 1 0; #X connect 6 0 5 0; #X connect 7 0 5 1; #X connect 8 0 4 0; #X connect 9 0 6 1; #X connect 9 0 7 1; pd-iemmatrix-0.3/tests/mtx_and/08_function.pd000066400000000000000000000024601262113134600212320ustar00rootroot00000000000000#N canvas 277 252 796 483 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 98 t b b; #X obj 122 156 t l l; #X obj 236 269 &&; #X obj 267 269 &&; #X obj 298 268 &&; #X obj 329 268 &&; #X obj 252 228 t f f f f; #X obj 185 156 t f f; #X obj 122 221 mtx_and 0; #X msg 122 132 0 1 0 1; #X msg 185 133 2; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 15 0; #X connect 7 1 16 0; #X connect 7 2 17 0; #X connect 7 3 18 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 21 0; #X connect 13 0 22 0; #X connect 13 1 23 0; #X connect 14 0 12 0; #X connect 14 1 7 0; #X connect 15 0 8 1; #X connect 16 0 9 1; #X connect 17 0 10 1; #X connect 18 0 11 1; #X connect 19 0 15 1; #X connect 19 1 16 1; #X connect 19 2 17 1; #X connect 19 3 18 1; #X connect 20 0 21 1; #X connect 20 1 19 0; #X connect 21 0 2 0; #X connect 22 0 14 0; #X connect 23 0 20 0; pd-iemmatrix-0.3/tests/mtx_and/09_function.pd000066400000000000000000000025521262113134600212350ustar00rootroot00000000000000#N canvas 311 295 379 440 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 98 t b b; #X obj 185 156 t l l; #X obj 122 156 t l l; #X obj 122 221 mtx_and; #X obj 236 269 &&; #X obj 267 269 &&; #X obj 298 268 &&; #X obj 329 268 &&; #X msg 186 200 matrix 1 2 \$1 \$2; #X obj 252 228 unpack 0 0; #X msg 122 132 0 1 0 1; #X msg 185 133 1 0; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 17 0; #X connect 7 1 18 0; #X connect 7 2 19 0; #X connect 7 3 20 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 16 0; #X connect 13 0 23 0; #X connect 13 1 24 0; #X connect 14 0 21 0; #X connect 14 1 22 0; #X connect 15 0 12 0; #X connect 15 1 7 0; #X connect 16 0 2 0; #X connect 17 0 8 1; #X connect 18 0 9 1; #X connect 19 0 10 1; #X connect 20 0 11 1; #X connect 21 0 16 1; #X connect 22 0 17 1; #X connect 22 0 19 1; #X connect 22 1 18 1; #X connect 22 1 20 1; #X connect 23 0 15 0; #X connect 24 0 14 0; pd-iemmatrix-0.3/tests/mtx_and/10_function.pd000066400000000000000000000025531262113134600212260ustar00rootroot00000000000000#N canvas 182 266 409 472 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 98 t b b; #X obj 185 156 t l l; #X obj 122 156 t l l; #X obj 122 221 mtx_and; #X obj 236 269 &&; #X obj 267 269 &&; #X obj 298 268 &&; #X obj 329 268 &&; #X msg 166 200 matrix 2 1 \$1 \$2; #X obj 252 226 unpack 0 0; #X msg 122 132 1 0 -1 2; #X msg 185 133 0 1; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 17 0; #X connect 7 1 18 0; #X connect 7 2 19 0; #X connect 7 3 20 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 16 0; #X connect 13 0 23 0; #X connect 13 1 24 0; #X connect 14 0 21 0; #X connect 14 1 22 0; #X connect 15 0 12 0; #X connect 15 1 7 0; #X connect 16 0 2 0; #X connect 17 0 8 1; #X connect 18 0 9 1; #X connect 19 0 10 1; #X connect 20 0 11 1; #X connect 21 0 16 1; #X connect 22 0 17 1; #X connect 22 0 18 1; #X connect 22 1 19 1; #X connect 22 1 20 1; #X connect 23 0 15 0; #X connect 24 0 14 0; pd-iemmatrix-0.3/tests/mtx_bitand/000077500000000000000000000000001262113134600172465ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_bitand/00_exist.pd000066400000000000000000000005111262113134600212230ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X text 67 37 test for existance of [mtx_bitand]; #X msg 122 122 matrix 1 1 1; #X obj 122 161 mtx_bitand 1; #X connect 0 0 5 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 5 0 6 0; #X connect 6 0 2 0; pd-iemmatrix-0.3/tests/mtx_bitand/01_function.pd000066400000000000000000000021061262113134600217170ustar00rootroot00000000000000#N canvas 117 373 440 427 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 200 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 156 t l l; #X obj 122 98 t b; #X obj 122 221 mtx_bitand 2; #X obj 236 221 & 2; #X obj 277 221 & 2; #X obj 318 220 & 2; #X obj 359 220 & 2; #X msg 122 132 2 5 -1.1 4; #X connect 0 0 14 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 16 0; #X connect 7 1 17 0; #X connect 7 2 18 0; #X connect 7 3 19 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 15 0; #X connect 13 0 12 0; #X connect 13 1 7 0; #X connect 14 0 20 0; #X connect 15 0 2 0; #X connect 16 0 8 1; #X connect 17 0 9 1; #X connect 18 0 10 1; #X connect 19 0 11 1; #X connect 20 0 13 0; pd-iemmatrix-0.3/tests/mtx_bitand/02_function.pd000066400000000000000000000025711262113134600217260ustar00rootroot00000000000000#N canvas 176 399 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 166 200 matrix 2 2 \$1 \$2 \$3 \$4; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 252 228 unpack 0 0 0 0; #X obj 122 98 t b b; #X obj 185 156 t l l; #X obj 122 156 t l l; #X obj 122 221 mtx_bitand; #X obj 236 269 &; #X obj 267 269 &; #X obj 298 268 &; #X obj 329 268 &; #X msg 122 132 1 2 3 4; #X msg 185 133 9 8 7 6; #X connect 0 0 15 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 19 0; #X connect 7 1 20 0; #X connect 7 2 21 0; #X connect 7 3 22 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 18 1; #X connect 13 0 18 0; #X connect 14 0 19 1; #X connect 14 1 20 1; #X connect 14 2 21 1; #X connect 14 3 22 1; #X connect 15 0 23 0; #X connect 15 1 24 0; #X connect 16 0 12 0; #X connect 16 1 14 0; #X connect 17 0 13 0; #X connect 17 1 7 0; #X connect 18 0 2 0; #X connect 19 0 8 1; #X connect 20 0 9 1; #X connect 21 0 10 1; #X connect 22 0 11 1; #X connect 23 0 17 0; #X connect 24 0 16 0; pd-iemmatrix-0.3/tests/mtx_bitand/03_function.pd000066400000000000000000000021031262113134600217160ustar00rootroot00000000000000#N canvas 144 215 431 450 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 256 200 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 156 t l l; #X obj 122 98 t b; #X msg 122 132 3 2 1 0; #X obj 122 221 mtx_bitand 1; #X obj 256 221 & 1; #X obj 297 221 & 1; #X obj 338 220 & 1; #X obj 379 220 & 1; #X connect 0 0 14 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 17 0; #X connect 7 1 18 0; #X connect 7 2 19 0; #X connect 7 3 20 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 16 0; #X connect 13 0 12 0; #X connect 13 1 7 0; #X connect 14 0 15 0; #X connect 15 0 13 0; #X connect 16 0 2 0; #X connect 17 0 8 1; #X connect 18 0 9 1; #X connect 19 0 10 1; #X connect 20 0 11 1; pd-iemmatrix-0.3/tests/mtx_bitand/04_function.pd000066400000000000000000000024571262113134600217330ustar00rootroot00000000000000#N canvas 190 400 412 429 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 185 190 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 252 228 unpack 0 0 0 0; #X obj 122 98 t b b; #X obj 185 156 t l l; #X obj 122 221 mtx_bitand; #X obj 236 269 &; #X obj 267 269 &; #X obj 298 268 &; #X obj 329 268 &; #X obj 122 156 t f f; #X obj 236 248 t f f f f; #X msg 122 132 5; #X msg 185 133 1 2 4 8; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 7 0; #X connect 3 1 8 0; #X connect 3 2 9 0; #X connect 3 3 10 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 5 0; #X connect 8 0 5 1; #X connect 9 0 4 0; #X connect 10 0 4 1; #X connect 11 0 15 1; #X connect 12 0 16 1; #X connect 12 1 17 1; #X connect 12 2 18 1; #X connect 12 3 19 1; #X connect 13 0 22 0; #X connect 13 1 23 0; #X connect 14 0 11 0; #X connect 14 1 12 0; #X connect 15 0 2 0; #X connect 16 0 7 1; #X connect 17 0 8 1; #X connect 18 0 9 1; #X connect 19 0 10 1; #X connect 20 0 15 0; #X connect 20 1 21 0; #X connect 21 0 16 0; #X connect 21 1 17 0; #X connect 21 2 18 0; #X connect 21 3 19 0; #X connect 22 0 20 0; #X connect 23 0 14 0; pd-iemmatrix-0.3/tests/mtx_bitand/05_function.pd000066400000000000000000000005641262113134600217310ustar00rootroot00000000000000#N canvas 55 354 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 307 ==; #X obj 122 98 t b; #X obj 122 174 t f f; #X msg 122 132 11; #X obj 122 221 mtx_bitand 7; #X obj 207 221 & 7; #X connect 0 0 3 0; #X connect 2 0 1 0; #X connect 3 0 5 0; #X connect 4 0 6 0; #X connect 4 1 7 0; #X connect 5 0 4 0; #X connect 6 0 2 0; #X connect 7 0 2 1; pd-iemmatrix-0.3/tests/mtx_bitand/06_function.pd000066400000000000000000000024601262113134600217270ustar00rootroot00000000000000#N canvas 282 295 386 465 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 98 t b b; #X obj 122 156 t l l; #X obj 236 269 &; #X obj 267 269 &; #X obj 298 268 &; #X obj 329 268 &; #X obj 252 228 t f f f f; #X obj 185 156 t f f; #X obj 122 221 mtx_bitand 0; #X msg 122 132 0 2 3 5; #X msg 185 133 17; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 15 0; #X connect 7 1 16 0; #X connect 7 2 17 0; #X connect 7 3 18 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 21 0; #X connect 13 0 22 0; #X connect 13 1 23 0; #X connect 14 0 12 0; #X connect 14 1 7 0; #X connect 15 0 8 1; #X connect 16 0 9 1; #X connect 17 0 10 1; #X connect 18 0 11 1; #X connect 19 0 15 1; #X connect 19 1 16 1; #X connect 19 2 17 1; #X connect 19 3 18 1; #X connect 20 0 21 1; #X connect 20 1 19 0; #X connect 21 0 2 0; #X connect 22 0 14 0; #X connect 23 0 20 0; pd-iemmatrix-0.3/tests/mtx_bitand/07_function.pd000066400000000000000000000007521262113134600217320ustar00rootroot00000000000000#N canvas 270 180 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 213 71 bang; #X obj 122 98 t b b; #X obj 122 175 t f f; #X obj 122 307 ==; #X obj 122 251 mtx_bitand 0; #X obj 239 251 &; #X msg 122 132 6; #X msg 152 131 9; #X connect 0 0 3 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 4 0 6 0; #X connect 4 1 7 0; #X connect 5 0 1 0; #X connect 6 0 5 0; #X connect 7 0 5 1; #X connect 8 0 4 0; #X connect 9 0 6 1; #X connect 9 0 7 1; pd-iemmatrix-0.3/tests/mtx_bitand/08_function.pd000066400000000000000000000024611262113134600217320ustar00rootroot00000000000000#N canvas 277 252 796 483 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 98 t b b; #X obj 122 156 t l l; #X obj 236 269 &; #X obj 267 269 &; #X obj 298 268 &; #X obj 329 268 &; #X obj 252 228 t f f f f; #X obj 185 156 t f f; #X obj 122 221 mtx_bitand 0; #X msg 122 132 4 3 7 6; #X msg 185 133 123; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 15 0; #X connect 7 1 16 0; #X connect 7 2 17 0; #X connect 7 3 18 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 21 0; #X connect 13 0 22 0; #X connect 13 1 23 0; #X connect 14 0 12 0; #X connect 14 1 7 0; #X connect 15 0 8 1; #X connect 16 0 9 1; #X connect 17 0 10 1; #X connect 18 0 11 1; #X connect 19 0 15 1; #X connect 19 1 16 1; #X connect 19 2 17 1; #X connect 19 3 18 1; #X connect 20 0 21 1; #X connect 20 1 19 0; #X connect 21 0 2 0; #X connect 22 0 14 0; #X connect 23 0 20 0; pd-iemmatrix-0.3/tests/mtx_bitand/09_function.pd000066400000000000000000000025541262113134600217360ustar00rootroot00000000000000#N canvas 311 295 379 440 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 98 t b b; #X obj 185 156 t l l; #X obj 122 156 t l l; #X obj 122 221 mtx_bitand; #X obj 236 269 &; #X obj 267 269 &; #X obj 298 268 &; #X obj 329 268 &; #X msg 186 200 matrix 1 2 \$1 \$2; #X obj 252 228 unpack 0 0; #X msg 122 132 10 9 -1 3; #X msg 185 133 7 34; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 17 0; #X connect 7 1 18 0; #X connect 7 2 19 0; #X connect 7 3 20 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 16 0; #X connect 13 0 23 0; #X connect 13 1 24 0; #X connect 14 0 21 0; #X connect 14 1 22 0; #X connect 15 0 12 0; #X connect 15 1 7 0; #X connect 16 0 2 0; #X connect 17 0 8 1; #X connect 18 0 9 1; #X connect 19 0 10 1; #X connect 20 0 11 1; #X connect 21 0 16 1; #X connect 22 0 17 1; #X connect 22 0 19 1; #X connect 22 1 18 1; #X connect 22 1 20 1; #X connect 23 0 15 0; #X connect 24 0 14 0; pd-iemmatrix-0.3/tests/mtx_bitand/10_function.pd000066400000000000000000000025511262113134600217230ustar00rootroot00000000000000#N canvas 182 266 409 472 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 98 t b b; #X obj 185 156 t l l; #X obj 122 156 t l l; #X obj 122 221 mtx_bitand; #X obj 236 269 &; #X obj 267 269 &; #X obj 298 268 &; #X obj 329 268 &; #X msg 166 200 matrix 2 1 \$1 \$2; #X obj 252 226 unpack 0 0; #X msg 185 133 5 3; #X msg 122 132 4 2 9 8; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 17 0; #X connect 7 1 18 0; #X connect 7 2 19 0; #X connect 7 3 20 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 16 0; #X connect 13 0 24 0; #X connect 13 1 23 0; #X connect 14 0 21 0; #X connect 14 1 22 0; #X connect 15 0 12 0; #X connect 15 1 7 0; #X connect 16 0 2 0; #X connect 17 0 8 1; #X connect 18 0 9 1; #X connect 19 0 10 1; #X connect 20 0 11 1; #X connect 21 0 16 1; #X connect 22 0 17 1; #X connect 22 0 18 1; #X connect 22 1 19 1; #X connect 22 1 20 1; #X connect 23 0 14 0; #X connect 24 0 15 0; pd-iemmatrix-0.3/tests/mtx_bitleft/000077500000000000000000000000001262113134600174365ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_bitleft/00_exist.pd000066400000000000000000000005111262113134600214130ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X text 67 37 test for existance of [mtx_bitleft]; #X msg 122 122 matrix 1 1 1; #X obj 122 161 mtx_bitleft; #X connect 0 0 5 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 5 0 6 0; #X connect 6 0 2 0; pd-iemmatrix-0.3/tests/mtx_bitleft/01_function.pd000066400000000000000000000021131262113134600221050ustar00rootroot00000000000000#N canvas 117 373 440 427 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 200 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 156 t l l; #X obj 122 98 t b; #X obj 122 221 mtx_bitleft 2; #X obj 236 221 << 2; #X obj 277 221 << 2; #X obj 318 220 << 2; #X obj 359 220 << 2; #X msg 122 132 2 5 -1.1 4; #X connect 0 0 14 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 16 0; #X connect 7 1 17 0; #X connect 7 2 18 0; #X connect 7 3 19 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 15 0; #X connect 13 0 12 0; #X connect 13 1 7 0; #X connect 14 0 20 0; #X connect 15 0 2 0; #X connect 16 0 8 1; #X connect 17 0 9 1; #X connect 18 0 10 1; #X connect 19 0 11 1; #X connect 20 0 13 0; pd-iemmatrix-0.3/tests/mtx_bitleft/02_function.pd000066400000000000000000000025761262113134600221230ustar00rootroot00000000000000#N canvas 176 399 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 166 200 matrix 2 2 \$1 \$2 \$3 \$4; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 252 228 unpack 0 0 0 0; #X obj 122 98 t b b; #X obj 185 156 t l l; #X obj 122 156 t l l; #X obj 122 221 mtx_bitleft; #X obj 236 269 <<; #X obj 267 269 <<; #X obj 298 268 <<; #X obj 329 268 <<; #X msg 122 132 1 2 3 4; #X msg 185 133 9 8 7 6; #X connect 0 0 15 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 19 0; #X connect 7 1 20 0; #X connect 7 2 21 0; #X connect 7 3 22 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 18 1; #X connect 13 0 18 0; #X connect 14 0 19 1; #X connect 14 1 20 1; #X connect 14 2 21 1; #X connect 14 3 22 1; #X connect 15 0 23 0; #X connect 15 1 24 0; #X connect 16 0 12 0; #X connect 16 1 14 0; #X connect 17 0 13 0; #X connect 17 1 7 0; #X connect 18 0 2 0; #X connect 19 0 8 1; #X connect 20 0 9 1; #X connect 21 0 10 1; #X connect 22 0 11 1; #X connect 23 0 17 0; #X connect 24 0 16 0; pd-iemmatrix-0.3/tests/mtx_bitleft/03_function.pd000066400000000000000000000021101262113134600221040ustar00rootroot00000000000000#N canvas 144 215 431 450 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 256 200 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 156 t l l; #X obj 122 98 t b; #X msg 122 132 3 2 1 0; #X obj 122 221 mtx_bitleft 1; #X obj 256 221 << 1; #X obj 297 221 << 1; #X obj 338 220 << 1; #X obj 379 220 << 1; #X connect 0 0 14 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 17 0; #X connect 7 1 18 0; #X connect 7 2 19 0; #X connect 7 3 20 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 16 0; #X connect 13 0 12 0; #X connect 13 1 7 0; #X connect 14 0 15 0; #X connect 15 0 13 0; #X connect 16 0 2 0; #X connect 17 0 8 1; #X connect 18 0 9 1; #X connect 19 0 10 1; #X connect 20 0 11 1; pd-iemmatrix-0.3/tests/mtx_bitleft/04_function.pd000066400000000000000000000024641262113134600221210ustar00rootroot00000000000000#N canvas 190 400 412 429 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 185 190 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 252 228 unpack 0 0 0 0; #X obj 122 98 t b b; #X obj 185 156 t l l; #X obj 122 221 mtx_bitleft; #X obj 236 269 <<; #X obj 267 269 <<; #X obj 298 268 <<; #X obj 329 268 <<; #X obj 122 156 t f f; #X obj 236 248 t f f f f; #X msg 122 132 5; #X msg 185 133 1 2 4 8; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 7 0; #X connect 3 1 8 0; #X connect 3 2 9 0; #X connect 3 3 10 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 5 0; #X connect 8 0 5 1; #X connect 9 0 4 0; #X connect 10 0 4 1; #X connect 11 0 15 1; #X connect 12 0 16 1; #X connect 12 1 17 1; #X connect 12 2 18 1; #X connect 12 3 19 1; #X connect 13 0 22 0; #X connect 13 1 23 0; #X connect 14 0 11 0; #X connect 14 1 12 0; #X connect 15 0 2 0; #X connect 16 0 7 1; #X connect 17 0 8 1; #X connect 18 0 9 1; #X connect 19 0 10 1; #X connect 20 0 15 0; #X connect 20 1 21 0; #X connect 21 0 16 0; #X connect 21 1 17 0; #X connect 21 2 18 0; #X connect 21 3 19 0; #X connect 22 0 20 0; #X connect 23 0 14 0; pd-iemmatrix-0.3/tests/mtx_bitleft/05_function.pd000066400000000000000000000005661262113134600221230ustar00rootroot00000000000000#N canvas 55 354 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 307 ==; #X obj 122 98 t b; #X obj 122 174 t f f; #X msg 122 132 11; #X obj 122 221 mtx_bitleft 7; #X obj 207 221 << 7; #X connect 0 0 3 0; #X connect 2 0 1 0; #X connect 3 0 5 0; #X connect 4 0 6 0; #X connect 4 1 7 0; #X connect 5 0 4 0; #X connect 6 0 2 0; #X connect 7 0 2 1; pd-iemmatrix-0.3/tests/mtx_bitleft/06_function.pd000066400000000000000000000024651262113134600221240ustar00rootroot00000000000000#N canvas 282 295 386 465 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 98 t b b; #X obj 122 156 t l l; #X obj 236 269 <<; #X obj 267 269 <<; #X obj 298 268 <<; #X obj 329 268 <<; #X obj 252 228 t f f f f; #X obj 185 156 t f f; #X obj 122 221 mtx_bitleft 0; #X msg 122 132 0 2 3 5; #X msg 185 133 17; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 15 0; #X connect 7 1 16 0; #X connect 7 2 17 0; #X connect 7 3 18 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 21 0; #X connect 13 0 22 0; #X connect 13 1 23 0; #X connect 14 0 12 0; #X connect 14 1 7 0; #X connect 15 0 8 1; #X connect 16 0 9 1; #X connect 17 0 10 1; #X connect 18 0 11 1; #X connect 19 0 15 1; #X connect 19 1 16 1; #X connect 19 2 17 1; #X connect 19 3 18 1; #X connect 20 0 21 1; #X connect 20 1 19 0; #X connect 21 0 2 0; #X connect 22 0 14 0; #X connect 23 0 20 0; pd-iemmatrix-0.3/tests/mtx_bitleft/07_function.pd000066400000000000000000000007541262113134600221240ustar00rootroot00000000000000#N canvas 270 180 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 213 71 bang; #X obj 122 98 t b b; #X obj 122 175 t f f; #X obj 122 307 ==; #X obj 122 251 mtx_bitleft 0; #X obj 239 251 <<; #X msg 122 132 6; #X msg 152 131 9; #X connect 0 0 3 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 4 0 6 0; #X connect 4 1 7 0; #X connect 5 0 1 0; #X connect 6 0 5 0; #X connect 7 0 5 1; #X connect 8 0 4 0; #X connect 9 0 6 1; #X connect 9 0 7 1; pd-iemmatrix-0.3/tests/mtx_bitleft/08_function.pd000066400000000000000000000024661262113134600221270ustar00rootroot00000000000000#N canvas 277 252 796 483 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 98 t b b; #X obj 122 156 t l l; #X obj 236 269 <<; #X obj 267 269 <<; #X obj 298 268 <<; #X obj 329 268 <<; #X obj 252 228 t f f f f; #X obj 185 156 t f f; #X obj 122 221 mtx_bitleft 0; #X msg 122 132 4 3 7 6; #X msg 185 133 3.6; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 15 0; #X connect 7 1 16 0; #X connect 7 2 17 0; #X connect 7 3 18 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 21 0; #X connect 13 0 22 0; #X connect 13 1 23 0; #X connect 14 0 12 0; #X connect 14 1 7 0; #X connect 15 0 8 1; #X connect 16 0 9 1; #X connect 17 0 10 1; #X connect 18 0 11 1; #X connect 19 0 15 1; #X connect 19 1 16 1; #X connect 19 2 17 1; #X connect 19 3 18 1; #X connect 20 0 21 1; #X connect 20 1 19 0; #X connect 21 0 2 0; #X connect 22 0 14 0; #X connect 23 0 20 0; pd-iemmatrix-0.3/tests/mtx_bitleft/09_function.pd000066400000000000000000000025621262113134600221250ustar00rootroot00000000000000#N canvas 311 295 379 440 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 98 t b b; #X obj 185 156 t l l; #X obj 122 156 t l l; #X obj 122 221 mtx_bitleft; #X obj 236 269 <<; #X obj 267 269 <<; #X obj 298 268 <<; #X obj 329 268 <<; #X msg 186 200 matrix 1 2 \$1 \$2; #X obj 252 228 unpack 0 0; #X msg 122 132 10 9 -1 3; #X msg 185 133 7 3.4; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 17 0; #X connect 7 1 18 0; #X connect 7 2 19 0; #X connect 7 3 20 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 16 0; #X connect 13 0 23 0; #X connect 13 1 24 0; #X connect 14 0 21 0; #X connect 14 1 22 0; #X connect 15 0 12 0; #X connect 15 1 7 0; #X connect 16 0 2 0; #X connect 17 0 8 1; #X connect 18 0 9 1; #X connect 19 0 10 1; #X connect 20 0 11 1; #X connect 21 0 16 1; #X connect 22 0 17 1; #X connect 22 0 19 1; #X connect 22 1 18 1; #X connect 22 1 20 1; #X connect 23 0 15 0; #X connect 24 0 14 0; pd-iemmatrix-0.3/tests/mtx_bitleft/10_function.pd000066400000000000000000000025561262113134600221200ustar00rootroot00000000000000#N canvas 182 266 409 472 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 98 t b b; #X obj 185 156 t l l; #X obj 122 156 t l l; #X obj 122 221 mtx_bitleft; #X obj 236 269 <<; #X obj 267 269 <<; #X obj 298 268 <<; #X obj 329 268 <<; #X msg 166 200 matrix 2 1 \$1 \$2; #X obj 252 226 unpack 0 0; #X msg 185 133 5 3; #X msg 122 132 4 2 9 8; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 17 0; #X connect 7 1 18 0; #X connect 7 2 19 0; #X connect 7 3 20 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 16 0; #X connect 13 0 24 0; #X connect 13 1 23 0; #X connect 14 0 21 0; #X connect 14 1 22 0; #X connect 15 0 12 0; #X connect 15 1 7 0; #X connect 16 0 2 0; #X connect 17 0 8 1; #X connect 18 0 9 1; #X connect 19 0 10 1; #X connect 20 0 11 1; #X connect 21 0 16 1; #X connect 22 0 17 1; #X connect 22 0 18 1; #X connect 22 1 19 1; #X connect 22 1 20 1; #X connect 23 0 14 0; #X connect 24 0 15 0; pd-iemmatrix-0.3/tests/mtx_bitor/000077500000000000000000000000001262113134600171245ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_bitor/00_exist.pd000066400000000000000000000005071262113134600211060ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X text 67 37 test for existance of [mtx_bitor]; #X msg 122 122 matrix 1 1 1; #X obj 122 161 mtx_bitor 1; #X connect 0 0 5 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 5 0 6 0; #X connect 6 0 2 0; pd-iemmatrix-0.3/tests/mtx_bitor/01_function.pd000066400000000000000000000021051262113134600215740ustar00rootroot00000000000000#N canvas 117 373 440 427 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 200 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 156 t l l; #X obj 122 98 t b; #X obj 122 221 mtx_bitor 2; #X obj 236 221 | 2; #X obj 277 221 | 2; #X obj 318 220 | 2; #X obj 359 220 | 2; #X msg 122 132 2 5 -1.1 4; #X connect 0 0 14 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 16 0; #X connect 7 1 17 0; #X connect 7 2 18 0; #X connect 7 3 19 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 15 0; #X connect 13 0 12 0; #X connect 13 1 7 0; #X connect 14 0 20 0; #X connect 15 0 2 0; #X connect 16 0 8 1; #X connect 17 0 9 1; #X connect 18 0 10 1; #X connect 19 0 11 1; #X connect 20 0 13 0; pd-iemmatrix-0.3/tests/mtx_bitor/02_function.pd000066400000000000000000000025701262113134600216030ustar00rootroot00000000000000#N canvas 176 399 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 166 200 matrix 2 2 \$1 \$2 \$3 \$4; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 252 228 unpack 0 0 0 0; #X obj 122 98 t b b; #X obj 185 156 t l l; #X obj 122 156 t l l; #X obj 122 221 mtx_bitor; #X obj 236 269 |; #X obj 267 269 |; #X obj 298 268 |; #X obj 329 268 |; #X msg 122 132 1 2 3 4; #X msg 185 133 9 8 7 6; #X connect 0 0 15 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 19 0; #X connect 7 1 20 0; #X connect 7 2 21 0; #X connect 7 3 22 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 18 1; #X connect 13 0 18 0; #X connect 14 0 19 1; #X connect 14 1 20 1; #X connect 14 2 21 1; #X connect 14 3 22 1; #X connect 15 0 23 0; #X connect 15 1 24 0; #X connect 16 0 12 0; #X connect 16 1 14 0; #X connect 17 0 13 0; #X connect 17 1 7 0; #X connect 18 0 2 0; #X connect 19 0 8 1; #X connect 20 0 9 1; #X connect 21 0 10 1; #X connect 22 0 11 1; #X connect 23 0 17 0; #X connect 24 0 16 0; pd-iemmatrix-0.3/tests/mtx_bitor/03_function.pd000066400000000000000000000021021262113134600215730ustar00rootroot00000000000000#N canvas 144 215 431 450 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 256 200 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 156 t l l; #X obj 122 98 t b; #X msg 122 132 3 2 1 0; #X obj 122 221 mtx_bitor 1; #X obj 256 221 | 1; #X obj 297 221 | 1; #X obj 338 220 | 1; #X obj 379 220 | 1; #X connect 0 0 14 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 17 0; #X connect 7 1 18 0; #X connect 7 2 19 0; #X connect 7 3 20 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 16 0; #X connect 13 0 12 0; #X connect 13 1 7 0; #X connect 14 0 15 0; #X connect 15 0 13 0; #X connect 16 0 2 0; #X connect 17 0 8 1; #X connect 18 0 9 1; #X connect 19 0 10 1; #X connect 20 0 11 1; pd-iemmatrix-0.3/tests/mtx_bitor/04_function.pd000066400000000000000000000024561262113134600216100ustar00rootroot00000000000000#N canvas 190 400 412 429 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 185 190 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 252 228 unpack 0 0 0 0; #X obj 122 98 t b b; #X obj 185 156 t l l; #X obj 122 221 mtx_bitor; #X obj 236 269 |; #X obj 267 269 |; #X obj 298 268 |; #X obj 329 268 |; #X obj 122 156 t f f; #X obj 236 248 t f f f f; #X msg 122 132 5; #X msg 185 133 1 2 4 8; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 7 0; #X connect 3 1 8 0; #X connect 3 2 9 0; #X connect 3 3 10 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 5 0; #X connect 8 0 5 1; #X connect 9 0 4 0; #X connect 10 0 4 1; #X connect 11 0 15 1; #X connect 12 0 16 1; #X connect 12 1 17 1; #X connect 12 2 18 1; #X connect 12 3 19 1; #X connect 13 0 22 0; #X connect 13 1 23 0; #X connect 14 0 11 0; #X connect 14 1 12 0; #X connect 15 0 2 0; #X connect 16 0 7 1; #X connect 17 0 8 1; #X connect 18 0 9 1; #X connect 19 0 10 1; #X connect 20 0 15 0; #X connect 20 1 21 0; #X connect 21 0 16 0; #X connect 21 1 17 0; #X connect 21 2 18 0; #X connect 21 3 19 0; #X connect 22 0 20 0; #X connect 23 0 14 0; pd-iemmatrix-0.3/tests/mtx_bitor/05_function.pd000066400000000000000000000005631262113134600216060ustar00rootroot00000000000000#N canvas 55 354 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 307 ==; #X obj 122 98 t b; #X obj 122 174 t f f; #X msg 122 132 11; #X obj 122 221 mtx_bitor 7; #X obj 207 221 | 7; #X connect 0 0 3 0; #X connect 2 0 1 0; #X connect 3 0 5 0; #X connect 4 0 6 0; #X connect 4 1 7 0; #X connect 5 0 4 0; #X connect 6 0 2 0; #X connect 7 0 2 1; pd-iemmatrix-0.3/tests/mtx_bitor/06_function.pd000066400000000000000000000024571262113134600216130ustar00rootroot00000000000000#N canvas 282 295 386 465 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 98 t b b; #X obj 122 156 t l l; #X obj 236 269 |; #X obj 267 269 |; #X obj 298 268 |; #X obj 329 268 |; #X obj 252 228 t f f f f; #X obj 185 156 t f f; #X obj 122 221 mtx_bitor 0; #X msg 122 132 0 2 3 5; #X msg 185 133 17; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 15 0; #X connect 7 1 16 0; #X connect 7 2 17 0; #X connect 7 3 18 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 21 0; #X connect 13 0 22 0; #X connect 13 1 23 0; #X connect 14 0 12 0; #X connect 14 1 7 0; #X connect 15 0 8 1; #X connect 16 0 9 1; #X connect 17 0 10 1; #X connect 18 0 11 1; #X connect 19 0 15 1; #X connect 19 1 16 1; #X connect 19 2 17 1; #X connect 19 3 18 1; #X connect 20 0 21 1; #X connect 20 1 19 0; #X connect 21 0 2 0; #X connect 22 0 14 0; #X connect 23 0 20 0; pd-iemmatrix-0.3/tests/mtx_bitor/07_function.pd000066400000000000000000000007511262113134600216070ustar00rootroot00000000000000#N canvas 270 180 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 213 71 bang; #X obj 122 98 t b b; #X obj 122 175 t f f; #X obj 122 307 ==; #X obj 122 251 mtx_bitor 0; #X obj 239 251 |; #X msg 122 132 6; #X msg 152 131 9; #X connect 0 0 3 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 4 0 6 0; #X connect 4 1 7 0; #X connect 5 0 1 0; #X connect 6 0 5 0; #X connect 7 0 5 1; #X connect 8 0 4 0; #X connect 9 0 6 1; #X connect 9 0 7 1; pd-iemmatrix-0.3/tests/mtx_bitor/08_function.pd000066400000000000000000000024601262113134600216070ustar00rootroot00000000000000#N canvas 277 252 796 483 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 98 t b b; #X obj 122 156 t l l; #X obj 236 269 |; #X obj 267 269 |; #X obj 298 268 |; #X obj 329 268 |; #X obj 252 228 t f f f f; #X obj 185 156 t f f; #X obj 122 221 mtx_bitor 0; #X msg 122 132 4 3 7 6; #X msg 185 133 123; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 15 0; #X connect 7 1 16 0; #X connect 7 2 17 0; #X connect 7 3 18 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 21 0; #X connect 13 0 22 0; #X connect 13 1 23 0; #X connect 14 0 12 0; #X connect 14 1 7 0; #X connect 15 0 8 1; #X connect 16 0 9 1; #X connect 17 0 10 1; #X connect 18 0 11 1; #X connect 19 0 15 1; #X connect 19 1 16 1; #X connect 19 2 17 1; #X connect 19 3 18 1; #X connect 20 0 21 1; #X connect 20 1 19 0; #X connect 21 0 2 0; #X connect 22 0 14 0; #X connect 23 0 20 0; pd-iemmatrix-0.3/tests/mtx_bitor/09_function.pd000066400000000000000000000025531262113134600216130ustar00rootroot00000000000000#N canvas 311 295 379 440 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 98 t b b; #X obj 185 156 t l l; #X obj 122 156 t l l; #X obj 122 221 mtx_bitor; #X obj 236 269 |; #X obj 267 269 |; #X obj 298 268 |; #X obj 329 268 |; #X msg 186 200 matrix 1 2 \$1 \$2; #X obj 252 228 unpack 0 0; #X msg 122 132 10 9 -1 3; #X msg 185 133 7 34; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 17 0; #X connect 7 1 18 0; #X connect 7 2 19 0; #X connect 7 3 20 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 16 0; #X connect 13 0 23 0; #X connect 13 1 24 0; #X connect 14 0 21 0; #X connect 14 1 22 0; #X connect 15 0 12 0; #X connect 15 1 7 0; #X connect 16 0 2 0; #X connect 17 0 8 1; #X connect 18 0 9 1; #X connect 19 0 10 1; #X connect 20 0 11 1; #X connect 21 0 16 1; #X connect 22 0 17 1; #X connect 22 0 19 1; #X connect 22 1 18 1; #X connect 22 1 20 1; #X connect 23 0 15 0; #X connect 24 0 14 0; pd-iemmatrix-0.3/tests/mtx_bitor/10_function.pd000066400000000000000000000025501262113134600216000ustar00rootroot00000000000000#N canvas 182 266 409 472 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 98 t b b; #X obj 185 156 t l l; #X obj 122 156 t l l; #X obj 122 221 mtx_bitor; #X obj 236 269 |; #X obj 267 269 |; #X obj 298 268 |; #X obj 329 268 |; #X msg 166 200 matrix 2 1 \$1 \$2; #X obj 252 226 unpack 0 0; #X msg 185 133 5 3; #X msg 122 132 4 2 9 8; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 17 0; #X connect 7 1 18 0; #X connect 7 2 19 0; #X connect 7 3 20 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 16 0; #X connect 13 0 24 0; #X connect 13 1 23 0; #X connect 14 0 21 0; #X connect 14 1 22 0; #X connect 15 0 12 0; #X connect 15 1 7 0; #X connect 16 0 2 0; #X connect 17 0 8 1; #X connect 18 0 9 1; #X connect 19 0 10 1; #X connect 20 0 11 1; #X connect 21 0 16 1; #X connect 22 0 17 1; #X connect 22 0 18 1; #X connect 22 1 19 1; #X connect 22 1 20 1; #X connect 23 0 14 0; #X connect 24 0 15 0; pd-iemmatrix-0.3/tests/mtx_bitright/000077500000000000000000000000001262113134600176215ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_bitright/00_exist.pd000066400000000000000000000005121262113134600215770ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X text 67 37 test for existance of [mtx_bitleft]; #X msg 122 122 matrix 1 1 1; #X obj 122 161 mtx_bitright; #X connect 0 0 5 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 5 0 6 0; #X connect 6 0 2 0; pd-iemmatrix-0.3/tests/mtx_bitright/01_function.pd000066400000000000000000000021141262113134600222710ustar00rootroot00000000000000#N canvas 117 373 440 427 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 200 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 156 t l l; #X obj 122 98 t b; #X obj 122 221 mtx_bitright 2; #X obj 236 221 >> 2; #X obj 277 221 >> 2; #X obj 318 220 >> 2; #X obj 359 220 >> 2; #X msg 122 132 2 5 -1.1 4; #X connect 0 0 14 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 16 0; #X connect 7 1 17 0; #X connect 7 2 18 0; #X connect 7 3 19 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 15 0; #X connect 13 0 12 0; #X connect 13 1 7 0; #X connect 14 0 20 0; #X connect 15 0 2 0; #X connect 16 0 8 1; #X connect 17 0 9 1; #X connect 18 0 10 1; #X connect 19 0 11 1; #X connect 20 0 13 0; pd-iemmatrix-0.3/tests/mtx_bitright/02_function.pd000066400000000000000000000025771262113134600223070ustar00rootroot00000000000000#N canvas 176 399 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 166 200 matrix 2 2 \$1 \$2 \$3 \$4; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 252 228 unpack 0 0 0 0; #X obj 122 98 t b b; #X obj 185 156 t l l; #X obj 122 156 t l l; #X obj 122 221 mtx_bitright; #X obj 236 269 >>; #X obj 267 269 >>; #X obj 298 268 >>; #X obj 329 268 >>; #X msg 122 132 1 2 3 4; #X msg 185 133 9 8 7 6; #X connect 0 0 15 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 19 0; #X connect 7 1 20 0; #X connect 7 2 21 0; #X connect 7 3 22 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 18 1; #X connect 13 0 18 0; #X connect 14 0 19 1; #X connect 14 1 20 1; #X connect 14 2 21 1; #X connect 14 3 22 1; #X connect 15 0 23 0; #X connect 15 1 24 0; #X connect 16 0 12 0; #X connect 16 1 14 0; #X connect 17 0 13 0; #X connect 17 1 7 0; #X connect 18 0 2 0; #X connect 19 0 8 1; #X connect 20 0 9 1; #X connect 21 0 10 1; #X connect 22 0 11 1; #X connect 23 0 17 0; #X connect 24 0 16 0; pd-iemmatrix-0.3/tests/mtx_bitright/03_function.pd000066400000000000000000000021111262113134600222700ustar00rootroot00000000000000#N canvas 144 215 431 450 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 256 200 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 156 t l l; #X obj 122 98 t b; #X msg 122 132 3 2 1 0; #X obj 122 221 mtx_bitright 1; #X obj 256 221 >> 1; #X obj 297 221 >> 1; #X obj 338 220 >> 1; #X obj 379 220 >> 1; #X connect 0 0 14 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 17 0; #X connect 7 1 18 0; #X connect 7 2 19 0; #X connect 7 3 20 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 16 0; #X connect 13 0 12 0; #X connect 13 1 7 0; #X connect 14 0 15 0; #X connect 15 0 13 0; #X connect 16 0 2 0; #X connect 17 0 8 1; #X connect 18 0 9 1; #X connect 19 0 10 1; #X connect 20 0 11 1; pd-iemmatrix-0.3/tests/mtx_bitright/04_function.pd000066400000000000000000000024651262113134600223050ustar00rootroot00000000000000#N canvas 190 400 412 429 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 185 190 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 252 228 unpack 0 0 0 0; #X obj 122 98 t b b; #X obj 185 156 t l l; #X obj 122 221 mtx_bitright; #X obj 236 269 >>; #X obj 267 269 >>; #X obj 298 268 >>; #X obj 329 268 >>; #X obj 122 156 t f f; #X obj 236 248 t f f f f; #X msg 122 132 5; #X msg 185 133 1 2 4 8; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 7 0; #X connect 3 1 8 0; #X connect 3 2 9 0; #X connect 3 3 10 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 5 0; #X connect 8 0 5 1; #X connect 9 0 4 0; #X connect 10 0 4 1; #X connect 11 0 15 1; #X connect 12 0 16 1; #X connect 12 1 17 1; #X connect 12 2 18 1; #X connect 12 3 19 1; #X connect 13 0 22 0; #X connect 13 1 23 0; #X connect 14 0 11 0; #X connect 14 1 12 0; #X connect 15 0 2 0; #X connect 16 0 7 1; #X connect 17 0 8 1; #X connect 18 0 9 1; #X connect 19 0 10 1; #X connect 20 0 15 0; #X connect 20 1 21 0; #X connect 21 0 16 0; #X connect 21 1 17 0; #X connect 21 2 18 0; #X connect 21 3 19 0; #X connect 22 0 20 0; #X connect 23 0 14 0; pd-iemmatrix-0.3/tests/mtx_bitright/05_function.pd000066400000000000000000000005671262113134600223070ustar00rootroot00000000000000#N canvas 55 354 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 307 ==; #X obj 122 98 t b; #X obj 122 174 t f f; #X msg 122 132 11; #X obj 122 221 mtx_bitright 7; #X obj 207 221 >> 7; #X connect 0 0 3 0; #X connect 2 0 1 0; #X connect 3 0 5 0; #X connect 4 0 6 0; #X connect 4 1 7 0; #X connect 5 0 4 0; #X connect 6 0 2 0; #X connect 7 0 2 1; pd-iemmatrix-0.3/tests/mtx_bitright/06_function.pd000066400000000000000000000024661262113134600223100ustar00rootroot00000000000000#N canvas 282 295 386 465 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 98 t b b; #X obj 122 156 t l l; #X obj 236 269 >>; #X obj 267 269 >>; #X obj 298 268 >>; #X obj 329 268 >>; #X obj 252 228 t f f f f; #X obj 185 156 t f f; #X obj 122 221 mtx_bitright 0; #X msg 122 132 0 2 3 5; #X msg 185 133 17; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 15 0; #X connect 7 1 16 0; #X connect 7 2 17 0; #X connect 7 3 18 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 21 0; #X connect 13 0 22 0; #X connect 13 1 23 0; #X connect 14 0 12 0; #X connect 14 1 7 0; #X connect 15 0 8 1; #X connect 16 0 9 1; #X connect 17 0 10 1; #X connect 18 0 11 1; #X connect 19 0 15 1; #X connect 19 1 16 1; #X connect 19 2 17 1; #X connect 19 3 18 1; #X connect 20 0 21 1; #X connect 20 1 19 0; #X connect 21 0 2 0; #X connect 22 0 14 0; #X connect 23 0 20 0; pd-iemmatrix-0.3/tests/mtx_bitright/07_function.pd000066400000000000000000000007551262113134600223100ustar00rootroot00000000000000#N canvas 270 180 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 213 71 bang; #X obj 122 98 t b b; #X obj 122 175 t f f; #X obj 122 307 ==; #X obj 122 251 mtx_bitright 0; #X obj 239 251 >>; #X msg 122 132 6; #X msg 152 131 9; #X connect 0 0 3 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 4 0 6 0; #X connect 4 1 7 0; #X connect 5 0 1 0; #X connect 6 0 5 0; #X connect 7 0 5 1; #X connect 8 0 4 0; #X connect 9 0 6 1; #X connect 9 0 7 1; pd-iemmatrix-0.3/tests/mtx_bitright/08_function.pd000066400000000000000000000024671262113134600223130ustar00rootroot00000000000000#N canvas 277 252 796 483 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 98 t b b; #X obj 122 156 t l l; #X obj 236 269 >>; #X obj 267 269 >>; #X obj 298 268 >>; #X obj 329 268 >>; #X obj 252 228 t f f f f; #X obj 185 156 t f f; #X obj 122 221 mtx_bitright 0; #X msg 122 132 4 3 7 6; #X msg 185 133 3.6; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 15 0; #X connect 7 1 16 0; #X connect 7 2 17 0; #X connect 7 3 18 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 21 0; #X connect 13 0 22 0; #X connect 13 1 23 0; #X connect 14 0 12 0; #X connect 14 1 7 0; #X connect 15 0 8 1; #X connect 16 0 9 1; #X connect 17 0 10 1; #X connect 18 0 11 1; #X connect 19 0 15 1; #X connect 19 1 16 1; #X connect 19 2 17 1; #X connect 19 3 18 1; #X connect 20 0 21 1; #X connect 20 1 19 0; #X connect 21 0 2 0; #X connect 22 0 14 0; #X connect 23 0 20 0; pd-iemmatrix-0.3/tests/mtx_bitright/09_function.pd000066400000000000000000000025631262113134600223110ustar00rootroot00000000000000#N canvas 311 295 379 440 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 98 t b b; #X obj 185 156 t l l; #X obj 122 156 t l l; #X obj 122 221 mtx_bitright; #X obj 236 269 >>; #X obj 267 269 >>; #X obj 298 268 >>; #X obj 329 268 >>; #X msg 186 200 matrix 1 2 \$1 \$2; #X obj 252 228 unpack 0 0; #X msg 122 132 10 9 -1 3; #X msg 185 133 7 4.3; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 17 0; #X connect 7 1 18 0; #X connect 7 2 19 0; #X connect 7 3 20 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 16 0; #X connect 13 0 23 0; #X connect 13 1 24 0; #X connect 14 0 21 0; #X connect 14 1 22 0; #X connect 15 0 12 0; #X connect 15 1 7 0; #X connect 16 0 2 0; #X connect 17 0 8 1; #X connect 18 0 9 1; #X connect 19 0 10 1; #X connect 20 0 11 1; #X connect 21 0 16 1; #X connect 22 0 17 1; #X connect 22 0 19 1; #X connect 22 1 18 1; #X connect 22 1 20 1; #X connect 23 0 15 0; #X connect 24 0 14 0; pd-iemmatrix-0.3/tests/mtx_bitright/10_function.pd000066400000000000000000000025571262113134600223040ustar00rootroot00000000000000#N canvas 182 266 409 472 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 98 t b b; #X obj 185 156 t l l; #X obj 122 156 t l l; #X obj 122 221 mtx_bitright; #X obj 236 269 >>; #X obj 267 269 >>; #X obj 298 268 >>; #X obj 329 268 >>; #X msg 166 200 matrix 2 1 \$1 \$2; #X obj 252 226 unpack 0 0; #X msg 185 133 5 3; #X msg 122 132 4 2 9 8; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 17 0; #X connect 7 1 18 0; #X connect 7 2 19 0; #X connect 7 3 20 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 16 0; #X connect 13 0 24 0; #X connect 13 1 23 0; #X connect 14 0 21 0; #X connect 14 1 22 0; #X connect 15 0 12 0; #X connect 15 1 7 0; #X connect 16 0 2 0; #X connect 17 0 8 1; #X connect 18 0 9 1; #X connect 19 0 10 1; #X connect 20 0 11 1; #X connect 21 0 16 1; #X connect 22 0 17 1; #X connect 22 0 18 1; #X connect 22 1 19 1; #X connect 22 1 20 1; #X connect 23 0 14 0; #X connect 24 0 15 0; pd-iemmatrix-0.3/tests/mtx_check/000077500000000000000000000000001262113134600170625ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_check/00_exist.pd000066400000000000000000000005051262113134600210420ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X obj 122 161 mtx_check; #X text 67 37 test for existance of [mtx_check]; #X msg 122 122 matrix 1 1 1; #X connect 0 0 6 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 2 0; #X connect 6 0 4 0; pd-iemmatrix-0.3/tests/mtx_check/01_function.pd000066400000000000000000000022561262113134600215410ustar00rootroot00000000000000#N canvas 117 373 642 474 10; #X obj 122 68 inlet bang; #X obj 122 405 outlet 1==OK; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X obj 122 156 t l l; #X obj 122 98 t b; #X msg 122 132 2 2 1 2 -3 0; #X msg 122 179 matrix \$1 \$2 \$3 \$4 \$5 \$6; #X obj 236 200 unpack 0 0 0 0 0 0; #X obj 122 221 mtx_check; #X msg 122 243 \$1 \$2 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0 0 0; #X obj 244 330 *; #X obj 244 307 ==; #X obj 275 307 ==; #X obj 122 380 *; #X connect 0 0 10 0; #X connect 2 0 4 1; #X connect 3 0 4 0; #X connect 4 0 20 0; #X connect 5 0 3 0; #X connect 6 0 3 1; #X connect 7 0 2 0; #X connect 8 0 2 1; #X connect 9 0 12 0; #X connect 9 1 13 0; #X connect 10 0 11 0; #X connect 11 0 9 0; #X connect 12 0 14 0; #X connect 13 0 5 1; #X connect 13 1 6 1; #X connect 13 2 7 1; #X connect 13 3 8 1; #X connect 13 4 18 1; #X connect 13 5 19 1; #X connect 14 0 15 0; #X connect 15 0 16 0; #X connect 16 0 5 0; #X connect 16 1 6 0; #X connect 16 2 7 0; #X connect 16 3 8 0; #X connect 16 4 18 0; #X connect 16 5 19 0; #X connect 17 0 20 1; #X connect 18 0 17 0; #X connect 19 0 17 1; #X connect 20 0 1 0; pd-iemmatrix-0.3/tests/mtx_check/02_function.pd000066400000000000000000000026101262113134600215340ustar00rootroot00000000000000#N canvas 117 373 642 474 10; #X obj 122 68 inlet bang; #X obj 122 405 outlet 1==OK; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X obj 122 156 t l l; #X obj 122 98 t b; #X msg 122 179 matrix \$1 \$2 \$3 \$4 \$5 \$6; #X obj 236 200 unpack 0 0 0 0 0 0; #X obj 122 221 mtx_check; #X obj 244 330 *; #X obj 244 307 ==; #X obj 275 307 ==; #X obj 122 380 *; #X msg 122 132 3 2 1 2 -3 0; #X msg 122 243 \$1 \$2 \$3 \$4 \$5 \$6 \$7 \$8; #X obj 122 268 unpack 0 0 0 0 0 0 0 0; #X obj 304 330 *; #X obj 304 307 ==; #X obj 335 307 ==; #X obj 244 354 *; #X connect 0 0 10 0; #X connect 2 0 4 1; #X connect 3 0 4 0; #X connect 4 0 17 0; #X connect 5 0 3 0; #X connect 6 0 3 1; #X connect 7 0 2 0; #X connect 8 0 2 1; #X connect 9 0 11 0; #X connect 9 1 12 0; #X connect 10 0 18 0; #X connect 11 0 13 0; #X connect 12 0 5 1; #X connect 12 1 6 1; #X connect 12 2 7 1; #X connect 12 3 8 1; #X connect 12 4 15 1; #X connect 12 5 16 1; #X connect 13 0 19 0; #X connect 14 0 24 0; #X connect 15 0 14 0; #X connect 16 0 14 1; #X connect 17 0 1 0; #X connect 18 0 9 0; #X connect 19 0 20 0; #X connect 20 0 5 0; #X connect 20 1 6 0; #X connect 20 2 7 0; #X connect 20 3 8 0; #X connect 20 4 15 0; #X connect 20 5 16 0; #X connect 20 6 22 0; #X connect 20 7 23 0; #X connect 21 0 24 1; #X connect 22 0 21 0; #X connect 23 0 21 1; #X connect 24 0 17 1; pd-iemmatrix-0.3/tests/mtx_check/03_function.pd000066400000000000000000000026101262113134600215350ustar00rootroot00000000000000#N canvas 117 373 642 474 10; #X obj 122 68 inlet bang; #X obj 122 405 outlet 1==OK; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X obj 122 156 t l l; #X obj 122 98 t b; #X msg 122 179 matrix \$1 \$2 \$3 \$4 \$5 \$6; #X obj 236 200 unpack 0 0 0 0 0 0; #X obj 122 221 mtx_check; #X obj 244 330 *; #X obj 244 307 ==; #X obj 275 307 ==; #X obj 122 380 *; #X msg 122 243 \$1 \$2 \$3 \$4 \$5 \$6 \$7 \$8; #X obj 122 268 unpack 0 0 0 0 0 0 0 0; #X obj 304 330 *; #X obj 304 307 ==; #X obj 335 307 ==; #X obj 244 354 *; #X msg 122 132 2 3 1 2 -3 0; #X connect 0 0 10 0; #X connect 2 0 4 1; #X connect 3 0 4 0; #X connect 4 0 17 0; #X connect 5 0 3 0; #X connect 6 0 3 1; #X connect 7 0 2 0; #X connect 8 0 2 1; #X connect 9 0 11 0; #X connect 9 1 12 0; #X connect 10 0 24 0; #X connect 11 0 13 0; #X connect 12 0 5 1; #X connect 12 1 6 1; #X connect 12 2 7 1; #X connect 12 3 8 1; #X connect 12 4 15 1; #X connect 12 5 16 1; #X connect 13 0 18 0; #X connect 14 0 23 0; #X connect 15 0 14 0; #X connect 16 0 14 1; #X connect 17 0 1 0; #X connect 18 0 19 0; #X connect 19 0 5 0; #X connect 19 1 6 0; #X connect 19 2 7 0; #X connect 19 3 8 0; #X connect 19 4 15 0; #X connect 19 5 16 0; #X connect 19 6 21 0; #X connect 19 7 22 0; #X connect 20 0 23 1; #X connect 21 0 20 0; #X connect 22 0 20 1; #X connect 23 0 17 1; #X connect 24 0 9 0; pd-iemmatrix-0.3/tests/mtx_cholesky/000077500000000000000000000000001262113134600176265ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_cholesky/00_exist.pd000066400000000000000000000005131262113134600216050ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X obj 122 161 mtx_cholesky; #X text 67 37 test for existance of [mtx_cholesky]; #X msg 122 122 matrix 1 1 1; #X connect 0 0 6 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 2 0; #X connect 6 0 4 0; pd-iemmatrix-0.3/tests/mtx_col/000077500000000000000000000000001262113134600165625ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_col/00_exist.pd000066400000000000000000000005011262113134600205360ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X obj 122 161 mtx_col; #X text 67 37 test for existance of [mtx_col]; #X msg 122 122 matrix 1 1 1; #X connect 0 0 6 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 2 0; #X connect 6 0 4 0; pd-iemmatrix-0.3/tests/mtx_colon/000077500000000000000000000000001262113134600171175ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_colon/00_exist.pd000066400000000000000000000004741262113134600211040ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X obj 122 161 mtx_colon; #X text 67 37 test for existance of [mtx_colon]; #X msg 122 119 1 1; #X connect 0 0 6 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 2 0; #X connect 6 0 4 0; pd-iemmatrix-0.3/tests/mtx_colon/00_exist1.pd000066400000000000000000000004641262113134600211640ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X obj 122 161 mtx_:; #X text 67 37 test for existance of [mtx_:]; #X msg 122 119 1 1; #X connect 0 0 6 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 2 0; #X connect 6 0 4 0; pd-iemmatrix-0.3/tests/mtx_concat/000077500000000000000000000000001262113134600172545ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_concat/00_exist.pd000066400000000000000000000004261262113134600212360ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X obj 122 161 mtx_concat; #X text 67 37 test for existance of [mtx_concat]; #X connect 0 0 4 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 2 0; pd-iemmatrix-0.3/tests/mtx_conv/000077500000000000000000000000001262113134600167525ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_conv/00_exist.pd000066400000000000000000000006011262113134600207270ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X obj 122 161 mtx_conv; #X text 67 37 test for existance of [mtx_conv]; #X obj 122 136 t a a; #X msg 122 116 matrix 1 1 1; #X connect 0 0 7 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 2 0; #X connect 6 0 4 0; #X connect 6 1 4 1; #X connect 7 0 6 0; pd-iemmatrix-0.3/tests/mtx_cos/000077500000000000000000000000001262113134600165715ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_cos/00_exist.pd000066400000000000000000000005011262113134600205450ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X obj 122 161 mtx_cos; #X text 67 37 test for existance of [mtx_cos]; #X msg 122 122 matrix 1 1 1; #X connect 0 0 6 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 2 0; #X connect 6 0 4 0; pd-iemmatrix-0.3/tests/mtx_cos/01_function.pd000066400000000000000000000007141262113134600212450ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 211 mtx_cos; #X msg 122 233 \$3; #X obj 122 101 t b; #X obj 122 151 t f f; #X msg 122 190 matrix 1 1 \$1; #X obj 165 232 cos; #X obj 122 265 ==; #X msg 122 127 -2; #X connect 0 0 4 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 4 0 9 0; #X connect 5 0 6 0; #X connect 5 1 7 0; #X connect 6 0 2 0; #X connect 7 0 8 1; #X connect 8 0 1 0; #X connect 9 0 5 0; pd-iemmatrix-0.3/tests/mtx_cos/02_function.pd000066400000000000000000000021731262113134600212470ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 191 mtx_cos; #X text 67 37 test for existance of [mtx_cos]; #X msg 122 170 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 89 t b; #X msg 122 110 3 -1 -10.5 0; #X obj 122 135 t l l; #X msg 122 213 \$3 \$4 \$5 \$6; #X obj 122 238 unpack 0 0 0 0; #X obj 184 300 *; #X obj 122 300 *; #X obj 122 326 *; #X obj 236 218 unpack 0 0 0 0; #X obj 122 277 ==; #X obj 153 277 ==; #X obj 184 277 ==; #X obj 215 277 ==; #X obj 236 239 cos; #X obj 267 239 cos; #X obj 298 238 cos; #X obj 329 238 cos; #X connect 0 0 5 0; #X connect 2 0 8 0; #X connect 4 0 2 0; #X connect 5 0 6 0; #X connect 6 0 7 0; #X connect 7 0 4 0; #X connect 7 1 13 0; #X connect 8 0 9 0; #X connect 9 0 14 0; #X connect 9 1 15 0; #X connect 9 2 16 0; #X connect 9 3 17 0; #X connect 10 0 12 1; #X connect 11 0 12 0; #X connect 12 0 1 0; #X connect 13 0 18 0; #X connect 13 1 19 0; #X connect 13 2 20 0; #X connect 13 3 21 0; #X connect 14 0 11 0; #X connect 15 0 11 1; #X connect 16 0 10 0; #X connect 17 0 10 1; #X connect 18 0 14 1; #X connect 19 0 15 1; #X connect 20 0 16 1; #X connect 21 0 17 1; pd-iemmatrix-0.3/tests/mtx_cos/03_function.pd000066400000000000000000000027471262113134600212570ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 191 mtx_cos; #X text 67 37 test for existance of [mtx_cos]; #X obj 122 89 t b; #X obj 122 135 t l l; #X obj 184 300 *; #X obj 122 300 *; #X obj 122 326 *; #X obj 122 277 ==; #X obj 153 277 ==; #X obj 184 277 ==; #X obj 215 277 ==; #X obj 266 239 cos; #X obj 297 239 cos; #X obj 328 238 cos; #X obj 359 238 cos; #X msg 122 170 matrix 2 3 \$1 \$2 \$3 \$4 \$5 \$6; #X obj 254 300 *; #X obj 254 277 ==; #X obj 285 277 ==; #X obj 122 238 unpack 0 0 0 0 0 0; #X msg 122 213 \$3 \$4 \$5 \$6 \$7 \$8; #X obj 388 238 cos; #X obj 419 238 cos; #X obj 266 218 unpack 0 0 0 0 0 0; #X obj 122 347 *; #X msg 122 110 3 -1 10.5 0.05 0 12; #X connect 0 0 4 0; #X connect 2 0 22 0; #X connect 4 0 27 0; #X connect 5 0 17 0; #X connect 5 1 25 0; #X connect 6 0 8 1; #X connect 7 0 8 0; #X connect 8 0 26 0; #X connect 9 0 7 0; #X connect 10 0 7 1; #X connect 11 0 6 0; #X connect 12 0 6 1; #X connect 13 0 9 1; #X connect 14 0 10 1; #X connect 15 0 11 1; #X connect 16 0 12 1; #X connect 17 0 2 0; #X connect 18 0 26 1; #X connect 19 0 18 0; #X connect 20 0 18 1; #X connect 21 0 9 0; #X connect 21 1 10 0; #X connect 21 2 11 0; #X connect 21 3 12 0; #X connect 21 4 19 0; #X connect 21 5 20 0; #X connect 22 0 21 0; #X connect 23 0 19 1; #X connect 24 0 20 1; #X connect 25 0 13 0; #X connect 25 1 14 0; #X connect 25 2 15 0; #X connect 25 3 16 0; #X connect 25 4 23 0; #X connect 25 5 24 0; #X connect 26 0 1 0; #X connect 27 0 5 0; pd-iemmatrix-0.3/tests/mtx_cumsum/000077500000000000000000000000001262113134600173165ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_cumsum/00_exist.pd000066400000000000000000000005071262113134600213000ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X obj 122 161 mtx_cumsum; #X text 67 37 test for existance of [mtx_cumsum]; #X msg 122 122 matrix 1 1 1; #X connect 0 0 6 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 2 0; #X connect 6 0 4 0; pd-iemmatrix-0.3/tests/mtx_dbtorms/000077500000000000000000000000001262113134600174575ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_dbtorms/00_exist.pd000066400000000000000000000005111262113134600214340ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X obj 122 161 mtx_dbtorms; #X text 67 37 test for existance of [mtx_dbtorms]; #X msg 122 122 matrix 1 1 1; #X connect 0 0 6 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 2 0; #X connect 6 0 4 0; pd-iemmatrix-0.3/tests/mtx_dbtorms/01_function.pd000066400000000000000000000007241262113134600221340ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 211 mtx_dbtorms; #X msg 122 233 \$3; #X obj 122 101 t b; #X obj 122 151 t f f; #X msg 122 190 matrix 1 1 \$1; #X obj 165 232 dbtorms; #X obj 122 265 ==; #X msg 122 127 -2; #X connect 0 0 4 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 4 0 9 0; #X connect 5 0 6 0; #X connect 5 1 7 0; #X connect 6 0 2 0; #X connect 7 0 8 1; #X connect 8 0 1 0; #X connect 9 0 5 0; pd-iemmatrix-0.3/tests/mtx_dbtorms/02_function.pd000066400000000000000000000022231262113134600221310ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 191 mtx_dbtorms; #X text 67 37 test for existance of [mtx_dbtorms]; #X msg 122 170 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 89 t b; #X msg 122 110 3 -1 -10.5 0; #X obj 122 135 t l l; #X msg 122 213 \$3 \$4 \$5 \$6; #X obj 122 238 unpack 0 0 0 0; #X obj 184 300 *; #X obj 122 300 *; #X obj 122 326 *; #X obj 236 218 unpack 0 0 0 0; #X obj 122 277 ==; #X obj 153 277 ==; #X obj 184 277 ==; #X obj 215 277 ==; #X obj 236 239 dbtorms; #X obj 267 239 dbtorms; #X obj 298 238 dbtorms; #X obj 329 238 dbtorms; #X connect 0 0 5 0; #X connect 2 0 8 0; #X connect 4 0 2 0; #X connect 5 0 6 0; #X connect 6 0 7 0; #X connect 7 0 4 0; #X connect 7 1 13 0; #X connect 8 0 9 0; #X connect 9 0 14 0; #X connect 9 1 15 0; #X connect 9 2 16 0; #X connect 9 3 17 0; #X connect 10 0 12 1; #X connect 11 0 12 0; #X connect 12 0 1 0; #X connect 13 0 18 0; #X connect 13 1 19 0; #X connect 13 2 20 0; #X connect 13 3 21 0; #X connect 14 0 11 0; #X connect 15 0 11 1; #X connect 16 0 10 0; #X connect 17 0 10 1; #X connect 18 0 14 1; #X connect 19 0 15 1; #X connect 20 0 16 1; #X connect 21 0 17 1; pd-iemmatrix-0.3/tests/mtx_dbtorms/03_function.pd000066400000000000000000000030071262113134600221330ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 191 mtx_dbtorms; #X text 67 37 test for existance of [mtx_dbtorms]; #X obj 122 89 t b; #X obj 122 135 t l l; #X obj 184 300 *; #X obj 122 300 *; #X obj 122 326 *; #X obj 122 277 ==; #X obj 153 277 ==; #X obj 184 277 ==; #X obj 215 277 ==; #X obj 266 239 dbtorms; #X obj 297 239 dbtorms; #X obj 328 238 dbtorms; #X obj 359 238 dbtorms; #X msg 122 170 matrix 2 3 \$1 \$2 \$3 \$4 \$5 \$6; #X obj 254 300 *; #X obj 254 277 ==; #X obj 285 277 ==; #X obj 122 238 unpack 0 0 0 0 0 0; #X msg 122 213 \$3 \$4 \$5 \$6 \$7 \$8; #X obj 388 238 dbtorms; #X obj 419 238 dbtorms; #X obj 266 218 unpack 0 0 0 0 0 0; #X obj 122 347 *; #X msg 122 110 3 -1 10.5 0.05 0 12; #X connect 0 0 4 0; #X connect 2 0 22 0; #X connect 4 0 27 0; #X connect 5 0 17 0; #X connect 5 1 25 0; #X connect 6 0 8 1; #X connect 7 0 8 0; #X connect 8 0 26 0; #X connect 9 0 7 0; #X connect 10 0 7 1; #X connect 11 0 6 0; #X connect 12 0 6 1; #X connect 13 0 9 1; #X connect 14 0 10 1; #X connect 15 0 11 1; #X connect 16 0 12 1; #X connect 17 0 2 0; #X connect 18 0 26 1; #X connect 19 0 18 0; #X connect 20 0 18 1; #X connect 21 0 9 0; #X connect 21 1 10 0; #X connect 21 2 11 0; #X connect 21 3 12 0; #X connect 21 4 19 0; #X connect 21 5 20 0; #X connect 22 0 21 0; #X connect 23 0 19 1; #X connect 24 0 20 1; #X connect 25 0 13 0; #X connect 25 1 14 0; #X connect 25 2 15 0; #X connect 25 3 16 0; #X connect 25 4 23 0; #X connect 25 5 24 0; #X connect 26 0 1 0; #X connect 27 0 5 0; pd-iemmatrix-0.3/tests/mtx_decay/000077500000000000000000000000001262113134600170725ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_decay/00_exist.pd000066400000000000000000000005051262113134600210520ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X obj 122 161 mtx_decay; #X text 67 37 test for existance of [mtx_decay]; #X msg 122 122 matrix 1 1 1; #X connect 0 0 6 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 2 0; #X connect 6 0 4 0; pd-iemmatrix-0.3/tests/mtx_diag/000077500000000000000000000000001262113134600167115ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_diag/00_exist.pd000066400000000000000000000004241262113134600206710ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X text 67 37 test for existance of [mtx_diag]; #X obj 122 161 mtx_diag 1; #X connect 0 0 5 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 5 0 2 0; pd-iemmatrix-0.3/tests/mtx_diegg/000077500000000000000000000000001262113134600170645ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_diegg/00_exist.pd000066400000000000000000000005051262113134600210440ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X obj 122 161 mtx_diegg; #X text 67 37 test for existance of [mtx_diegg]; #X msg 122 122 matrix 1 1 1; #X connect 0 0 6 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 2 0; #X connect 6 0 4 0; pd-iemmatrix-0.3/tests/mtx_diegg/01_init.pd000066400000000000000000000012711262113134600206550ustar00rootroot00000000000000#N canvas 192 359 450 432 10; #X msg 69 90 bang; #X obj 69 187 unpack 0 0 0 0 0 0; #X obj 141 212 == 1; #X obj 117 235 == 0; #X obj 117 257 *; #X obj 165 257 *; #X obj 117 280 *; #X obj 69 166 route matrix; #X obj 165 234 == 2; #X obj 190 212 == 0; #X obj 69 145 mtx_diegg 1 2; #X obj 69 65 inlet bang; #X obj 117 305 outlet; #X text 265 139 0 1; #X text 265 154 2 0; #X text 200 145 1 2 -->; #X connect 0 0 10 0; #X connect 1 2 3 0; #X connect 1 3 2 0; #X connect 1 4 8 0; #X connect 1 5 9 0; #X connect 2 0 4 1; #X connect 3 0 4 0; #X connect 4 0 6 0; #X connect 5 0 6 1; #X connect 6 0 12 0; #X connect 7 0 1 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 7 0; #X connect 11 0 0 0; pd-iemmatrix-0.3/tests/mtx_diegg/02_getdiegg.pd000066400000000000000000000007001262113134600214660ustar00rootroot00000000000000#N canvas 446 389 450 432 10; #X obj 87 257 *; #X obj 69 65 inlet bang; #X obj 87 305 outlet; #X obj 69 125 mtx_diegg; #X msg 69 90 matrix 2 2 0 1 2 0; #X obj 69 187 unpack 0 0; #X text 265 139 0 1; #X text 265 154 2 0; #X text 297 145 --> 1 2; #X obj 87 235 == 1; #X obj 111 212 == 2; #X connect 0 0 2 0; #X connect 1 0 4 0; #X connect 3 0 5 0; #X connect 4 0 3 0; #X connect 5 0 9 0; #X connect 5 1 10 0; #X connect 9 0 0 0; #X connect 10 0 0 1; pd-iemmatrix-0.3/tests/mtx_diegg/02_init.pd000066400000000000000000000013331262113134600206550ustar00rootroot00000000000000#N canvas 0 0 450 432 10; #X msg 69 90 bang; #X obj 69 187 unpack 0 0 0 0 0 0; #X obj 141 212 == 1; #X obj 117 235 == 0; #X obj 117 257 *; #X obj 165 257 *; #X obj 117 280 *; #X obj 165 234 == 2; #X obj 190 212 == 0; #X obj 69 65 inlet bang; #X obj 117 305 outlet; #X obj 69 145 mtx_diegg; #X msg 69 126 1 2; #X obj 69 166 route matrix; #X text 265 139 0 1; #X text 265 154 2 0; #X text 200 145 1 2 -->; #X connect 0 0 12 0; #X connect 1 2 3 0; #X connect 1 3 2 0; #X connect 1 4 7 0; #X connect 1 5 8 0; #X connect 2 0 4 1; #X connect 3 0 4 0; #X connect 4 0 6 0; #X connect 5 0 6 1; #X connect 6 0 10 0; #X connect 7 0 5 0; #X connect 8 0 5 1; #X connect 9 0 0 0; #X connect 11 0 13 0; #X connect 12 0 11 0; #X connect 13 0 1 0; pd-iemmatrix-0.3/tests/mtx_diff/000077500000000000000000000000001262113134600167155ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_diff/00_exist.pd000066400000000000000000000005031262113134600206730ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X obj 122 161 mtx_diff; #X text 67 37 test for existance of [mtx_diff]; #X msg 122 122 matrix 1 1 1; #X connect 0 0 6 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 2 0; #X connect 6 0 4 0; pd-iemmatrix-0.3/tests/mtx_distance2/000077500000000000000000000000001262113134600176615ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_distance2/00_exist.pd000066400000000000000000000005151262113134600216420ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X obj 122 161 mtx_distance2; #X text 67 37 test for existance of [mtx_distance2]; #X msg 122 122 matrix 1 1 1; #X connect 0 0 6 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 2 0; #X connect 6 0 4 0; pd-iemmatrix-0.3/tests/mtx_egg/000077500000000000000000000000001262113134600165475ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_egg/00_exist.pd000066400000000000000000000005011262113134600205230ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X obj 122 161 mtx_egg; #X text 67 37 test for existance of [mtx_egg]; #X msg 122 122 matrix 1 1 1; #X connect 0 0 6 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 2 0; #X connect 6 0 4 0; pd-iemmatrix-0.3/tests/mtx_egg/01_function.pd000066400000000000000000000011761262113134600212260ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 214 \$3 \$4 \$5 \$6; #X obj 122 161 mtx_egg 2; #X obj 122 238 unpack 0 0 0 0; #X obj 122 262 == 0; #X obj 242 262 == 0; #X obj 122 282 *; #X obj 122 302 *; #X obj 202 282 *; #X obj 122 104 t b; #X obj 162 262 == 1; #X obj 202 262 == 1; #X connect 0 0 10 0; #X connect 2 0 4 0; #X connect 3 0 2 0; #X connect 4 0 5 0; #X connect 4 1 11 0; #X connect 4 2 12 0; #X connect 4 3 6 0; #X connect 5 0 7 0; #X connect 6 0 9 1; #X connect 7 0 8 0; #X connect 8 0 1 0; #X connect 9 0 8 1; #X connect 10 0 3 0; #X connect 11 0 7 1; #X connect 12 0 9 0; pd-iemmatrix-0.3/tests/mtx_egg/02_function.pd000066400000000000000000000015411262113134600212230ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 262 == 0; #X obj 162 262 == 0; #X obj 242 262 == 0; #X obj 122 282 *; #X obj 122 302 *; #X obj 202 282 *; #X obj 122 104 t b; #X obj 122 161 mtx_egg 2 3; #X msg 122 214 \$3 \$4 \$5 \$6 \$7 \$8; #X obj 122 238 unpack 0 0 0 0 0 0; #X obj 322 262 == 0; #X obj 282 282 *; #X obj 122 324 *; #X obj 202 262 == 1; #X obj 282 262 == 1; #X connect 0 0 8 0; #X connect 2 0 5 0; #X connect 3 0 5 1; #X connect 4 0 7 1; #X connect 5 0 6 0; #X connect 6 0 14 0; #X connect 7 0 6 1; #X connect 8 0 9 0; #X connect 9 0 10 0; #X connect 10 0 11 0; #X connect 11 0 2 0; #X connect 11 1 3 0; #X connect 11 2 15 0; #X connect 11 3 4 0; #X connect 11 4 16 0; #X connect 11 5 12 0; #X connect 12 0 13 1; #X connect 13 0 14 1; #X connect 14 0 1 0; #X connect 15 0 7 0; #X connect 16 0 13 0; pd-iemmatrix-0.3/tests/mtx_egg/03_function.pd000066400000000000000000000012541262113134600212250ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 262 == 0; #X obj 242 262 == 0; #X obj 122 282 *; #X obj 122 302 *; #X obj 202 282 *; #X obj 122 104 t b; #X obj 122 238 unpack 0 0 0 0 0 0; #X obj 122 161 mtx_egg 7 8; #X msg 122 214 \$3 \$4 \$5 \$6; #X msg 122 135 2; #X obj 162 262 == 1; #X obj 202 262 == 1; #X connect 0 0 7 0; #X connect 2 0 4 0; #X connect 3 0 6 1; #X connect 4 0 5 0; #X connect 5 0 1 0; #X connect 6 0 5 1; #X connect 7 0 11 0; #X connect 8 0 2 0; #X connect 8 1 12 0; #X connect 8 2 13 0; #X connect 8 3 3 0; #X connect 9 0 10 0; #X connect 10 0 8 0; #X connect 11 0 9 0; #X connect 12 0 4 1; #X connect 13 0 6 0; pd-iemmatrix-0.3/tests/mtx_egg/04_function.pd000066400000000000000000000016021262113134600212230ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 262 == 0; #X obj 242 262 == 0; #X obj 122 282 *; #X obj 122 302 *; #X obj 202 282 *; #X obj 122 104 t b; #X msg 122 214 \$3 \$4 \$5 \$6 \$7 \$8; #X obj 122 238 unpack 0 0 0 0 0 0; #X obj 282 262 == 0; #X obj 322 262 == 0; #X obj 282 282 *; #X obj 122 324 *; #X msg 122 135 3 2; #X obj 122 161 mtx_egg; #X obj 162 262 == 1; #X obj 202 262 == 1; #X connect 0 0 7 0; #X connect 2 0 4 0; #X connect 3 0 6 1; #X connect 4 0 5 0; #X connect 5 0 13 0; #X connect 6 0 5 1; #X connect 7 0 14 0; #X connect 8 0 9 0; #X connect 9 0 2 0; #X connect 9 1 16 0; #X connect 9 2 17 0; #X connect 9 3 3 0; #X connect 9 4 10 0; #X connect 9 5 11 0; #X connect 10 0 12 0; #X connect 11 0 12 1; #X connect 12 0 13 1; #X connect 13 0 1 0; #X connect 14 0 15 0; #X connect 15 0 8 0; #X connect 16 0 4 1; #X connect 17 0 6 0; pd-iemmatrix-0.3/tests/mtx_egg/05_function.pd000066400000000000000000000011151262113134600212230ustar00rootroot00000000000000#N canvas 541 351 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 282 *; #X obj 122 104 t b; #X obj 122 191 mtx_egg 7 8; #X msg 122 135 10 14; #X msg 122 214 \$1 \$2; #X obj 122 157 t l l; #X obj 122 262 ==; #X obj 162 262 ==; #X obj 179 215 unpack; #X obj 122 236 unpack; #X connect 0 0 3 0; #X connect 2 0 1 0; #X connect 3 0 5 0; #X connect 4 0 6 0; #X connect 5 0 7 0; #X connect 6 0 11 0; #X connect 7 0 4 0; #X connect 7 1 10 0; #X connect 8 0 2 0; #X connect 9 0 2 1; #X connect 10 0 8 1; #X connect 10 1 9 1; #X connect 11 0 8 0; #X connect 11 1 9 0; pd-iemmatrix-0.3/tests/mtx_egg/06_function.pd000066400000000000000000000011111262113134600212200ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 104 t b; #X obj 122 282 *; #X obj 122 191 mtx_egg 7 8; #X msg 122 214 \$1 \$2; #X obj 122 262 ==; #X obj 162 262 ==; #X obj 122 236 unpack; #X msg 122 135 32; #X obj 122 157 t f f; #X obj 179 215 t f f; #X connect 0 0 2 0; #X connect 2 0 9 0; #X connect 3 0 1 0; #X connect 4 0 5 0; #X connect 5 0 8 0; #X connect 6 0 3 0; #X connect 7 0 3 1; #X connect 8 0 6 0; #X connect 8 1 7 0; #X connect 9 0 10 0; #X connect 10 0 4 0; #X connect 10 1 11 0; #X connect 11 0 6 1; #X connect 11 1 7 1; pd-iemmatrix-0.3/tests/mtx_element/000077500000000000000000000000001262113134600174365ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_element/00_exist.pd000066400000000000000000000005111262113134600214130ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 69 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X obj 122 161 mtx_element; #X text 67 37 test for existance of [mtx_element]; #X msg 122 122 matrix 1 1 1; #X connect 0 0 6 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 2 0; #X connect 6 0 4 0; pd-iemmatrix-0.3/tests/mtx_eq/000077500000000000000000000000001262113134600164125ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_eq/00_exist.pd000066400000000000000000000004771262113134600204020ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X text 67 37 test for existance of [mtx_eq]; #X msg 122 122 matrix 1 1 1; #X obj 122 161 mtx_eq; #X connect 0 0 5 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 5 0 6 0; #X connect 6 0 2 0; pd-iemmatrix-0.3/tests/mtx_eq/01_function.pd000066400000000000000000000021061262113134600210630ustar00rootroot00000000000000#N canvas 117 373 440 427 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 200 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 156 t l l; #X obj 122 98 t b; #X obj 122 221 mtx_eq 2; #X obj 236 221 == 2; #X obj 277 221 == 2; #X obj 318 220 == 2; #X obj 359 220 == 2; #X msg 122 132 2 5 -1.1 4; #X connect 0 0 14 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 16 0; #X connect 7 1 17 0; #X connect 7 2 18 0; #X connect 7 3 19 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 15 0; #X connect 13 0 12 0; #X connect 13 1 7 0; #X connect 14 0 20 0; #X connect 15 0 2 0; #X connect 16 0 8 1; #X connect 17 0 9 1; #X connect 18 0 10 1; #X connect 19 0 11 1; #X connect 20 0 13 0; pd-iemmatrix-0.3/tests/mtx_eq/02_function.pd000066400000000000000000000025711262113134600210720ustar00rootroot00000000000000#N canvas 176 399 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 166 200 matrix 2 2 \$1 \$2 \$3 \$4; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 252 228 unpack 0 0 0 0; #X obj 122 98 t b b; #X obj 185 156 t l l; #X obj 122 156 t l l; #X obj 122 221 mtx_eq; #X obj 236 269 ==; #X obj 267 269 ==; #X obj 298 268 ==; #X obj 329 268 ==; #X msg 122 132 1 2 3 4; #X msg 185 133 9 8 7 6; #X connect 0 0 15 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 19 0; #X connect 7 1 20 0; #X connect 7 2 21 0; #X connect 7 3 22 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 18 1; #X connect 13 0 18 0; #X connect 14 0 19 1; #X connect 14 1 20 1; #X connect 14 2 21 1; #X connect 14 3 22 1; #X connect 15 0 23 0; #X connect 15 1 24 0; #X connect 16 0 12 0; #X connect 16 1 14 0; #X connect 17 0 13 0; #X connect 17 1 7 0; #X connect 18 0 2 0; #X connect 19 0 8 1; #X connect 20 0 9 1; #X connect 21 0 10 1; #X connect 22 0 11 1; #X connect 23 0 17 0; #X connect 24 0 16 0; pd-iemmatrix-0.3/tests/mtx_eq/03_function.pd000066400000000000000000000021031262113134600210620ustar00rootroot00000000000000#N canvas 144 215 431 450 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 256 200 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 156 t l l; #X obj 122 98 t b; #X msg 122 132 3 2 1 0; #X obj 122 221 mtx_eq 1; #X obj 256 221 == 1; #X obj 297 221 == 1; #X obj 338 220 == 1; #X obj 379 220 == 1; #X connect 0 0 14 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 17 0; #X connect 7 1 18 0; #X connect 7 2 19 0; #X connect 7 3 20 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 16 0; #X connect 13 0 12 0; #X connect 13 1 7 0; #X connect 14 0 15 0; #X connect 15 0 13 0; #X connect 16 0 2 0; #X connect 17 0 8 1; #X connect 18 0 9 1; #X connect 19 0 10 1; #X connect 20 0 11 1; pd-iemmatrix-0.3/tests/mtx_eq/04_function.pd000066400000000000000000000024571262113134600210770ustar00rootroot00000000000000#N canvas 190 400 412 429 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 185 190 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 252 228 unpack 0 0 0 0; #X obj 122 98 t b b; #X obj 185 156 t l l; #X obj 122 221 mtx_eq; #X obj 236 269 ==; #X obj 267 269 ==; #X obj 298 268 ==; #X obj 329 268 ==; #X obj 122 156 t f f; #X obj 236 248 t f f f f; #X msg 122 132 5; #X msg 185 133 1 2 4 8; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 7 0; #X connect 3 1 8 0; #X connect 3 2 9 0; #X connect 3 3 10 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 5 0; #X connect 8 0 5 1; #X connect 9 0 4 0; #X connect 10 0 4 1; #X connect 11 0 15 1; #X connect 12 0 16 1; #X connect 12 1 17 1; #X connect 12 2 18 1; #X connect 12 3 19 1; #X connect 13 0 22 0; #X connect 13 1 23 0; #X connect 14 0 11 0; #X connect 14 1 12 0; #X connect 15 0 2 0; #X connect 16 0 7 1; #X connect 17 0 8 1; #X connect 18 0 9 1; #X connect 19 0 10 1; #X connect 20 0 15 0; #X connect 20 1 21 0; #X connect 21 0 16 0; #X connect 21 1 17 0; #X connect 21 2 18 0; #X connect 21 3 19 0; #X connect 22 0 20 0; #X connect 23 0 14 0; pd-iemmatrix-0.3/tests/mtx_eq/05_function.pd000066400000000000000000000005611262113134600210720ustar00rootroot00000000000000#N canvas 55 354 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 307 ==; #X obj 122 98 t b; #X obj 122 174 t f f; #X msg 122 132 11; #X obj 122 221 mtx_eq 7; #X obj 207 221 == 7; #X connect 0 0 3 0; #X connect 2 0 1 0; #X connect 3 0 5 0; #X connect 4 0 6 0; #X connect 4 1 7 0; #X connect 5 0 4 0; #X connect 6 0 2 0; #X connect 7 0 2 1; pd-iemmatrix-0.3/tests/mtx_eq/06_function.pd000066400000000000000000000024601262113134600210730ustar00rootroot00000000000000#N canvas 282 295 386 465 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 98 t b b; #X obj 122 156 t l l; #X obj 236 269 ==; #X obj 267 269 ==; #X obj 298 268 ==; #X obj 329 268 ==; #X obj 252 228 t f f f f; #X obj 185 156 t f f; #X obj 122 221 mtx_eq 0; #X msg 122 132 0 2 3 5; #X msg 185 133 17; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 15 0; #X connect 7 1 16 0; #X connect 7 2 17 0; #X connect 7 3 18 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 21 0; #X connect 13 0 22 0; #X connect 13 1 23 0; #X connect 14 0 12 0; #X connect 14 1 7 0; #X connect 15 0 8 1; #X connect 16 0 9 1; #X connect 17 0 10 1; #X connect 18 0 11 1; #X connect 19 0 15 1; #X connect 19 1 16 1; #X connect 19 2 17 1; #X connect 19 3 18 1; #X connect 20 0 21 1; #X connect 20 1 19 0; #X connect 21 0 2 0; #X connect 22 0 14 0; #X connect 23 0 20 0; pd-iemmatrix-0.3/tests/mtx_eq/07_function.pd000066400000000000000000000007471262113134600211020ustar00rootroot00000000000000#N canvas 270 180 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 213 71 bang; #X obj 122 98 t b b; #X obj 122 175 t f f; #X obj 122 307 ==; #X obj 122 251 mtx_eq 0; #X obj 239 251 ==; #X msg 122 132 6; #X msg 152 131 9; #X connect 0 0 3 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 4 0 6 0; #X connect 4 1 7 0; #X connect 5 0 1 0; #X connect 6 0 5 0; #X connect 7 0 5 1; #X connect 8 0 4 0; #X connect 9 0 6 1; #X connect 9 0 7 1; pd-iemmatrix-0.3/tests/mtx_eq/08_function.pd000066400000000000000000000024611262113134600210760ustar00rootroot00000000000000#N canvas 277 252 796 483 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 98 t b b; #X obj 122 156 t l l; #X obj 236 269 ==; #X obj 267 269 ==; #X obj 298 268 ==; #X obj 329 268 ==; #X obj 252 228 t f f f f; #X obj 185 156 t f f; #X obj 122 221 mtx_eq 0; #X msg 122 132 4 3 7 6; #X msg 185 133 123; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 15 0; #X connect 7 1 16 0; #X connect 7 2 17 0; #X connect 7 3 18 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 21 0; #X connect 13 0 22 0; #X connect 13 1 23 0; #X connect 14 0 12 0; #X connect 14 1 7 0; #X connect 15 0 8 1; #X connect 16 0 9 1; #X connect 17 0 10 1; #X connect 18 0 11 1; #X connect 19 0 15 1; #X connect 19 1 16 1; #X connect 19 2 17 1; #X connect 19 3 18 1; #X connect 20 0 21 1; #X connect 20 1 19 0; #X connect 21 0 2 0; #X connect 22 0 14 0; #X connect 23 0 20 0; pd-iemmatrix-0.3/tests/mtx_eq/09_function.pd000066400000000000000000000025541262113134600211020ustar00rootroot00000000000000#N canvas 311 295 379 440 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 98 t b b; #X obj 185 156 t l l; #X obj 122 156 t l l; #X obj 122 221 mtx_eq; #X obj 236 269 ==; #X obj 267 269 ==; #X obj 298 268 ==; #X obj 329 268 ==; #X msg 186 200 matrix 1 2 \$1 \$2; #X obj 252 228 unpack 0 0; #X msg 122 132 10 9 -1 3; #X msg 185 133 7 34; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 17 0; #X connect 7 1 18 0; #X connect 7 2 19 0; #X connect 7 3 20 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 16 0; #X connect 13 0 23 0; #X connect 13 1 24 0; #X connect 14 0 21 0; #X connect 14 1 22 0; #X connect 15 0 12 0; #X connect 15 1 7 0; #X connect 16 0 2 0; #X connect 17 0 8 1; #X connect 18 0 9 1; #X connect 19 0 10 1; #X connect 20 0 11 1; #X connect 21 0 16 1; #X connect 22 0 17 1; #X connect 22 0 19 1; #X connect 22 1 18 1; #X connect 22 1 20 1; #X connect 23 0 15 0; #X connect 24 0 14 0; pd-iemmatrix-0.3/tests/mtx_eq/10_function.pd000066400000000000000000000025511262113134600210670ustar00rootroot00000000000000#N canvas 182 266 409 472 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 98 t b b; #X obj 185 156 t l l; #X obj 122 156 t l l; #X obj 122 221 mtx_eq; #X obj 236 269 ==; #X obj 267 269 ==; #X obj 298 268 ==; #X obj 329 268 ==; #X msg 166 200 matrix 2 1 \$1 \$2; #X obj 252 226 unpack 0 0; #X msg 185 133 5 3; #X msg 122 132 4 2 9 8; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 17 0; #X connect 7 1 18 0; #X connect 7 2 19 0; #X connect 7 3 20 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 16 0; #X connect 13 0 24 0; #X connect 13 1 23 0; #X connect 14 0 21 0; #X connect 14 1 22 0; #X connect 15 0 12 0; #X connect 15 1 7 0; #X connect 16 0 2 0; #X connect 17 0 8 1; #X connect 18 0 9 1; #X connect 19 0 10 1; #X connect 20 0 11 1; #X connect 21 0 16 1; #X connect 22 0 17 1; #X connect 22 0 18 1; #X connect 22 1 19 1; #X connect 22 1 20 1; #X connect 23 0 14 0; #X connect 24 0 15 0; pd-iemmatrix-0.3/tests/mtx_exp/000077500000000000000000000000001262113134600166015ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_exp/00_exist.pd000066400000000000000000000005011262113134600205550ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X obj 122 161 mtx_exp; #X text 67 37 test for existance of [mtx_exp]; #X msg 122 122 matrix 1 1 1; #X connect 0 0 6 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 2 0; #X connect 6 0 4 0; pd-iemmatrix-0.3/tests/mtx_exp/01_function.pd000066400000000000000000000007141262113134600212550ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 211 mtx_exp; #X msg 122 233 \$3; #X obj 122 101 t b; #X obj 122 151 t f f; #X msg 122 190 matrix 1 1 \$1; #X obj 165 232 exp; #X obj 122 265 ==; #X msg 122 127 -2; #X connect 0 0 4 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 4 0 9 0; #X connect 5 0 6 0; #X connect 5 1 7 0; #X connect 6 0 2 0; #X connect 7 0 8 1; #X connect 8 0 1 0; #X connect 9 0 5 0; pd-iemmatrix-0.3/tests/mtx_exp/02_function.pd000066400000000000000000000021731262113134600212570ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 191 mtx_exp; #X text 67 37 test for existance of [mtx_exp]; #X msg 122 170 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 89 t b; #X msg 122 110 3 -1 -10.5 0; #X obj 122 135 t l l; #X msg 122 213 \$3 \$4 \$5 \$6; #X obj 122 238 unpack 0 0 0 0; #X obj 184 300 *; #X obj 122 300 *; #X obj 122 326 *; #X obj 236 218 unpack 0 0 0 0; #X obj 122 277 ==; #X obj 153 277 ==; #X obj 184 277 ==; #X obj 215 277 ==; #X obj 236 239 exp; #X obj 267 239 exp; #X obj 298 238 exp; #X obj 329 238 exp; #X connect 0 0 5 0; #X connect 2 0 8 0; #X connect 4 0 2 0; #X connect 5 0 6 0; #X connect 6 0 7 0; #X connect 7 0 4 0; #X connect 7 1 13 0; #X connect 8 0 9 0; #X connect 9 0 14 0; #X connect 9 1 15 0; #X connect 9 2 16 0; #X connect 9 3 17 0; #X connect 10 0 12 1; #X connect 11 0 12 0; #X connect 12 0 1 0; #X connect 13 0 18 0; #X connect 13 1 19 0; #X connect 13 2 20 0; #X connect 13 3 21 0; #X connect 14 0 11 0; #X connect 15 0 11 1; #X connect 16 0 10 0; #X connect 17 0 10 1; #X connect 18 0 14 1; #X connect 19 0 15 1; #X connect 20 0 16 1; #X connect 21 0 17 1; pd-iemmatrix-0.3/tests/mtx_exp/03_function.pd000066400000000000000000000027471262113134600212670ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 191 mtx_exp; #X text 67 37 test for existance of [mtx_exp]; #X obj 122 89 t b; #X obj 122 135 t l l; #X obj 184 300 *; #X obj 122 300 *; #X obj 122 326 *; #X obj 122 277 ==; #X obj 153 277 ==; #X obj 184 277 ==; #X obj 215 277 ==; #X obj 266 239 exp; #X obj 297 239 exp; #X obj 328 238 exp; #X obj 359 238 exp; #X msg 122 170 matrix 2 3 \$1 \$2 \$3 \$4 \$5 \$6; #X obj 254 300 *; #X obj 254 277 ==; #X obj 285 277 ==; #X obj 122 238 unpack 0 0 0 0 0 0; #X msg 122 213 \$3 \$4 \$5 \$6 \$7 \$8; #X obj 388 238 exp; #X obj 419 238 exp; #X obj 266 218 unpack 0 0 0 0 0 0; #X obj 122 347 *; #X msg 122 110 3 -1 10.5 0.05 0 12; #X connect 0 0 4 0; #X connect 2 0 22 0; #X connect 4 0 27 0; #X connect 5 0 17 0; #X connect 5 1 25 0; #X connect 6 0 8 1; #X connect 7 0 8 0; #X connect 8 0 26 0; #X connect 9 0 7 0; #X connect 10 0 7 1; #X connect 11 0 6 0; #X connect 12 0 6 1; #X connect 13 0 9 1; #X connect 14 0 10 1; #X connect 15 0 11 1; #X connect 16 0 12 1; #X connect 17 0 2 0; #X connect 18 0 26 1; #X connect 19 0 18 0; #X connect 20 0 18 1; #X connect 21 0 9 0; #X connect 21 1 10 0; #X connect 21 2 11 0; #X connect 21 3 12 0; #X connect 21 4 19 0; #X connect 21 5 20 0; #X connect 22 0 21 0; #X connect 23 0 19 1; #X connect 24 0 20 1; #X connect 25 0 13 0; #X connect 25 1 14 0; #X connect 25 2 15 0; #X connect 25 3 16 0; #X connect 25 4 23 0; #X connect 25 5 24 0; #X connect 26 0 1 0; #X connect 27 0 5 0; pd-iemmatrix-0.3/tests/mtx_eye/000077500000000000000000000000001262113134600165675ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_eye/00_exist.pd000066400000000000000000000005011262113134600205430ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X obj 122 161 mtx_eye; #X text 67 37 test for existance of [mtx_eye]; #X msg 122 122 matrix 1 1 1; #X connect 0 0 6 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 2 0; #X connect 6 0 4 0; pd-iemmatrix-0.3/tests/mtx_eye/01_function.pd000066400000000000000000000011761262113134600212460ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 214 \$3 \$4 \$5 \$6; #X obj 122 161 mtx_eye 2; #X obj 122 238 unpack 0 0 0 0; #X obj 162 262 == 0; #X obj 202 262 == 0; #X obj 122 282 *; #X obj 122 302 *; #X obj 202 282 *; #X obj 122 104 t b; #X obj 122 262 == 1; #X obj 242 262 == 1; #X connect 0 0 10 0; #X connect 2 0 4 0; #X connect 3 0 2 0; #X connect 4 0 11 0; #X connect 4 1 5 0; #X connect 4 2 6 0; #X connect 4 3 12 0; #X connect 5 0 7 1; #X connect 6 0 9 0; #X connect 7 0 8 0; #X connect 8 0 1 0; #X connect 9 0 8 1; #X connect 10 0 3 0; #X connect 11 0 7 0; #X connect 12 0 9 1; pd-iemmatrix-0.3/tests/mtx_eye/02_function.pd000066400000000000000000000016131262113134600212430ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 162 262 == 0; #X obj 202 262 == 0; #X obj 122 282 *; #X obj 122 302 *; #X obj 202 282 *; #X obj 122 104 t b; #X obj 122 161 mtx_eye 2 3; #X msg 122 214 \$3 \$4 \$5 \$6 \$7 \$8; #X obj 122 238 unpack 0 0 0 0 0 0; #X obj 322 262 == 0; #X obj 282 282 *; #X obj 122 324 *; #X obj 122 262 == 1; #X msg 140 133 bang; #X obj 242 262 == 0; #X obj 282 262 == 1; #X connect 0 0 7 0; #X connect 2 0 4 1; #X connect 3 0 6 0; #X connect 4 0 5 0; #X connect 5 0 13 0; #X connect 6 0 5 1; #X connect 7 0 8 0; #X connect 8 0 9 0; #X connect 9 0 10 0; #X connect 10 0 14 0; #X connect 10 1 2 0; #X connect 10 2 3 0; #X connect 10 3 16 0; #X connect 10 4 17 0; #X connect 10 5 11 0; #X connect 11 0 12 1; #X connect 12 0 13 1; #X connect 13 0 1 0; #X connect 14 0 4 0; #X connect 15 0 8 0; #X connect 16 0 6 1; #X connect 17 0 12 0; pd-iemmatrix-0.3/tests/mtx_eye/03_function.pd000066400000000000000000000012541262113134600212450ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 162 262 == 0; #X obj 202 262 == 0; #X obj 122 282 *; #X obj 122 302 *; #X obj 202 282 *; #X obj 122 104 t b; #X obj 122 238 unpack 0 0 0 0 0 0; #X obj 122 161 mtx_eye 7 8; #X msg 122 214 \$3 \$4 \$5 \$6; #X msg 122 135 2; #X obj 122 262 == 1; #X obj 242 262 == 1; #X connect 0 0 7 0; #X connect 2 0 4 1; #X connect 3 0 6 0; #X connect 4 0 5 0; #X connect 5 0 1 0; #X connect 6 0 5 1; #X connect 7 0 11 0; #X connect 8 0 12 0; #X connect 8 1 2 0; #X connect 8 2 3 0; #X connect 8 3 13 0; #X connect 9 0 10 0; #X connect 10 0 8 0; #X connect 11 0 9 0; #X connect 12 0 4 0; #X connect 13 0 6 1; pd-iemmatrix-0.3/tests/mtx_eye/04_function.pd000066400000000000000000000016021262113134600212430ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 162 262 == 0; #X obj 122 282 *; #X obj 122 302 *; #X obj 202 282 *; #X obj 122 104 t b; #X msg 122 214 \$3 \$4 \$5 \$6 \$7 \$8; #X obj 122 238 unpack 0 0 0 0 0 0; #X obj 322 262 == 0; #X obj 282 282 *; #X obj 122 324 *; #X msg 122 135 3 2; #X obj 122 161 mtx_eye; #X obj 122 262 == 1; #X obj 202 262 == 0; #X obj 242 262 == 1; #X obj 282 262 == 0; #X connect 0 0 6 0; #X connect 2 0 3 1; #X connect 3 0 4 0; #X connect 4 0 11 0; #X connect 5 0 4 1; #X connect 6 0 12 0; #X connect 7 0 8 0; #X connect 8 0 14 0; #X connect 8 1 2 0; #X connect 8 2 15 0; #X connect 8 3 16 0; #X connect 8 4 17 0; #X connect 8 5 9 0; #X connect 9 0 10 1; #X connect 10 0 11 1; #X connect 11 0 1 0; #X connect 12 0 13 0; #X connect 13 0 7 0; #X connect 14 0 3 0; #X connect 15 0 5 0; #X connect 16 0 5 1; #X connect 17 0 10 0; pd-iemmatrix-0.3/tests/mtx_eye/05_function.pd000066400000000000000000000011151262113134600212430ustar00rootroot00000000000000#N canvas 541 351 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 282 *; #X obj 122 104 t b; #X obj 122 191 mtx_eye 7 8; #X msg 122 135 10 14; #X msg 122 214 \$1 \$2; #X obj 122 157 t l l; #X obj 122 262 ==; #X obj 162 262 ==; #X obj 179 215 unpack; #X obj 122 236 unpack; #X connect 0 0 3 0; #X connect 2 0 1 0; #X connect 3 0 5 0; #X connect 4 0 6 0; #X connect 5 0 7 0; #X connect 6 0 11 0; #X connect 7 0 4 0; #X connect 7 1 10 0; #X connect 8 0 2 0; #X connect 9 0 2 1; #X connect 10 0 8 1; #X connect 10 1 9 1; #X connect 11 0 8 0; #X connect 11 1 9 0; pd-iemmatrix-0.3/tests/mtx_eye/06_function.pd000066400000000000000000000011111262113134600212400ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 104 t b; #X obj 122 282 *; #X obj 122 191 mtx_eye 7 8; #X msg 122 214 \$1 \$2; #X obj 122 262 ==; #X obj 162 262 ==; #X obj 122 236 unpack; #X msg 122 135 32; #X obj 122 157 t f f; #X obj 179 215 t f f; #X connect 0 0 2 0; #X connect 2 0 9 0; #X connect 3 0 1 0; #X connect 4 0 5 0; #X connect 5 0 8 0; #X connect 6 0 3 0; #X connect 7 0 3 1; #X connect 8 0 6 0; #X connect 8 1 7 0; #X connect 9 0 10 0; #X connect 10 0 4 0; #X connect 10 1 11 0; #X connect 11 0 6 1; #X connect 11 1 7 1; pd-iemmatrix-0.3/tests/mtx_fill/000077500000000000000000000000001262113134600167335ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_fill/00_exist.pd000066400000000000000000000006261262113134600207170ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X obj 122 161 mtx_fill; #X text 67 37 test for existance of [mtx_fill]; #X msg 122 96 matrix 1 1 1; #X obj 122 127 t a a a; #X connect 0 0 6 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 2 0; #X connect 6 0 7 0; #X connect 7 0 4 0; #X connect 7 1 4 1; #X connect 7 2 4 2; pd-iemmatrix-0.3/tests/mtx_find/000077500000000000000000000000001262113134600167255ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_find/00_exist.pd000066400000000000000000000005031262113134600207030ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X text 67 37 test for existance of [mtx_find]; #X msg 122 125 matrix 1 1 1; #X obj 122 161 mtx_find; #X connect 0 0 5 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 5 0 6 0; #X connect 6 0 2 0; pd-iemmatrix-0.3/tests/mtx_gauss/000077500000000000000000000000001262113134600171275ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_gauss/00_exist.pd000066400000000000000000000005051262113134600211070ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X obj 122 161 mtx_gauss; #X text 67 37 test for existance of [mtx_gauss]; #X msg 122 122 matrix 1 1 1; #X connect 0 0 6 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 2 0; #X connect 6 0 4 0; pd-iemmatrix-0.3/tests/mtx_ge/000077500000000000000000000000001262113134600164005ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_ge/00_exist.pd000066400000000000000000000004771262113134600203700ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X obj 122 161 mtx_ge; #X text 67 37 test for existance of [mtx_ge]; #X msg 122 122 matrix 1 1 1; #X connect 0 0 6 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 2 0; #X connect 6 0 4 0; pd-iemmatrix-0.3/tests/mtx_ge/01_function.pd000066400000000000000000000021061262113134600210510ustar00rootroot00000000000000#N canvas 117 373 440 427 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 200 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 156 t l l; #X obj 122 98 t b; #X obj 122 221 mtx_ge 2; #X obj 236 221 >= 2; #X obj 277 221 >= 2; #X obj 318 220 >= 2; #X obj 359 220 >= 2; #X msg 122 132 2 5 -1.1 4; #X connect 0 0 14 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 16 0; #X connect 7 1 17 0; #X connect 7 2 18 0; #X connect 7 3 19 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 15 0; #X connect 13 0 12 0; #X connect 13 1 7 0; #X connect 14 0 20 0; #X connect 15 0 2 0; #X connect 16 0 8 1; #X connect 17 0 9 1; #X connect 18 0 10 1; #X connect 19 0 11 1; #X connect 20 0 13 0; pd-iemmatrix-0.3/tests/mtx_ge/02_function.pd000066400000000000000000000025711262113134600210600ustar00rootroot00000000000000#N canvas 176 399 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 166 200 matrix 2 2 \$1 \$2 \$3 \$4; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 252 228 unpack 0 0 0 0; #X obj 122 98 t b b; #X obj 185 156 t l l; #X obj 122 156 t l l; #X obj 122 221 mtx_ge; #X obj 236 269 >=; #X obj 267 269 >=; #X obj 298 268 >=; #X obj 329 268 >=; #X msg 122 132 1 2 3 4; #X msg 185 133 9 8 7 6; #X connect 0 0 15 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 19 0; #X connect 7 1 20 0; #X connect 7 2 21 0; #X connect 7 3 22 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 18 1; #X connect 13 0 18 0; #X connect 14 0 19 1; #X connect 14 1 20 1; #X connect 14 2 21 1; #X connect 14 3 22 1; #X connect 15 0 23 0; #X connect 15 1 24 0; #X connect 16 0 12 0; #X connect 16 1 14 0; #X connect 17 0 13 0; #X connect 17 1 7 0; #X connect 18 0 2 0; #X connect 19 0 8 1; #X connect 20 0 9 1; #X connect 21 0 10 1; #X connect 22 0 11 1; #X connect 23 0 17 0; #X connect 24 0 16 0; pd-iemmatrix-0.3/tests/mtx_ge/03_function.pd000066400000000000000000000021031262113134600210500ustar00rootroot00000000000000#N canvas 144 215 431 450 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 256 200 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 156 t l l; #X obj 122 98 t b; #X msg 122 132 3 2 1 0; #X obj 122 221 mtx_ge 1; #X obj 256 221 >= 1; #X obj 297 221 >= 1; #X obj 338 220 >= 1; #X obj 379 220 >= 1; #X connect 0 0 14 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 17 0; #X connect 7 1 18 0; #X connect 7 2 19 0; #X connect 7 3 20 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 16 0; #X connect 13 0 12 0; #X connect 13 1 7 0; #X connect 14 0 15 0; #X connect 15 0 13 0; #X connect 16 0 2 0; #X connect 17 0 8 1; #X connect 18 0 9 1; #X connect 19 0 10 1; #X connect 20 0 11 1; pd-iemmatrix-0.3/tests/mtx_ge/04_function.pd000066400000000000000000000024571262113134600210650ustar00rootroot00000000000000#N canvas 190 400 412 429 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 185 190 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 252 228 unpack 0 0 0 0; #X obj 122 98 t b b; #X obj 185 156 t l l; #X obj 122 221 mtx_ge; #X obj 236 269 >=; #X obj 267 269 >=; #X obj 298 268 >=; #X obj 329 268 >=; #X obj 122 156 t f f; #X obj 236 248 t f f f f; #X msg 122 132 5; #X msg 185 133 1 2 4 8; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 7 0; #X connect 3 1 8 0; #X connect 3 2 9 0; #X connect 3 3 10 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 5 0; #X connect 8 0 5 1; #X connect 9 0 4 0; #X connect 10 0 4 1; #X connect 11 0 15 1; #X connect 12 0 16 1; #X connect 12 1 17 1; #X connect 12 2 18 1; #X connect 12 3 19 1; #X connect 13 0 22 0; #X connect 13 1 23 0; #X connect 14 0 11 0; #X connect 14 1 12 0; #X connect 15 0 2 0; #X connect 16 0 7 1; #X connect 17 0 8 1; #X connect 18 0 9 1; #X connect 19 0 10 1; #X connect 20 0 15 0; #X connect 20 1 21 0; #X connect 21 0 16 0; #X connect 21 1 17 0; #X connect 21 2 18 0; #X connect 21 3 19 0; #X connect 22 0 20 0; #X connect 23 0 14 0; pd-iemmatrix-0.3/tests/mtx_ge/05_function.pd000066400000000000000000000005611262113134600210600ustar00rootroot00000000000000#N canvas 55 354 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 307 ==; #X obj 122 98 t b; #X obj 122 174 t f f; #X msg 122 132 11; #X obj 122 221 mtx_ge 7; #X obj 207 221 >= 7; #X connect 0 0 3 0; #X connect 2 0 1 0; #X connect 3 0 5 0; #X connect 4 0 6 0; #X connect 4 1 7 0; #X connect 5 0 4 0; #X connect 6 0 2 0; #X connect 7 0 2 1; pd-iemmatrix-0.3/tests/mtx_ge/06_function.pd000066400000000000000000000024601262113134600210610ustar00rootroot00000000000000#N canvas 282 295 386 465 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 98 t b b; #X obj 122 156 t l l; #X obj 236 269 >=; #X obj 267 269 >=; #X obj 298 268 >=; #X obj 329 268 >=; #X obj 252 228 t f f f f; #X obj 185 156 t f f; #X obj 122 221 mtx_ge 0; #X msg 122 132 0 2 3 5; #X msg 185 133 17; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 15 0; #X connect 7 1 16 0; #X connect 7 2 17 0; #X connect 7 3 18 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 21 0; #X connect 13 0 22 0; #X connect 13 1 23 0; #X connect 14 0 12 0; #X connect 14 1 7 0; #X connect 15 0 8 1; #X connect 16 0 9 1; #X connect 17 0 10 1; #X connect 18 0 11 1; #X connect 19 0 15 1; #X connect 19 1 16 1; #X connect 19 2 17 1; #X connect 19 3 18 1; #X connect 20 0 21 1; #X connect 20 1 19 0; #X connect 21 0 2 0; #X connect 22 0 14 0; #X connect 23 0 20 0; pd-iemmatrix-0.3/tests/mtx_ge/07_function.pd000066400000000000000000000007471262113134600210700ustar00rootroot00000000000000#N canvas 270 180 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 213 71 bang; #X obj 122 98 t b b; #X obj 122 175 t f f; #X obj 122 307 ==; #X obj 122 251 mtx_ge 0; #X obj 239 251 >=; #X msg 122 132 6; #X msg 152 131 9; #X connect 0 0 3 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 4 0 6 0; #X connect 4 1 7 0; #X connect 5 0 1 0; #X connect 6 0 5 0; #X connect 7 0 5 1; #X connect 8 0 4 0; #X connect 9 0 6 1; #X connect 9 0 7 1; pd-iemmatrix-0.3/tests/mtx_ge/08_function.pd000066400000000000000000000024611262113134600210640ustar00rootroot00000000000000#N canvas 277 252 796 483 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 98 t b b; #X obj 122 156 t l l; #X obj 236 269 >=; #X obj 267 269 >=; #X obj 298 268 >=; #X obj 329 268 >=; #X obj 252 228 t f f f f; #X obj 185 156 t f f; #X obj 122 221 mtx_ge 0; #X msg 122 132 4 3 7 6; #X msg 185 133 123; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 15 0; #X connect 7 1 16 0; #X connect 7 2 17 0; #X connect 7 3 18 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 21 0; #X connect 13 0 22 0; #X connect 13 1 23 0; #X connect 14 0 12 0; #X connect 14 1 7 0; #X connect 15 0 8 1; #X connect 16 0 9 1; #X connect 17 0 10 1; #X connect 18 0 11 1; #X connect 19 0 15 1; #X connect 19 1 16 1; #X connect 19 2 17 1; #X connect 19 3 18 1; #X connect 20 0 21 1; #X connect 20 1 19 0; #X connect 21 0 2 0; #X connect 22 0 14 0; #X connect 23 0 20 0; pd-iemmatrix-0.3/tests/mtx_ge/09_function.pd000066400000000000000000000025541262113134600210700ustar00rootroot00000000000000#N canvas 311 295 379 440 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 98 t b b; #X obj 185 156 t l l; #X obj 122 156 t l l; #X obj 122 221 mtx_ge; #X obj 236 269 >=; #X obj 267 269 >=; #X obj 298 268 >=; #X obj 329 268 >=; #X msg 186 200 matrix 1 2 \$1 \$2; #X obj 252 228 unpack 0 0; #X msg 122 132 10 9 -1 3; #X msg 185 133 7 34; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 17 0; #X connect 7 1 18 0; #X connect 7 2 19 0; #X connect 7 3 20 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 16 0; #X connect 13 0 23 0; #X connect 13 1 24 0; #X connect 14 0 21 0; #X connect 14 1 22 0; #X connect 15 0 12 0; #X connect 15 1 7 0; #X connect 16 0 2 0; #X connect 17 0 8 1; #X connect 18 0 9 1; #X connect 19 0 10 1; #X connect 20 0 11 1; #X connect 21 0 16 1; #X connect 22 0 17 1; #X connect 22 0 19 1; #X connect 22 1 18 1; #X connect 22 1 20 1; #X connect 23 0 15 0; #X connect 24 0 14 0; pd-iemmatrix-0.3/tests/mtx_ge/10_function.pd000066400000000000000000000025511262113134600210550ustar00rootroot00000000000000#N canvas 182 266 409 472 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 98 t b b; #X obj 185 156 t l l; #X obj 122 156 t l l; #X obj 122 221 mtx_ge; #X obj 236 269 >=; #X obj 267 269 >=; #X obj 298 268 >=; #X obj 329 268 >=; #X msg 166 200 matrix 2 1 \$1 \$2; #X obj 252 226 unpack 0 0; #X msg 185 133 5 3; #X msg 122 132 4 2 9 8; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 17 0; #X connect 7 1 18 0; #X connect 7 2 19 0; #X connect 7 3 20 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 16 0; #X connect 13 0 24 0; #X connect 13 1 23 0; #X connect 14 0 21 0; #X connect 14 1 22 0; #X connect 15 0 12 0; #X connect 15 1 7 0; #X connect 16 0 2 0; #X connect 17 0 8 1; #X connect 18 0 9 1; #X connect 19 0 10 1; #X connect 20 0 11 1; #X connect 21 0 16 1; #X connect 22 0 17 1; #X connect 22 0 18 1; #X connect 22 1 19 1; #X connect 22 1 20 1; #X connect 23 0 14 0; #X connect 24 0 15 0; pd-iemmatrix-0.3/tests/mtx_gt/000077500000000000000000000000001262113134600164175ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_gt/00_exist.pd000066400000000000000000000004771262113134600204070ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X obj 122 161 mtx_gt; #X text 67 37 test for existance of [mtx_gt]; #X msg 122 122 matrix 1 1 1; #X connect 0 0 6 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 2 0; #X connect 6 0 4 0; pd-iemmatrix-0.3/tests/mtx_gt/01_function.pd000066400000000000000000000021021262113134600210640ustar00rootroot00000000000000#N canvas 117 373 440 427 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 200 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 156 t l l; #X obj 122 98 t b; #X obj 122 221 mtx_gt 2; #X obj 236 221 > 2; #X obj 277 221 > 2; #X obj 318 220 > 2; #X obj 359 220 > 2; #X msg 122 132 2 5 -1.1 4; #X connect 0 0 14 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 16 0; #X connect 7 1 17 0; #X connect 7 2 18 0; #X connect 7 3 19 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 15 0; #X connect 13 0 12 0; #X connect 13 1 7 0; #X connect 14 0 20 0; #X connect 15 0 2 0; #X connect 16 0 8 1; #X connect 17 0 9 1; #X connect 18 0 10 1; #X connect 19 0 11 1; #X connect 20 0 13 0; pd-iemmatrix-0.3/tests/mtx_gt/02_function.pd000066400000000000000000000025651262113134600211020ustar00rootroot00000000000000#N canvas 176 399 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 166 200 matrix 2 2 \$1 \$2 \$3 \$4; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 252 228 unpack 0 0 0 0; #X obj 122 98 t b b; #X obj 185 156 t l l; #X obj 122 156 t l l; #X obj 122 221 mtx_gt; #X obj 236 269 >; #X obj 267 269 >; #X obj 298 268 >; #X obj 329 268 >; #X msg 122 132 1 2 3 4; #X msg 185 133 9 8 7 6; #X connect 0 0 15 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 19 0; #X connect 7 1 20 0; #X connect 7 2 21 0; #X connect 7 3 22 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 18 1; #X connect 13 0 18 0; #X connect 14 0 19 1; #X connect 14 1 20 1; #X connect 14 2 21 1; #X connect 14 3 22 1; #X connect 15 0 23 0; #X connect 15 1 24 0; #X connect 16 0 12 0; #X connect 16 1 14 0; #X connect 17 0 13 0; #X connect 17 1 7 0; #X connect 18 0 2 0; #X connect 19 0 8 1; #X connect 20 0 9 1; #X connect 21 0 10 1; #X connect 22 0 11 1; #X connect 23 0 17 0; #X connect 24 0 16 0; pd-iemmatrix-0.3/tests/mtx_gt/03_function.pd000066400000000000000000000020771262113134600211010ustar00rootroot00000000000000#N canvas 144 215 431 450 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 256 200 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 156 t l l; #X obj 122 98 t b; #X msg 122 132 3 2 1 0; #X obj 122 221 mtx_gt 1; #X obj 256 221 > 1; #X obj 297 221 > 1; #X obj 338 220 > 1; #X obj 379 220 > 1; #X connect 0 0 14 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 17 0; #X connect 7 1 18 0; #X connect 7 2 19 0; #X connect 7 3 20 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 16 0; #X connect 13 0 12 0; #X connect 13 1 7 0; #X connect 14 0 15 0; #X connect 15 0 13 0; #X connect 16 0 2 0; #X connect 17 0 8 1; #X connect 18 0 9 1; #X connect 19 0 10 1; #X connect 20 0 11 1; pd-iemmatrix-0.3/tests/mtx_gt/04_function.pd000066400000000000000000000024531262113134600211000ustar00rootroot00000000000000#N canvas 190 400 412 429 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 185 190 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 252 228 unpack 0 0 0 0; #X obj 122 98 t b b; #X obj 185 156 t l l; #X obj 122 221 mtx_gt; #X obj 236 269 >; #X obj 267 269 >; #X obj 298 268 >; #X obj 329 268 >; #X obj 122 156 t f f; #X obj 236 248 t f f f f; #X msg 122 132 5; #X msg 185 133 1 2 4 8; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 7 0; #X connect 3 1 8 0; #X connect 3 2 9 0; #X connect 3 3 10 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 5 0; #X connect 8 0 5 1; #X connect 9 0 4 0; #X connect 10 0 4 1; #X connect 11 0 15 1; #X connect 12 0 16 1; #X connect 12 1 17 1; #X connect 12 2 18 1; #X connect 12 3 19 1; #X connect 13 0 22 0; #X connect 13 1 23 0; #X connect 14 0 11 0; #X connect 14 1 12 0; #X connect 15 0 2 0; #X connect 16 0 7 1; #X connect 17 0 8 1; #X connect 18 0 9 1; #X connect 19 0 10 1; #X connect 20 0 15 0; #X connect 20 1 21 0; #X connect 21 0 16 0; #X connect 21 1 17 0; #X connect 21 2 18 0; #X connect 21 3 19 0; #X connect 22 0 20 0; #X connect 23 0 14 0; pd-iemmatrix-0.3/tests/mtx_gt/05_function.pd000066400000000000000000000005601262113134600210760ustar00rootroot00000000000000#N canvas 55 354 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 307 ==; #X obj 122 98 t b; #X obj 122 174 t f f; #X msg 122 132 11; #X obj 122 221 mtx_gt 7; #X obj 207 221 > 7; #X connect 0 0 3 0; #X connect 2 0 1 0; #X connect 3 0 5 0; #X connect 4 0 6 0; #X connect 4 1 7 0; #X connect 5 0 4 0; #X connect 6 0 2 0; #X connect 7 0 2 1; pd-iemmatrix-0.3/tests/mtx_gt/06_function.pd000066400000000000000000000024541262113134600211030ustar00rootroot00000000000000#N canvas 282 295 386 465 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 98 t b b; #X obj 122 156 t l l; #X obj 236 269 >; #X obj 267 269 >; #X obj 298 268 >; #X obj 329 268 >; #X obj 252 228 t f f f f; #X obj 185 156 t f f; #X obj 122 221 mtx_gt 0; #X msg 122 132 0 2 3 5; #X msg 185 133 17; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 15 0; #X connect 7 1 16 0; #X connect 7 2 17 0; #X connect 7 3 18 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 21 0; #X connect 13 0 22 0; #X connect 13 1 23 0; #X connect 14 0 12 0; #X connect 14 1 7 0; #X connect 15 0 8 1; #X connect 16 0 9 1; #X connect 17 0 10 1; #X connect 18 0 11 1; #X connect 19 0 15 1; #X connect 19 1 16 1; #X connect 19 2 17 1; #X connect 19 3 18 1; #X connect 20 0 21 1; #X connect 20 1 19 0; #X connect 21 0 2 0; #X connect 22 0 14 0; #X connect 23 0 20 0; pd-iemmatrix-0.3/tests/mtx_gt/07_function.pd000066400000000000000000000007461262113134600211060ustar00rootroot00000000000000#N canvas 270 180 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 213 71 bang; #X obj 122 98 t b b; #X obj 122 175 t f f; #X obj 122 307 ==; #X obj 122 251 mtx_gt 0; #X obj 239 251 >; #X msg 122 132 6; #X msg 152 131 9; #X connect 0 0 3 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 4 0 6 0; #X connect 4 1 7 0; #X connect 5 0 1 0; #X connect 6 0 5 0; #X connect 7 0 5 1; #X connect 8 0 4 0; #X connect 9 0 6 1; #X connect 9 0 7 1; pd-iemmatrix-0.3/tests/mtx_gt/08_function.pd000066400000000000000000000024551262113134600211060ustar00rootroot00000000000000#N canvas 277 252 796 483 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 98 t b b; #X obj 122 156 t l l; #X obj 236 269 >; #X obj 267 269 >; #X obj 298 268 >; #X obj 329 268 >; #X obj 252 228 t f f f f; #X obj 185 156 t f f; #X obj 122 221 mtx_gt 0; #X msg 122 132 4 3 7 6; #X msg 185 133 123; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 15 0; #X connect 7 1 16 0; #X connect 7 2 17 0; #X connect 7 3 18 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 21 0; #X connect 13 0 22 0; #X connect 13 1 23 0; #X connect 14 0 12 0; #X connect 14 1 7 0; #X connect 15 0 8 1; #X connect 16 0 9 1; #X connect 17 0 10 1; #X connect 18 0 11 1; #X connect 19 0 15 1; #X connect 19 1 16 1; #X connect 19 2 17 1; #X connect 19 3 18 1; #X connect 20 0 21 1; #X connect 20 1 19 0; #X connect 21 0 2 0; #X connect 22 0 14 0; #X connect 23 0 20 0; pd-iemmatrix-0.3/tests/mtx_gt/09_function.pd000066400000000000000000000025501262113134600211030ustar00rootroot00000000000000#N canvas 311 295 379 440 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 98 t b b; #X obj 185 156 t l l; #X obj 122 156 t l l; #X obj 122 221 mtx_gt; #X obj 236 269 >; #X obj 267 269 >; #X obj 298 268 >; #X obj 329 268 >; #X msg 186 200 matrix 1 2 \$1 \$2; #X obj 252 228 unpack 0 0; #X msg 122 132 10 9 -1 3; #X msg 185 133 7 34; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 17 0; #X connect 7 1 18 0; #X connect 7 2 19 0; #X connect 7 3 20 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 16 0; #X connect 13 0 23 0; #X connect 13 1 24 0; #X connect 14 0 21 0; #X connect 14 1 22 0; #X connect 15 0 12 0; #X connect 15 1 7 0; #X connect 16 0 2 0; #X connect 17 0 8 1; #X connect 18 0 9 1; #X connect 19 0 10 1; #X connect 20 0 11 1; #X connect 21 0 16 1; #X connect 22 0 17 1; #X connect 22 0 19 1; #X connect 22 1 18 1; #X connect 22 1 20 1; #X connect 23 0 15 0; #X connect 24 0 14 0; pd-iemmatrix-0.3/tests/mtx_gt/10_function.pd000066400000000000000000000025451262113134600210770ustar00rootroot00000000000000#N canvas 182 266 409 472 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 98 t b b; #X obj 185 156 t l l; #X obj 122 156 t l l; #X obj 122 221 mtx_gt; #X obj 236 269 >; #X obj 267 269 >; #X obj 298 268 >; #X obj 329 268 >; #X msg 166 200 matrix 2 1 \$1 \$2; #X obj 252 226 unpack 0 0; #X msg 185 133 5 3; #X msg 122 132 4 2 9 8; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 17 0; #X connect 7 1 18 0; #X connect 7 2 19 0; #X connect 7 3 20 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 16 0; #X connect 13 0 24 0; #X connect 13 1 23 0; #X connect 14 0 21 0; #X connect 14 1 22 0; #X connect 15 0 12 0; #X connect 15 1 7 0; #X connect 16 0 2 0; #X connect 17 0 8 1; #X connect 18 0 9 1; #X connect 19 0 10 1; #X connect 20 0 11 1; #X connect 21 0 16 1; #X connect 22 0 17 1; #X connect 22 0 18 1; #X connect 22 1 19 1; #X connect 22 1 20 1; #X connect 23 0 14 0; #X connect 24 0 15 0; pd-iemmatrix-0.3/tests/mtx_index/000077500000000000000000000000001262113134600171145ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_index/00_exist.pd000066400000000000000000000006031262113134600210730ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X obj 122 161 mtx_index; #X text 67 37 test for existance of [mtx_index]; #X msg 122 102 matrix 1 1 1; #X obj 122 126 t a a; #X connect 0 0 6 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 2 0; #X connect 6 0 7 0; #X connect 7 0 4 0; #X connect 7 1 4 1; pd-iemmatrix-0.3/tests/mtx_int/000077500000000000000000000000001262113134600165775ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_int/00_exist.pd000066400000000000000000000005011262113134600205530ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X obj 122 161 mtx_int; #X text 67 37 test for existance of [mtx_int]; #X msg 122 122 matrix 1 1 1; #X connect 0 0 6 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 2 0; #X connect 6 0 4 0; pd-iemmatrix-0.3/tests/mtx_int/01_function.pd000066400000000000000000000007141262113134600212530ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 211 mtx_int; #X msg 122 233 \$3; #X obj 122 101 t b; #X obj 122 151 t f f; #X msg 122 190 matrix 1 1 \$1; #X obj 165 232 int; #X obj 122 265 ==; #X msg 122 127 -2; #X connect 0 0 4 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 4 0 9 0; #X connect 5 0 6 0; #X connect 5 1 7 0; #X connect 6 0 2 0; #X connect 7 0 8 1; #X connect 8 0 1 0; #X connect 9 0 5 0; pd-iemmatrix-0.3/tests/mtx_int/02_function.pd000066400000000000000000000021731262113134600212550ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 191 mtx_int; #X text 67 37 test for existance of [mtx_int]; #X msg 122 170 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 89 t b; #X msg 122 110 3 -1 -10.5 0; #X obj 122 135 t l l; #X msg 122 213 \$3 \$4 \$5 \$6; #X obj 122 238 unpack 0 0 0 0; #X obj 184 300 *; #X obj 122 300 *; #X obj 122 326 *; #X obj 236 218 unpack 0 0 0 0; #X obj 122 277 ==; #X obj 153 277 ==; #X obj 184 277 ==; #X obj 215 277 ==; #X obj 236 239 int; #X obj 267 239 int; #X obj 298 238 int; #X obj 329 238 int; #X connect 0 0 5 0; #X connect 2 0 8 0; #X connect 4 0 2 0; #X connect 5 0 6 0; #X connect 6 0 7 0; #X connect 7 0 4 0; #X connect 7 1 13 0; #X connect 8 0 9 0; #X connect 9 0 14 0; #X connect 9 1 15 0; #X connect 9 2 16 0; #X connect 9 3 17 0; #X connect 10 0 12 1; #X connect 11 0 12 0; #X connect 12 0 1 0; #X connect 13 0 18 0; #X connect 13 1 19 0; #X connect 13 2 20 0; #X connect 13 3 21 0; #X connect 14 0 11 0; #X connect 15 0 11 1; #X connect 16 0 10 0; #X connect 17 0 10 1; #X connect 18 0 14 1; #X connect 19 0 15 1; #X connect 20 0 16 1; #X connect 21 0 17 1; pd-iemmatrix-0.3/tests/mtx_int/03_function.pd000066400000000000000000000027471262113134600212650ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 191 mtx_int; #X text 67 37 test for existance of [mtx_int]; #X obj 122 89 t b; #X obj 122 135 t l l; #X obj 184 300 *; #X obj 122 300 *; #X obj 122 326 *; #X obj 122 277 ==; #X obj 153 277 ==; #X obj 184 277 ==; #X obj 215 277 ==; #X obj 266 239 int; #X obj 297 239 int; #X obj 328 238 int; #X obj 359 238 int; #X msg 122 170 matrix 2 3 \$1 \$2 \$3 \$4 \$5 \$6; #X obj 254 300 *; #X obj 254 277 ==; #X obj 285 277 ==; #X obj 122 238 unpack 0 0 0 0 0 0; #X msg 122 213 \$3 \$4 \$5 \$6 \$7 \$8; #X obj 388 238 int; #X obj 419 238 int; #X obj 266 218 unpack 0 0 0 0 0 0; #X obj 122 347 *; #X msg 122 110 3 -1 10.5 0.05 0 12; #X connect 0 0 4 0; #X connect 2 0 22 0; #X connect 4 0 27 0; #X connect 5 0 17 0; #X connect 5 1 25 0; #X connect 6 0 8 1; #X connect 7 0 8 0; #X connect 8 0 26 0; #X connect 9 0 7 0; #X connect 10 0 7 1; #X connect 11 0 6 0; #X connect 12 0 6 1; #X connect 13 0 9 1; #X connect 14 0 10 1; #X connect 15 0 11 1; #X connect 16 0 12 1; #X connect 17 0 2 0; #X connect 18 0 26 1; #X connect 19 0 18 0; #X connect 20 0 18 1; #X connect 21 0 9 0; #X connect 21 1 10 0; #X connect 21 2 11 0; #X connect 21 3 12 0; #X connect 21 4 19 0; #X connect 21 5 20 0; #X connect 22 0 21 0; #X connect 23 0 19 1; #X connect 24 0 20 1; #X connect 25 0 13 0; #X connect 25 1 14 0; #X connect 25 2 15 0; #X connect 25 3 16 0; #X connect 25 4 23 0; #X connect 25 5 24 0; #X connect 26 0 1 0; #X connect 27 0 5 0; pd-iemmatrix-0.3/tests/mtx_inverse/000077500000000000000000000000001262113134600174605ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_inverse/00_exist.pd000066400000000000000000000005111262113134600214350ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X obj 122 161 mtx_inverse; #X text 67 37 test for existance of [mtx_inverse]; #X msg 122 122 matrix 1 1 1; #X connect 0 0 6 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 2 0; #X connect 6 0 4 0; pd-iemmatrix-0.3/tests/mtx_isequal/000077500000000000000000000000001262113134600174505ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_isequal/00_exist.pd000066400000000000000000000005111262113134600214250ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X msg 122 122 matrix 1 1 1; #X obj 122 161 mtx_isequal; #X text 67 37 test for existance of [mtx_isequal]; #X connect 0 0 4 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 5 0; #X connect 5 0 2 0; pd-iemmatrix-0.3/tests/mtx_isequal/01_function0.pd000066400000000000000000000007021262113134600222010ustar00rootroot00000000000000#N canvas 433 156 508 521 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 366 1; #X msg 122 112 matrix 3 3 1 2 3 4 5 6 7 8 9; #X obj 122 231 mtx_isequal; #X text 67 37 test whether [mtx_isequal] correctly detects the equality of 2 matrices; #X obj 122 347 select 1; #X obj 122 165 t a a; #X connect 0 0 3 0; #X connect 2 0 1 0; #X connect 3 0 7 0; #X connect 4 0 6 0; #X connect 6 0 2 0; #X connect 7 0 4 0; #X connect 7 1 4 1; pd-iemmatrix-0.3/tests/mtx_isequal/01_function1.pd000066400000000000000000000006621262113134600222070ustar00rootroot00000000000000#N canvas 386 139 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 366 1; #X obj 122 161 mtx_isequal; #X obj 122 347 select 1; #X text 67 37 test whether [mtx_isequal] correctly detects the equality of 2 matrices; #X obj 122 139 t a a a; #X obj 122 112 mtx_rand 4; #X connect 0 0 7 0; #X connect 2 0 1 0; #X connect 3 0 4 0; #X connect 4 0 2 0; #X connect 6 0 3 0; #X connect 6 1 3 1; #X connect 7 0 6 0; pd-iemmatrix-0.3/tests/mtx_isequal/01_function2.pd000066400000000000000000000010051262113134600222000ustar00rootroot00000000000000#N canvas 433 156 508 521 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 366 1; #X msg 122 112 matrix 3 3 1 2 3 4 5 6 7 8 9; #X obj 122 231 mtx_isequal; #X obj 122 90 t b b; #X msg 154 138 matrix 3 3 1 2 3 4 5 6 7 8 10; #X text 67 37 test whether [mtx_isequal] correctly detects the inequality of 2 matrices; #X obj 122 347 select 0; #X connect 0 0 5 0; #X connect 2 0 1 0; #X connect 3 0 4 0; #X connect 4 0 8 0; #X connect 5 0 3 0; #X connect 5 1 6 0; #X connect 6 0 4 1; #X connect 8 0 2 0; pd-iemmatrix-0.3/tests/mtx_isequal/01_function3.pd000066400000000000000000000007721262113134600222130ustar00rootroot00000000000000#N canvas 433 156 508 521 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 366 1; #X msg 122 112 matrix 3 3 1 2 3 4 5 6 7 8 9; #X obj 122 231 mtx_isequal; #X obj 122 90 t b b; #X text 67 37 test whether [mtx_isequal] correctly detects the inequality of 2 matrices; #X obj 122 347 select 0; #X msg 154 138 matrix 2 2 1 2 3 4; #X connect 0 0 5 0; #X connect 2 0 1 0; #X connect 3 0 4 0; #X connect 4 0 7 0; #X connect 5 0 3 0; #X connect 5 1 8 0; #X connect 7 0 2 0; #X connect 8 0 4 1; pd-iemmatrix-0.3/tests/mtx_le/000077500000000000000000000000001262113134600164055ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_le/00_exist.pd000066400000000000000000000004771262113134600203750ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X obj 122 161 mtx_le; #X text 67 37 test for existance of [mtx_le]; #X msg 122 122 matrix 1 1 1; #X connect 0 0 6 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 2 0; #X connect 6 0 4 0; pd-iemmatrix-0.3/tests/mtx_le/01_function.pd000066400000000000000000000021061262113134600210560ustar00rootroot00000000000000#N canvas 117 373 440 427 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 200 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 156 t l l; #X obj 122 98 t b; #X obj 122 221 mtx_le 2; #X obj 236 221 <= 2; #X obj 277 221 <= 2; #X obj 318 220 <= 2; #X obj 359 220 <= 2; #X msg 122 132 2 5 -1.1 4; #X connect 0 0 14 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 16 0; #X connect 7 1 17 0; #X connect 7 2 18 0; #X connect 7 3 19 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 15 0; #X connect 13 0 12 0; #X connect 13 1 7 0; #X connect 14 0 20 0; #X connect 15 0 2 0; #X connect 16 0 8 1; #X connect 17 0 9 1; #X connect 18 0 10 1; #X connect 19 0 11 1; #X connect 20 0 13 0; pd-iemmatrix-0.3/tests/mtx_le/02_function.pd000066400000000000000000000025711262113134600210650ustar00rootroot00000000000000#N canvas 176 399 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 166 200 matrix 2 2 \$1 \$2 \$3 \$4; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 252 228 unpack 0 0 0 0; #X obj 122 98 t b b; #X obj 185 156 t l l; #X obj 122 156 t l l; #X obj 122 221 mtx_le; #X obj 236 269 <=; #X obj 267 269 <=; #X obj 298 268 <=; #X obj 329 268 <=; #X msg 122 132 1 2 3 4; #X msg 185 133 9 8 7 6; #X connect 0 0 15 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 19 0; #X connect 7 1 20 0; #X connect 7 2 21 0; #X connect 7 3 22 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 18 1; #X connect 13 0 18 0; #X connect 14 0 19 1; #X connect 14 1 20 1; #X connect 14 2 21 1; #X connect 14 3 22 1; #X connect 15 0 23 0; #X connect 15 1 24 0; #X connect 16 0 12 0; #X connect 16 1 14 0; #X connect 17 0 13 0; #X connect 17 1 7 0; #X connect 18 0 2 0; #X connect 19 0 8 1; #X connect 20 0 9 1; #X connect 21 0 10 1; #X connect 22 0 11 1; #X connect 23 0 17 0; #X connect 24 0 16 0; pd-iemmatrix-0.3/tests/mtx_le/03_function.pd000066400000000000000000000021031262113134600210550ustar00rootroot00000000000000#N canvas 144 215 431 450 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 256 200 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 156 t l l; #X obj 122 98 t b; #X msg 122 132 3 2 1 0; #X obj 122 221 mtx_le 1; #X obj 256 221 <= 1; #X obj 297 221 <= 1; #X obj 338 220 <= 1; #X obj 379 220 <= 1; #X connect 0 0 14 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 17 0; #X connect 7 1 18 0; #X connect 7 2 19 0; #X connect 7 3 20 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 16 0; #X connect 13 0 12 0; #X connect 13 1 7 0; #X connect 14 0 15 0; #X connect 15 0 13 0; #X connect 16 0 2 0; #X connect 17 0 8 1; #X connect 18 0 9 1; #X connect 19 0 10 1; #X connect 20 0 11 1; pd-iemmatrix-0.3/tests/mtx_le/04_function.pd000066400000000000000000000024571262113134600210720ustar00rootroot00000000000000#N canvas 190 400 412 429 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 185 190 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 252 228 unpack 0 0 0 0; #X obj 122 98 t b b; #X obj 185 156 t l l; #X obj 122 221 mtx_le; #X obj 236 269 <=; #X obj 267 269 <=; #X obj 298 268 <=; #X obj 329 268 <=; #X obj 122 156 t f f; #X obj 236 248 t f f f f; #X msg 122 132 5; #X msg 185 133 1 2 4 8; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 7 0; #X connect 3 1 8 0; #X connect 3 2 9 0; #X connect 3 3 10 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 5 0; #X connect 8 0 5 1; #X connect 9 0 4 0; #X connect 10 0 4 1; #X connect 11 0 15 1; #X connect 12 0 16 1; #X connect 12 1 17 1; #X connect 12 2 18 1; #X connect 12 3 19 1; #X connect 13 0 22 0; #X connect 13 1 23 0; #X connect 14 0 11 0; #X connect 14 1 12 0; #X connect 15 0 2 0; #X connect 16 0 7 1; #X connect 17 0 8 1; #X connect 18 0 9 1; #X connect 19 0 10 1; #X connect 20 0 15 0; #X connect 20 1 21 0; #X connect 21 0 16 0; #X connect 21 1 17 0; #X connect 21 2 18 0; #X connect 21 3 19 0; #X connect 22 0 20 0; #X connect 23 0 14 0; pd-iemmatrix-0.3/tests/mtx_le/05_function.pd000066400000000000000000000005611262113134600210650ustar00rootroot00000000000000#N canvas 55 354 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 307 ==; #X obj 122 98 t b; #X obj 122 174 t f f; #X msg 122 132 11; #X obj 122 221 mtx_le 7; #X obj 207 221 <= 7; #X connect 0 0 3 0; #X connect 2 0 1 0; #X connect 3 0 5 0; #X connect 4 0 6 0; #X connect 4 1 7 0; #X connect 5 0 4 0; #X connect 6 0 2 0; #X connect 7 0 2 1; pd-iemmatrix-0.3/tests/mtx_le/06_function.pd000066400000000000000000000024601262113134600210660ustar00rootroot00000000000000#N canvas 282 295 386 465 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 98 t b b; #X obj 122 156 t l l; #X obj 236 269 <=; #X obj 267 269 <=; #X obj 298 268 <=; #X obj 329 268 <=; #X obj 252 228 t f f f f; #X obj 185 156 t f f; #X obj 122 221 mtx_le 0; #X msg 122 132 0 2 3 5; #X msg 185 133 17; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 15 0; #X connect 7 1 16 0; #X connect 7 2 17 0; #X connect 7 3 18 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 21 0; #X connect 13 0 22 0; #X connect 13 1 23 0; #X connect 14 0 12 0; #X connect 14 1 7 0; #X connect 15 0 8 1; #X connect 16 0 9 1; #X connect 17 0 10 1; #X connect 18 0 11 1; #X connect 19 0 15 1; #X connect 19 1 16 1; #X connect 19 2 17 1; #X connect 19 3 18 1; #X connect 20 0 21 1; #X connect 20 1 19 0; #X connect 21 0 2 0; #X connect 22 0 14 0; #X connect 23 0 20 0; pd-iemmatrix-0.3/tests/mtx_le/07_function.pd000066400000000000000000000007471262113134600210750ustar00rootroot00000000000000#N canvas 270 180 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 213 71 bang; #X obj 122 98 t b b; #X obj 122 175 t f f; #X obj 122 307 ==; #X obj 122 251 mtx_le 0; #X obj 239 251 <=; #X msg 122 132 6; #X msg 152 131 9; #X connect 0 0 3 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 4 0 6 0; #X connect 4 1 7 0; #X connect 5 0 1 0; #X connect 6 0 5 0; #X connect 7 0 5 1; #X connect 8 0 4 0; #X connect 9 0 6 1; #X connect 9 0 7 1; pd-iemmatrix-0.3/tests/mtx_le/08_function.pd000066400000000000000000000024611262113134600210710ustar00rootroot00000000000000#N canvas 277 252 796 483 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 98 t b b; #X obj 122 156 t l l; #X obj 236 269 <=; #X obj 267 269 <=; #X obj 298 268 <=; #X obj 329 268 <=; #X obj 252 228 t f f f f; #X obj 185 156 t f f; #X obj 122 221 mtx_le 0; #X msg 122 132 4 3 7 6; #X msg 185 133 123; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 15 0; #X connect 7 1 16 0; #X connect 7 2 17 0; #X connect 7 3 18 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 21 0; #X connect 13 0 22 0; #X connect 13 1 23 0; #X connect 14 0 12 0; #X connect 14 1 7 0; #X connect 15 0 8 1; #X connect 16 0 9 1; #X connect 17 0 10 1; #X connect 18 0 11 1; #X connect 19 0 15 1; #X connect 19 1 16 1; #X connect 19 2 17 1; #X connect 19 3 18 1; #X connect 20 0 21 1; #X connect 20 1 19 0; #X connect 21 0 2 0; #X connect 22 0 14 0; #X connect 23 0 20 0; pd-iemmatrix-0.3/tests/mtx_le/09_function.pd000066400000000000000000000025541262113134600210750ustar00rootroot00000000000000#N canvas 311 295 379 440 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 98 t b b; #X obj 185 156 t l l; #X obj 122 156 t l l; #X obj 122 221 mtx_le; #X obj 236 269 <=; #X obj 267 269 <=; #X obj 298 268 <=; #X obj 329 268 <=; #X msg 186 200 matrix 1 2 \$1 \$2; #X obj 252 228 unpack 0 0; #X msg 122 132 10 9 -1 3; #X msg 185 133 7 34; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 17 0; #X connect 7 1 18 0; #X connect 7 2 19 0; #X connect 7 3 20 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 16 0; #X connect 13 0 23 0; #X connect 13 1 24 0; #X connect 14 0 21 0; #X connect 14 1 22 0; #X connect 15 0 12 0; #X connect 15 1 7 0; #X connect 16 0 2 0; #X connect 17 0 8 1; #X connect 18 0 9 1; #X connect 19 0 10 1; #X connect 20 0 11 1; #X connect 21 0 16 1; #X connect 22 0 17 1; #X connect 22 0 19 1; #X connect 22 1 18 1; #X connect 22 1 20 1; #X connect 23 0 15 0; #X connect 24 0 14 0; pd-iemmatrix-0.3/tests/mtx_le/10_function.pd000066400000000000000000000025511262113134600210620ustar00rootroot00000000000000#N canvas 182 266 409 472 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 98 t b b; #X obj 185 156 t l l; #X obj 122 156 t l l; #X obj 122 221 mtx_le; #X obj 236 269 <=; #X obj 267 269 <=; #X obj 298 268 <=; #X obj 329 268 <=; #X msg 166 200 matrix 2 1 \$1 \$2; #X obj 252 226 unpack 0 0; #X msg 185 133 5 3; #X msg 122 132 4 2 9 8; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 17 0; #X connect 7 1 18 0; #X connect 7 2 19 0; #X connect 7 3 20 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 16 0; #X connect 13 0 24 0; #X connect 13 1 23 0; #X connect 14 0 21 0; #X connect 14 1 22 0; #X connect 15 0 12 0; #X connect 15 1 7 0; #X connect 16 0 2 0; #X connect 17 0 8 1; #X connect 18 0 9 1; #X connect 19 0 10 1; #X connect 20 0 11 1; #X connect 21 0 16 1; #X connect 22 0 17 1; #X connect 22 0 18 1; #X connect 22 1 19 1; #X connect 22 1 20 1; #X connect 23 0 14 0; #X connect 24 0 15 0; pd-iemmatrix-0.3/tests/mtx_log/000077500000000000000000000000001262113134600165665ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_log/00_exist.pd000066400000000000000000000005011262113134600205420ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X obj 122 161 mtx_log; #X text 67 37 test for existance of [mtx_log]; #X msg 122 122 matrix 1 1 1; #X connect 0 0 6 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 2 0; #X connect 6 0 4 0; pd-iemmatrix-0.3/tests/mtx_log/01_function.pd000066400000000000000000000007131262113134600212410ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 211 mtx_log; #X msg 122 233 \$3; #X obj 122 101 t b; #X obj 122 151 t f f; #X msg 122 188 matrix 1 1 \$1; #X obj 165 232 log; #X obj 122 271 ==; #X msg 122 127 2; #X connect 0 0 4 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 4 0 9 0; #X connect 5 0 6 0; #X connect 5 1 7 0; #X connect 6 0 2 0; #X connect 7 0 8 1; #X connect 8 0 1 0; #X connect 9 0 5 0; pd-iemmatrix-0.3/tests/mtx_log/02_function.pd000066400000000000000000000021721262113134600212430ustar00rootroot00000000000000#N canvas 597 136 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 191 mtx_log; #X text 67 37 test for existance of [mtx_log]; #X msg 122 170 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 89 t b; #X obj 122 135 t l l; #X msg 122 213 \$3 \$4 \$5 \$6; #X obj 122 238 unpack 0 0 0 0; #X obj 184 300 *; #X obj 122 300 *; #X obj 122 326 *; #X obj 236 218 unpack 0 0 0 0; #X obj 122 277 ==; #X obj 153 277 ==; #X obj 184 277 ==; #X obj 215 277 ==; #X obj 236 239 log; #X obj 267 239 log; #X obj 298 238 log; #X obj 329 238 log; #X msg 122 110 3 1 10.5 0.1; #X connect 0 0 5 0; #X connect 2 0 7 0; #X connect 4 0 2 0; #X connect 5 0 21 0; #X connect 6 0 4 0; #X connect 6 1 12 0; #X connect 7 0 8 0; #X connect 8 0 13 0; #X connect 8 1 14 0; #X connect 8 2 15 0; #X connect 8 3 16 0; #X connect 9 0 11 1; #X connect 10 0 11 0; #X connect 11 0 1 0; #X connect 12 0 17 0; #X connect 12 1 18 0; #X connect 12 2 19 0; #X connect 12 3 20 0; #X connect 13 0 10 0; #X connect 14 0 10 1; #X connect 15 0 9 0; #X connect 16 0 9 1; #X connect 17 0 13 1; #X connect 18 0 14 1; #X connect 19 0 15 1; #X connect 20 0 16 1; #X connect 21 0 6 0; pd-iemmatrix-0.3/tests/mtx_log/03_function.pd000066400000000000000000000027461262113134600212530ustar00rootroot00000000000000#N canvas 42 94 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 191 mtx_log; #X text 67 37 test for existance of [mtx_log]; #X obj 122 89 t b; #X obj 122 135 t l l; #X obj 184 300 *; #X obj 122 300 *; #X obj 122 326 *; #X obj 122 277 ==; #X obj 153 277 ==; #X obj 184 277 ==; #X obj 215 277 ==; #X obj 266 239 log; #X obj 297 239 log; #X obj 328 238 log; #X obj 359 238 log; #X msg 122 170 matrix 2 3 \$1 \$2 \$3 \$4 \$5 \$6; #X obj 254 300 *; #X obj 254 277 ==; #X obj 285 277 ==; #X obj 122 238 unpack 0 0 0 0 0 0; #X msg 122 213 \$3 \$4 \$5 \$6 \$7 \$8; #X obj 388 238 log; #X obj 419 238 log; #X obj 266 218 unpack 0 0 0 0 0 0; #X obj 122 347 *; #X msg 122 110 4 2 10.5 0.05 100 12; #X connect 0 0 4 0; #X connect 2 0 22 0; #X connect 4 0 27 0; #X connect 5 0 17 0; #X connect 5 1 25 0; #X connect 6 0 8 1; #X connect 7 0 8 0; #X connect 8 0 26 0; #X connect 9 0 7 0; #X connect 10 0 7 1; #X connect 11 0 6 0; #X connect 12 0 6 1; #X connect 13 0 9 1; #X connect 14 0 10 1; #X connect 15 0 11 1; #X connect 16 0 12 1; #X connect 17 0 2 0; #X connect 18 0 26 1; #X connect 19 0 18 0; #X connect 20 0 18 1; #X connect 21 0 9 0; #X connect 21 1 10 0; #X connect 21 2 11 0; #X connect 21 3 12 0; #X connect 21 4 19 0; #X connect 21 5 20 0; #X connect 22 0 21 0; #X connect 23 0 19 1; #X connect 24 0 20 1; #X connect 25 0 13 0; #X connect 25 1 14 0; #X connect 25 2 15 0; #X connect 25 3 16 0; #X connect 25 4 23 0; #X connect 25 5 24 0; #X connect 26 0 1 0; #X connect 27 0 5 0; pd-iemmatrix-0.3/tests/mtx_log/04_function.pd000066400000000000000000000025521262113134600212470ustar00rootroot00000000000000#N canvas 385 142 710 488 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 222 191 mtx_log; #X text 67 37 test for existance of [mtx_log]; #X msg 222 170 matrix 2 2 \$1 \$2 \$3 \$4; #X msg 222 110 3 -1 -10.5 0; #X obj 222 135 t l l; #X msg 222 213 \$3 \$4 \$5 \$6; #X obj 222 238 unpack 0 0 0 0; #X obj 284 300 *; #X obj 222 300 *; #X obj 222 326 *; #X obj 336 218 unpack 0 0 0 0; #X obj 222 277 ==; #X obj 253 277 ==; #X obj 284 277 ==; #X obj 315 277 ==; #X obj 336 239 log; #X obj 367 239 log; #X obj 398 238 log; #X obj 429 238 log; #X obj 122 89 t b b; #X obj 222 433 print mtx_log; #X msg 222 392 for NaNs the behaviour different from [log] \, this no bug !; #X msg 122 354 1; #X obj 222 351 select 0; #X connect 0 0 21 0; #X connect 2 0 7 0; #X connect 4 0 2 0; #X connect 5 0 6 0; #X connect 6 0 4 0; #X connect 6 1 12 0; #X connect 7 0 8 0; #X connect 8 0 13 0; #X connect 8 1 14 0; #X connect 8 2 15 0; #X connect 8 3 16 0; #X connect 9 0 11 1; #X connect 10 0 11 0; #X connect 11 0 25 0; #X connect 12 0 17 0; #X connect 12 1 18 0; #X connect 12 2 19 0; #X connect 12 3 20 0; #X connect 13 0 10 0; #X connect 14 0 10 1; #X connect 15 0 9 0; #X connect 16 0 9 1; #X connect 17 0 13 1; #X connect 18 0 14 1; #X connect 19 0 15 1; #X connect 20 0 16 1; #X connect 21 0 24 0; #X connect 21 1 5 0; #X connect 23 0 22 0; #X connect 24 0 1 0; #X connect 25 0 23 0; pd-iemmatrix-0.3/tests/mtx_lt/000077500000000000000000000000001262113134600164245ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_lt/00_exist.pd000066400000000000000000000004771262113134600204140ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X obj 122 161 mtx_lt; #X text 67 37 test for existance of [mtx_lt]; #X msg 122 122 matrix 1 1 1; #X connect 0 0 6 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 2 0; #X connect 6 0 4 0; pd-iemmatrix-0.3/tests/mtx_lt/01_function.pd000066400000000000000000000021021262113134600210710ustar00rootroot00000000000000#N canvas 117 373 440 427 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 200 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 156 t l l; #X obj 122 98 t b; #X obj 122 221 mtx_lt 2; #X obj 236 221 < 2; #X obj 277 221 < 2; #X obj 318 220 < 2; #X obj 359 220 < 2; #X msg 122 132 2 5 -1.1 4; #X connect 0 0 14 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 16 0; #X connect 7 1 17 0; #X connect 7 2 18 0; #X connect 7 3 19 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 15 0; #X connect 13 0 12 0; #X connect 13 1 7 0; #X connect 14 0 20 0; #X connect 15 0 2 0; #X connect 16 0 8 1; #X connect 17 0 9 1; #X connect 18 0 10 1; #X connect 19 0 11 1; #X connect 20 0 13 0; pd-iemmatrix-0.3/tests/mtx_lt/02_function.pd000066400000000000000000000025651262113134600211070ustar00rootroot00000000000000#N canvas 176 399 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 166 200 matrix 2 2 \$1 \$2 \$3 \$4; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 252 228 unpack 0 0 0 0; #X obj 122 98 t b b; #X obj 185 156 t l l; #X obj 122 156 t l l; #X obj 122 221 mtx_lt; #X obj 236 269 <; #X obj 267 269 <; #X obj 298 268 <; #X obj 329 268 <; #X msg 122 132 1 2 3 4; #X msg 185 133 9 8 7 6; #X connect 0 0 15 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 19 0; #X connect 7 1 20 0; #X connect 7 2 21 0; #X connect 7 3 22 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 18 1; #X connect 13 0 18 0; #X connect 14 0 19 1; #X connect 14 1 20 1; #X connect 14 2 21 1; #X connect 14 3 22 1; #X connect 15 0 23 0; #X connect 15 1 24 0; #X connect 16 0 12 0; #X connect 16 1 14 0; #X connect 17 0 13 0; #X connect 17 1 7 0; #X connect 18 0 2 0; #X connect 19 0 8 1; #X connect 20 0 9 1; #X connect 21 0 10 1; #X connect 22 0 11 1; #X connect 23 0 17 0; #X connect 24 0 16 0; pd-iemmatrix-0.3/tests/mtx_lt/03_function.pd000066400000000000000000000020771262113134600211060ustar00rootroot00000000000000#N canvas 144 215 431 450 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 256 200 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 156 t l l; #X obj 122 98 t b; #X msg 122 132 3 2 1 0; #X obj 122 221 mtx_lt 1; #X obj 256 221 < 1; #X obj 297 221 < 1; #X obj 338 220 < 1; #X obj 379 220 < 1; #X connect 0 0 14 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 17 0; #X connect 7 1 18 0; #X connect 7 2 19 0; #X connect 7 3 20 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 16 0; #X connect 13 0 12 0; #X connect 13 1 7 0; #X connect 14 0 15 0; #X connect 15 0 13 0; #X connect 16 0 2 0; #X connect 17 0 8 1; #X connect 18 0 9 1; #X connect 19 0 10 1; #X connect 20 0 11 1; pd-iemmatrix-0.3/tests/mtx_lt/04_function.pd000066400000000000000000000024531262113134600211050ustar00rootroot00000000000000#N canvas 190 400 412 429 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 185 190 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 252 228 unpack 0 0 0 0; #X obj 122 98 t b b; #X obj 185 156 t l l; #X obj 122 221 mtx_lt; #X obj 236 269 <; #X obj 267 269 <; #X obj 298 268 <; #X obj 329 268 <; #X obj 122 156 t f f; #X obj 236 248 t f f f f; #X msg 122 132 5; #X msg 185 133 1 2 4 8; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 7 0; #X connect 3 1 8 0; #X connect 3 2 9 0; #X connect 3 3 10 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 5 0; #X connect 8 0 5 1; #X connect 9 0 4 0; #X connect 10 0 4 1; #X connect 11 0 15 1; #X connect 12 0 16 1; #X connect 12 1 17 1; #X connect 12 2 18 1; #X connect 12 3 19 1; #X connect 13 0 22 0; #X connect 13 1 23 0; #X connect 14 0 11 0; #X connect 14 1 12 0; #X connect 15 0 2 0; #X connect 16 0 7 1; #X connect 17 0 8 1; #X connect 18 0 9 1; #X connect 19 0 10 1; #X connect 20 0 15 0; #X connect 20 1 21 0; #X connect 21 0 16 0; #X connect 21 1 17 0; #X connect 21 2 18 0; #X connect 21 3 19 0; #X connect 22 0 20 0; #X connect 23 0 14 0; pd-iemmatrix-0.3/tests/mtx_lt/05_function.pd000066400000000000000000000005601262113134600211030ustar00rootroot00000000000000#N canvas 55 354 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 307 ==; #X obj 122 98 t b; #X obj 122 174 t f f; #X msg 122 132 11; #X obj 122 221 mtx_lt 7; #X obj 207 221 < 7; #X connect 0 0 3 0; #X connect 2 0 1 0; #X connect 3 0 5 0; #X connect 4 0 6 0; #X connect 4 1 7 0; #X connect 5 0 4 0; #X connect 6 0 2 0; #X connect 7 0 2 1; pd-iemmatrix-0.3/tests/mtx_lt/06_function.pd000066400000000000000000000024541262113134600211100ustar00rootroot00000000000000#N canvas 282 295 386 465 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 98 t b b; #X obj 122 156 t l l; #X obj 236 269 <; #X obj 267 269 <; #X obj 298 268 <; #X obj 329 268 <; #X obj 252 228 t f f f f; #X obj 185 156 t f f; #X obj 122 221 mtx_lt 0; #X msg 122 132 0 2 3 5; #X msg 185 133 17; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 15 0; #X connect 7 1 16 0; #X connect 7 2 17 0; #X connect 7 3 18 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 21 0; #X connect 13 0 22 0; #X connect 13 1 23 0; #X connect 14 0 12 0; #X connect 14 1 7 0; #X connect 15 0 8 1; #X connect 16 0 9 1; #X connect 17 0 10 1; #X connect 18 0 11 1; #X connect 19 0 15 1; #X connect 19 1 16 1; #X connect 19 2 17 1; #X connect 19 3 18 1; #X connect 20 0 21 1; #X connect 20 1 19 0; #X connect 21 0 2 0; #X connect 22 0 14 0; #X connect 23 0 20 0; pd-iemmatrix-0.3/tests/mtx_lt/07_function.pd000066400000000000000000000007461262113134600211130ustar00rootroot00000000000000#N canvas 270 180 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 213 71 bang; #X obj 122 98 t b b; #X obj 122 175 t f f; #X obj 122 307 ==; #X obj 122 251 mtx_lt 0; #X obj 239 251 <; #X msg 122 132 6; #X msg 152 131 9; #X connect 0 0 3 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 4 0 6 0; #X connect 4 1 7 0; #X connect 5 0 1 0; #X connect 6 0 5 0; #X connect 7 0 5 1; #X connect 8 0 4 0; #X connect 9 0 6 1; #X connect 9 0 7 1; pd-iemmatrix-0.3/tests/mtx_lt/08_function.pd000066400000000000000000000024551262113134600211130ustar00rootroot00000000000000#N canvas 277 252 796 483 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 98 t b b; #X obj 122 156 t l l; #X obj 236 269 <; #X obj 267 269 <; #X obj 298 268 <; #X obj 329 268 <; #X obj 252 228 t f f f f; #X obj 185 156 t f f; #X obj 122 221 mtx_lt 0; #X msg 122 132 4 3 7 6; #X msg 185 133 123; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 15 0; #X connect 7 1 16 0; #X connect 7 2 17 0; #X connect 7 3 18 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 21 0; #X connect 13 0 22 0; #X connect 13 1 23 0; #X connect 14 0 12 0; #X connect 14 1 7 0; #X connect 15 0 8 1; #X connect 16 0 9 1; #X connect 17 0 10 1; #X connect 18 0 11 1; #X connect 19 0 15 1; #X connect 19 1 16 1; #X connect 19 2 17 1; #X connect 19 3 18 1; #X connect 20 0 21 1; #X connect 20 1 19 0; #X connect 21 0 2 0; #X connect 22 0 14 0; #X connect 23 0 20 0; pd-iemmatrix-0.3/tests/mtx_lt/09_function.pd000066400000000000000000000025501262113134600211100ustar00rootroot00000000000000#N canvas 311 295 379 440 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 98 t b b; #X obj 185 156 t l l; #X obj 122 156 t l l; #X obj 122 221 mtx_lt; #X obj 236 269 <; #X obj 267 269 <; #X obj 298 268 <; #X obj 329 268 <; #X msg 186 200 matrix 1 2 \$1 \$2; #X obj 252 228 unpack 0 0; #X msg 122 132 10 9 -1 3; #X msg 185 133 7 34; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 17 0; #X connect 7 1 18 0; #X connect 7 2 19 0; #X connect 7 3 20 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 16 0; #X connect 13 0 23 0; #X connect 13 1 24 0; #X connect 14 0 21 0; #X connect 14 1 22 0; #X connect 15 0 12 0; #X connect 15 1 7 0; #X connect 16 0 2 0; #X connect 17 0 8 1; #X connect 18 0 9 1; #X connect 19 0 10 1; #X connect 20 0 11 1; #X connect 21 0 16 1; #X connect 22 0 17 1; #X connect 22 0 19 1; #X connect 22 1 18 1; #X connect 22 1 20 1; #X connect 23 0 15 0; #X connect 24 0 14 0; pd-iemmatrix-0.3/tests/mtx_lt/10_function.pd000066400000000000000000000025451262113134600211040ustar00rootroot00000000000000#N canvas 182 266 409 472 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 98 t b b; #X obj 185 156 t l l; #X obj 122 156 t l l; #X obj 122 221 mtx_lt; #X obj 236 269 <; #X obj 267 269 <; #X obj 298 268 <; #X obj 329 268 <; #X msg 166 200 matrix 2 1 \$1 \$2; #X obj 252 226 unpack 0 0; #X msg 185 133 5 3; #X msg 122 132 4 2 9 8; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 17 0; #X connect 7 1 18 0; #X connect 7 2 19 0; #X connect 7 3 20 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 16 0; #X connect 13 0 24 0; #X connect 13 1 23 0; #X connect 14 0 21 0; #X connect 14 1 22 0; #X connect 15 0 12 0; #X connect 15 1 7 0; #X connect 16 0 2 0; #X connect 17 0 8 1; #X connect 18 0 9 1; #X connect 19 0 10 1; #X connect 20 0 11 1; #X connect 21 0 16 1; #X connect 22 0 17 1; #X connect 22 0 18 1; #X connect 22 1 19 1; #X connect 22 1 20 1; #X connect 23 0 14 0; #X connect 24 0 15 0; pd-iemmatrix-0.3/tests/mtx_matcher/000077500000000000000000000000001262113134600174305ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_matcher/00_exist.pd000066400000000000000000000005111262113134600214050ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X obj 122 161 mtx_matcher; #X text 67 37 test for existance of [mtx_matcher]; #X msg 122 122 matrix 1 1 1; #X connect 0 0 6 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 2 0; #X connect 6 0 4 0; pd-iemmatrix-0.3/tests/mtx_matrix/000077500000000000000000000000001262113134600173115ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_matrix/00_exist.pd000066400000000000000000000004771262113134600213010ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X text 67 37 test for existance of [matrix]; #X obj 122 161 matrix; #X msg 122 122 matrix 1 1 1; #X connect 0 0 6 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 5 0 2 0; #X connect 6 0 5 0; pd-iemmatrix-0.3/tests/mtx_matrix/00_exist1.pd000066400000000000000000000004121262113134600213470ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X text 67 37 test for existance of [mtx]; #X obj 122 161 mtx 1; #X connect 0 0 5 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 5 0 2 0; pd-iemmatrix-0.3/tests/mtx_max/000077500000000000000000000000001262113134600165725ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_max/00_exist.pd000066400000000000000000000005011262113134600205460ustar00rootroot00000000000000#N canvas 166 104 310 436 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X msg 122 122 matrix 1 1 1; #X obj 122 161 mtx_max; #X text 67 37 test for existance of [mtx_max]; #X connect 0 0 4 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 5 0; #X connect 5 0 2 0; pd-iemmatrix-0.3/tests/mtx_max/01_function.pd000066400000000000000000000005721262113134600212500ustar00rootroot00000000000000#N canvas 50 42 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 101 t b; #X obj 122 151 t f f; #X msg 122 190 matrix 1 1 \$1; #X obj 122 265 ==; #X msg 122 127 -2; #X obj 122 211 mtx_max; #X connect 0 0 2 0; #X connect 2 0 6 0; #X connect 3 0 4 0; #X connect 3 1 5 1; #X connect 4 0 7 0; #X connect 5 0 1 0; #X connect 6 0 3 0; #X connect 7 0 5 0; pd-iemmatrix-0.3/tests/mtx_max/02_function.pd000066400000000000000000000012561262113134600212510ustar00rootroot00000000000000#N canvas 175 99 591 461 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X text 67 37 test for existance of [mtx_max]; #X msg 122 170 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 89 t b; #X msg 122 110 3 -1 -10.5 0; #X obj 122 277 ==; #X obj 297 167 unpack 0 0 0 0; #X obj 297 188 max; #X obj 359 187 max; #X obj 297 208 max; #X obj 122 191 mtx_max; #X obj 122 136 t l l; #X connect 0 0 4 0; #X connect 3 0 11 0; #X connect 4 0 5 0; #X connect 5 0 12 0; #X connect 6 0 1 0; #X connect 7 0 8 0; #X connect 7 1 8 1; #X connect 7 2 9 0; #X connect 7 3 9 1; #X connect 8 0 10 0; #X connect 9 0 10 1; #X connect 10 0 6 1; #X connect 11 0 6 0; #X connect 12 0 3 0; #X connect 12 1 7 0; pd-iemmatrix-0.3/tests/mtx_max/03_function.pd000066400000000000000000000017561262113134600212570ustar00rootroot00000000000000#N canvas 105 62 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X text 67 37 test for existance of [mtx_max]; #X obj 122 89 t b; #X obj 122 135 t l l; #X msg 122 170 matrix 2 3 \$1 \$2 \$3 \$4 \$5 \$6; #X msg 122 110 3 -1 10.5 0.05 0 12; #X obj 349 196 unpack 0 0 0 0 0 0; #X obj 349 217 max; #X obj 380 217 max; #X obj 411 216 max; #X obj 122 300 *; #X obj 122 326 *; #X obj 122 277 ==; #X obj 161 277 ==; #X obj 201 277 ==; #X obj 122 255 unpack 0 0 0; #X obj 122 191 mtx_max :; #X connect 0 0 3 0; #X connect 3 0 6 0; #X connect 4 0 5 0; #X connect 4 1 7 0; #X connect 5 0 17 0; #X connect 6 0 4 0; #X connect 7 0 8 0; #X connect 7 1 9 0; #X connect 7 2 10 0; #X connect 7 3 8 1; #X connect 7 4 9 1; #X connect 7 5 10 1; #X connect 8 0 13 1; #X connect 9 0 14 1; #X connect 10 0 15 1; #X connect 11 0 12 0; #X connect 12 0 1 0; #X connect 13 0 11 0; #X connect 14 0 11 1; #X connect 15 0 12 1; #X connect 16 0 13 0; #X connect 16 1 14 0; #X connect 16 2 15 0; #X connect 17 0 16 0; pd-iemmatrix-0.3/tests/mtx_max/04_function.pd000066400000000000000000000017601262113134600212530ustar00rootroot00000000000000#N canvas 105 62 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X text 67 37 test for existance of [mtx_max]; #X obj 122 89 t b; #X obj 122 135 t l l; #X msg 122 170 matrix 2 3 \$1 \$2 \$3 \$4 \$5 \$6; #X msg 122 110 3 -1 10.5 0.05 0 12; #X obj 138 226 unpack 0 0 0 0 0 0; #X obj 138 247 max; #X obj 169 247 max; #X obj 200 246 max; #X obj 122 330 *; #X obj 122 356 *; #X obj 122 307 ==; #X obj 161 307 ==; #X obj 201 307 ==; #X obj 122 285 unpack 0 0 0; #X obj 122 191 mtx_max col; #X connect 0 0 3 0; #X connect 3 0 6 0; #X connect 4 0 5 0; #X connect 4 1 7 0; #X connect 5 0 17 0; #X connect 6 0 4 0; #X connect 7 0 8 0; #X connect 7 1 9 0; #X connect 7 2 10 0; #X connect 7 3 8 1; #X connect 7 4 9 1; #X connect 7 5 10 1; #X connect 8 0 13 1; #X connect 9 0 14 1; #X connect 10 0 15 1; #X connect 11 0 12 0; #X connect 12 0 1 0; #X connect 13 0 11 0; #X connect 14 0 11 1; #X connect 15 0 12 1; #X connect 16 0 13 0; #X connect 16 1 14 0; #X connect 16 2 15 0; #X connect 17 0 16 0; pd-iemmatrix-0.3/tests/mtx_max/05_function.pd000066400000000000000000000017631262113134600212570ustar00rootroot00000000000000#N canvas 105 62 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X text 67 37 test for existance of [mtx_max]; #X obj 122 89 t b; #X obj 122 135 t l l; #X msg 122 170 matrix 2 3 \$1 \$2 \$3 \$4 \$5 \$6; #X msg 122 110 3 -1 10.5 0.05 0 12; #X obj 152 216 unpack 0 0 0 0 0 0; #X obj 152 237 max; #X obj 183 237 max; #X obj 214 236 max; #X obj 122 320 *; #X obj 122 346 *; #X obj 122 297 ==; #X obj 161 297 ==; #X obj 201 297 ==; #X obj 122 275 unpack 0 0 0; #X obj 122 191 mtx_max column; #X connect 0 0 3 0; #X connect 3 0 6 0; #X connect 4 0 5 0; #X connect 4 1 7 0; #X connect 5 0 17 0; #X connect 6 0 4 0; #X connect 7 0 8 0; #X connect 7 1 9 0; #X connect 7 2 10 0; #X connect 7 3 8 1; #X connect 7 4 9 1; #X connect 7 5 10 1; #X connect 8 0 13 1; #X connect 9 0 14 1; #X connect 10 0 15 1; #X connect 11 0 12 0; #X connect 12 0 1 0; #X connect 13 0 11 0; #X connect 14 0 11 1; #X connect 15 0 12 1; #X connect 16 0 13 0; #X connect 16 1 14 0; #X connect 16 2 15 0; #X connect 17 0 16 0; pd-iemmatrix-0.3/tests/mtx_max/06_function.pd000066400000000000000000000016651262113134600212610ustar00rootroot00000000000000#N canvas 105 62 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X text 67 37 test for existance of [mtx_max]; #X obj 122 89 t b; #X obj 122 135 t l l; #X msg 122 170 matrix 2 3 \$1 \$2 \$3 \$4 \$5 \$6; #X msg 122 110 3 -1 10.5 0.05 0 12; #X obj 122 341 *; #X obj 122 318 ==; #X obj 161 318 ==; #X obj 138 255 unpack 0 0 0 0 0 0; #X obj 122 296 unpack 0 0; #X obj 138 276 max; #X obj 169 276 max; #X obj 198 276 max; #X obj 229 276 max; #X obj 122 191 mtx_max row; #X connect 0 0 3 0; #X connect 3 0 6 0; #X connect 4 0 5 0; #X connect 4 1 10 0; #X connect 5 0 16 0; #X connect 6 0 4 0; #X connect 7 0 1 0; #X connect 8 0 7 0; #X connect 9 0 7 1; #X connect 10 0 12 0; #X connect 10 1 13 0; #X connect 10 2 13 1; #X connect 10 3 14 0; #X connect 10 4 15 0; #X connect 10 5 15 1; #X connect 11 0 8 0; #X connect 11 1 9 0; #X connect 12 0 8 1; #X connect 13 0 12 1; #X connect 14 0 9 1; #X connect 15 0 14 1; #X connect 16 0 11 0; pd-iemmatrix-0.3/tests/mtx_max2/000077500000000000000000000000001262113134600166545ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_max2/00_exist.pd000066400000000000000000000005031262113134600206320ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X obj 122 161 mtx_max2; #X text 67 37 test for existance of [mtx_max2]; #X msg 122 122 matrix 1 1 1; #X connect 0 0 6 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 2 0; #X connect 6 0 4 0; pd-iemmatrix-0.3/tests/mtx_mean/000077500000000000000000000000001262113134600167255ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_mean/00_exist.pd000066400000000000000000000005031262113134600207030ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X obj 122 161 mtx_mean; #X text 67 37 test for existance of [mtx_mean]; #X msg 122 122 matrix 1 1 1; #X connect 0 0 6 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 2 0; #X connect 6 0 4 0; pd-iemmatrix-0.3/tests/mtx_min/000077500000000000000000000000001262113134600165705ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_min/00_exist.pd000066400000000000000000000004761262113134600205570ustar00rootroot00000000000000#N canvas 0 77 396 423 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X msg 122 122 matrix 1 1 1; #X obj 122 161 mtx_min; #X text 67 37 test for existance of [mtx_min]; #X connect 0 0 4 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 5 0; #X connect 5 0 2 0; pd-iemmatrix-0.3/tests/mtx_min/01_function.pd000066400000000000000000000005721262113134600212460ustar00rootroot00000000000000#N canvas 50 42 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 101 t b; #X obj 122 151 t f f; #X msg 122 190 matrix 1 1 \$1; #X obj 122 265 ==; #X msg 122 127 -2; #X obj 122 211 mtx_min; #X connect 0 0 2 0; #X connect 2 0 6 0; #X connect 3 0 4 0; #X connect 3 1 5 1; #X connect 4 0 7 0; #X connect 5 0 1 0; #X connect 6 0 3 0; #X connect 7 0 5 0; pd-iemmatrix-0.3/tests/mtx_min/02_function.pd000066400000000000000000000012561262113134600212470ustar00rootroot00000000000000#N canvas 175 99 591 461 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X text 67 37 test for existance of [mtx_min]; #X msg 122 170 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 89 t b; #X msg 122 110 3 -1 -10.5 0; #X obj 285 168 unpack 0 0 0 0; #X obj 122 277 ==; #X obj 285 189 min; #X obj 347 188 min; #X obj 285 209 min; #X obj 122 191 mtx_min; #X obj 122 135 t l l; #X connect 0 0 4 0; #X connect 3 0 11 0; #X connect 4 0 5 0; #X connect 5 0 12 0; #X connect 6 0 8 0; #X connect 6 1 8 1; #X connect 6 2 9 0; #X connect 6 3 9 1; #X connect 7 0 1 0; #X connect 8 0 10 0; #X connect 9 0 10 1; #X connect 10 0 7 1; #X connect 11 0 7 0; #X connect 12 0 3 0; #X connect 12 1 6 0; pd-iemmatrix-0.3/tests/mtx_min/03_function.pd000066400000000000000000000017601262113134600212500ustar00rootroot00000000000000#N canvas 105 62 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X text 67 37 test for existance of [mtx_min]; #X obj 122 89 t b; #X obj 122 135 t l l; #X obj 122 300 *; #X obj 122 326 *; #X obj 122 277 ==; #X obj 161 277 ==; #X obj 201 277 ==; #X msg 122 170 matrix 2 3 \$1 \$2 \$3 \$4 \$5 \$6; #X msg 122 110 3 -1 10.5 0.05 0 12; #X obj 216 195 unpack 0 0 0 0 0 0; #X obj 216 216 min; #X obj 247 216 min; #X obj 278 215 min; #X obj 122 255 unpack 0 0 0; #X obj 122 191 mtx_min :; #X connect 0 0 3 0; #X connect 3 0 11 0; #X connect 4 0 10 0; #X connect 4 1 12 0; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 5 0; #X connect 8 0 5 1; #X connect 9 0 6 1; #X connect 10 0 17 0; #X connect 11 0 4 0; #X connect 12 0 13 0; #X connect 12 1 14 0; #X connect 12 2 15 0; #X connect 12 3 13 1; #X connect 12 4 14 1; #X connect 12 5 15 1; #X connect 13 0 7 1; #X connect 14 0 8 1; #X connect 15 0 9 1; #X connect 16 0 7 0; #X connect 16 1 8 0; #X connect 16 2 9 0; #X connect 17 0 16 0; pd-iemmatrix-0.3/tests/mtx_min/04_function.pd000066400000000000000000000017621262113134600212530ustar00rootroot00000000000000#N canvas 105 62 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X text 67 37 test for existance of [mtx_min]; #X obj 122 89 t b; #X obj 122 135 t l l; #X obj 122 300 *; #X obj 122 326 *; #X obj 122 277 ==; #X obj 161 277 ==; #X obj 201 277 ==; #X msg 122 170 matrix 2 3 \$1 \$2 \$3 \$4 \$5 \$6; #X msg 122 110 3 -1 10.5 0.05 0 12; #X obj 286 195 unpack 0 0 0 0 0 0; #X obj 286 216 min; #X obj 317 216 min; #X obj 348 215 min; #X obj 122 255 unpack 0 0 0; #X obj 122 191 mtx_min col; #X connect 0 0 3 0; #X connect 3 0 11 0; #X connect 4 0 10 0; #X connect 4 1 12 0; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 5 0; #X connect 8 0 5 1; #X connect 9 0 6 1; #X connect 10 0 17 0; #X connect 11 0 4 0; #X connect 12 0 13 0; #X connect 12 1 14 0; #X connect 12 2 15 0; #X connect 12 3 13 1; #X connect 12 4 14 1; #X connect 12 5 15 1; #X connect 13 0 7 1; #X connect 14 0 8 1; #X connect 15 0 9 1; #X connect 16 0 7 0; #X connect 16 1 8 0; #X connect 16 2 9 0; #X connect 17 0 16 0; pd-iemmatrix-0.3/tests/mtx_min/05_function.pd000066400000000000000000000017651262113134600212570ustar00rootroot00000000000000#N canvas 105 62 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X text 67 37 test for existance of [mtx_min]; #X obj 122 89 t b; #X obj 122 135 t l l; #X obj 122 300 *; #X obj 122 326 *; #X obj 122 277 ==; #X obj 161 277 ==; #X obj 201 277 ==; #X msg 122 170 matrix 2 3 \$1 \$2 \$3 \$4 \$5 \$6; #X msg 122 110 3 -1 10.5 0.05 0 12; #X obj 286 195 unpack 0 0 0 0 0 0; #X obj 286 216 min; #X obj 317 216 min; #X obj 348 215 min; #X obj 122 255 unpack 0 0 0; #X obj 122 191 mtx_min column; #X connect 0 0 3 0; #X connect 3 0 11 0; #X connect 4 0 10 0; #X connect 4 1 12 0; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 5 0; #X connect 8 0 5 1; #X connect 9 0 6 1; #X connect 10 0 17 0; #X connect 11 0 4 0; #X connect 12 0 13 0; #X connect 12 1 14 0; #X connect 12 2 15 0; #X connect 12 3 13 1; #X connect 12 4 14 1; #X connect 12 5 15 1; #X connect 13 0 7 1; #X connect 14 0 8 1; #X connect 15 0 9 1; #X connect 16 0 7 0; #X connect 16 1 8 0; #X connect 16 2 9 0; #X connect 17 0 16 0; pd-iemmatrix-0.3/tests/mtx_min/06_function.pd000066400000000000000000000016651262113134600212570ustar00rootroot00000000000000#N canvas 105 62 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X text 67 37 test for existance of [mtx_min]; #X obj 122 89 t b; #X obj 122 135 t l l; #X obj 122 300 *; #X obj 122 277 ==; #X obj 161 277 ==; #X msg 122 170 matrix 2 3 \$1 \$2 \$3 \$4 \$5 \$6; #X msg 122 110 3 -1 10.5 0.05 0 12; #X obj 138 214 unpack 0 0 0 0 0 0; #X obj 138 235 min; #X obj 169 235 min; #X obj 122 255 unpack 0 0; #X obj 198 235 min; #X obj 229 235 min; #X obj 122 191 mtx_min row; #X connect 0 0 3 0; #X connect 3 0 9 0; #X connect 4 0 8 0; #X connect 4 1 10 0; #X connect 5 0 1 0; #X connect 6 0 5 0; #X connect 7 0 5 1; #X connect 8 0 16 0; #X connect 9 0 4 0; #X connect 10 0 11 0; #X connect 10 1 12 0; #X connect 10 2 12 1; #X connect 10 3 14 0; #X connect 10 4 15 0; #X connect 10 5 15 1; #X connect 11 0 6 1; #X connect 12 0 11 1; #X connect 13 0 6 0; #X connect 13 1 7 0; #X connect 14 0 7 1; #X connect 15 0 14 1; #X connect 16 0 13 0; pd-iemmatrix-0.3/tests/mtx_min2/000077500000000000000000000000001262113134600166525ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_min2/00_exist.pd000066400000000000000000000005031262113134600206300ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X obj 122 161 mtx_min2; #X text 67 37 test for existance of [mtx_min2]; #X msg 122 122 matrix 1 1 1; #X connect 0 0 6 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 2 0; #X connect 6 0 4 0; pd-iemmatrix-0.3/tests/mtx_minmax/000077500000000000000000000000001262113134600172765ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_minmax/00_exist.pd000066400000000000000000000005071262113134600212600ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X msg 122 122 matrix 1 1 1; #X obj 122 161 mtx_minmax; #X text 67 37 test for existance of [mtx_minmax]; #X connect 0 0 4 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 5 0; #X connect 5 0 2 0; pd-iemmatrix-0.3/tests/mtx_minmax/01_function.pd000066400000000000000000000007621262113134600217550ustar00rootroot00000000000000#N canvas 50 42 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 101 t b; #X obj 122 151 t f f; #X msg 122 190 matrix 1 1 \$1; #X obj 122 265 ==; #X msg 122 127 -2; #X obj 122 211 mtx_minmax; #X obj 183 265 ==; #X obj 122 299 *; #X connect 0 0 2 0; #X connect 2 0 6 0; #X connect 3 0 4 0; #X connect 3 1 5 1; #X connect 3 1 8 1; #X connect 4 0 7 0; #X connect 5 0 9 0; #X connect 6 0 3 0; #X connect 7 0 5 0; #X connect 7 1 8 0; #X connect 8 0 9 1; #X connect 9 0 1 0; pd-iemmatrix-0.3/tests/mtx_minmax/02_function.pd000066400000000000000000000020451262113134600217520ustar00rootroot00000000000000#N canvas 175 99 591 461 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X text 67 37 test for existance of [mtx_abs]; #X msg 122 170 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 89 t b; #X msg 122 110 3 -1 -10.5 0; #X obj 122 300 *; #X obj 285 168 unpack 0 0 0 0; #X obj 122 277 ==; #X obj 153 277 ==; #X obj 122 191 mtx_minmax; #X obj 285 189 min; #X obj 347 188 min; #X obj 285 209 min; #X obj 122 135 t l l l; #X obj 387 167 unpack 0 0 0 0; #X obj 387 188 max; #X obj 449 187 max; #X obj 387 208 max; #X connect 0 0 4 0; #X connect 3 0 10 0; #X connect 4 0 5 0; #X connect 5 0 14 0; #X connect 6 0 1 0; #X connect 7 0 11 0; #X connect 7 1 11 1; #X connect 7 2 12 0; #X connect 7 3 12 1; #X connect 8 0 6 0; #X connect 9 0 6 1; #X connect 10 0 8 0; #X connect 10 1 9 0; #X connect 11 0 13 0; #X connect 12 0 13 1; #X connect 13 0 8 1; #X connect 14 0 3 0; #X connect 14 1 7 0; #X connect 14 2 15 0; #X connect 15 0 16 0; #X connect 15 1 16 1; #X connect 15 2 17 0; #X connect 15 3 17 1; #X connect 16 0 18 0; #X connect 17 0 18 1; #X connect 18 0 9 1; pd-iemmatrix-0.3/tests/mtx_minmax/03_function.pd000066400000000000000000000032251262113134600217540ustar00rootroot00000000000000#N canvas 105 62 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X text 67 37 test for existance of [mtx_abs]; #X obj 122 89 t b; #X obj 122 135 t l l; #X obj 122 300 *; #X obj 122 326 *; #X obj 122 277 ==; #X obj 161 277 ==; #X obj 201 277 ==; #X msg 122 170 matrix 2 3 \$1 \$2 \$3 \$4 \$5 \$6; #X msg 122 110 3 -1 10.5 0.05 0 12; #X obj 122 191 mtx_minmax :; #X obj 216 195 unpack 0 0 0 0 0 0; #X obj 216 216 min; #X obj 247 216 min; #X obj 278 215 min; #X obj 122 255 unpack 0 0 0; #X obj 122 357 *; #X obj 349 196 unpack 0 0 0 0 0 0; #X obj 349 217 max; #X obj 380 217 max; #X obj 411 216 max; #X obj 333 300 *; #X obj 333 326 *; #X obj 333 277 ==; #X obj 372 277 ==; #X obj 412 277 ==; #X obj 333 255 unpack 0 0 0; #X connect 0 0 3 0; #X connect 3 0 11 0; #X connect 4 0 10 0; #X connect 4 1 13 0; #X connect 4 1 19 0; #X connect 5 0 6 0; #X connect 6 0 18 0; #X connect 7 0 5 0; #X connect 8 0 5 1; #X connect 9 0 6 1; #X connect 10 0 12 0; #X connect 11 0 4 0; #X connect 12 0 17 0; #X connect 12 1 28 0; #X connect 13 0 14 0; #X connect 13 1 15 0; #X connect 13 2 16 0; #X connect 13 3 14 1; #X connect 13 4 15 1; #X connect 13 5 16 1; #X connect 14 0 7 1; #X connect 15 0 8 1; #X connect 16 0 9 1; #X connect 17 0 7 0; #X connect 17 1 8 0; #X connect 17 2 9 0; #X connect 18 0 1 0; #X connect 19 0 20 0; #X connect 19 1 21 0; #X connect 19 2 22 0; #X connect 19 3 20 1; #X connect 19 4 21 1; #X connect 19 5 22 1; #X connect 20 0 25 1; #X connect 21 0 26 1; #X connect 22 0 27 1; #X connect 23 0 24 0; #X connect 24 0 18 1; #X connect 25 0 23 0; #X connect 26 0 23 1; #X connect 27 0 24 1; #X connect 28 0 25 0; #X connect 28 1 26 0; #X connect 28 2 27 0; pd-iemmatrix-0.3/tests/mtx_minmax/04_function.pd000066400000000000000000000032271262113134600217570ustar00rootroot00000000000000#N canvas 105 62 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X text 67 37 test for existance of [mtx_abs]; #X obj 122 89 t b; #X obj 122 135 t l l; #X obj 122 300 *; #X obj 122 326 *; #X obj 122 277 ==; #X obj 161 277 ==; #X obj 201 277 ==; #X msg 122 170 matrix 2 3 \$1 \$2 \$3 \$4 \$5 \$6; #X msg 122 110 3 -1 10.5 0.05 0 12; #X obj 286 195 unpack 0 0 0 0 0 0; #X obj 286 216 min; #X obj 317 216 min; #X obj 348 215 min; #X obj 122 255 unpack 0 0 0; #X obj 122 357 *; #X obj 419 196 unpack 0 0 0 0 0 0; #X obj 419 217 max; #X obj 450 217 max; #X obj 481 216 max; #X obj 403 300 *; #X obj 403 326 *; #X obj 403 277 ==; #X obj 442 277 ==; #X obj 482 277 ==; #X obj 403 255 unpack 0 0 0; #X obj 122 191 mtx_minmax col; #X connect 0 0 3 0; #X connect 3 0 11 0; #X connect 4 0 10 0; #X connect 4 1 12 0; #X connect 4 1 18 0; #X connect 5 0 6 0; #X connect 6 0 17 0; #X connect 7 0 5 0; #X connect 8 0 5 1; #X connect 9 0 6 1; #X connect 10 0 28 0; #X connect 11 0 4 0; #X connect 12 0 13 0; #X connect 12 1 14 0; #X connect 12 2 15 0; #X connect 12 3 13 1; #X connect 12 4 14 1; #X connect 12 5 15 1; #X connect 13 0 7 1; #X connect 14 0 8 1; #X connect 15 0 9 1; #X connect 16 0 7 0; #X connect 16 1 8 0; #X connect 16 2 9 0; #X connect 17 0 1 0; #X connect 18 0 19 0; #X connect 18 1 20 0; #X connect 18 2 21 0; #X connect 18 3 19 1; #X connect 18 4 20 1; #X connect 18 5 21 1; #X connect 19 0 24 1; #X connect 20 0 25 1; #X connect 21 0 26 1; #X connect 22 0 23 0; #X connect 23 0 17 1; #X connect 24 0 22 0; #X connect 25 0 22 1; #X connect 26 0 23 1; #X connect 27 0 24 0; #X connect 27 1 25 0; #X connect 27 2 26 0; #X connect 28 0 16 0; #X connect 28 1 27 0; pd-iemmatrix-0.3/tests/mtx_minmax/05_function.pd000066400000000000000000000032321262113134600217540ustar00rootroot00000000000000#N canvas 105 62 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X text 67 37 test for existance of [mtx_abs]; #X obj 122 89 t b; #X obj 122 135 t l l; #X obj 122 300 *; #X obj 122 326 *; #X obj 122 277 ==; #X obj 161 277 ==; #X obj 201 277 ==; #X msg 122 170 matrix 2 3 \$1 \$2 \$3 \$4 \$5 \$6; #X msg 122 110 3 -1 10.5 0.05 0 12; #X obj 286 195 unpack 0 0 0 0 0 0; #X obj 286 216 min; #X obj 317 216 min; #X obj 348 215 min; #X obj 122 255 unpack 0 0 0; #X obj 122 357 *; #X obj 419 196 unpack 0 0 0 0 0 0; #X obj 419 217 max; #X obj 450 217 max; #X obj 481 216 max; #X obj 403 300 *; #X obj 403 326 *; #X obj 403 277 ==; #X obj 442 277 ==; #X obj 482 277 ==; #X obj 403 255 unpack 0 0 0; #X obj 122 191 mtx_minmax column; #X connect 0 0 3 0; #X connect 3 0 11 0; #X connect 4 0 10 0; #X connect 4 1 12 0; #X connect 4 1 18 0; #X connect 5 0 6 0; #X connect 6 0 17 0; #X connect 7 0 5 0; #X connect 8 0 5 1; #X connect 9 0 6 1; #X connect 10 0 28 0; #X connect 11 0 4 0; #X connect 12 0 13 0; #X connect 12 1 14 0; #X connect 12 2 15 0; #X connect 12 3 13 1; #X connect 12 4 14 1; #X connect 12 5 15 1; #X connect 13 0 7 1; #X connect 14 0 8 1; #X connect 15 0 9 1; #X connect 16 0 7 0; #X connect 16 1 8 0; #X connect 16 2 9 0; #X connect 17 0 1 0; #X connect 18 0 19 0; #X connect 18 1 20 0; #X connect 18 2 21 0; #X connect 18 3 19 1; #X connect 18 4 20 1; #X connect 18 5 21 1; #X connect 19 0 24 1; #X connect 20 0 25 1; #X connect 21 0 26 1; #X connect 22 0 23 0; #X connect 23 0 17 1; #X connect 24 0 22 0; #X connect 25 0 22 1; #X connect 26 0 23 1; #X connect 27 0 24 0; #X connect 27 1 25 0; #X connect 27 2 26 0; #X connect 28 0 16 0; #X connect 28 1 27 0; pd-iemmatrix-0.3/tests/mtx_minmax/06_function.pd000066400000000000000000000030321262113134600217530ustar00rootroot00000000000000#N canvas 105 62 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X text 67 37 test for existance of [mtx_abs]; #X obj 122 89 t b; #X obj 122 135 t l l; #X obj 122 300 *; #X obj 122 326 *; #X obj 122 277 ==; #X obj 161 277 ==; #X msg 122 170 matrix 2 3 \$1 \$2 \$3 \$4 \$5 \$6; #X msg 122 110 3 -1 10.5 0.05 0 12; #X obj 138 214 unpack 0 0 0 0 0 0; #X obj 138 235 min; #X obj 169 235 min; #X obj 122 191 mtx_minmax row; #X obj 122 255 unpack 0 0; #X obj 198 235 min; #X obj 229 235 min; #X obj 262 300 *; #X obj 262 277 ==; #X obj 301 277 ==; #X obj 278 214 unpack 0 0 0 0 0 0; #X obj 262 255 unpack 0 0; #X obj 278 235 max; #X obj 309 235 max; #X obj 338 235 max; #X obj 369 235 max; #X connect 0 0 3 0; #X connect 3 0 10 0; #X connect 4 0 9 0; #X connect 4 1 11 0; #X connect 4 1 21 0; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 5 0; #X connect 8 0 5 1; #X connect 9 0 14 0; #X connect 10 0 4 0; #X connect 11 0 12 0; #X connect 11 1 13 0; #X connect 11 2 13 1; #X connect 11 3 16 0; #X connect 11 4 17 0; #X connect 11 5 17 1; #X connect 12 0 7 1; #X connect 13 0 12 1; #X connect 14 0 15 0; #X connect 14 1 22 0; #X connect 15 0 7 0; #X connect 15 1 8 0; #X connect 16 0 8 1; #X connect 17 0 16 1; #X connect 18 0 6 1; #X connect 19 0 18 0; #X connect 20 0 18 1; #X connect 21 0 23 0; #X connect 21 1 24 0; #X connect 21 2 24 1; #X connect 21 3 25 0; #X connect 21 4 26 0; #X connect 21 5 26 1; #X connect 22 0 19 0; #X connect 22 1 20 0; #X connect 23 0 19 1; #X connect 24 0 23 1; #X connect 25 0 20 1; #X connect 26 0 25 1; pd-iemmatrix-0.3/tests/mtx_mul/000077500000000000000000000000001262113134600166025ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_mul/00_exist.pd000066400000000000000000000005031262113134600205600ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X text 67 37 test for existance of [mtx_mul]; #X msg 122 122 matrix 1 1 1; #X obj 122 161 mtx_mul 1; #X connect 0 0 5 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 5 0 6 0; #X connect 6 0 2 0; pd-iemmatrix-0.3/tests/mtx_mul/00_exist1.pd000066400000000000000000000004771262113134600206530ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X text 67 37 test for existance of [mtx_*]; #X msg 122 122 matrix 1 1 1; #X obj 122 161 mtx_* 1; #X connect 0 0 5 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 5 0 6 0; #X connect 6 0 2 0; pd-iemmatrix-0.3/tests/mtx_mul/00_exist2.pd000066400000000000000000000005011262113134600206400ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X text 67 37 test for existance of [mtx_.*]; #X msg 122 122 matrix 1 1 1; #X obj 122 161 mtx_.* 1; #X connect 0 0 5 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 5 0 6 0; #X connect 6 0 2 0; pd-iemmatrix-0.3/tests/mtx_neq/000077500000000000000000000000001262113134600165705ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_neq/00_exist.pd000066400000000000000000000005011262113134600205440ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X obj 122 161 mtx_neq; #X text 67 37 test for existance of [mtx_neq]; #X msg 122 122 matrix 1 1 1; #X connect 0 0 6 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 2 0; #X connect 6 0 4 0; pd-iemmatrix-0.3/tests/mtx_neq/01_function.pd000066400000000000000000000021071262113134600212420ustar00rootroot00000000000000#N canvas 117 373 440 427 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 200 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 156 t l l; #X obj 122 98 t b; #X obj 122 221 mtx_neq 2; #X obj 236 221 != 2; #X obj 277 221 != 2; #X obj 318 220 != 2; #X obj 359 220 != 2; #X msg 122 132 2 5 -1.1 4; #X connect 0 0 14 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 16 0; #X connect 7 1 17 0; #X connect 7 2 18 0; #X connect 7 3 19 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 15 0; #X connect 13 0 12 0; #X connect 13 1 7 0; #X connect 14 0 20 0; #X connect 15 0 2 0; #X connect 16 0 8 1; #X connect 17 0 9 1; #X connect 18 0 10 1; #X connect 19 0 11 1; #X connect 20 0 13 0; pd-iemmatrix-0.3/tests/mtx_neq/02_function.pd000066400000000000000000000025721262113134600212510ustar00rootroot00000000000000#N canvas 176 399 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 166 200 matrix 2 2 \$1 \$2 \$3 \$4; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 252 228 unpack 0 0 0 0; #X obj 122 98 t b b; #X obj 185 156 t l l; #X obj 122 156 t l l; #X obj 122 221 mtx_neq; #X obj 236 269 !=; #X obj 267 269 !=; #X obj 298 268 !=; #X obj 329 268 !=; #X msg 122 132 1 2 3 4; #X msg 185 133 9 8 7 6; #X connect 0 0 15 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 19 0; #X connect 7 1 20 0; #X connect 7 2 21 0; #X connect 7 3 22 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 18 1; #X connect 13 0 18 0; #X connect 14 0 19 1; #X connect 14 1 20 1; #X connect 14 2 21 1; #X connect 14 3 22 1; #X connect 15 0 23 0; #X connect 15 1 24 0; #X connect 16 0 12 0; #X connect 16 1 14 0; #X connect 17 0 13 0; #X connect 17 1 7 0; #X connect 18 0 2 0; #X connect 19 0 8 1; #X connect 20 0 9 1; #X connect 21 0 10 1; #X connect 22 0 11 1; #X connect 23 0 17 0; #X connect 24 0 16 0; pd-iemmatrix-0.3/tests/mtx_neq/03_function.pd000066400000000000000000000021041262113134600212410ustar00rootroot00000000000000#N canvas 144 215 431 450 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 256 200 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 156 t l l; #X obj 122 98 t b; #X msg 122 132 3 2 1 0; #X obj 122 221 mtx_neq 1; #X obj 256 221 != 1; #X obj 297 221 != 1; #X obj 338 220 != 1; #X obj 379 220 != 1; #X connect 0 0 14 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 17 0; #X connect 7 1 18 0; #X connect 7 2 19 0; #X connect 7 3 20 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 16 0; #X connect 13 0 12 0; #X connect 13 1 7 0; #X connect 14 0 15 0; #X connect 15 0 13 0; #X connect 16 0 2 0; #X connect 17 0 8 1; #X connect 18 0 9 1; #X connect 19 0 10 1; #X connect 20 0 11 1; pd-iemmatrix-0.3/tests/mtx_neq/04_function.pd000066400000000000000000000024601262113134600212470ustar00rootroot00000000000000#N canvas 190 400 412 429 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 185 190 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 252 228 unpack 0 0 0 0; #X obj 122 98 t b b; #X obj 185 156 t l l; #X obj 122 221 mtx_neq; #X obj 236 269 !=; #X obj 267 269 !=; #X obj 298 268 !=; #X obj 329 268 !=; #X obj 122 156 t f f; #X obj 236 248 t f f f f; #X msg 122 132 5; #X msg 185 133 1 2 4 8; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 7 0; #X connect 3 1 8 0; #X connect 3 2 9 0; #X connect 3 3 10 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 5 0; #X connect 8 0 5 1; #X connect 9 0 4 0; #X connect 10 0 4 1; #X connect 11 0 15 1; #X connect 12 0 16 1; #X connect 12 1 17 1; #X connect 12 2 18 1; #X connect 12 3 19 1; #X connect 13 0 22 0; #X connect 13 1 23 0; #X connect 14 0 11 0; #X connect 14 1 12 0; #X connect 15 0 2 0; #X connect 16 0 7 1; #X connect 17 0 8 1; #X connect 18 0 9 1; #X connect 19 0 10 1; #X connect 20 0 15 0; #X connect 20 1 21 0; #X connect 21 0 16 0; #X connect 21 1 17 0; #X connect 21 2 18 0; #X connect 21 3 19 0; #X connect 22 0 20 0; #X connect 23 0 14 0; pd-iemmatrix-0.3/tests/mtx_neq/05_function.pd000066400000000000000000000005621262113134600212510ustar00rootroot00000000000000#N canvas 55 354 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 307 ==; #X obj 122 98 t b; #X obj 122 174 t f f; #X msg 122 132 11; #X obj 122 221 mtx_neq 7; #X obj 207 221 != 7; #X connect 0 0 3 0; #X connect 2 0 1 0; #X connect 3 0 5 0; #X connect 4 0 6 0; #X connect 4 1 7 0; #X connect 5 0 4 0; #X connect 6 0 2 0; #X connect 7 0 2 1; pd-iemmatrix-0.3/tests/mtx_neq/06_function.pd000066400000000000000000000024611262113134600212520ustar00rootroot00000000000000#N canvas 282 295 386 465 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 98 t b b; #X obj 122 156 t l l; #X obj 236 269 !=; #X obj 267 269 !=; #X obj 298 268 !=; #X obj 329 268 !=; #X obj 252 228 t f f f f; #X obj 185 156 t f f; #X obj 122 221 mtx_neq 0; #X msg 122 132 0 2 3 5; #X msg 185 133 17; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 15 0; #X connect 7 1 16 0; #X connect 7 2 17 0; #X connect 7 3 18 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 21 0; #X connect 13 0 22 0; #X connect 13 1 23 0; #X connect 14 0 12 0; #X connect 14 1 7 0; #X connect 15 0 8 1; #X connect 16 0 9 1; #X connect 17 0 10 1; #X connect 18 0 11 1; #X connect 19 0 15 1; #X connect 19 1 16 1; #X connect 19 2 17 1; #X connect 19 3 18 1; #X connect 20 0 21 1; #X connect 20 1 19 0; #X connect 21 0 2 0; #X connect 22 0 14 0; #X connect 23 0 20 0; pd-iemmatrix-0.3/tests/mtx_neq/07_function.pd000066400000000000000000000007501262113134600212520ustar00rootroot00000000000000#N canvas 270 180 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 213 71 bang; #X obj 122 98 t b b; #X obj 122 175 t f f; #X obj 122 307 ==; #X obj 122 251 mtx_neq 0; #X obj 239 251 !=; #X msg 122 132 6; #X msg 152 131 9; #X connect 0 0 3 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 4 0 6 0; #X connect 4 1 7 0; #X connect 5 0 1 0; #X connect 6 0 5 0; #X connect 7 0 5 1; #X connect 8 0 4 0; #X connect 9 0 6 1; #X connect 9 0 7 1; pd-iemmatrix-0.3/tests/mtx_neq/08_function.pd000066400000000000000000000024621262113134600212550ustar00rootroot00000000000000#N canvas 277 252 796 483 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 98 t b b; #X obj 122 156 t l l; #X obj 236 269 !=; #X obj 267 269 !=; #X obj 298 268 !=; #X obj 329 268 !=; #X obj 252 228 t f f f f; #X obj 185 156 t f f; #X obj 122 221 mtx_neq 0; #X msg 122 132 4 3 7 6; #X msg 185 133 123; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 15 0; #X connect 7 1 16 0; #X connect 7 2 17 0; #X connect 7 3 18 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 21 0; #X connect 13 0 22 0; #X connect 13 1 23 0; #X connect 14 0 12 0; #X connect 14 1 7 0; #X connect 15 0 8 1; #X connect 16 0 9 1; #X connect 17 0 10 1; #X connect 18 0 11 1; #X connect 19 0 15 1; #X connect 19 1 16 1; #X connect 19 2 17 1; #X connect 19 3 18 1; #X connect 20 0 21 1; #X connect 20 1 19 0; #X connect 21 0 2 0; #X connect 22 0 14 0; #X connect 23 0 20 0; pd-iemmatrix-0.3/tests/mtx_neq/09_function.pd000066400000000000000000000025551262113134600212610ustar00rootroot00000000000000#N canvas 311 295 379 440 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 98 t b b; #X obj 185 156 t l l; #X obj 122 156 t l l; #X obj 122 221 mtx_neq; #X obj 236 269 !=; #X obj 267 269 !=; #X obj 298 268 !=; #X obj 329 268 !=; #X msg 186 200 matrix 1 2 \$1 \$2; #X obj 252 228 unpack 0 0; #X msg 122 132 10 9 -1 3; #X msg 185 133 7 34; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 17 0; #X connect 7 1 18 0; #X connect 7 2 19 0; #X connect 7 3 20 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 16 0; #X connect 13 0 23 0; #X connect 13 1 24 0; #X connect 14 0 21 0; #X connect 14 1 22 0; #X connect 15 0 12 0; #X connect 15 1 7 0; #X connect 16 0 2 0; #X connect 17 0 8 1; #X connect 18 0 9 1; #X connect 19 0 10 1; #X connect 20 0 11 1; #X connect 21 0 16 1; #X connect 22 0 17 1; #X connect 22 0 19 1; #X connect 22 1 18 1; #X connect 22 1 20 1; #X connect 23 0 15 0; #X connect 24 0 14 0; pd-iemmatrix-0.3/tests/mtx_neq/10_function.pd000066400000000000000000000025521262113134600212460ustar00rootroot00000000000000#N canvas 182 266 409 472 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 98 t b b; #X obj 185 156 t l l; #X obj 122 156 t l l; #X obj 122 221 mtx_neq; #X obj 236 269 !=; #X obj 267 269 !=; #X obj 298 268 !=; #X obj 329 268 !=; #X msg 166 200 matrix 2 1 \$1 \$2; #X obj 252 226 unpack 0 0; #X msg 185 133 5 3; #X msg 122 132 4 2 9 8; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 17 0; #X connect 7 1 18 0; #X connect 7 2 19 0; #X connect 7 3 20 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 16 0; #X connect 13 0 24 0; #X connect 13 1 23 0; #X connect 14 0 21 0; #X connect 14 1 22 0; #X connect 15 0 12 0; #X connect 15 1 7 0; #X connect 16 0 2 0; #X connect 17 0 8 1; #X connect 18 0 9 1; #X connect 19 0 10 1; #X connect 20 0 11 1; #X connect 21 0 16 1; #X connect 22 0 17 1; #X connect 22 0 18 1; #X connect 22 1 19 1; #X connect 22 1 20 1; #X connect 23 0 14 0; #X connect 24 0 15 0; pd-iemmatrix-0.3/tests/mtx_not/000077500000000000000000000000001262113134600166055ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_not/00_exist.pd000066400000000000000000000005011262113134600205610ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X obj 122 161 mtx_not; #X text 67 37 test for existance of [mtx_not]; #X msg 122 122 matrix 1 1 1; #X connect 0 0 6 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 2 0; #X connect 6 0 4 0; pd-iemmatrix-0.3/tests/mtx_not/00_exist1.pd000066400000000000000000000004751262113134600206540ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X obj 122 161 mtx_!; #X text 67 37 test for existance of [mtx_!]; #X msg 122 122 matrix 1 1 1; #X connect 0 0 6 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 2 0; #X connect 6 0 4 0; pd-iemmatrix-0.3/tests/mtx_ones/000077500000000000000000000000001262113134600167515ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_ones/00_exist.pd000066400000000000000000000004241262113134600207310ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X text 67 37 test for existance of [mtx_ones]; #X obj 122 161 mtx_ones 1; #X connect 0 0 5 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 5 0 2 0; pd-iemmatrix-0.3/tests/mtx_ones/01_function.pd000066400000000000000000000011771262113134600214310ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 214 \$3 \$4 \$5 \$6; #X obj 122 161 mtx_ones 2; #X obj 122 238 unpack 0 0 0 0; #X obj 122 282 *; #X obj 122 302 *; #X obj 202 282 *; #X obj 122 104 t b; #X obj 122 262 == 1; #X obj 162 262 == 1; #X obj 202 262 == 1; #X obj 242 262 == 1; #X connect 0 0 8 0; #X connect 2 0 4 0; #X connect 3 0 2 0; #X connect 4 0 9 0; #X connect 4 1 10 0; #X connect 4 2 11 0; #X connect 4 3 12 0; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 6 1; #X connect 8 0 3 0; #X connect 9 0 5 0; #X connect 10 0 5 1; #X connect 11 0 7 0; #X connect 12 0 7 1; pd-iemmatrix-0.3/tests/mtx_ones/02_function.pd000066400000000000000000000015341262113134600214270ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 282 *; #X obj 122 302 *; #X obj 202 282 *; #X obj 122 104 t b; #X obj 122 161 mtx_ones 2 3; #X msg 122 214 \$3 \$4 \$5 \$6 \$7 \$8; #X obj 122 238 unpack 0 0 0 0 0 0; #X obj 282 282 *; #X obj 122 324 *; #X obj 122 262 == 1; #X obj 162 262 == 1; #X obj 202 262 == 1; #X obj 242 262 == 1; #X obj 282 262 == 1; #X obj 322 262 == 1; #X connect 0 0 5 0; #X connect 2 0 3 0; #X connect 3 0 10 0; #X connect 4 0 3 1; #X connect 5 0 6 0; #X connect 6 0 7 0; #X connect 7 0 8 0; #X connect 8 0 11 0; #X connect 8 1 12 0; #X connect 8 2 13 0; #X connect 8 3 14 0; #X connect 8 4 15 0; #X connect 8 5 16 0; #X connect 9 0 10 1; #X connect 10 0 1 0; #X connect 11 0 2 0; #X connect 12 0 2 1; #X connect 13 0 4 0; #X connect 14 0 4 1; #X connect 15 0 9 0; #X connect 16 0 9 1; pd-iemmatrix-0.3/tests/mtx_ones/03_function.pd000066400000000000000000000012551262113134600214300ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 282 *; #X obj 122 302 *; #X obj 202 282 *; #X obj 122 104 t b; #X obj 122 238 unpack 0 0 0 0 0 0; #X obj 122 161 mtx_ones 7 8; #X msg 122 214 \$3 \$4 \$5 \$6; #X msg 122 135 2; #X obj 122 262 == 1; #X obj 162 262 == 1; #X obj 202 262 == 1; #X obj 242 262 == 1; #X connect 0 0 5 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 3 1; #X connect 5 0 9 0; #X connect 6 0 10 0; #X connect 6 1 11 0; #X connect 6 2 12 0; #X connect 6 3 13 0; #X connect 7 0 8 0; #X connect 8 0 6 0; #X connect 9 0 7 0; #X connect 10 0 2 0; #X connect 11 0 2 1; #X connect 12 0 4 0; #X connect 13 0 4 1; pd-iemmatrix-0.3/tests/mtx_ones/04_function.pd000066400000000000000000000016011262113134600214240ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 282 *; #X obj 122 302 *; #X obj 202 282 *; #X obj 122 104 t b; #X msg 122 214 \$3 \$4 \$5 \$6 \$7 \$8; #X obj 122 238 unpack 0 0 0 0 0 0; #X obj 282 282 *; #X obj 122 324 *; #X msg 122 135 3 2; #X obj 122 161 mtx_ones; #X obj 122 262 == 1; #X obj 162 262 == 1; #X obj 202 262 == 1; #X obj 242 262 == 1; #X obj 282 262 == 1; #X obj 322 262 == 1; #X connect 0 0 5 0; #X connect 2 0 3 0; #X connect 3 0 9 0; #X connect 4 0 3 1; #X connect 5 0 10 0; #X connect 6 0 7 0; #X connect 7 0 12 0; #X connect 7 1 13 0; #X connect 7 2 14 0; #X connect 7 3 15 0; #X connect 7 4 16 0; #X connect 7 5 17 0; #X connect 8 0 9 1; #X connect 9 0 1 0; #X connect 10 0 11 0; #X connect 11 0 6 0; #X connect 12 0 2 0; #X connect 13 0 2 1; #X connect 14 0 4 0; #X connect 15 0 4 1; #X connect 16 0 8 0; #X connect 17 0 8 1; pd-iemmatrix-0.3/tests/mtx_ones/05_function.pd000066400000000000000000000011161262113134600214260ustar00rootroot00000000000000#N canvas 541 351 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 282 *; #X obj 122 104 t b; #X obj 122 191 mtx_ones 7 8; #X msg 122 135 10 14; #X msg 122 214 \$1 \$2; #X obj 122 157 t l l; #X obj 122 262 ==; #X obj 162 262 ==; #X obj 179 215 unpack; #X obj 122 236 unpack; #X connect 0 0 3 0; #X connect 2 0 1 0; #X connect 3 0 5 0; #X connect 4 0 6 0; #X connect 5 0 7 0; #X connect 6 0 11 0; #X connect 7 0 4 0; #X connect 7 1 10 0; #X connect 8 0 2 0; #X connect 9 0 2 1; #X connect 10 0 8 1; #X connect 10 1 9 1; #X connect 11 0 8 0; #X connect 11 1 9 0; pd-iemmatrix-0.3/tests/mtx_ones/06_function.pd000066400000000000000000000011121262113134600214230ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 104 t b; #X obj 122 282 *; #X obj 122 191 mtx_ones 7 8; #X msg 122 214 \$1 \$2; #X obj 122 262 ==; #X obj 162 262 ==; #X obj 122 236 unpack; #X msg 122 135 32; #X obj 122 157 t f f; #X obj 179 215 t f f; #X connect 0 0 2 0; #X connect 2 0 9 0; #X connect 3 0 1 0; #X connect 4 0 5 0; #X connect 5 0 8 0; #X connect 6 0 3 0; #X connect 7 0 3 1; #X connect 8 0 6 0; #X connect 8 1 7 0; #X connect 9 0 10 0; #X connect 10 0 4 0; #X connect 10 1 11 0; #X connect 11 0 6 1; #X connect 11 1 7 1; pd-iemmatrix-0.3/tests/mtx_or/000077500000000000000000000000001262113134600164255ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_or/00_exist.pd000066400000000000000000000004771262113134600204150ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X obj 122 161 mtx_or; #X text 67 37 test for existance of [mtx_or]; #X msg 122 122 matrix 1 1 1; #X connect 0 0 6 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 2 0; #X connect 6 0 4 0; pd-iemmatrix-0.3/tests/mtx_or/01_function.pd000066400000000000000000000021031262113134600210730ustar00rootroot00000000000000#N canvas 117 373 440 427 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 200 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 156 t l l; #X obj 122 98 t b; #X msg 122 132 0 1 0 2; #X obj 122 221 mtx_or 4; #X obj 236 221 || 4; #X obj 277 221 || 4; #X obj 318 220 || 4; #X obj 359 220 || 4; #X connect 0 0 14 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 17 0; #X connect 7 1 18 0; #X connect 7 2 19 0; #X connect 7 3 20 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 16 0; #X connect 13 0 12 0; #X connect 13 1 7 0; #X connect 14 0 15 0; #X connect 15 0 13 0; #X connect 16 0 2 0; #X connect 17 0 8 1; #X connect 18 0 9 1; #X connect 19 0 10 1; #X connect 20 0 11 1; pd-iemmatrix-0.3/tests/mtx_or/02_function.pd000066400000000000000000000025711262113134600211050ustar00rootroot00000000000000#N canvas 721 420 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 166 200 matrix 2 2 \$1 \$2 \$3 \$4; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 252 228 unpack 0 0 0 0; #X obj 122 98 t b b; #X obj 185 156 t l l; #X obj 122 156 t l l; #X obj 122 221 mtx_or; #X obj 236 269 ||; #X obj 267 269 ||; #X obj 298 268 ||; #X obj 329 268 ||; #X msg 122 132 0 1 0 1; #X msg 185 133 1 1 0 0; #X connect 0 0 15 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 19 0; #X connect 7 1 20 0; #X connect 7 2 21 0; #X connect 7 3 22 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 18 1; #X connect 13 0 18 0; #X connect 14 0 19 1; #X connect 14 1 20 1; #X connect 14 2 21 1; #X connect 14 3 22 1; #X connect 15 0 23 0; #X connect 15 1 24 0; #X connect 16 0 12 0; #X connect 16 1 14 0; #X connect 17 0 13 0; #X connect 17 1 7 0; #X connect 18 0 2 0; #X connect 19 0 8 1; #X connect 20 0 9 1; #X connect 21 0 10 1; #X connect 22 0 11 1; #X connect 23 0 17 0; #X connect 24 0 16 0; pd-iemmatrix-0.3/tests/mtx_or/03_function.pd000066400000000000000000000021031262113134600210750ustar00rootroot00000000000000#N canvas 144 215 431 450 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 256 200 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 156 t l l; #X obj 122 98 t b; #X msg 122 132 0 1 2 3; #X obj 122 221 mtx_or 2; #X obj 256 221 || 2; #X obj 297 221 || 2; #X obj 338 220 || 2; #X obj 379 220 || 2; #X connect 0 0 14 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 17 0; #X connect 7 1 18 0; #X connect 7 2 19 0; #X connect 7 3 20 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 16 0; #X connect 13 0 12 0; #X connect 13 1 7 0; #X connect 14 0 15 0; #X connect 15 0 13 0; #X connect 16 0 2 0; #X connect 17 0 8 1; #X connect 18 0 9 1; #X connect 19 0 10 1; #X connect 20 0 11 1; pd-iemmatrix-0.3/tests/mtx_or/04_function.pd000066400000000000000000000024571262113134600211120ustar00rootroot00000000000000#N canvas 385 142 412 429 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 185 190 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 252 228 unpack 0 0 0 0; #X obj 122 98 t b b; #X obj 185 156 t l l; #X obj 122 221 mtx_or; #X obj 122 156 t f f; #X obj 236 248 t f f f f; #X msg 122 132 2; #X obj 236 269 ||; #X obj 267 269 ||; #X obj 298 268 ||; #X obj 329 268 ||; #X msg 185 133 1 0 3 2; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 7 0; #X connect 3 1 8 0; #X connect 3 2 9 0; #X connect 3 3 10 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 5 0; #X connect 8 0 5 1; #X connect 9 0 4 0; #X connect 10 0 4 1; #X connect 11 0 15 1; #X connect 12 0 19 1; #X connect 12 1 20 1; #X connect 12 2 21 1; #X connect 12 3 22 1; #X connect 13 0 18 0; #X connect 13 1 23 0; #X connect 14 0 11 0; #X connect 14 1 12 0; #X connect 15 0 2 0; #X connect 16 0 15 0; #X connect 16 1 17 0; #X connect 17 0 19 0; #X connect 17 1 20 0; #X connect 17 2 21 0; #X connect 17 3 22 0; #X connect 18 0 16 0; #X connect 19 0 7 1; #X connect 20 0 8 1; #X connect 21 0 9 1; #X connect 22 0 10 1; #X connect 23 0 14 0; pd-iemmatrix-0.3/tests/mtx_or/05_function.pd000066400000000000000000000005661262113134600211120ustar00rootroot00000000000000#N canvas 55 354 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 307 ==; #X obj 122 98 t b; #X obj 122 174 t f f; #X msg 122 132 6.2; #X obj 122 221 mtx_or 1.1; #X obj 207 222 || 1.1; #X connect 0 0 3 0; #X connect 2 0 1 0; #X connect 3 0 5 0; #X connect 4 0 6 0; #X connect 4 1 7 0; #X connect 5 0 4 0; #X connect 6 0 2 0; #X connect 7 0 2 1; pd-iemmatrix-0.3/tests/mtx_or/06_function.pd000066400000000000000000000024651262113134600211130ustar00rootroot00000000000000#N canvas 385 142 386 465 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 98 t b b; #X obj 122 156 t l l; #X obj 236 269 ||; #X obj 267 269 ||; #X obj 298 268 ||; #X obj 329 268 ||; #X obj 252 228 t f f f f; #X obj 185 156 t f f; #X obj 122 221 mtx_or 0; #X msg 82 132 -1 0 2.2 0.1; #X msg 185 133 3.1; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 15 0; #X connect 7 1 16 0; #X connect 7 2 17 0; #X connect 7 3 18 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 21 0; #X connect 13 0 22 0; #X connect 13 1 23 0; #X connect 14 0 12 0; #X connect 14 1 7 0; #X connect 15 0 8 1; #X connect 16 0 9 1; #X connect 17 0 10 1; #X connect 18 0 11 1; #X connect 19 0 15 1; #X connect 19 1 16 1; #X connect 19 2 17 1; #X connect 19 3 18 1; #X connect 20 0 21 1; #X connect 20 1 19 0; #X connect 21 0 2 0; #X connect 22 0 14 0; #X connect 23 0 20 0; pd-iemmatrix-0.3/tests/mtx_or/07_function.pd000066400000000000000000000007471262113134600211150ustar00rootroot00000000000000#N canvas 270 180 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 213 71 bang; #X obj 122 98 t b b; #X obj 122 175 t f f; #X obj 122 307 ==; #X obj 122 251 mtx_or 0; #X obj 239 251 ||; #X msg 122 132 2; #X msg 152 131 0; #X connect 0 0 3 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 4 0 6 0; #X connect 4 1 7 0; #X connect 5 0 1 0; #X connect 6 0 5 0; #X connect 7 0 5 1; #X connect 8 0 4 0; #X connect 9 0 6 1; #X connect 9 0 7 1; pd-iemmatrix-0.3/tests/mtx_or/08_function.pd000066400000000000000000000024571262113134600211160ustar00rootroot00000000000000#N canvas 277 252 796 483 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 98 t b b; #X obj 122 156 t l l; #X obj 236 269 ||; #X obj 267 269 ||; #X obj 298 268 ||; #X obj 329 268 ||; #X obj 252 228 t f f f f; #X obj 185 156 t f f; #X obj 122 221 mtx_or 0; #X msg 122 132 0 1 0 1; #X msg 185 133 2; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 15 0; #X connect 7 1 16 0; #X connect 7 2 17 0; #X connect 7 3 18 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 21 0; #X connect 13 0 22 0; #X connect 13 1 23 0; #X connect 14 0 12 0; #X connect 14 1 7 0; #X connect 15 0 8 1; #X connect 16 0 9 1; #X connect 17 0 10 1; #X connect 18 0 11 1; #X connect 19 0 15 1; #X connect 19 1 16 1; #X connect 19 2 17 1; #X connect 19 3 18 1; #X connect 20 0 21 1; #X connect 20 1 19 0; #X connect 21 0 2 0; #X connect 22 0 14 0; #X connect 23 0 20 0; pd-iemmatrix-0.3/tests/mtx_or/09_function.pd000066400000000000000000000025511262113134600211120ustar00rootroot00000000000000#N canvas 311 295 379 440 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 98 t b b; #X obj 185 156 t l l; #X obj 122 156 t l l; #X obj 122 221 mtx_or; #X obj 236 269 ||; #X obj 267 269 ||; #X obj 298 268 ||; #X obj 329 268 ||; #X msg 186 200 matrix 1 2 \$1 \$2; #X obj 252 228 unpack 0 0; #X msg 122 132 0 1 0 1; #X msg 185 133 1 0; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 17 0; #X connect 7 1 18 0; #X connect 7 2 19 0; #X connect 7 3 20 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 16 0; #X connect 13 0 23 0; #X connect 13 1 24 0; #X connect 14 0 21 0; #X connect 14 1 22 0; #X connect 15 0 12 0; #X connect 15 1 7 0; #X connect 16 0 2 0; #X connect 17 0 8 1; #X connect 18 0 9 1; #X connect 19 0 10 1; #X connect 20 0 11 1; #X connect 21 0 16 1; #X connect 22 0 17 1; #X connect 22 0 19 1; #X connect 22 1 18 1; #X connect 22 1 20 1; #X connect 23 0 15 0; #X connect 24 0 14 0; pd-iemmatrix-0.3/tests/mtx_or/10_function.pd000066400000000000000000000025521262113134600211030ustar00rootroot00000000000000#N canvas 182 266 409 472 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 98 t b b; #X obj 185 156 t l l; #X obj 122 156 t l l; #X obj 122 221 mtx_or; #X obj 236 269 ||; #X obj 267 269 ||; #X obj 298 268 ||; #X obj 329 268 ||; #X msg 166 200 matrix 2 1 \$1 \$2; #X obj 252 226 unpack 0 0; #X msg 122 132 1 0 -1 2; #X msg 185 133 0 1; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 17 0; #X connect 7 1 18 0; #X connect 7 2 19 0; #X connect 7 3 20 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 16 0; #X connect 13 0 23 0; #X connect 13 1 24 0; #X connect 14 0 21 0; #X connect 14 1 22 0; #X connect 15 0 12 0; #X connect 15 1 7 0; #X connect 16 0 2 0; #X connect 17 0 8 1; #X connect 18 0 9 1; #X connect 19 0 10 1; #X connect 20 0 11 1; #X connect 21 0 16 1; #X connect 22 0 17 1; #X connect 22 0 18 1; #X connect 22 1 19 1; #X connect 22 1 20 1; #X connect 23 0 15 0; #X connect 24 0 14 0; pd-iemmatrix-0.3/tests/mtx_pivot/000077500000000000000000000000001262113134600171465ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_pivot/00_exist.pd000066400000000000000000000005051262113134600211260ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X obj 122 161 mtx_pivot; #X text 67 37 test for existance of [mtx_pivot]; #X msg 122 122 matrix 1 1 1; #X connect 0 0 6 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 2 0; #X connect 6 0 4 0; pd-iemmatrix-0.3/tests/mtx_prod/000077500000000000000000000000001262113134600167515ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_prod/00_exist.pd000066400000000000000000000005031262113134600207270ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X obj 122 161 mtx_prod; #X text 67 37 test for existance of [mtx_prod]; #X msg 122 122 matrix 1 1 1; #X connect 0 0 6 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 2 0; #X connect 6 0 4 0; pd-iemmatrix-0.3/tests/mtx_rand/000077500000000000000000000000001262113134600167315ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_rand/00_exist.pd000066400000000000000000000004241262113134600207110ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X text 67 37 test for existance of [mtx_rand]; #X obj 122 161 mtx_rand 1; #X connect 0 0 5 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 5 0 2 0; pd-iemmatrix-0.3/tests/mtx_rand/01_default.pd000066400000000000000000000004711262113134600212040ustar00rootroot00000000000000#N canvas 386 139 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X text 67 37 test for existance of [mtx_rand]; #X obj 122 161 mtx_rand; #X obj 122 90 t b; #X connect 0 0 6 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 5 0 2 0; #X connect 6 0 5 0; pd-iemmatrix-0.3/tests/mtx_repmat/000077500000000000000000000000001262113134600172755ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_repmat/00_exist.pd000066400000000000000000000005071262113134600212570ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X obj 122 161 mtx_repmat; #X text 67 37 test for existance of [mtx_repmat]; #X msg 122 122 matrix 1 1 1; #X connect 0 0 6 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 2 0; #X connect 6 0 4 0; pd-iemmatrix-0.3/tests/mtx_resize/000077500000000000000000000000001262113134600173065ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_resize/00_exist.pd000066400000000000000000000005071262113134600212700ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X obj 122 161 mtx_resize; #X text 67 37 test for existance of [mtx_resize]; #X msg 122 122 matrix 1 1 1; #X connect 0 0 6 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 2 0; #X connect 6 0 4 0; pd-iemmatrix-0.3/tests/mtx_reverse/000077500000000000000000000000001262113134600174605ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_reverse/00_exist.pd000066400000000000000000000005111262113134600214350ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X obj 122 161 mtx_reverse; #X text 67 37 test for existance of [mtx_reverse]; #X msg 122 122 matrix 1 1 1; #X connect 0 0 6 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 2 0; #X connect 6 0 4 0; pd-iemmatrix-0.3/tests/mtx_rmstodb/000077500000000000000000000000001262113134600174575ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_rmstodb/00_exist.pd000066400000000000000000000005111262113134600214340ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X obj 122 161 mtx_rmstodb; #X text 67 37 test for existance of [mtx_rmstodb]; #X msg 122 122 matrix 1 1 1; #X connect 0 0 6 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 2 0; #X connect 6 0 4 0; pd-iemmatrix-0.3/tests/mtx_rmstodb/01_function.pd000066400000000000000000000007241262113134600221340ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 211 mtx_rmstodb; #X msg 122 233 \$3; #X obj 122 101 t b; #X obj 122 151 t f f; #X msg 122 190 matrix 1 1 \$1; #X obj 165 232 rmstodb; #X obj 122 265 ==; #X msg 122 127 -2; #X connect 0 0 4 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 4 0 9 0; #X connect 5 0 6 0; #X connect 5 1 7 0; #X connect 6 0 2 0; #X connect 7 0 8 1; #X connect 8 0 1 0; #X connect 9 0 5 0; pd-iemmatrix-0.3/tests/mtx_rmstodb/02_function.pd000066400000000000000000000022231262113134600221310ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 191 mtx_rmstodb; #X text 67 37 test for existance of [mtx_rmstodb]; #X msg 122 170 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 89 t b; #X msg 122 110 3 -1 -10.5 0; #X obj 122 135 t l l; #X msg 122 213 \$3 \$4 \$5 \$6; #X obj 122 238 unpack 0 0 0 0; #X obj 184 300 *; #X obj 122 300 *; #X obj 122 326 *; #X obj 236 218 unpack 0 0 0 0; #X obj 122 277 ==; #X obj 153 277 ==; #X obj 184 277 ==; #X obj 215 277 ==; #X obj 236 239 rmstodb; #X obj 267 239 rmstodb; #X obj 298 238 rmstodb; #X obj 329 238 rmstodb; #X connect 0 0 5 0; #X connect 2 0 8 0; #X connect 4 0 2 0; #X connect 5 0 6 0; #X connect 6 0 7 0; #X connect 7 0 4 0; #X connect 7 1 13 0; #X connect 8 0 9 0; #X connect 9 0 14 0; #X connect 9 1 15 0; #X connect 9 2 16 0; #X connect 9 3 17 0; #X connect 10 0 12 1; #X connect 11 0 12 0; #X connect 12 0 1 0; #X connect 13 0 18 0; #X connect 13 1 19 0; #X connect 13 2 20 0; #X connect 13 3 21 0; #X connect 14 0 11 0; #X connect 15 0 11 1; #X connect 16 0 10 0; #X connect 17 0 10 1; #X connect 18 0 14 1; #X connect 19 0 15 1; #X connect 20 0 16 1; #X connect 21 0 17 1; pd-iemmatrix-0.3/tests/mtx_rmstodb/03_function.pd000066400000000000000000000030071262113134600221330ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 191 mtx_rmstodb; #X text 67 37 test for existance of [mtx_rmstodb]; #X obj 122 89 t b; #X obj 122 135 t l l; #X obj 184 300 *; #X obj 122 300 *; #X obj 122 326 *; #X obj 122 277 ==; #X obj 153 277 ==; #X obj 184 277 ==; #X obj 215 277 ==; #X obj 266 239 rmstodb; #X obj 297 239 rmstodb; #X obj 328 238 rmstodb; #X obj 359 238 rmstodb; #X msg 122 170 matrix 2 3 \$1 \$2 \$3 \$4 \$5 \$6; #X obj 254 300 *; #X obj 254 277 ==; #X obj 285 277 ==; #X obj 122 238 unpack 0 0 0 0 0 0; #X msg 122 213 \$3 \$4 \$5 \$6 \$7 \$8; #X obj 388 238 rmstodb; #X obj 419 238 rmstodb; #X obj 266 218 unpack 0 0 0 0 0 0; #X obj 122 347 *; #X msg 122 110 3 -1 10.5 0.05 0 12; #X connect 0 0 4 0; #X connect 2 0 22 0; #X connect 4 0 27 0; #X connect 5 0 17 0; #X connect 5 1 25 0; #X connect 6 0 8 1; #X connect 7 0 8 0; #X connect 8 0 26 0; #X connect 9 0 7 0; #X connect 10 0 7 1; #X connect 11 0 6 0; #X connect 12 0 6 1; #X connect 13 0 9 1; #X connect 14 0 10 1; #X connect 15 0 11 1; #X connect 16 0 12 1; #X connect 17 0 2 0; #X connect 18 0 26 1; #X connect 19 0 18 0; #X connect 20 0 18 1; #X connect 21 0 9 0; #X connect 21 1 10 0; #X connect 21 2 11 0; #X connect 21 3 12 0; #X connect 21 4 19 0; #X connect 21 5 20 0; #X connect 22 0 21 0; #X connect 23 0 19 1; #X connect 24 0 20 1; #X connect 25 0 13 0; #X connect 25 1 14 0; #X connect 25 2 15 0; #X connect 25 3 16 0; #X connect 25 4 23 0; #X connect 25 5 24 0; #X connect 26 0 1 0; #X connect 27 0 5 0; pd-iemmatrix-0.3/tests/mtx_roll/000077500000000000000000000000001262113134600167555ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_roll/00_exist.pd000066400000000000000000000005031262113134600207330ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X obj 122 161 mtx_roll; #X text 67 37 test for existance of [mtx_roll]; #X msg 122 122 matrix 1 1 1; #X connect 0 0 6 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 2 0; #X connect 6 0 4 0; pd-iemmatrix-0.3/tests/mtx_row/000077500000000000000000000000001262113134600166145ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_row/00_exist.pd000066400000000000000000000005011262113134600205700ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X obj 122 161 mtx_row; #X text 67 37 test for existance of [mtx_row]; #X msg 122 122 matrix 1 1 1; #X connect 0 0 6 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 2 0; #X connect 6 0 4 0; pd-iemmatrix-0.3/tests/mtx_rowrfft/000077500000000000000000000000001262113134600174765ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_rowrfft/00_exist.pd000066400000000000000000000005171262113134600214610ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X obj 122 161 mtx_rowrfft; #X text 67 37 test for existance of [mtx_rowrfft]; #X msg 122 122 matrix 1 4 0 0 0 0; #X connect 0 0 6 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 2 0; #X connect 6 0 4 0; pd-iemmatrix-0.3/tests/mtx_rowrifft/000077500000000000000000000000001262113134600176475ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_rowrifft/00_exist.pd000066400000000000000000000006151262113134600216310ustar00rootroot00000000000000#N canvas 386 139 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X obj 122 161 mtx_rowrifft; #X text 67 37 test for existance of [mtx_rowrifft]; #X obj 122 136 t a a; #X msg 122 115 matrix 1 3 0 0 0; #X connect 0 0 7 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 2 0; #X connect 6 0 4 0; #X connect 6 1 4 1; #X connect 7 0 6 0; pd-iemmatrix-0.3/tests/mtx_scroll/000077500000000000000000000000001262113134600173035ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_scroll/00_exist.pd000066400000000000000000000005071262113134600212650ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X obj 122 161 mtx_scroll; #X text 67 37 test for existance of [mtx_scroll]; #X msg 122 122 matrix 1 1 1; #X connect 0 0 6 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 2 0; #X connect 6 0 4 0; pd-iemmatrix-0.3/tests/mtx_sin/000077500000000000000000000000001262113134600165765ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_sin/00_exist.pd000066400000000000000000000005011262113134600205520ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X obj 122 161 mtx_sin; #X text 67 37 test for existance of [mtx_sin]; #X msg 122 122 matrix 1 1 1; #X connect 0 0 6 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 2 0; #X connect 6 0 4 0; pd-iemmatrix-0.3/tests/mtx_sin/01_function.pd000066400000000000000000000007141262113134600212520ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 211 mtx_sin; #X msg 122 233 \$3; #X obj 122 101 t b; #X obj 122 151 t f f; #X msg 122 190 matrix 1 1 \$1; #X obj 165 232 sin; #X obj 122 265 ==; #X msg 122 127 -2; #X connect 0 0 4 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 4 0 9 0; #X connect 5 0 6 0; #X connect 5 1 7 0; #X connect 6 0 2 0; #X connect 7 0 8 1; #X connect 8 0 1 0; #X connect 9 0 5 0; pd-iemmatrix-0.3/tests/mtx_sin/02_function.pd000066400000000000000000000021731262113134600212540ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 191 mtx_sin; #X text 67 37 test for existance of [mtx_sin]; #X msg 122 170 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 89 t b; #X msg 122 110 3 -1 -10.5 0; #X obj 122 135 t l l; #X msg 122 213 \$3 \$4 \$5 \$6; #X obj 122 238 unpack 0 0 0 0; #X obj 184 300 *; #X obj 122 300 *; #X obj 122 326 *; #X obj 236 218 unpack 0 0 0 0; #X obj 122 277 ==; #X obj 153 277 ==; #X obj 184 277 ==; #X obj 215 277 ==; #X obj 236 239 sin; #X obj 267 239 sin; #X obj 298 238 sin; #X obj 329 238 sin; #X connect 0 0 5 0; #X connect 2 0 8 0; #X connect 4 0 2 0; #X connect 5 0 6 0; #X connect 6 0 7 0; #X connect 7 0 4 0; #X connect 7 1 13 0; #X connect 8 0 9 0; #X connect 9 0 14 0; #X connect 9 1 15 0; #X connect 9 2 16 0; #X connect 9 3 17 0; #X connect 10 0 12 1; #X connect 11 0 12 0; #X connect 12 0 1 0; #X connect 13 0 18 0; #X connect 13 1 19 0; #X connect 13 2 20 0; #X connect 13 3 21 0; #X connect 14 0 11 0; #X connect 15 0 11 1; #X connect 16 0 10 0; #X connect 17 0 10 1; #X connect 18 0 14 1; #X connect 19 0 15 1; #X connect 20 0 16 1; #X connect 21 0 17 1; pd-iemmatrix-0.3/tests/mtx_sin/03_function.pd000066400000000000000000000027471262113134600212640ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 191 mtx_sin; #X text 67 37 test for existance of [mtx_sin]; #X obj 122 89 t b; #X obj 122 135 t l l; #X obj 184 300 *; #X obj 122 300 *; #X obj 122 326 *; #X obj 122 277 ==; #X obj 153 277 ==; #X obj 184 277 ==; #X obj 215 277 ==; #X obj 266 239 sin; #X obj 297 239 sin; #X obj 328 238 sin; #X obj 359 238 sin; #X msg 122 170 matrix 2 3 \$1 \$2 \$3 \$4 \$5 \$6; #X obj 254 300 *; #X obj 254 277 ==; #X obj 285 277 ==; #X obj 122 238 unpack 0 0 0 0 0 0; #X msg 122 213 \$3 \$4 \$5 \$6 \$7 \$8; #X obj 388 238 sin; #X obj 419 238 sin; #X obj 266 218 unpack 0 0 0 0 0 0; #X obj 122 347 *; #X msg 122 110 3 -1 10.5 0.05 0 12; #X connect 0 0 4 0; #X connect 2 0 22 0; #X connect 4 0 27 0; #X connect 5 0 17 0; #X connect 5 1 25 0; #X connect 6 0 8 1; #X connect 7 0 8 0; #X connect 8 0 26 0; #X connect 9 0 7 0; #X connect 10 0 7 1; #X connect 11 0 6 0; #X connect 12 0 6 1; #X connect 13 0 9 1; #X connect 14 0 10 1; #X connect 15 0 11 1; #X connect 16 0 12 1; #X connect 17 0 2 0; #X connect 18 0 26 1; #X connect 19 0 18 0; #X connect 20 0 18 1; #X connect 21 0 9 0; #X connect 21 1 10 0; #X connect 21 2 11 0; #X connect 21 3 12 0; #X connect 21 4 19 0; #X connect 21 5 20 0; #X connect 22 0 21 0; #X connect 23 0 19 1; #X connect 24 0 20 1; #X connect 25 0 13 0; #X connect 25 1 14 0; #X connect 25 2 15 0; #X connect 25 3 16 0; #X connect 25 4 23 0; #X connect 25 5 24 0; #X connect 26 0 1 0; #X connect 27 0 5 0; pd-iemmatrix-0.3/tests/mtx_size/000077500000000000000000000000001262113134600167575ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_size/00_exist.pd000066400000000000000000000005031262113134600207350ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X obj 122 161 mtx_size; #X text 67 37 test for existance of [mtx_size]; #X msg 122 122 matrix 1 1 1; #X connect 0 0 6 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 2 0; #X connect 6 0 4 0; pd-iemmatrix-0.3/tests/mtx_size/01_function.pd000066400000000000000000000010431262113134600214270ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 335 outlet 1==OK; #X obj 122 211 mtx_size; #X obj 122 90 t b; #X msg 122 132 1 8; #X obj 122 161 t l l; #X msg 122 190 matrix \$1 \$2 -2; #X obj 204 211 unpack; #X obj 122 259 ==; #X obj 173 259 ==; #X obj 122 297 *; #X connect 0 0 3 0; #X connect 2 0 8 0; #X connect 2 1 9 0; #X connect 3 0 4 0; #X connect 4 0 5 0; #X connect 5 0 6 0; #X connect 5 1 7 0; #X connect 6 0 2 0; #X connect 7 0 8 1; #X connect 7 1 9 1; #X connect 8 0 10 0; #X connect 9 0 10 1; #X connect 10 0 1 0; pd-iemmatrix-0.3/tests/mtx_slice/000077500000000000000000000000001262113134600171045ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_slice/00_exist.pd000066400000000000000000000005051262113134600210640ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X obj 122 161 mtx_slice; #X text 67 37 test for existance of [mtx_slice]; #X msg 122 122 matrix 1 1 1; #X connect 0 0 6 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 2 0; #X connect 6 0 4 0; pd-iemmatrix-0.3/tests/mtx_sort/000077500000000000000000000000001262113134600167745ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_sort/00_exist.pd000066400000000000000000000005031262113134600207520ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X obj 122 161 mtx_sort; #X text 67 37 test for existance of [mtx_sort]; #X msg 122 122 matrix 1 1 1; #X connect 0 0 6 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 2 0; #X connect 6 0 4 0; pd-iemmatrix-0.3/tests/mtx_spivot/000077500000000000000000000000001262113134600173315ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_spivot/00_exist.pd000066400000000000000000000005071262113134600213130ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X obj 122 161 mtx_spivot; #X text 67 37 test for existance of [mtx_spivot]; #X msg 122 122 matrix 1 1 1; #X connect 0 0 6 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 2 0; #X connect 6 0 4 0; pd-iemmatrix-0.3/tests/mtx_sub/000077500000000000000000000000001262113134600165765ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_sub/00_exist.pd000066400000000000000000000005011262113134600205520ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X obj 122 161 mtx_sub; #X text 67 37 test for existance of [mtx_sub]; #X msg 122 122 matrix 1 1 1; #X connect 0 0 6 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 2 0; #X connect 6 0 4 0; pd-iemmatrix-0.3/tests/mtx_sub/00_exist1.pd000066400000000000000000000004751262113134600206450ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X obj 122 161 mtx_-; #X text 67 37 test for existance of [mtx_-]; #X msg 122 122 matrix 1 1 1; #X connect 0 0 6 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 2 0; #X connect 6 0 4 0; pd-iemmatrix-0.3/tests/mtx_sub/01_function.pd000066400000000000000000000021101262113134600212420ustar00rootroot00000000000000#N canvas 117 373 440 427 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 200 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 156 t l l; #X obj 122 98 t b; #X msg 122 132 3 9 243 43; #X obj 122 221 mtx_sub -1; #X obj 236 221 - -1; #X obj 277 221 - -1; #X obj 318 220 - -1; #X obj 359 220 - -1; #X connect 0 0 14 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 17 0; #X connect 7 1 18 0; #X connect 7 2 19 0; #X connect 7 3 20 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 16 0; #X connect 13 0 12 0; #X connect 13 1 7 0; #X connect 14 0 15 0; #X connect 15 0 13 0; #X connect 16 0 2 0; #X connect 17 0 8 1; #X connect 18 0 9 1; #X connect 19 0 10 1; #X connect 20 0 11 1; pd-iemmatrix-0.3/tests/mtx_sub/02_function.pd000066400000000000000000000025671262113134600212630ustar00rootroot00000000000000#N canvas 252 376 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 166 200 matrix 2 2 \$1 \$2 \$3 \$4; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 252 228 unpack 0 0 0 0; #X obj 122 98 t b b; #X obj 185 156 t l l; #X obj 122 156 t l l; #X obj 122 221 mtx_sub; #X obj 236 269 -; #X obj 267 269 -; #X obj 298 268 -; #X obj 329 268 -; #X msg 122 132 1 3 2 -1; #X msg 185 133 0 0 4 6; #X connect 0 0 15 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 19 0; #X connect 7 1 20 0; #X connect 7 2 21 0; #X connect 7 3 22 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 18 1; #X connect 13 0 18 0; #X connect 14 0 19 1; #X connect 14 1 20 1; #X connect 14 2 21 1; #X connect 14 3 22 1; #X connect 15 0 23 0; #X connect 15 1 24 0; #X connect 16 0 12 0; #X connect 16 1 14 0; #X connect 17 0 13 0; #X connect 17 1 7 0; #X connect 18 0 2 0; #X connect 19 0 8 1; #X connect 20 0 9 1; #X connect 21 0 10 1; #X connect 22 0 11 1; #X connect 23 0 17 0; #X connect 24 0 16 0; pd-iemmatrix-0.3/tests/mtx_sub/03_function.pd000066400000000000000000000021041262113134600212470ustar00rootroot00000000000000#N canvas 144 215 431 450 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 256 200 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 156 t l l; #X obj 122 98 t b; #X msg 122 132 23 -3 4.4 9; #X obj 122 221 mtx_sub 6; #X obj 256 221 - 6; #X obj 297 221 - 6; #X obj 338 220 - 6; #X obj 379 220 - 6; #X connect 0 0 14 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 17 0; #X connect 7 1 18 0; #X connect 7 2 19 0; #X connect 7 3 20 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 16 0; #X connect 13 0 12 0; #X connect 13 1 7 0; #X connect 14 0 15 0; #X connect 15 0 13 0; #X connect 16 0 2 0; #X connect 17 0 8 1; #X connect 18 0 9 1; #X connect 19 0 10 1; #X connect 20 0 11 1; pd-iemmatrix-0.3/tests/mtx_sub/04_function.pd000066400000000000000000000024661262113134600212630ustar00rootroot00000000000000#N canvas 385 142 412 429 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 185 190 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 252 228 unpack 0 0 0 0; #X obj 122 98 t b b; #X obj 185 156 t l l; #X obj 122 221 mtx_sub; #X obj 236 269 -; #X obj 267 269 -; #X obj 298 268 -; #X obj 329 268 -; #X obj 122 156 t f f; #X obj 236 248 t f f f f; #X msg 122 132 8; #X msg 185 133 5 3 -1000 12.1235; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 7 0; #X connect 3 1 8 0; #X connect 3 2 9 0; #X connect 3 3 10 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 5 0; #X connect 8 0 5 1; #X connect 9 0 4 0; #X connect 10 0 4 1; #X connect 11 0 15 1; #X connect 12 0 16 1; #X connect 12 1 17 1; #X connect 12 2 18 1; #X connect 12 3 19 1; #X connect 13 0 22 0; #X connect 13 1 23 0; #X connect 14 0 11 0; #X connect 14 1 12 0; #X connect 15 0 2 0; #X connect 16 0 7 1; #X connect 17 0 8 1; #X connect 18 0 9 1; #X connect 19 0 10 1; #X connect 20 0 15 0; #X connect 20 1 21 0; #X connect 21 0 16 0; #X connect 21 1 17 0; #X connect 21 2 18 0; #X connect 21 3 19 0; #X connect 22 0 20 0; #X connect 23 0 14 0; pd-iemmatrix-0.3/tests/mtx_sub/05_function.pd000066400000000000000000000005641262113134600212610ustar00rootroot00000000000000#N canvas 55 354 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 307 ==; #X obj 122 98 t b; #X obj 122 174 t f f; #X msg 122 132 7; #X obj 122 221 mtx_sub 2.1; #X obj 207 221 - 2.1; #X connect 0 0 3 0; #X connect 2 0 1 0; #X connect 3 0 5 0; #X connect 4 0 6 0; #X connect 4 1 7 0; #X connect 5 0 4 0; #X connect 6 0 2 0; #X connect 7 0 2 1; pd-iemmatrix-0.3/tests/mtx_sub/06_function.pd000066400000000000000000000024621262113134600212610ustar00rootroot00000000000000#N canvas 385 142 386 465 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 98 t b b; #X obj 122 156 t l l; #X obj 236 269 -; #X obj 267 269 -; #X obj 298 268 -; #X obj 329 268 -; #X obj 252 228 t f f f f; #X obj 185 156 t f f; #X obj 122 221 mtx_sub 0; #X msg 122 132 4 34 76 0.1; #X msg 205 133 9.5; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 15 0; #X connect 7 1 16 0; #X connect 7 2 17 0; #X connect 7 3 18 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 21 0; #X connect 13 0 22 0; #X connect 13 1 23 0; #X connect 14 0 12 0; #X connect 14 1 7 0; #X connect 15 0 8 1; #X connect 16 0 9 1; #X connect 17 0 10 1; #X connect 18 0 11 1; #X connect 19 0 15 1; #X connect 19 1 16 1; #X connect 19 2 17 1; #X connect 19 3 18 1; #X connect 20 0 21 1; #X connect 20 1 19 0; #X connect 21 0 2 0; #X connect 22 0 14 0; #X connect 23 0 20 0; pd-iemmatrix-0.3/tests/mtx_sub/07_function.pd000066400000000000000000000007511262113134600212610ustar00rootroot00000000000000#N canvas 270 180 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 213 71 bang; #X obj 122 98 t b b; #X obj 122 175 t f f; #X obj 122 307 ==; #X obj 122 251 mtx_sub 0; #X obj 239 251 -; #X msg 122 132 2; #X msg 152 131 6.9; #X connect 0 0 3 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 4 0 6 0; #X connect 4 1 7 0; #X connect 5 0 1 0; #X connect 6 0 5 0; #X connect 7 0 5 1; #X connect 8 0 4 0; #X connect 9 0 6 1; #X connect 9 0 7 1; pd-iemmatrix-0.3/tests/mtx_sub/08_function.pd000066400000000000000000000024651262113134600212660ustar00rootroot00000000000000#N canvas 277 252 796 483 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 98 t b b; #X obj 122 156 t l l; #X obj 236 269 -; #X obj 267 269 -; #X obj 298 268 -; #X obj 329 268 -; #X obj 252 228 t f f f f; #X obj 225 156 t f f; #X obj 122 221 mtx_sub 0; #X msg 225 133 9.99; #X msg 122 132 3 2 6543.1 -1; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 15 0; #X connect 7 1 16 0; #X connect 7 2 17 0; #X connect 7 3 18 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 21 0; #X connect 13 0 23 0; #X connect 13 1 22 0; #X connect 14 0 12 0; #X connect 14 1 7 0; #X connect 15 0 8 1; #X connect 16 0 9 1; #X connect 17 0 10 1; #X connect 18 0 11 1; #X connect 19 0 15 1; #X connect 19 1 16 1; #X connect 19 2 17 1; #X connect 19 3 18 1; #X connect 20 0 21 1; #X connect 20 1 19 0; #X connect 21 0 2 0; #X connect 22 0 20 0; #X connect 23 0 14 0; pd-iemmatrix-0.3/tests/mtx_sub/09_function.pd000066400000000000000000000025541262113134600212660ustar00rootroot00000000000000#N canvas 311 295 379 440 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 98 t b b; #X obj 185 156 t l l; #X obj 122 156 t l l; #X obj 122 221 mtx_sub; #X obj 236 269 -; #X obj 267 269 -; #X obj 298 268 -; #X obj 329 268 -; #X msg 186 200 matrix 1 2 \$1 \$2; #X obj 252 228 unpack 0 0; #X msg 122 132 3 -1 0.2 4.4; #X msg 215 133 9.13; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 17 0; #X connect 7 1 18 0; #X connect 7 2 19 0; #X connect 7 3 20 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 16 0; #X connect 13 0 23 0; #X connect 13 1 24 0; #X connect 14 0 21 0; #X connect 14 1 22 0; #X connect 15 0 12 0; #X connect 15 1 7 0; #X connect 16 0 2 0; #X connect 17 0 8 1; #X connect 18 0 9 1; #X connect 19 0 10 1; #X connect 20 0 11 1; #X connect 21 0 16 1; #X connect 22 0 17 1; #X connect 22 0 19 1; #X connect 22 1 18 1; #X connect 22 1 20 1; #X connect 23 0 15 0; #X connect 24 0 14 0; pd-iemmatrix-0.3/tests/mtx_sub/10_function.pd000066400000000000000000000025551262113134600212570ustar00rootroot00000000000000#N canvas 182 266 409 472 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 243 \$3 \$4 \$5 \$6; #X obj 122 268 unpack 0 0 0 0; #X obj 184 330 *; #X obj 122 330 *; #X obj 122 356 *; #X obj 236 248 unpack 0 0 0 0; #X obj 122 307 ==; #X obj 153 307 ==; #X obj 184 307 ==; #X obj 215 307 ==; #X msg 122 179 matrix 2 2 \$1 \$2 \$3 \$4; #X obj 122 98 t b b; #X obj 185 156 t l l; #X obj 122 156 t l l; #X obj 122 221 mtx_sub; #X obj 236 269 -; #X obj 267 269 -; #X obj 298 268 -; #X obj 329 268 -; #X msg 166 200 matrix 2 1 \$1 \$2; #X obj 252 226 unpack 0 0; #X msg 122 132 3 2 -1 6; #X msg 185 133 12.5 -100; #X connect 0 0 13 0; #X connect 2 0 3 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 10 0; #X connect 3 3 11 0; #X connect 4 0 6 1; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 17 0; #X connect 7 1 18 0; #X connect 7 2 19 0; #X connect 7 3 20 0; #X connect 8 0 5 0; #X connect 9 0 5 1; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 16 0; #X connect 13 0 23 0; #X connect 13 1 24 0; #X connect 14 0 21 0; #X connect 14 1 22 0; #X connect 15 0 12 0; #X connect 15 1 7 0; #X connect 16 0 2 0; #X connect 17 0 8 1; #X connect 18 0 9 1; #X connect 19 0 10 1; #X connect 20 0 11 1; #X connect 21 0 16 1; #X connect 22 0 17 1; #X connect 22 0 18 1; #X connect 22 1 19 1; #X connect 22 1 20 1; #X connect 23 0 15 0; #X connect 24 0 14 0; pd-iemmatrix-0.3/tests/mtx_sum/000077500000000000000000000000001262113134600166115ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_sum/00_exist.pd000066400000000000000000000004201262113134600205650ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X obj 122 161 mtx_sum; #X text 67 37 test for existance of [mtx_sum]; #X connect 0 0 4 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 2 0; pd-iemmatrix-0.3/tests/mtx_symasym/000077500000000000000000000000001262113134600175075ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_symasym/00_exist.pd000066400000000000000000000005111262113134600214640ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X obj 122 161 mtx_symasym; #X text 67 37 test for existance of [mtx_symasym]; #X msg 122 122 matrix 1 1 1; #X connect 0 0 6 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 2 0; #X connect 6 0 4 0; pd-iemmatrix-0.3/tests/mtx_trace/000077500000000000000000000000001262113134600171035ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_trace/00_exist.pd000066400000000000000000000004241262113134600210630ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X obj 122 161 mtx_trace; #X text 67 37 test for existance of [mtx_trace]; #X connect 0 0 4 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 2 0; pd-iemmatrix-0.3/tests/mtx_transpose/000077500000000000000000000000001262113134600200235ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_transpose/00_exist.pd000066400000000000000000000005151262113134600220040ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X obj 122 161 mtx_transpose; #X text 67 37 test for existance of [mtx_transpose]; #X msg 122 122 matrix 1 1 1; #X connect 0 0 6 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 4 0 2 0; #X connect 6 0 4 0; pd-iemmatrix-0.3/tests/mtx_zeros/000077500000000000000000000000001262113134600171475ustar00rootroot00000000000000pd-iemmatrix-0.3/tests/mtx_zeros/00_exist.pd000066400000000000000000000004261262113134600211310ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 347 b; #X msg 122 366 1; #X text 67 37 test for existance of [mtx_zeros]; #X obj 122 161 mtx_zeros 1; #X connect 0 0 5 0; #X connect 2 0 3 0; #X connect 3 0 1 0; #X connect 5 0 2 0; pd-iemmatrix-0.3/tests/mtx_zeros/01_function.pd000066400000000000000000000012021262113134600216140ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X msg 122 214 \$3 \$4 \$5 \$6; #X obj 122 161 mtx_zeros 2; #X obj 122 238 unpack 0 0 0 0; #X obj 122 262 == 0; #X obj 162 262 == 0; #X obj 202 262 == 0; #X obj 242 262 == 0; #X obj 122 282 *; #X obj 122 302 *; #X obj 202 282 *; #X obj 122 104 t b; #X connect 0 0 12 0; #X connect 2 0 4 0; #X connect 3 0 2 0; #X connect 4 0 5 0; #X connect 4 1 6 0; #X connect 4 2 7 0; #X connect 4 3 8 0; #X connect 5 0 9 0; #X connect 6 0 9 1; #X connect 7 0 11 0; #X connect 8 0 11 1; #X connect 9 0 10 0; #X connect 10 0 1 0; #X connect 11 0 10 1; #X connect 12 0 3 0; pd-iemmatrix-0.3/tests/mtx_zeros/02_function.pd000066400000000000000000000015431262113134600216250ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 262 == 0; #X obj 162 262 == 0; #X obj 202 262 == 0; #X obj 242 262 == 0; #X obj 122 282 *; #X obj 122 302 *; #X obj 202 282 *; #X obj 122 104 t b; #X obj 122 161 mtx_zeros 2 3; #X msg 122 214 \$3 \$4 \$5 \$6 \$7 \$8; #X obj 122 238 unpack 0 0 0 0 0 0; #X obj 282 262 == 0; #X obj 322 262 == 0; #X obj 282 282 *; #X obj 122 324 *; #X connect 0 0 9 0; #X connect 2 0 6 0; #X connect 3 0 6 1; #X connect 4 0 8 0; #X connect 5 0 8 1; #X connect 6 0 7 0; #X connect 7 0 16 0; #X connect 8 0 7 1; #X connect 9 0 10 0; #X connect 10 0 11 0; #X connect 11 0 12 0; #X connect 12 0 2 0; #X connect 12 1 3 0; #X connect 12 2 4 0; #X connect 12 3 5 0; #X connect 12 4 13 0; #X connect 12 5 14 0; #X connect 13 0 15 0; #X connect 14 0 15 1; #X connect 15 0 16 1; #X connect 16 0 1 0; pd-iemmatrix-0.3/tests/mtx_zeros/03_function.pd000066400000000000000000000012611262113134600216230ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 262 == 0; #X obj 162 262 == 0; #X obj 202 262 == 0; #X obj 242 262 == 0; #X obj 122 282 *; #X obj 122 302 *; #X obj 202 282 *; #X obj 122 104 t b; #X obj 122 238 unpack 0 0 0 0 0 0; #X obj 122 161 mtx_zeros 7 8; #X msg 122 214 \$3 \$4 \$5 \$6; #X msg 122 135 2; #X connect 0 0 9 0; #X connect 2 0 6 0; #X connect 3 0 6 1; #X connect 4 0 8 0; #X connect 5 0 8 1; #X connect 6 0 7 0; #X connect 7 0 1 0; #X connect 8 0 7 1; #X connect 9 0 13 0; #X connect 10 0 2 0; #X connect 10 1 3 0; #X connect 10 2 4 0; #X connect 10 3 5 0; #X connect 11 0 12 0; #X connect 12 0 10 0; #X connect 13 0 11 0; pd-iemmatrix-0.3/tests/mtx_zeros/04_function.pd000066400000000000000000000016111262113134600216230ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 262 == 0; #X obj 162 262 == 0; #X obj 202 262 == 0; #X obj 242 262 == 0; #X obj 122 282 *; #X obj 122 302 *; #X obj 202 282 *; #X obj 122 104 t b; #X msg 122 214 \$3 \$4 \$5 \$6 \$7 \$8; #X obj 122 238 unpack 0 0 0 0 0 0; #X obj 282 262 == 0; #X obj 322 262 == 0; #X obj 282 282 *; #X obj 122 324 *; #X msg 122 135 3 2; #X obj 122 161 mtx_zeros; #X connect 0 0 9 0; #X connect 2 0 6 0; #X connect 3 0 6 1; #X connect 4 0 8 0; #X connect 5 0 8 1; #X connect 6 0 7 0; #X connect 7 0 15 0; #X connect 8 0 7 1; #X connect 9 0 16 0; #X connect 10 0 11 0; #X connect 11 0 2 0; #X connect 11 1 3 0; #X connect 11 2 4 0; #X connect 11 3 5 0; #X connect 11 4 12 0; #X connect 11 5 13 0; #X connect 12 0 14 0; #X connect 13 0 14 1; #X connect 14 0 15 1; #X connect 15 0 1 0; #X connect 16 0 17 0; #X connect 17 0 10 0; pd-iemmatrix-0.3/tests/mtx_zeros/05_function.pd000066400000000000000000000011171262113134600216250ustar00rootroot00000000000000#N canvas 541 351 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 282 *; #X obj 122 104 t b; #X obj 122 191 mtx_zeros 7 8; #X msg 122 135 10 14; #X msg 122 214 \$1 \$2; #X obj 122 157 t l l; #X obj 122 262 ==; #X obj 162 262 ==; #X obj 179 215 unpack; #X obj 122 236 unpack; #X connect 0 0 3 0; #X connect 2 0 1 0; #X connect 3 0 5 0; #X connect 4 0 6 0; #X connect 5 0 7 0; #X connect 6 0 11 0; #X connect 7 0 4 0; #X connect 7 1 10 0; #X connect 8 0 2 0; #X connect 9 0 2 1; #X connect 10 0 8 1; #X connect 10 1 9 1; #X connect 11 0 8 0; #X connect 11 1 9 0; pd-iemmatrix-0.3/tests/mtx_zeros/06_function.pd000066400000000000000000000011131262113134600216220ustar00rootroot00000000000000#N canvas 385 142 508 466 10; #X obj 122 68 inlet bang; #X obj 122 385 outlet 1==OK; #X obj 122 104 t b; #X obj 122 282 *; #X obj 122 191 mtx_zeros 7 8; #X msg 122 214 \$1 \$2; #X obj 122 262 ==; #X obj 162 262 ==; #X obj 122 236 unpack; #X msg 122 135 32; #X obj 122 157 t f f; #X obj 179 215 t f f; #X connect 0 0 2 0; #X connect 2 0 9 0; #X connect 3 0 1 0; #X connect 4 0 5 0; #X connect 5 0 8 0; #X connect 6 0 3 0; #X connect 7 0 3 1; #X connect 8 0 6 0; #X connect 8 1 7 0; #X connect 9 0 10 0; #X connect 10 0 4 0; #X connect 10 1 11 0; #X connect 11 0 6 1; #X connect 11 1 7 1; pd-iemmatrix-0.3/tests/runtests.bat000066400000000000000000000002101262113134600174650ustar00rootroot00000000000000rem RUN TEST SUITE set PATH=%PATH%;C:\Programme\pd\bin\ pd -lib ..\iemmatrix -path ..\abs -nogui runtests_nogui.pd > runtests.log 2>&1pd-iemmatrix-0.3/tests/runtests.pd000066400000000000000000000012171262113134600173320ustar00rootroot00000000000000#N canvas 368 197 813 499 10; #X obj 177 463 testunit; #X obj 177 377 textfile; #X obj 177 183 t b b; #X msg 207 261 read runtests.txt \, rewind; #X obj 177 287 metro 10; #X msg 243 289 0; #X obj 177 126 bng 40 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X msg 177 351 bang; #X symbolatom 177 430 0 0 0 0 - - -; #X obj 177 399 symbol; #X obj 138 260 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1; #X connect 1 0 9 0; #X connect 1 1 5 0; #X connect 2 0 4 0; #X connect 2 1 3 0; #X connect 3 0 1 0; #X connect 4 0 7 0; #X connect 5 0 4 0; #X connect 6 0 2 0; #X connect 7 0 1 0; #X connect 8 0 0 0; #X connect 9 0 8 0; #X connect 10 0 4 0; pd-iemmatrix-0.3/tests/runtests.sh000077500000000000000000000015111262113134600173410ustar00rootroot00000000000000#!/bin/sh if [ "x${PD}" = "x" ] then PD=pd fi RUNTESTS_TXT=runtests.txt RUNTESTS_LOG=runtests.log ls -1 */*.pd | sed 's/\.pd/;/' > $RUNTESTS_TXT IEMMATRIX="-lib ../iemmatrix -path ../abs/" run_nogui() { pd $IEMMATRIX -nogui runtests_nogui.pd > ${RUNTESTS_LOG}.$$ 2>&1 NUMTESTS=`grep -c . $RUNTESTS_TXT` echo "regression-test: ${NUMTESTS} tests total" >> ${RUNTESTS_LOG}.$$ cat ${RUNTESTS_LOG}.$$ | egrep "^regression-test: " | sed -e 's/^regression-test: //' FAILEDTESTS=$(cat ${RUNTESTS_LOG}.$$ | egrep "^regression-test: .*: failed$" | sed -e 's|^regression-test: ||' -e 's|: failed$||') echo -n "failed tests: " for ft in ${FAILEDTESTS}; do echo -n "${ft} " done echo } run_withgui() { pd $IEMMATRIX -stderr runtests.pd 2>&1 | tee ${RUNTESTS_LOG} } if test "x$1" = "x-gui"; then run_withgui else run_nogui fi pd-iemmatrix-0.3/tests/runtests.txt000066400000000000000000000143261262113134600175530ustar00rootroot00000000000000mtx_abs/00_exist; mtx_abs/01_function; mtx_abs/02_function; mtx_abs/03_function; mtx_add/00_exist1; mtx_add/00_exist; mtx_add/01_function; mtx_add/02_function; mtx_add/03_function; mtx_add/04_function; mtx_add/05_function; mtx_add/06_function; mtx_add/07_function; mtx_add/08_function; mtx_add/09_function; mtx_add/10_function; mtx_and/00_exist; mtx_and/01_function; mtx_and/02_function; mtx_and/03_function; mtx_and/04_function; mtx_and/05_function; mtx_and/06_function; mtx_and/07_function; mtx_and/08_function; mtx_and/09_function; mtx_and/10_function; mtx_bitand/00_exist; mtx_bitand/01_function; mtx_bitand/02_function; mtx_bitand/03_function; mtx_bitand/04_function; mtx_bitand/05_function; mtx_bitand/06_function; mtx_bitand/07_function; mtx_bitand/08_function; mtx_bitand/09_function; mtx_bitand/10_function; mtx_bitleft/00_exist; mtx_bitleft/01_function; mtx_bitleft/02_function; mtx_bitleft/03_function; mtx_bitleft/04_function; mtx_bitleft/05_function; mtx_bitleft/06_function; mtx_bitleft/07_function; mtx_bitleft/08_function; mtx_bitleft/09_function; mtx_bitleft/10_function; mtx_bitor/00_exist; mtx_bitor/01_function; mtx_bitor/02_function; mtx_bitor/03_function; mtx_bitor/04_function; mtx_bitor/05_function; mtx_bitor/06_function; mtx_bitor/07_function; mtx_bitor/08_function; mtx_bitor/09_function; mtx_bitor/10_function; mtx_bitright/00_exist; mtx_bitright/01_function; mtx_bitright/02_function; mtx_bitright/03_function; mtx_bitright/04_function; mtx_bitright/05_function; mtx_bitright/06_function; mtx_bitright/07_function; mtx_bitright/08_function; mtx_bitright/09_function; mtx_bitright/10_function; mtx_check/00_exist; mtx_check/01_function; mtx_check/02_function; mtx_check/03_function; mtx_cholesky/00_exist; mtx_col/00_exist; mtx_colon/00_exist1; mtx_colon/00_exist; mtx_concat/00_exist; mtx_conv/00_exist; mtx_cos/00_exist; mtx_cos/01_function; mtx_cos/02_function; mtx_cos/03_function; mtx_cumsum/00_exist; mtx_dbtorms/00_exist; mtx_dbtorms/01_function; mtx_dbtorms/02_function; mtx_dbtorms/03_function; mtx_decay/00_exist; mtx_diag/00_exist; mtx_diegg/00_exist; mtx_diegg/01_init; mtx_diegg/02_getdiegg; mtx_diegg/02_init; mtx_diff/00_exist; mtx_distance2/00_exist; mtx_egg/00_exist; mtx_egg/01_function; mtx_egg/02_function; mtx_egg/03_function; mtx_egg/04_function; mtx_egg/05_function; mtx_egg/06_function; mtx_element/00_exist; mtx_eq/00_exist; mtx_eq/01_function; mtx_eq/02_function; mtx_eq/03_function; mtx_eq/04_function; mtx_eq/05_function; mtx_eq/06_function; mtx_eq/07_function; mtx_eq/08_function; mtx_eq/09_function; mtx_eq/10_function; mtx_exp/00_exist; mtx_exp/01_function; mtx_exp/02_function; mtx_exp/03_function; mtx_eye/00_exist; mtx_eye/01_function; mtx_eye/02_function; mtx_eye/03_function; mtx_eye/04_function; mtx_eye/05_function; mtx_eye/06_function; mtx_fill/00_exist; mtx_find/00_exist; mtx_gauss/00_exist; mtx_ge/00_exist; mtx_ge/01_function; mtx_ge/02_function; mtx_ge/03_function; mtx_ge/04_function; mtx_ge/05_function; mtx_ge/06_function; mtx_ge/07_function; mtx_ge/08_function; mtx_ge/09_function; mtx_ge/10_function; mtx_gt/00_exist; mtx_gt/01_function; mtx_gt/02_function; mtx_gt/03_function; mtx_gt/04_function; mtx_gt/05_function; mtx_gt/06_function; mtx_gt/07_function; mtx_gt/08_function; mtx_gt/09_function; mtx_gt/10_function; mtx_index/00_exist; mtx_int/00_exist; mtx_int/01_function; mtx_int/02_function; mtx_int/03_function; mtx_inverse/00_exist; mtx_isequal/00_exist; mtx_isequal/01_function0; mtx_isequal/01_function1; mtx_isequal/01_function2; mtx_isequal/01_function3; mtx_le/00_exist; mtx_le/01_function; mtx_le/02_function; mtx_le/03_function; mtx_le/04_function; mtx_le/05_function; mtx_le/06_function; mtx_le/07_function; mtx_le/08_function; mtx_le/09_function; mtx_le/10_function; mtx_log/00_exist; mtx_log/01_function; mtx_log/02_function; mtx_log/03_function; mtx_log/04_function; mtx_lt/00_exist; mtx_lt/01_function; mtx_lt/02_function; mtx_lt/03_function; mtx_lt/04_function; mtx_lt/05_function; mtx_lt/06_function; mtx_lt/07_function; mtx_lt/08_function; mtx_lt/09_function; mtx_lt/10_function; mtx_matcher/00_exist; mtx_matrix/00_exist1; mtx_matrix/00_exist; mtx_max/00_exist; mtx_max/01_function; mtx_max/02_function; mtx_max/03_function; mtx_max/04_function; mtx_max/05_function; mtx_max/06_function; mtx_max2/00_exist; mtx_mean/00_exist; mtx_min/00_exist; mtx_min/01_function; mtx_min/02_function; mtx_min/03_function; mtx_min/04_function; mtx_min/05_function; mtx_min/06_function; mtx_min2/00_exist; mtx_minmax/00_exist; mtx_minmax/01_function; mtx_minmax/02_function; mtx_minmax/03_function; mtx_minmax/04_function; mtx_minmax/05_function; mtx_minmax/06_function; mtx_mul/00_exist1; mtx_mul/00_exist2; mtx_mul/00_exist; mtx_neq/00_exist; mtx_neq/01_function; mtx_neq/02_function; mtx_neq/03_function; mtx_neq/04_function; mtx_neq/05_function; mtx_neq/06_function; mtx_neq/07_function; mtx_neq/08_function; mtx_neq/09_function; mtx_neq/10_function; mtx_not/00_exist1; mtx_not/00_exist; mtx_ones/00_exist; mtx_ones/01_function; mtx_ones/02_function; mtx_ones/03_function; mtx_ones/04_function; mtx_ones/05_function; mtx_ones/06_function; mtx_or/00_exist; mtx_or/01_function; mtx_or/02_function; mtx_or/03_function; mtx_or/04_function; mtx_or/05_function; mtx_or/06_function; mtx_or/07_function; mtx_or/08_function; mtx_or/09_function; mtx_or/10_function; mtx_pivot/00_exist; mtx_prod/00_exist; mtx_rand/00_exist; mtx_rand/01_default; mtx_repmat/00_exist; mtx_resize/00_exist; mtx_reverse/00_exist; mtx_rmstodb/00_exist; mtx_rmstodb/01_function; mtx_rmstodb/02_function; mtx_rmstodb/03_function; mtx_roll/00_exist; mtx_row/00_exist; mtx_rowrfft/00_exist; mtx_rowrifft/00_exist; mtx_scroll/00_exist; mtx_sin/00_exist; mtx_sin/01_function; mtx_sin/02_function; mtx_sin/03_function; mtx_size/00_exist; mtx_size/01_function; mtx_slice/00_exist; mtx_sort/00_exist; mtx_spivot/00_exist; mtx_sub/00_exist1; mtx_sub/00_exist; mtx_sub/01_function; mtx_sub/02_function; mtx_sub/03_function; mtx_sub/04_function; mtx_sub/05_function; mtx_sub/06_function; mtx_sub/07_function; mtx_sub/08_function; mtx_sub/09_function; mtx_sub/10_function; mtx_sum/00_exist; mtx_symasym/00_exist; mtx_trace/00_exist; mtx_transpose/00_exist; mtx_zeros/00_exist; mtx_zeros/01_function; mtx_zeros/02_function; mtx_zeros/03_function; mtx_zeros/04_function; mtx_zeros/05_function; mtx_zeros/06_function; pd-iemmatrix-0.3/tests/runtests_nogui.pd000066400000000000000000000017541262113134600205410ustar00rootroot00000000000000#N canvas 209 168 427 557 10; #X obj 86 209 testunit; #X obj 86 130 textfile; #X obj 86 56 t b b; #X msg 116 84 read runtests.txt \, rewind; #X obj 86 34 loadbang; #X msg 137 171 \; pd quit; #X obj 86 110 until; #X obj 86 233 select 0 1; #X obj 111 259 + 1; #X obj 171 259 + 1; #X obj 87 312 i; #X obj 130 312 i; #X obj 130 381 print regression-test; #X msg 130 356 \$1 tests passed; #X msg 87 335 \$1 tests failed; #X obj 87 291 t b b; #X obj 137 150 t b b; #X obj 86 259 i 1; #X obj 146 259 i 1; #X connect 0 0 7 0; #X connect 1 0 0 0; #X connect 1 1 16 0; #X connect 2 0 6 0; #X connect 2 1 3 0; #X connect 3 0 1 0; #X connect 4 0 2 0; #X connect 6 0 1 0; #X connect 7 0 17 0; #X connect 7 1 18 0; #X connect 8 0 17 1; #X connect 9 0 18 1; #X connect 10 0 14 0; #X connect 11 0 13 0; #X connect 13 0 12 0; #X connect 14 0 12 0; #X connect 15 0 10 0; #X connect 15 1 11 0; #X connect 16 0 5 0; #X connect 16 1 15 0; #X connect 17 0 8 0; #X connect 17 0 10 1; #X connect 18 0 9 0; #X connect 18 0 11 1; pd-iemmatrix-0.3/tests/testunit.pd000066400000000000000000000040611262113134600173220ustar00rootroot00000000000000#N canvas 697 324 312 252 10; #N canvas 6 50 564 876 run-test 1; #X obj 87 512 r \$0-receive; #X obj 71 532 f; #X msg 96 533 0; #X obj 71 76 symbol; #X obj 71 44 inlet test-to-run; #X obj 71 639 outlet result; #X obj 71 615 pack 0 s; #X obj 181 205 makefilename pd-%d-regressiontest; #X obj 109 226 pack s \$0 s; #X obj 181 186 f \$0; #X obj 109 160 t s b; #X obj 143 489 t b s s; #X obj 71 104 t b b s s; #X msg 140 72 bang; #X obj 90 135 s \$0-send; #X msg 109 246 \; \$3 clear \; \$3 obj 100 100 r \$2-send \; \$3 obj 100 150 \$1 \; \$3 obj 100 200 s \$2-receive \; \$3 connect 0 0 1 0 \; \$3 connect 1 0 2 0; #N canvas 395 348 450 300 print 0; #X obj 101 247 print regression-test; #X obj 101 204 pack s s; #X obj 101 117 select 1; #X obj 152 137 b; #X msg 152 160 failed; #X msg 101 138 OK; #X obj 101 185 symbol; #X msg 101 223 \$2: \$1; #X obj 296 82 inlet test; #X obj 101 92 inlet result; #X connect 1 0 7 0; #X connect 2 0 5 0; #X connect 2 1 3 0; #X connect 3 0 4 0; #X connect 4 0 6 0; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 0 0; #X connect 8 0 1 1; #X connect 9 0 2 0; #X restore 101 584 pd print result; #X obj 71 565 t f f; #X msg 101 406 \; \$1 clear; #X obj 101 386 symbol; #X obj 71 364 t b b; #X obj 71 195 spigot 1; #X obj 133 201 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1; #X connect 0 0 1 1; #X connect 1 0 17 0; #X connect 2 0 1 1; #X connect 3 0 12 0; #X connect 4 0 3 0; #X connect 6 0 5 0; #X connect 7 0 8 2; #X connect 7 0 19 1; #X connect 8 0 15 0; #X connect 9 0 7 0; #X connect 10 0 8 0; #X connect 10 1 9 0; #X connect 11 0 2 0; #X connect 11 1 6 1; #X connect 11 2 16 1; #X connect 12 0 21 0; #X connect 12 1 14 0; #X connect 12 2 10 0; #X connect 12 3 11 0; #X connect 13 0 3 0; #X connect 17 0 6 0; #X connect 17 1 16 0; #X connect 19 0 18 0; #X connect 20 0 1 0; #X connect 20 1 19 0; #X connect 21 0 20 0; #X connect 22 0 21 1; #X restore 94 138 pd run-test; #X obj 94 163 outlet; #X obj 94 111 inlet; #N canvas 672 477 450 300 \$0-regressiontest 0; #X restore 92 186 pd \$0-regressiontest; #X connect 0 0 1 0; #X connect 2 0 0 0;