pax_global_header00006660000000000000000000000064143444207000014510gustar00rootroot0000000000000052 comment=4f8bec92737ed023fcbbba84a02c221d370cff4d pd-smlib-0.13.0/000077500000000000000000000000001434442070000133005ustar00rootroot00000000000000pd-smlib-0.13.0/LICENSE.txt000066400000000000000000000432541434442070000151330ustar00rootroot00000000000000 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 Lesser 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 Lesser General Public License instead of this License. pd-smlib-0.13.0/Makefile000066400000000000000000000037151434442070000147460ustar00rootroot00000000000000# Makefile for Makefile.pdlibbuilder. # lib.name := smlib bp.class.sources = source/bp.c decimator.class.sources = source/decimator.c deltas.class.sources = source/deltas.c hip.class.sources = source/hip.c hist.class.sources = source/hist.c itov.class.sources = source/itov.c lavg.class.sources = source/lavg.c lhist.class.sources = source/lhist.c lhisti.class.sources = source/lhisti.c linspace.class.sources = source/linspace.c lmax.class.sources = source/lmax.c lmin.class.sources = source/lmin.c lrange.class.sources = source/lrange.c lstd.class.sources = source/lstd.c prevl.class.sources = source/prevl.c threshold.class.sources = source/threshold.c vabs.class.sources = source/vabs.c vclip.class.sources = source/vclip.c vcog.class.sources = source/vcog.c vdbtorms.class.sources = source/vdbtorms.c vdelta.class.sources = source/vdelta.c vfmod.class.sources = source/vfmod.c vftom.class.sources = source/vftom.c vlavg.class.sources = source/vlavg.c vlmax.class.sources = source/vlmax.c vlmin.class.sources = source/vlmin.c vlrange.class.sources = source/vlrange.c vmax.class.sources = source/vmax.c vmin.class.sources = source/vmin.c vmtof.class.sources = source/vmtof.c vnmax.class.sources = source/vnmax.c vpow.class.sources = source/vpow.c vrms.class.sources = source/vrms.c vrmstodb.class.sources = source/vrmstodb.c vstd.class.sources = source/vstd.c vsum.class.sources = source/vsum.c vthreshold.class.sources = source/vthreshold.c vvconv.class.sources = source/vvconv.c vvminus.class.sources = source/vvminus.c vvplus.class.sources = source/vvplus.c extradirs = examples datafiles = \ $(wildcard help/*-help.pd) \ smlib-meta.pd \ SMLib.pd \ README.txt \ LICENSE.txt PDLIBBUILDER_DIR=pd-lib-builder/ include $(PDLIBBUILDER_DIR)/Makefile.pdlibbuilder pd-smlib-0.13.0/README.md000066400000000000000000000014621434442070000145620ustar00rootroot00000000000000smlib - Signal processing for Mapping library for pure-data (c) 2002 by Johannes Taelman This git-fork of the Pure-data library smlib is cloned from https://git.puredata.info/cgit/svn2git/libraries/smlib.git, which is the svn-to-git from https://sourceforge.net/p/pure-data/svn/HEAD/tree/trunk/externals/smlib/. The initial changes were adding/recreating some separate directories for source and help files and replace the buildsystem by pd-lib-builder. This to simplify creation of a deken package of the libary. Additionally, the help-patches are reformatted. See the original README.txt for more information. The current version is 0.12.3. For bugs found in this version, please report them to me. Johannes is not responsible for bugs introduced by me. Fred Jan Kraan fjkraan@electrickery.nl 2016-09-02 pd-smlib-0.13.0/README.txt000066400000000000000000000077231434442070000150070ustar00rootroot00000000000000 ----------------------------------------- - SMLib : Signal processing for Mapping - ----------------------------------------- v0.12 date 20021125 1. Introduction --------------- SMLib is an external objects library for PD (pure data). It complements PD with a set of objects for vector processing, vector analysis, vector synthesis, number stream analysis, number stream filters. I was missing objects that could do dsp-like operations on control signals. PD is event-driven by nature (except the dsp-objects and [delay], [metro], ...). A slider that does not change does not transmit anything. Event-driven events can be sampled by eg. using a [float] with a [metro] on its main input, and a slider on its right inlet. SMLib has objects designed to process such streams. Eg. [lavg] is a leaky integrator, it smoothes abrupt changes. Leaky processes are interesting in mapping because our attention is also leaky. Eg. [hp] is a high-pass filter (just like [hp~]), and it only passes changes, and decays to zero when there are no changes. Likewise our attention shifts towards remarkable changes in our environment. You can detect 'events' in float streams with [threshold]. A vector is a list of floats. These objects are suitable for gesture and high-level music analysis prototyping. This library is written by Johannes Taelman (johannes.taelman@rug.ac.be). The code is free+open (GNU GPL license). I have only tested/compiled the code on win32, but porting to linux or macOs should be easy. 2. List of objects ------------------ processing stream of floats (context) (float output) lavg leaky average lmax leaky maximum lmin leaky minimum lrange leaky range lstd leaky standard deviation decimator passes 1 in n input values threshold detection with hysteresis hip first order high-pass filter bp second order (resonant) high-pass filter analyzing stream of floats (vector output) hist histogram lhist leaky histogram, clips samples lhisti leaky histogram, ignore samples outside bins itov bin index to value (for the histograms prevl previous floats in a list deltas difference between last float and previous floats immediate vector analysis (float output) vsum sum of vector elements vcog center of gravity vmax maximum and its location vmin minimum and its location vrms root mean square vstd standard deviation vector processors (vector output) vv+ vector addition vv- vector substraction vvconv vector convolution vclip clip elements vfmod floating point modulo vpow power vthreshold detections with hysteresises unit conversions on vectors vftom frequency to midi vmtof midi to frequency vdbtorms dB to rms vrmstodb rms to dB vector synthesis (vector output) linspace linearly spaced vector vector stream processing (vector output) (context) vlavg leaky averages vlmax leaky maxima vlmin leaky minima vlrange leaky ranges vdelta difference between successive vectors 3. Installation --------------- ** Outdated ** Requires PD on the win32 platform (for now). Put SMLib.dll in a directory in your PD path. Put the help patches in pd\doc\5.reference. Start PD with "-lib SMLib" 4. Getting started ------------------ ** Outdated ** Start PD. Create a new patch. Create an object [SMLib] Right-click on this object after creation. Choose help. This gives you the main SMLib patch with all objects and a brief explanation of them. Choose help for the objects to get details. Have a look at the example patches for design ideas. 5. References ------------- PD headquarters: http://msp.ucsd.edu/software.html http://www.puredata.info pd-smlib-0.13.0/SMLib.pd000066400000000000000000000001771434442070000146000ustar00rootroot00000000000000#N canvas 180 534 450 300 10; #X text 41 77 SMlib; #X text 41 104 this is just a placeholder so you can access SMlib-help.pd ; pd-smlib-0.13.0/examples/000077500000000000000000000000001434442070000151165ustar00rootroot00000000000000pd-smlib-0.13.0/examples/beattracker.pd000066400000000000000000000075331434442070000177420ustar00rootroot00000000000000#N canvas 145 39 541 656 10; #X declare -lib smlib -lib creb -lib zexy; #X obj 28 22 adc~; #X obj 20 330 vmin; #X floatatom 69 348 5 0 0 0 - - -; #X obj 10 127 bang; #X obj 58 473 /; #X floatatom 59 526 5 0 0 0 - - -; #X floatatom 1 361 5 0 0 0 - - -; #N canvas 0 22 450 300 (subpatch) 0; #X array arrayP 140 float 1; #A 0 12.745 12.6021 12.4917 12.4624 12.4428 12.4083 12.357 12.3169 12.2838 12.3642 12.4992 12.6125 12.8334 13.1195 13.2091 13.3636 13.427 13.3262 13.1274 13.0323 12.8959 12.4778 12.1279 11.7467 11.1084 10.6082 10.4762 10.5106 10.7249 11.0192 11.4685 11.8969 12.1991 12.4113 12.6745 12.9505 13.0786 13.2169 13.2771 13.2021 12.9841 12.5133 12.0669 11.549 11.0624 10.5936 10.3689 10.1306 10.1064 10.2099 10.1462 10.0187 10.1388 10.2314 10.366 10.447 10.7786 11.1631 11.4977 11.6852 11.9644 12.0264 11.8789 11.6583 11.5462 11.2125 10.9489 10.555 10.1705 9.70149 9.28413 9.1935 9.21485 9.45742 9.79504 10.2243 10.7402 11.2532 11.698 12.1547 12.5026 12.7131 12.8981 12.8903 12.784 12.7157 12.6072 12.4176 12.101 11.7283 11.4631 11.1951 10.8678 10.6743 10.553 10.5304 10.5276 10.6795 10.932 11.0555 11.1699 11.4492 11.7819 12.0798 12.2656 12.2123 12.1171 11.9876 11.7143 11.5564 11.2613 10.9105 10.6654 10.5599 10.4874 10.6588 10.8811 11.2697 11.5855 12.0241 12.4281 12.8351 13.1598 13.4953 13.6783 13.6874 13.5532 13.2183 12.8892 12.5378 12.0966 11.7289 11.3947 11.0228 10.7229 10.5954 10.4147 10.2329 10.1179 10.0109; #X coords 0 100 139 0 200 140 1; #X restore 324 155 graph; #X obj 292 486 tabset arrayP; #X obj 291 454 spigot; #X msg 347 454 0; #X msg 330 427 1; #X obj 292 380 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1; #X obj 109 208 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 194 189 loadbang; #X obj 133 281 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 107 252 vpow 2; #X obj 129 321 vpow 2; #X obj 69 315 vvplus; #X msg 85 102 0; #X obj 26 56 ear~ 256; #X obj 107 228 linspace 1 0.1 140; #X obj 130 299 linspace 0.1 1 140; #X obj 20 171 deltas 60 200 200; #X obj 56 421 + 60; #X obj 20 196 vabs; #X obj 121 49 env~ 256; #X floatatom 206 55 5 0 0 0 - - -; #X obj 57 375 moses 2; #X obj 55 400 moses 138; #X obj 324 297 hsl 200 15 0 140 0 0 empty empty empty -2 -6 0 8 -262144 -1 -1 0 1; #X text 11 75 samplerate = 44100/256 = 172.26 Hz = 0.348 BPM resolution ; #X obj 57 500 * 172.26; #X obj 291 398 metro 200; #X obj 19 245 vlavg 100; #X text 102 122 172.26Hz/60 = 172 BPM; #X text 103 138 172.26Hz/200 = 51.6 BPM; #X obj 39 95 vsum; #X obj 20 300 vvplus; #X obj 55 138 * 0.1; #X obj 59 572 ftom; #X floatatom 169 574 5 0 0 0 - - -; #X obj 96 573 vfmod 12; #X text 109 524 BPM; #X msg 56 451 60; #X text 3 -31 beattracker based on average mean difference funtion (amdf); #X obj 1 395 vmax; #X obj 1 431 -; #X obj 1 470 vsl 15 128 0 127 0 0 empty empty empty 0 -8 0 8 -262144 -1 -1 0 1; #X text 441 593 j#|@2002; #X obj 362 -26 declare -lib smlib -lib creb -lib zexy; #X connect 0 0 20 0; #X connect 0 0 26 0; #X connect 1 0 6 0; #X connect 1 0 47 1; #X connect 1 1 2 0; #X connect 1 1 28 0; #X connect 2 0 30 0; #X connect 3 0 23 0; #X connect 4 0 32 0; #X connect 5 0 40 0; #X connect 9 0 10 0; #X connect 9 0 8 0; #X connect 10 0 9 1; #X connect 11 0 9 1; #X connect 12 0 33 0; #X connect 13 0 21 0; #X connect 14 0 22 0; #X connect 14 0 21 0; #X connect 15 0 22 0; #X connect 16 0 18 0; #X connect 17 0 18 1; #X connect 20 0 37 0; #X connect 21 0 16 0; #X connect 22 0 17 0; #X connect 23 0 25 0; #X connect 24 0 4 1; #X connect 24 0 44 0; #X connect 25 0 34 0; #X connect 26 0 27 0; #X connect 28 1 29 0; #X connect 29 0 24 0; #X connect 32 0 5 0; #X connect 33 0 11 0; #X connect 34 0 38 0; #X connect 37 0 3 0; #X connect 37 0 19 0; #X connect 37 0 39 0; #X connect 38 0 1 0; #X connect 38 0 9 0; #X connect 38 0 46 0; #X connect 39 0 23 0; #X connect 40 0 42 0; #X connect 42 0 41 0; #X connect 44 0 4 0; #X connect 46 0 47 0; #X connect 47 0 48 0; pd-smlib-0.13.0/examples/normalizer.pd000066400000000000000000000046011434442070000176260ustar00rootroot00000000000000#N canvas 161 407 512 338 10; #X obj 410 270 smlib/SMLib-help; #X obj -14 54 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 ; #X obj -14 94 random 10; #X obj -14 72 metro 10; #X obj 13 272 hsl 128 15 -3 3 0 0 empty empty empty -2 -6 0 8 -262144 -1 -1 7495 1; #X floatatom 34 224 5 0 0; #X obj 60 143 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 ; #X obj 126 143 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 34 202 lstd 50; #X obj -14 117 + 7; #X floatatom 21 250 5 0 0; #X text 45 121 adapt; #X text 119 123 store; #N canvas 0 0 456 343 normalizer 0; #X obj 83 171 -; #X obj 37 2 inlet; #X obj 101 81 spigot; #X obj 131 0 inlet; #X msg 256 108 set \$1; #X obj 167 108 spigot; #X msg 220 108 0; #X msg 255 132 11.0646; #X msg 222 39 1; #X text 253 39 set; #X msg 294 42 bang; #X text 335 42 recall; #X obj 294 18 loadbang; #X obj 139 190 spigot; #X msg 294 217 set \$1; #X obj 205 217 spigot; #X msg 258 217 0; #X msg 293 241 3.10129; #X obj 90 292 outlet; #X text 178 0 learn; #X obj 231 -1 inlet; #X obj 102 107 lavg 500; #X obj 140 216 lstd 500; #X obj 92 261 *; #X obj 135 241 pow -1; #X connect 0 0 13 0; #X connect 0 0 23 0; #X connect 1 0 0 0; #X connect 1 0 2 0; #X connect 2 0 21 0; #X connect 3 0 2 1; #X connect 3 0 13 1; #X connect 4 0 7 0; #X connect 5 0 4 0; #X connect 5 0 6 0; #X connect 6 0 5 1; #X connect 7 0 0 1; #X connect 8 0 5 1; #X connect 8 0 15 1; #X connect 10 0 7 0; #X connect 10 0 17 0; #X connect 12 0 10 0; #X connect 13 0 22 0; #X connect 14 0 17 0; #X connect 15 0 14 0; #X connect 15 0 16 0; #X connect 16 0 15 1; #X connect 20 0 8 0; #X connect 21 0 0 1; #X connect 21 0 5 0; #X connect 22 0 15 0; #X connect 22 0 24 0; #X connect 23 0 18 0; #X connect 24 0 23 1; #X restore 14 173 pd normalizer; #X text -17 -8 normalizer : rescales a float stream so that its average approximates zero \, and its standard deviation approximates unity. ; #X text 153 143 using store changes the patch; #X text 153 160 not usefull for use in an abstraction; #X text 389 290 j#|@2002; #X floatatom 96 223 5 0 0; #X obj 96 201 lavg 50; #X connect 1 0 3 0; #X connect 2 0 9 0; #X connect 3 0 2 0; #X connect 6 0 13 1; #X connect 7 0 13 2; #X connect 8 0 5 0; #X connect 9 0 13 0; #X connect 13 0 4 0; #X connect 13 0 8 0; #X connect 13 0 10 0; #X connect 13 0 19 0; #X connect 19 0 18 0; pd-smlib-0.13.0/examples/resonate-beat.pd000066400000000000000000000140371434442070000202010ustar00rootroot00000000000000#N canvas 35 57 1126 761 10; #X floatatom 35 282 5 0 0; #X obj 35 259 float; #X obj 35 195 loadbang; #X obj 35 219 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 ; #X floatatom 161 312 0 0 0; #X msg 129 289 clear; #X text 179 288 <-- reinitialize internal state; #X text 193 313 <-- center frequency; #X floatatom 210 334 0 0 0; #X text 242 335 <-- Q; #X obj 111 412 hsl 128 15 -256 256 0 0 empty empty empty -2 -6 0 8 -262144 -1 -1 6350 1; #X floatatom 108 430 5 0 0; #X obj 35 7 key; #X obj 35 30 select 32; #X msg 80 260 0; #X obj 40 527 line~; #X obj 40 549 osc~; #X obj 40 571 hip~ 30; #X msg 40 505 200 \, 0 100; #X obj 40 597 *~; #X obj 163 508 lrange 30; #X floatatom 164 533 5 0 0; #X obj 41 453 threshold 1 1 -1 1; #X floatatom 478 314 0 0 0; #X msg 446 291 clear; #X floatatom 527 336 0 0 0; #X obj 428 414 hsl 128 15 -256 256 0 0 empty empty empty -2 -6 0 8 -262144 -1 -1 6350 1; #X floatatom 425 432 5 0 0; #X obj 357 529 line~; #X obj 357 551 osc~; #X obj 357 573 hip~ 30; #X obj 350 600 *~; #X obj 480 503 lrange 30; #X floatatom 481 535 5 0 0; #X obj 358 455 threshold 1 1 -1 1; #X obj 354 383 bp 0.02 10; #X obj 35 236 metro 20; #X obj 164 553 * 0.01; #X obj 481 554 * 0.01; #X obj 37 381 bp 0.04 10; #X text 74 9 rock your spacebar!; #X floatatom 786 308 0 0 0; #X msg 754 285 clear; #X floatatom 835 330 0 0 0; #X obj 736 408 hsl 128 15 -256 256 0 0 empty empty empty -2 -6 0 8 -262144 -1 -1 6350 1; #X floatatom 733 426 5 0 0; #X obj 706 523 line~; #X obj 706 545 osc~; #X obj 649 663 hip~ 30; #X obj 658 694 *~; #X obj 812 499 lrange 30; #X floatatom 813 531 5 0 0; #X obj 666 449 threshold 1 1 -1 1; #X msg 356 503 10000 \, 0 20; #X obj 648 587 *~; #X obj 583 561 clip~ -0.1 0.1; #X msg 702 499 0 \, 110 200; #X obj 582 539 osc~ 55; #X text 112 237 generate sampled stream; #X text 122 380 resonate; #X text 192 454 detect; #X text 46 486 bass drum synth; #X text 364 483 electro clap synth; #X obj 583 517 line~; #X obj 663 378 bp 0.01 10; #X obj 649 638 clip~ -0.2 0.1; #X obj 649 611 *~ 5; #X obj 1018 527 line~; #X obj 1018 549 osc~; #X obj 961 667 hip~ 30; #X obj 970 698 *~; #X obj 1103 503 lrange 30; #X floatatom 1104 535 5 0 0; #X obj 960 591 *~; #X obj 894 543 osc~ 55; #X obj 895 521 line~; #X obj 961 642 clip~ -0.2 0.1; #X obj 961 615 *~ 5; #X msg 1012 503 0 \, 175 200; #X obj 1103 554 * 0.02; #X obj 812 550 * 0.02; #X obj 362 110 delay; #X floatatom 339 43 5 0 0; #X obj 306 87 moses 50; #X obj 537 164 line~; #X obj 537 186 osc~; #X obj 536 230 *~ 0.2; #X obj 536 208 hip~ 300; #X text 528 120 electro tom synth; #X msg 536 141 2000 \, 0 10; #X obj 306 65 float; #X obj 423 67 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X msg 342 16 753; #X msg 386 16 520; #X obj 536 254 throw~ mix; #X obj 39 623 throw~ mix; #X obj 348 626 throw~ mix; #X obj 655 718 throw~ mix; #X obj 969 723 throw~ mix; #X text 750 377 resonate; #X text 510 452 detect; #X text 821 450 detect; #X obj 810 143 catch~ mix; #X obj 802 171 dac~; #X text 282 -8 or use this metronome; #X text 992 8 j#|@2002; #X text 395 44 pulse period in ms; #X text 444 66 start; #X obj 488 24 line 100; #X msg 489 1 2000 \, 200 240000; #X text 664 474 electro bass synths; #X text 948 476 electro bass synths; #X obj 895 565 clip~ -0.1 0.2; #X msg 896 497 87 \, 86 2000; #X msg 583 493 55 \, 54 2000; #X msg 35 164 1000; #X obj 165 577 moses 0.3; #X obj 482 579 moses 0.3; #X obj 1105 579 moses 0.4; #X obj 814 575 moses 0.4; #X text 443 385 resonate; #X msg 421 87 0; #X text 453 88 stop; #X connect 1 0 0 0; #X connect 1 0 14 0; #X connect 1 0 35 0; #X connect 1 0 39 0; #X connect 1 0 64 0; #X connect 2 0 3 0; #X connect 3 0 36 0; #X connect 4 0 39 1; #X connect 5 0 39 0; #X connect 8 0 39 2; #X connect 10 0 11 0; #X connect 12 0 13 0; #X connect 13 0 115 0; #X connect 13 0 89 0; #X connect 14 0 1 1; #X connect 15 0 16 0; #X connect 16 0 17 0; #X connect 17 0 19 0; #X connect 18 0 15 0; #X connect 19 0 95 0; #X connect 20 0 21 0; #X connect 21 0 37 0; #X connect 22 0 18 0; #X connect 23 0 35 1; #X connect 24 0 35 0; #X connect 25 0 35 2; #X connect 26 0 27 0; #X connect 28 0 29 0; #X connect 29 0 30 0; #X connect 30 0 31 0; #X connect 31 0 96 0; #X connect 32 0 33 0; #X connect 33 0 38 0; #X connect 34 0 53 0; #X connect 35 0 26 0; #X connect 35 0 32 0; #X connect 35 0 34 0; #X connect 36 0 1 0; #X connect 37 0 116 0; #X connect 38 0 117 0; #X connect 39 0 10 0; #X connect 39 0 20 0; #X connect 39 0 22 0; #X connect 41 0 64 1; #X connect 42 0 64 0; #X connect 43 0 64 2; #X connect 44 0 45 0; #X connect 46 0 47 0; #X connect 47 0 54 1; #X connect 48 0 49 0; #X connect 49 0 97 0; #X connect 50 0 51 0; #X connect 51 0 80 0; #X connect 52 0 56 0; #X connect 52 0 114 0; #X connect 52 1 113 0; #X connect 52 1 78 0; #X connect 53 0 28 0; #X connect 54 0 66 0; #X connect 55 0 54 0; #X connect 56 0 46 0; #X connect 57 0 55 0; #X connect 63 0 57 0; #X connect 64 0 44 0; #X connect 64 0 50 0; #X connect 64 0 52 0; #X connect 64 0 71 0; #X connect 65 0 48 0; #X connect 66 0 65 0; #X connect 67 0 68 0; #X connect 68 0 73 1; #X connect 69 0 70 0; #X connect 70 0 98 0; #X connect 71 0 72 0; #X connect 72 0 79 0; #X connect 73 0 77 0; #X connect 74 0 112 0; #X connect 75 0 74 0; #X connect 76 0 69 0; #X connect 77 0 76 0; #X connect 78 0 67 0; #X connect 79 0 118 0; #X connect 80 0 119 0; #X connect 81 0 115 0; #X connect 81 0 89 0; #X connect 81 0 90 0; #X connect 82 0 90 1; #X connect 83 1 81 0; #X connect 84 0 85 0; #X connect 85 0 87 0; #X connect 86 0 94 0; #X connect 87 0 86 0; #X connect 89 0 84 0; #X connect 90 0 83 0; #X connect 91 0 90 0; #X connect 92 0 82 0; #X connect 93 0 82 0; #X connect 102 0 103 0; #X connect 102 0 103 1; #X connect 108 0 82 0; #X connect 109 0 108 0; #X connect 112 0 73 0; #X connect 113 0 75 0; #X connect 114 0 63 0; #X connect 115 0 1 1; #X connect 116 0 19 1; #X connect 117 0 31 1; #X connect 118 0 70 1; #X connect 119 0 49 1; #X connect 121 0 108 0; pd-smlib-0.13.0/help/000077500000000000000000000000001434442070000142305ustar00rootroot00000000000000pd-smlib-0.13.0/help/SMLib-help.pd000066400000000000000000000061071434442070000164550ustar00rootroot00000000000000#N canvas 1 53 525 422 10; #X obj 31 188 lmax; #X obj 31 211 lmin; #X obj 31 234 lrange; #X obj 31 165 lavg; #X obj 9 317 threshold; #X text 89 188 leaky maximum; #X text 89 213 leaky minimum; #X text 90 237 leaky range; #X text 89 164 leaky average; #X text 92 316 hysteresis; #X obj 31 257 lstd; #X text 90 260 leaky standard deviation; #X obj 26 421 hist; #X text 88 421 histogram; #X obj 26 444 lhist; #X text 88 445 leaky histogram; #X obj 9 293 decimator; #X text 94 291 decimator; #X obj 32 352 hip; #X obj 32 375 bp; #X text 83 751 vector addition; #X text 83 774 vector substraction; #X obj 25 797 vvconv; #X text 83 797 vector convolution; #X obj 24 590 vsum; #X text 85 592 sum of elements; #X obj 24 613 vcog; #X text 85 613 center of gravity; #X obj 24 636 vmax; #X text 86 637 maximum and its location; #X text 86 659 minimum and its location; #X obj 24 659 vmin; #X obj 27 1129 vlavg; #X text 87 1131 leaky averages; #X text 3 4 SMLib means Signal processing for Mapping; #X text 435 1264 j#|@2002; #X text 249 121 johannes.taelman@rug.ac.be; #X text 283 102 enjoy!; #X obj 27 1152 vlmax; #X text 87 1154 leaky maxima; #X obj 27 1175 vlmin; #X text 87 1177 leaky minima; #X obj 27 1198 vlrange; #X text 87 1200 leaky ranges; #X obj 27 1221 vdelta; #X text 88 1223 differences between succesive vectors; #X obj 25 820 vclip; #X text 84 821 clip elements; #X text 96 352 high pass filter; #X text 97 375 band pass filter; #X text 3 29 Its a collection of objects for the analysis of float streams (for taking temporal context into account) \, vectors (lists of floats) and vector streams (temporal context...). It is complementary to the zexy and gem/markex library \, so have a look at those too. ; #X obj 24 683 vrms; #X text 84 686 root mean square; #X obj 24 706 vstd; #X text 83 708 standard deviation; #X text 22 1044 there is also a [Clip] in cyclone (identical to vclip) ; #X text 0 398 analyzing stream of floats (context) (vector output) ; #X text 1 142 processing stream of floats (context) (float output) ; #X text -3 567 immediate vector analysis (float output); #X text -6 730 immediate vector processing (vector output); #X text 22 1010 cfr. [.] in zexy; #X text 22 1027 cfr. [v+] \, [v-] \, [v*] \, [v/] \, [vabs] in GEM/MarkEx ; #X text -2 1108 vector stream processing (context) (vector output) ; #X obj 25 843 vfmod; #X text 83 845 floating point modulo; #X obj 23 918 vmtof; #X text 81 918 midi to frequency; #X text 21 897 unit conversions; #X obj 23 941 vftom; #X text 81 941 frequency to midi; #X obj 23 964 vdbtorms; #X text 99 964 db to rms; #X obj 23 987 vrmstodb; #X text 99 987 rms to db; #X obj 25 866 vpow; #X obj 25 546 deltas; #X text 83 867 power; #X obj 26 466 lhisti; #X text 88 467 leaky histogram without clipping input; #X text 88 546 difference between current input and past inputs; #X obj 26 520 prevl; #X text 89 520 previous input values in a list; #X text -3 1064 vector synthesis; #X obj 23 1085 linspace; #X text 98 1085 generates a vector with linear spaced floats; #X obj 44 492 itov; #X text 90 491 index to value (for histogram bins); #X obj 25 751 vvplus; #X obj 25 774 vvminus; pd-smlib-0.13.0/help/bp-help.pd000066400000000000000000000072501434442070000161100ustar00rootroot00000000000000#N canvas 395 79 558 505 10; #X obj 0 478 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289 0; #X obj 1 275 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0 ; #N canvas 375 298 424 317 META 0; #X text 12 165 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 25 LICENSE GPL v2; #X text 12 5 KEYWORDS control filter; #X text 12 45 DESCRIPTION bandpass filter on float stream; #X text 12 65 INLET_0 float clear; #X text 12 85 INLET_1 float; #X text 12 105 INLET_2 float; #X text 12 125 OUTLET_0 float; #X text 12 145 AUTHOR Johannes Taelman (johannes.taelman@rug.ac.be) ; #X restore 500 480 pd META; #X obj 0 380 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0 ; #X obj 0 417 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1 0; #N canvas 132 486 428 85 Related_objects 0; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 Related Objects; #X obj 9 29 bp~; #X restore 196 481 pd Related_objects; #X obj 79 327 cnv 17 3 17 empty empty 1 5 9 0 16 -228856 -162280 0 ; #X obj 0 0 cnv 15 552 40 empty empty bp 3 12 0 18 -204280 -1 0; #X text 99 391 float; #X text 82 442 1) float; #X obj 79 389 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 79 349 cnv 17 3 17 empty empty 2 5 9 0 16 -228856 -162280 0 ; #X text 99 326 float; #X text 99 348 float; #X obj 79 285 cnv 17 3 35 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X text 11 21 bandpass filter on float stream; #X obj 509 6 bp; #X floatatom 92 155 5 0 0 0 - - -, f 5; #X obj 86 132 float; #X obj 86 110 metro 100; #X obj 86 90 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 ; #X msg 41 90 clear; #X floatatom 272 158 8 0 0 0 - - -, f 8; #X obj 86 247 smlib/bp 0.07 5; #X obj 339 117 hsl 128 15 0 127 0 0 empty empty empty -2 -8 0 10 -262144 -1 -1 0 1; #X obj 275 136 hsl 192 15 -63 127 0 0 empty empty empty -2 -8 0 10 -262144 -1 -1 6333 1; #X text 174 323 - center frequency; #X text 99 283 clear; #X text 174 285 - reinitialize internal state; #X text 99 302 float; #X text 174 303 - input value; #X text 174 347 - Q-factor; #X text 174 391 - filtered value; #X obj 271 44 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 ; #X obj 271 82 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1; #X obj 271 100 * 50; #X obj 271 62 metro 5000; #X obj 86 68 loadbang; #X text 174 442 - set initial values for center frequency and Q; #X obj 340 179 hsl 128 15 0 0.5 0 0 empty empty center_frequency 0 7 0 12 -262144 -1 -1 5300 1; #X floatatom 337 201 5 0 0 0 - - -, f 5; #X obj 340 225 hsl 128 15 0 5 0 0 empty empty Q_factor 2 7 0 12 -262144 -1 -1 10300 1; #X floatatom 337 247 5 0 0 0 - - -, f 5; #X text 337 100 set value:; #N canvas 994 402 450 300 view 0; #N canvas 0 50 450 250 (subpatch) 0; #X array \$0-bp 200 float 4; #X coords 0 50 199 -30 300 140 1 0 0; #X restore 100 139 graph; #X obj 100 20 inlet; #X obj 100 94 tabwrite \$0-bp; #X obj 127 70 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 100 44 t f b; #X obj 181 44 f; #X obj 208 44 + 1; #X msg 217 16 0; #X obj 181 70 t f f; #X obj 208 93 moses 200; #X connect 1 0 4 0; #X connect 3 0 5 0; #X connect 4 0 2 0; #X connect 4 1 3 0; #X connect 5 0 6 0; #X connect 5 0 8 0; #X connect 6 0 5 1; #X connect 7 0 5 1; #X connect 8 0 2 1; #X connect 8 1 9 0; #X connect 9 1 7 0; #X restore 257 176 pd view; #X connect 18 0 17 0; #X connect 18 0 23 0; #X connect 19 0 18 0; #X connect 20 0 19 0; #X connect 21 0 23 0; #X connect 23 0 25 0; #X connect 24 0 18 1; #X connect 25 0 22 0; #X connect 25 0 44 0; #X connect 33 0 36 0; #X connect 34 0 35 0; #X connect 35 0 24 0; #X connect 36 0 34 0; #X connect 37 0 20 0; #X connect 39 0 40 0; #X connect 39 0 23 1; #X connect 41 0 42 0; #X connect 41 0 23 2; pd-smlib-0.13.0/help/decimator-help.pd000066400000000000000000000050471434442070000174600ustar00rootroot00000000000000#N canvas 391 81 558 505 10; #X obj 0 434 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289 0; #X obj 1 275 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0 ; #N canvas 738 344 424 317 META 0; #X text 12 125 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 25 LICENSE GPL v2; #X text 12 85 OUTLET_0 float; #X text 12 105 AUTHOR Johannes Taelman (johannes.taelman@rug.ac.be) ; #X text 12 5 KEYWORDS control; #X text 12 65 INLET_0 float factor clear; #X text 12 45 DESCRIPTION pass 1 in n input values; #X restore 500 436 pd META; #X obj 0 336 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0 ; #X obj 0 373 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1 0; #N canvas 132 486 428 85 Related_objects 0; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 Related Objects; #X obj 9 29 bp~; #X restore 196 437 pd Related_objects; #X obj 0 0 cnv 15 552 40 empty empty decimator 3 12 0 18 -204280 -1 0; #X text 99 347 float; #X text 82 398 1) float; #X obj 79 345 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 79 285 cnv 17 3 35 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 84 71 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 ; #X text 99 307 float; #X obj 84 49 loadbang; #X obj 190 251 print; #X msg 220 145 -10; #X floatatom 190 106 5 0 0 0 - - -, f 5; #X msg 292 141 clear; #X obj 103 229 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #N canvas 635 477 450 300 counter 0; #X obj 91 26 inlet; #X obj 91 68 f; #X obj 127 68 + 1; #X msg 163 34 0; #X obj 91 218 outlet; #X floatatom 104 103 5 0 0 0 - - -, f 5; #X obj 91 140 t f f; #X obj 118 176 moses 10; #X connect 0 0 1 0; #X connect 1 0 2 0; #X connect 1 0 5 0; #X connect 1 0 6 0; #X connect 2 0 1 1; #X connect 3 0 1 0; #X connect 6 0 4 0; #X connect 6 1 7 0; #X connect 7 1 3 0; #X restore 190 66 pd counter; #X obj 103 208 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 84 90 metro 500; #X msg 291 113 factor 4; #X obj 190 212 smlib/decimator 3; #X obj 492 6 decimator; #X text 11 21 reduces the number of floats in a stream; #X text 99 283 factor f; #X text 174 285 - sets the reduction factor to one in every f; #X text 174 308 - input float stream; #X text 174 347 - reduced float stream; #X text 174 398 - set initial reduction factor; #X connect 11 0 21 0; #X connect 13 0 11 0; #X connect 15 0 23 0; #X connect 16 0 20 0; #X connect 16 0 23 0; #X connect 17 0 23 0; #X connect 19 0 16 0; #X connect 21 0 19 0; #X connect 22 0 23 0; #X connect 23 0 14 0; #X connect 23 0 18 0; pd-smlib-0.13.0/help/deltas-help.pd000066400000000000000000000075571434442070000167750ustar00rootroot00000000000000#N canvas 461 79 558 505 10; #X obj -1 562 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289 0; #X obj 1 261 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0 ; #N canvas 736 345 424 317 META 0; #X text 12 175 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 25 LICENSE GPL v2; #X text 12 155 AUTHOR Johannes Taelman (johannes.taelman@rug.ac.be) ; #X text 12 75 INLET_0 float factor clear; #X text 12 45 DESCRIPTION generate vector with differences between last input and past inputs; #X text 12 115 INLET_2 float; #X text 12 95 INLET_1 float; #X text 12 135 OUTLET_0 list; #X text 12 5 KEYWORDS control list_op; #X restore 499 564 pd META; #X obj 0 396 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0 ; #X obj 0 433 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1 0; #N canvas 130 487 428 85 Related_objects 0; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 Related Objects; #X restore 195 565 pd Related_objects; #X obj 0 0 cnv 15 552 40 empty empty deltas 3 12 0 18 -204280 -1 0 ; #X obj 79 405 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 79 271 cnv 17 3 70 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 84 71 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 ; #X text 99 308 float; #X obj 84 49 loadbang; #X obj 84 90 metro 500; #X text 174 309 - input float stream; #X floatatom 196 102 5 0 0 0 - - -, f 5; #X obj 196 237 print deltas; #X floatatom 254 123 5 0 0 0 - - -, f 5; #X floatatom 313 123 5 0 0 0 - - -, f 5; #X text 313 102 b; #X text 252 103 a; #X msg 141 116 clear; #N canvas 635 477 450 300 counter 0; #X obj 91 26 inlet; #X obj 91 68 f; #X obj 127 68 + 1; #X msg 163 34 0; #X obj 91 218 outlet; #X floatatom 104 103 5 0 0 0 - - -, f 5; #X obj 91 140 t f f; #X obj 118 176 moses 10; #X connect 0 0 1 0; #X connect 1 0 2 0; #X connect 1 0 5 0; #X connect 1 0 6 0; #X connect 2 0 1 1; #X connect 3 0 1 0; #X connect 6 0 4 0; #X connect 6 1 7 0; #X connect 7 1 3 0; #X restore 196 54 pd counter; #X text 11 21 generates vector with differences between last input and past inputs, f 71; #X obj 492 6 deltas; #X text 99 288 clear; #X text 99 270 bang; #X obj 79 351 cnv 17 3 17 empty empty 1 5 9 0 16 -228856 -162280 0 ; #X obj 79 374 cnv 17 3 17 empty empty 2 5 9 0 16 -228856 -162280 0 ; #X text 99 350 float; #X text 99 371 float; #X text 173 351 - lower bound of previous values (0 is current value) ; #X text 174 372 - upper bound of previous values; #X obj 196 200 smlib/deltas 1 10 10; #X obj 196 122 t b f; #X text 174 454 - set initial lower bound; #X text 174 472 - set initial upper bound; #X text 174 490 - set initial buffer size; #X text 174 328 - set values for lower \, and upper bound and buffer size; #X text 99 327 set l u b; #N canvas 632 527 450 300 valueGenerator 0; #X obj 128 66 inlet; #X obj 162 129 *; #X obj 113 170 - 0; #X floatatom 132 213 5 0 0 0 - - -, f 5; #X obj 113 238 outlet; #X obj 128 96 t f f f f; #X obj 128 129 +; #X connect 0 0 5 0; #X connect 1 0 2 0; #X connect 2 0 3 0; #X connect 2 0 4 0; #X connect 5 0 6 0; #X connect 5 1 6 1; #X connect 5 2 1 0; #X connect 5 3 1 1; #X connect 6 0 2 1; #X restore 196 78 pd valueGenerator; #X text 99 407 list; #X text 174 407 - deltas between lower and upper boundary; #X obj 0 511 cnv 3 550 3 empty empty more_info 8 12 0 13 -228856 -1 0; #X text 82 454 a) float; #X text 82 472 b) float; #X text 82 490 c) float; #X text 81 531 The lower boundary (a) should be smaller than the upper boundary (b) \, which should be equal or smaller than the buffer size (c), f 65; #X text 174 290 - clear the buffer values; #X text 174 271 - calculates the set of deltas; #X connect 9 0 12 0; #X connect 11 0 9 0; #X connect 12 0 21 0; #X connect 14 0 33 0; #X connect 16 0 32 1; #X connect 17 0 32 2; #X connect 20 0 32 0; #X connect 21 0 39 0; #X connect 32 0 15 0; #X connect 33 0 32 0; #X connect 33 1 32 0; #X connect 39 0 14 0; pd-smlib-0.13.0/help/hip-help.pd000066400000000000000000000065431434442070000162730ustar00rootroot00000000000000#N canvas 393 80 558 505 10; #X obj 0 456 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289 0; #X obj 1 275 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0 ; #N canvas 740 343 424 317 META 0; #X text 12 155 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 25 LICENSE GPL v2; #X text 12 135 AUTHOR Johannes Taelman (johannes.taelman@rug.ac.be) ; #X text 12 95 INLET_1 float; #X text 12 5 KEYWORDS control filter; #X text 12 45 DESCRIPTION highpass filter on float stream; #X text 12 75 INLET_0 float clear; #X text 12 115 OUTLET_0 float; #X restore 500 458 pd META; #X obj 0 358 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0 ; #X obj 0 395 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1 0; #N canvas 132 486 428 85 Related_objects 0; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 Related Objects; #X obj 9 29 bp~; #X restore 196 459 pd Related_objects; #X obj 79 327 cnv 17 3 17 empty empty 1 5 9 0 16 -228856 -162280 0 ; #X obj 0 0 cnv 15 552 40 empty empty hip 3 12 0 18 -204280 -1 0; #X text 99 369 float; #X text 82 420 1) float; #X obj 79 367 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X text 99 326 float; #X obj 79 285 cnv 17 3 35 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X floatatom 92 155 5 0 0 0 - - -, f 5; #X obj 86 132 float; #X obj 86 110 metro 100; #X obj 86 90 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 ; #X msg 41 90 clear; #X floatatom 272 158 8 0 0 0 - - -, f 8; #X obj 339 117 hsl 128 15 0 127 0 0 empty empty empty -2 -8 0 10 -262144 -1 -1 0 1; #X obj 275 136 hsl 192 15 -63 127 0 0 empty empty empty -2 -8 0 10 -262144 -1 -1 3213 1; #X text 99 283 clear; #X text 174 285 - reinitialize internal state; #X text 99 302 float; #X text 174 303 - input value; #X text 174 369 - filtered value; #X obj 271 44 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 ; #X obj 271 82 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1; #X obj 271 100 * 50; #X obj 271 62 metro 5000; #X obj 86 68 loadbang; #X obj 340 179 hsl 128 15 0 0.5 0 0 empty empty cutoff_frequency 0 7 0 12 -262144 -1 -1 100 1; #X floatatom 337 201 5 0 0 0 - - -, f 5; #X text 337 100 set value:; #N canvas 988 405 450 300 view 0; #N canvas 0 50 450 250 (subpatch) 0; #X array \$0-hip 200 float 4; #X coords 0 50 199 -30 300 140 1 0 0; #X restore 100 139 graph; #X obj 100 20 inlet; #X obj 127 70 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 100 44 t f b; #X obj 181 44 f; #X obj 208 44 + 1; #X msg 217 16 0; #X obj 181 70 t f f; #X obj 208 93 moses 200; #X obj 100 94 tabwrite \$0-hip; #X connect 1 0 3 0; #X connect 2 0 4 0; #X connect 3 0 9 0; #X connect 3 1 2 0; #X connect 4 0 5 0; #X connect 4 0 7 0; #X connect 5 0 4 1; #X connect 6 0 4 1; #X connect 7 0 9 1; #X connect 7 1 8 0; #X connect 8 1 6 0; #X restore 257 176 pd view; #X obj 86 247 smlib/hip 0.05; #X obj 509 6 hip; #X text 174 323 - cutoff frequency; #X text 174 420 - set initial value for coutoff frequency; #X text 11 21 highpass filter on float stream; #X connect 14 0 13 0; #X connect 14 0 35 0; #X connect 15 0 14 0; #X connect 16 0 15 0; #X connect 17 0 35 0; #X connect 19 0 14 1; #X connect 20 0 18 0; #X connect 20 0 34 0; #X connect 26 0 29 0; #X connect 27 0 28 0; #X connect 28 0 19 0; #X connect 29 0 27 0; #X connect 30 0 16 0; #X connect 31 0 32 0; #X connect 31 0 35 1; #X connect 35 0 20 0; pd-smlib-0.13.0/help/hist-help.pd000066400000000000000000000062031434442070000164530ustar00rootroot00000000000000#N canvas 455 82 558 505 10; #X obj -1 654 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289 0; #X obj 1 301 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0 ; #N canvas 734 346 424 317 META 0; #X text 12 125 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 25 LICENSE GPL v2; #X text 12 105 AUTHOR Johannes Taelman (johannes.taelman@rug.ac.be) ; #X text 12 45 DESCRIPTION histograms; #X text 12 5 KEYWORDS control; #X text 12 65 INLET_0 float list absolute relative clear; #X text 12 85 OUTLET_0 list; #X restore 499 656 pd META; #X obj 0 452 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0 ; #X obj 0 489 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1 0; #N canvas 130 487 428 85 Related_objects 0; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 Related Objects; #X restore 195 657 pd Related_objects; #X obj 0 0 cnv 15 552 40 empty empty hist 3 12 0 18 -204280 -1 0; #X obj 79 461 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 79 311 cnv 17 3 125 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X text 99 344 clear; #X text 99 463 list; #X obj 0 567 cnv 3 550 3 empty empty more_info 8 12 0 13 -228856 -1 0; #X text 82 510 a) float; #X text 82 528 b) float; #X text 82 546 c) float; #X text 174 346 - clear the buffer values; #X obj 98 272 print; #X msg 362 55 absolute; #X msg 362 77 relative; #X msg 364 115 clear; #X floatatom 158 275 5 0 0 0 - - -, f 5; #X msg 98 54 1 3 5 7 9; #X msg 145 75 1.4 3.4 5.4 7.4 9.4; #X msg 34 54 -10; #X obj 505 6 hist; #X text 99 310 absolute; #X text 99 380 list; #X text 99 398 relative; #X text 174 381 - input floats; #X obj 343 56 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X text 99 327 bang; #X text 174 399 - calculates relative histogram values; #X text 174 311 - calculates absolute histogram values; #X text 174 328 - calculates absolute histogram values; #X text 174 546 - set initial number of bins; #X text 174 510 - set initial lower scale value; #X text 174 528 - set initial upper scale value; #X text 11 21 histograms, f 71; #X msg 66 54 20; #X text 81 587 The lower boundary (a) should be smaller than the upper boundary (b) \, which should be equal or smaller than the buffer size (c). Out of range values are not ignored \, but put into the first and last bin., f 65; #X text 99 415 set l u b; #X text 174 416 - set lower (l) and upper (u) scale values and number of bins (b).; #X text 174 364 - input float; #X text 99 363 float; #X obj 98 196 smlib/hist 0 10 5; #X obj 158 254 smlib/vsum; #X obj 98 75 t b l; #X obj 196 118 t b l; #X obj 145 96 t b l; #X text 174 463 - histogram values on absolute \, bang and relative ; #X msg 364 148 set 0 10 10; #X msg 196 96 0.6 3.6 4.6 5.6 8.6; #X connect 17 0 44 0; #X connect 18 0 44 0; #X connect 19 0 44 0; #X connect 21 0 46 0; #X connect 22 0 48 0; #X connect 23 0 44 0; #X connect 29 0 44 0; #X connect 38 0 44 0; #X connect 44 0 16 0; #X connect 44 0 45 0; #X connect 45 0 20 0; #X connect 46 0 44 0; #X connect 46 1 44 0; #X connect 47 0 44 0; #X connect 47 1 44 0; #X connect 48 0 44 0; #X connect 48 1 44 0; #X connect 50 0 44 0; #X connect 51 0 47 0; pd-smlib-0.13.0/help/itov-help.pd000066400000000000000000000050531434442070000164670ustar00rootroot00000000000000#N canvas 455 82 558 505 10; #X obj -1 492 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289 0; #X obj 1 261 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0 ; #N canvas 732 347 424 317 META 0; #X text 12 175 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 25 LICENSE GPL v2; #X text 12 155 AUTHOR Johannes Taelman (johannes.taelman@rug.ac.be) ; #X text 12 45 DESCRIPTION binary index to value; #X text 12 5 KEYWORDS control; #X text 12 75 INLET_0 float absolute clear; #X text 12 95 OUTLET_0 float; #X text 12 115 OUTLET_1 float; #X text 12 135 OUTLET_2 float; #X restore 499 494 pd META; #X obj 0 321 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0 ; #X obj 0 406 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1 0; #N canvas 130 487 428 85 Related_objects 0; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 Related Objects; #X restore 195 495 pd Related_objects; #X obj 0 0 cnv 15 552 40 empty empty itov 3 12 0 18 -204280 -1 0; #X obj 79 330 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 79 271 cnv 17 3 35 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X text 82 427 a) float; #X text 82 445 b) float; #X text 82 463 c) float; #X text 99 287 list; #X text 174 271 - input float; #X text 99 270 float; #X msg 46 65 clear; #X floatatom 175 243 5 0 0 0 - - -, f 5; #X floatatom 123 244 5 0 0 0 - - -, f 5; #X floatatom 228 243 5 0 0 0 - - -, f 5; #X msg 186 69 absolute; #X floatatom 129 135 5 0 0 0 - - -, f 5; #X msg 94 45 4.6; #X msg 130 45 5.4; #X msg 164 45 5.6; #X floatatom 45 112 5 0 0 0 - - -, f 5; #X obj 123 92 smlib/hist 0 10 10; #X obj 123 114 smlib/vcog; #X obj 123 190 smlib/itov 0 10 10; #X obj 505 6 itov; #X text 311 71 [itov] is an incomplete object.; #X text 174 427 - value of first class; #X text 174 445 - value of last class; #X text 174 462 - number of classes; #X obj 79 354 cnv 17 3 17 empty empty 1 5 9 0 16 -228856 -162280 0 ; #X obj 79 378 cnv 17 3 17 empty empty 2 5 9 0 16 -228856 -162280 0 ; #X text 99 332 float; #X text 99 356 float; #X text 99 380 float; #X text 174 356 - scaled value; #X text 174 332 - not used; #X text 174 380 - not used; #X text 174 288 - not implemented; #X text 11 23 index to value, f 71; #X connect 15 0 25 0; #X connect 19 0 25 0; #X connect 21 0 19 0; #X connect 21 0 25 0; #X connect 22 0 19 0; #X connect 22 0 25 0; #X connect 23 0 19 0; #X connect 23 0 25 0; #X connect 24 0 27 0; #X connect 25 0 26 0; #X connect 26 0 20 0; #X connect 26 0 27 0; #X connect 27 0 17 0; #X connect 27 1 16 0; #X connect 27 2 18 0; pd-smlib-0.13.0/help/lavg-help.pd000066400000000000000000000041011434442070000164300ustar00rootroot00000000000000#N canvas 453 83 558 505 10; #X obj -1 468 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289 0; #X obj 1 290 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0 ; #N canvas 732 347 424 317 META 0; #X text 12 175 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 25 LICENSE GPL v2; #X text 12 155 AUTHOR Johannes Taelman (johannes.taelman@rug.ac.be) ; #X text 12 45 DESCRIPTION binary index to value; #X text 12 5 KEYWORDS control; #X text 12 75 INLET_0 float absolute clear; #X text 12 95 OUTLET_0 float; #X text 12 115 OUTLET_1 float; #X text 12 135 OUTLET_2 float; #X restore 499 470 pd META; #X obj 0 360 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0 ; #X obj 0 407 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1 0; #N canvas 130 487 428 85 Related_objects 0; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 Related Objects; #X restore 195 471 pd Related_objects; #X obj 0 0 cnv 15 552 40 empty empty lavg 3 12 0 18 -204280 -1 0; #X obj 79 369 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 79 300 cnv 17 3 50 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X text 82 428 a) float; #X text 174 300 - input float; #X text 99 299 float; #X text 99 371 float; #X floatatom 108 106 5 0 0 0 - - -, f 5; #X obj 81 105 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X floatatom 81 241 8 0 0 0 - - -, f 8; #X obj 81 127 float; #X msg 198 128 clear; #X obj 81 188 smlib/lavg 10; #X obj 81 83 metro 500; #X obj 81 63 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1 ; #X text 11 23 leaky average, f 71; #X obj 505 6 lavg; #X text 174 371 - averaged value; #X text 99 317 clear; #X text 174 318 - clear accumulator; #X text 98 336 set d; #X text 174 337 - set half-decay time; #X text 174 428 - default half-decay times; #X msg 197 106 decay \$1; #X floatatom 197 84 5 0 0 0 - - -, f 5; #X connect 13 0 16 1; #X connect 14 0 16 0; #X connect 16 0 18 0; #X connect 17 0 18 0; #X connect 18 0 15 0; #X connect 19 0 14 0; #X connect 20 0 19 0; #X connect 29 0 18 0; #X connect 30 0 29 0; pd-smlib-0.13.0/help/lhist-help.pd000066400000000000000000000057461434442070000166420ustar00rootroot00000000000000#N canvas 455 82 558 505 10; #X obj -1 593 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289 0; #X obj 1 290 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0 ; #N canvas 730 348 424 317 META 0; #X text 12 125 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 25 LICENSE GPL v2; #X text 12 105 AUTHOR Johannes Taelman (johannes.taelman@rug.ac.be) ; #X text 12 5 KEYWORDS control; #X text 12 85 OUTLET_0 list; #X text 12 45 DESCRIPTION "leaky" histograms; #X text 12 65 INLET_0 float list leak absolute relative clear; #X restore 499 595 pd META; #X obj 0 415 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0 ; #X obj 0 453 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1 0; #N canvas 128 488 428 85 Related_objects 0; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 Related Objects; #X obj 4 26 smlib/lhisti; #X restore 195 596 pd Related_objects; #X obj 0 0 cnv 15 552 40 empty empty lhist 3 12 0 18 -204280 -1 0; #X obj 79 424 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 79 300 cnv 17 3 50 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X text 82 472 a) float; #X obj 101 266 print; #X obj 101 70 random 10; #X obj 101 50 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X msg 226 127 absolute; #X msg 294 127 relative; #X msg 52 71 clear; #X floatatom 143 269 8 0 0 0 - - -, f 8; #X msg 107 93 1 3 5 7 9; #X msg 185 126 leak; #X msg 113 114 -5; #X obj 101 198 smlib/lhist 0 10 10 5; #X obj 143 248 smlib/vsum; #X text 11 23 "leaky" histograms, f 71; #X obj 505 6 lhist; #X text 99 299 absolute; #X text 174 339 - input float; #X text 99 338 float; #X text 99 318 clear; #X text 99 357 list; #X text 99 377 leak; #X text 99 395 relative; #X text 174 358 - input list of floats; #X text 174 378 - perform leak; #X text 174 300 - generate absolute histogram; #X text 174 396 - generage relative histogram; #X obj 185 70 metro 500; #X obj 185 50 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 1; #X obj 185 93 t b b; #X obj 267 70 metro 500; #X obj 267 50 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1; #X obj 267 93 t b b; #X text 99 426 list; #X text 174 472 - value of first class; #X text 174 490 - value of last class; #X text 82 490 b) float; #X text 82 509 c) float; #X text 174 509 - number of classes; #X text 82 527 d) float; #X text 174 527 - half-decay time; #X obj 0 550 cnv 3 550 3 empty empty more_info 8 12 0 13 -228856 -1 0; #X text 82 569 out-of-range inputs are clipped; #X text 174 426 - array of samples in classes; #X text 174 319 - reinitialize histogram bins; #X connect 11 0 20 0; #X connect 12 0 11 0; #X connect 13 0 20 0; #X connect 14 0 20 0; #X connect 15 0 20 0; #X connect 17 0 20 0; #X connect 18 0 20 0; #X connect 19 0 20 0; #X connect 20 0 10 0; #X connect 20 0 21 0; #X connect 21 0 16 0; #X connect 35 0 37 0; #X connect 36 0 35 0; #X connect 37 0 18 0; #X connect 37 1 13 0; #X connect 38 0 40 0; #X connect 39 0 38 0; #X connect 40 0 18 0; #X connect 40 1 14 0; pd-smlib-0.13.0/help/lhisti-help.pd000066400000000000000000000060451434442070000170040ustar00rootroot00000000000000#N canvas 455 82 558 505 10; #X obj -1 593 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289 0; #X obj 1 290 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0 ; #N canvas 728 349 424 317 META 0; #X text 12 125 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 25 LICENSE GPL v2; #X text 12 105 AUTHOR Johannes Taelman (johannes.taelman@rug.ac.be) ; #X text 12 5 KEYWORDS control; #X text 12 45 DESCRIPTION "leaky" histograms without clipping the input ; #X text 12 65 INLET_0 float list leak absolute relative clear; #X text 12 85 OUTLET_0 list; #X restore 499 595 pd META; #X obj 0 415 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0 ; #X obj 0 453 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1 0; #N canvas 126 489 428 85 Related_objects 0; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 Related Objects; #X obj 4 26 smlib/lhist; #X restore 195 596 pd Related_objects; #X obj 0 0 cnv 15 552 40 empty empty lhisti 3 12 0 18 -204280 -1 0 ; #X obj 79 424 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 79 300 cnv 17 3 50 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X text 82 472 a) float; #X obj 101 266 print; #X obj 101 70 random 10; #X obj 101 50 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X msg 226 127 absolute; #X msg 294 127 relative; #X msg 52 71 clear; #X floatatom 143 269 8 0 0 0 - - -, f 8; #X msg 107 93 1 3 5 7 9; #X msg 185 126 leak; #X msg 113 114 -5; #X obj 143 248 smlib/vsum; #X text 99 299 absolute; #X text 174 339 - input float; #X text 99 338 float; #X text 99 318 clear; #X text 99 357 list; #X text 99 377 leak; #X text 99 395 relative; #X text 174 358 - input list of floats; #X text 174 378 - perform leak; #X text 174 300 - generate absolute histogram; #X obj 185 70 metro 500; #X obj 185 50 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 1; #X obj 185 93 t b b; #X obj 267 70 metro 500; #X obj 267 50 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1; #X obj 267 93 t b b; #X text 99 426 list; #X text 174 472 - value of first class; #X text 174 490 - value of last class; #X text 82 490 b) float; #X text 82 509 c) float; #X text 174 509 - number of classes; #X text 82 527 d) float; #X text 174 527 - half-decay time; #X obj 0 550 cnv 3 550 3 empty empty more_info 8 12 0 13 -228856 -1 0; #X text 174 426 - array of samples in classes; #X text 174 319 - reinitialize histogram bins; #X text 174 396 - generate relative histogram; #X text 11 23 "leaky" histograms without clipping the input, f 71 ; #X obj 505 6 lhisti; #X obj 101 198 smlib/lhisti 0 10 10 5; #X text 82 569 out-of-range inputs are not clipped; #X connect 11 0 51 0; #X connect 12 0 11 0; #X connect 13 0 51 0; #X connect 14 0 51 0; #X connect 15 0 51 0; #X connect 17 0 51 0; #X connect 18 0 51 0; #X connect 19 0 51 0; #X connect 20 0 16 0; #X connect 31 0 33 0; #X connect 32 0 31 0; #X connect 33 0 18 0; #X connect 33 1 13 0; #X connect 34 0 36 0; #X connect 35 0 34 0; #X connect 36 0 18 0; #X connect 36 1 14 0; #X connect 51 0 10 0; #X connect 51 0 20 0; pd-smlib-0.13.0/help/linspace-help.pd000066400000000000000000000054511434442070000173060ustar00rootroot00000000000000#N canvas 455 82 558 505 10; #X obj -1 522 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289 0; #X obj 1 290 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0 ; #N canvas 726 350 424 317 META 0; #X text 12 165 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 25 LICENSE GPL v2; #X text 12 145 AUTHOR Johannes Taelman (johannes.taelman@rug.ac.be) ; #X text 12 5 KEYWORDS control; #X text 12 125 OUTLET_0 list; #X text 12 45 DESCRIPTION generate a vector with linear spaced floats ; #X text 12 65 INLET_0 bang float; #X text 12 85 INLET_1 float; #X text 12 105 INLET_2 float; #X restore 499 524 pd META; #X obj 0 401 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0 ; #X obj 0 439 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1 0; #N canvas 126 489 428 85 Related_objects 0; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 Related Objects; #X obj 4 26 smlib/lhist; #X restore 195 525 pd Related_objects; #X obj 0 0 cnv 15 552 40 empty empty linspace 3 12 0 18 -204280 -1 0; #X obj 79 410 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 79 300 cnv 17 3 35 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X text 82 458 a) float; #X text 99 412 list; #X text 82 476 b) float; #X obj 85 259 print linspace; #X floatatom 202 164 5 0 0 0 - - -, f 5; #X floatatom 143 164 5 0 0 0 - - -, f 5; #X floatatom 101 164 5 0 0 0 - - -, f 5; #X obj 85 103 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X text 102 60 generate; #X text 200 104 set n; #X obj 85 208 smlib/linspace 0 1 4; #X obj 85 80 metro 500; #X obj 85 59 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1 ; #X obj 164 60 hsl 128 15 0 127 0 0 empty empty set_a 2 7 0 12 -262144 -1 -1 8300 1; #X obj 164 80 hsl 128 15 0 127 0 0 empty empty set_b 2 7 0 12 -262144 -1 -1 5100 1; #X obj 202 120 hradio 15 1 0 10 empty empty empty 0 -8 0 10 -262144 -1 -1 2; #X obj 202 142 + 2; #X text 11 23 generates a vector with linear spaced floats, f 71; #X obj 491 6 linspace; #X text 99 299 bang; #X text 99 318 float; #X obj 79 344 cnv 17 3 17 empty empty 1 5 9 0 16 -228856 -162280 0 ; #X obj 79 372 cnv 17 3 17 empty empty 2 5 9 0 16 -228856 -162280 0 ; #X text 99 343 float; #X text 99 371 float; #X text 174 319 - set a: start value; #X text 174 344 - set b: end value; #X text 174 412 - n values between a and b; #X text 174 458 - value of a; #X text 174 476 - value of b; #X text 174 495 - number of floats; #X text 174 372 - set n: number of floats; #X text 174 300 - generate vector of n floats between a and b; #X text 82 495 n) float; #X connect 13 0 19 2; #X connect 14 0 19 1; #X connect 15 0 19 0; #X connect 16 0 19 0; #X connect 19 0 12 0; #X connect 20 0 16 0; #X connect 21 0 20 0; #X connect 22 0 15 0; #X connect 23 0 14 0; #X connect 24 0 25 0; #X connect 25 0 13 0; pd-smlib-0.13.0/help/lmax-help.pd000066400000000000000000000114241434442070000164460ustar00rootroot00000000000000#N canvas 453 83 558 505 10; #X obj -1 467 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289 0; #X obj 1 310 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0 ; #N canvas 724 351 424 317 META 0; #X text 12 125 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 25 LICENSE GPL v2; #X text 12 105 AUTHOR Johannes Taelman (johannes.taelman@rug.ac.be) ; #X text 12 5 KEYWORDS control; #X text 12 45 DESCRIPTION leaky maximum; #X text 12 65 INLET_0 float clear decay; #X text 12 85 OUTLET_0 float; #X restore 499 469 pd META; #X obj 0 391 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0 ; #X obj 0 429 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1 0; #N canvas 124 490 428 85 Related_objects 0; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 Related Objects; #X obj 4 26 smlib/lhist; #X restore 195 470 pd Related_objects; #X obj 0 0 cnv 15 552 40 empty empty lmax 3 12 0 18 -204280 -1 0; #X obj 79 400 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 79 320 cnv 17 3 50 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X text 82 448 a) float; #X obj 85 103 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 85 59 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1 ; #X text 99 338 float; #X floatatom 112 104 5 0 0 0 - - -, f 5; #X floatatom 85 278 5 0 0 0 - - -, f 5; #X obj 85 130 float; #X msg 175 104 clear; #X msg 221 104 decay 5; #X obj 182 73 hsl 128 15 0 127 0 0 empty empty empty -2 -8 0 10 -262144 -1 -1 0 1; #X obj 85 208 smlib/lmax 10; #X text 11 23 leaky maximum, f 71; #X obj 510 6 lmax; #X text 99 319 clear; #X text 174 320 - resets the maximum; #N canvas 659 423 450 387 view 0; #N canvas 0 50 450 250 (subpatch) 0; #X array \$0-lmax 200 float 5; #A 0 0.482965 0.420445 0.366019 0.318638 0.27739 0.241482 0.210223 0.183009 0.159319 0.138695 0.120741 0.105111 0.0915047 0.0796594 0.0693476 0.0603706 0.0525556 0.0457523 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 40.7856 35.506 30.9097 26.9085 23.4252 20.3928 17.753 15.4549 13.4542 11.7126 10.1964 8.87649 7.72743 6.72712 5.8563 5.8563 5.0982 4.43824 3.86372 3.36356 2.92815 2.5491 2.21912 1.93186 1.68178 1.46407 1.27455 1.10956 0.965929 0.84089 0.732037 0.637276 0.554781 0.482965 0.420445 0.366019 0.318638 0.27739 0.241482 0.210223 0.183009 0.159319 0.138695 0.120741 0.105111 0.0915047 0.0796594 0.0693476 0.0603706 0.0525556 0.0457523 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 46.8504 40.7856 35.506 30.9097 26.9085 23.4252 20.3928 17.753 15.4549 13.4542 11.7126 10.1964 8.87649 7.72743 6.72712 5.8563 5.0982 4.43824 3.86372 3.36356 2.92815 2.5491 2.21912 1.93186 1.68178 1.46407 1.27455 1.10956 0.965929 0.84089 0.732037 0.554781; #X coords 0 100 199 0 300 140 1 0 0; #X restore 91 193 graph; #X obj 91 49 inlet; #X obj 91 74 t f b; #X obj 118 99 f 0; #X obj 144 99 + 1; #X msg 199 69 0; #X obj 91 154 tabwrite \$0-lmax; #X obj 118 124 moses 200; #X floatatom 39 106 8 0 0 0 - - -, f 8; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 View; #X connect 1 0 2 0; #X connect 2 0 6 0; #X connect 2 0 8 0; #X connect 2 1 3 0; #X connect 3 0 4 0; #X connect 3 0 6 1; #X connect 3 0 7 0; #X connect 4 0 3 1; #X connect 5 0 3 1; #X connect 7 1 5 0; #X restore 124 278 pd view; #X obj 357 56 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1; #X obj 355 115 * 1; #X obj 397 100 hsl 128 15 0 50 0 0 empty empty empty -2 -8 0 10 -262144 -1 -1 0 1; #X floatatom 354 139 5 0 0 0 - - -, f 5; #X obj 355 97 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1; #X obj 355 76 metro 5000; #X obj 85 80 metro 100; #X text 99 357 decay; #X text 174 339 - sets the decay value; #X text 174 358 - input value; #X text 99 402 float; #X text 174 402 - output value; #X text 174 448 - initial decay value; #X connect 10 0 15 0; #X connect 11 0 31 0; #X connect 13 0 15 1; #X connect 15 0 19 0; #X connect 16 0 19 0; #X connect 17 0 19 0; #X connect 18 0 13 0; #X connect 19 0 14 0; #X connect 19 0 24 0; #X connect 25 0 30 0; #X connect 26 0 18 0; #X connect 26 0 28 0; #X connect 27 0 26 1; #X connect 29 0 26 0; #X connect 30 0 29 0; #X connect 31 0 10 0; pd-smlib-0.13.0/help/lmin-help.pd000066400000000000000000000102171434442070000164430ustar00rootroot00000000000000#N canvas 453 83 558 505 10; #X obj -1 468 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289 0; #X obj 1 308 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0 ; #N canvas 722 352 424 317 META 0; #X text 12 125 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 25 LICENSE GPL v2; #X text 12 5 KEYWORDS control filter; #X text 12 85 OUTLET_0 float; #X text 12 105 AUTHOR Johannes Taelman (johannes.taelman@rug.ac.be) ; #X text 12 45 DESCRIPTION leaky minimum; #X text 12 65 INLET_0 float clear decay; #X restore 499 470 pd META; #X obj 0 384 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0 ; #X obj 0 422 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1 0; #N canvas 124 490 428 85 Related_objects 0; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 Related Objects; #X obj 4 26 smlib/lhist; #X restore 195 471 pd Related_objects; #X obj 0 0 cnv 15 552 40 empty empty lmin 3 12 0 18 -204280 -1 0; #X obj 79 393 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 79 318 cnv 17 3 50 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X text 82 441 a) float; #X obj 85 103 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 85 59 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1 ; #X floatatom 112 104 5 0 0 0 - - -, f 5; #X floatatom 85 275 5 0 0 0 - - -, f 5; #X obj 85 130 float; #X msg 175 104 clear; #X msg 221 104 decay 5; #X obj 182 73 hsl 128 15 0 127 0 0 empty empty empty -2 -8 0 10 -262144 -1 -1 0 1; #X text 99 317 clear; #N canvas 655 425 450 387 view 0; #N canvas 0 50 450 250 (subpatch) 0; #X array \$0-lmin 200 float 5; #A 0 26.4576 27.8232 29.0974 30.2863 31.3955 32.4305 33.3961 34.2971 35.1378 35.9222 36.654 37.3368 37.9739 38.5683 39.123 39.6404 40.1233 40.5738 40.9941 41.3863 41.7522 42.0936 42.4122 42.7094 42.9867 43.2454 43.4868 43.7121 43.9223 44.1183 44.3013 44.472 44.6313 44.7799 44.9186 45.0479 45.1686 45.2813 45.3863 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 3.13743 6.06476 8.79605 11.3444 13.7222 15.9407 18.0106 19.9419 21.7439 23.4252 24.9939 26.4576 27.8232 29.0974 30.2863 31.3955 32.4305 33.3961 34.2971 35.1378 35.9222 36.654 37.3368 37.9739 38.5683 39.123 39.6404 40.1233 40.5738 40.9941 41.3863 41.7522 42.0936 42.4122 42.7094 42.9867 43.2454 43.4868 43.7121 43.9223 44.1183 44.3013 44.472 44.6313 44.7799 44.9186 45.0479 45.1686 45.2813 45.3863 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 3.13743 6.06476 8.79605 11.3444 13.7222 15.9407 18.0106 19.9419 21.7439 24.9939 ; #X coords 0 100 199 0 300 140 1 0 0; #X restore 91 193 graph; #X obj 91 49 inlet; #X obj 91 74 t f b; #X obj 118 99 f 0; #X obj 144 99 + 1; #X msg 199 69 0; #X obj 118 124 moses 200; #X floatatom 39 106 8 0 0 0 - - -, f 8; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 View; #X obj 91 154 tabwrite \$0-lmin; #X connect 1 0 2 0; #X connect 2 0 7 0; #X connect 2 0 10 0; #X connect 2 1 3 0; #X connect 3 0 4 0; #X connect 3 0 6 0; #X connect 3 0 10 1; #X connect 4 0 3 1; #X connect 5 0 3 1; #X connect 6 1 5 0; #X restore 124 275 pd view; #X obj 357 56 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1; #X obj 355 115 * 1; #X obj 397 100 hsl 128 15 0 50 0 0 empty empty empty -2 -8 0 10 -262144 -1 -1 0 1; #X floatatom 354 139 5 0 0 0 - - -, f 5; #X obj 355 97 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1; #X obj 355 76 metro 5000; #X obj 85 80 metro 100; #X obj 85 208 smlib/lmin 10; #X text 11 23 leaky minimum, f 71; #X obj 510 6 lmin; #X text 174 318 - resets the minimum; #X text 99 395 float; #X text 99 355 float; #X text 99 336 decay; #X text 174 337 - sets the decay time; #X text 174 395 - output value; #X text 173 356 - input value; #X text 174 441 - initial decay value; #X connect 10 0 14 0; #X connect 11 0 26 0; #X connect 12 0 14 1; #X connect 14 0 27 0; #X connect 15 0 27 0; #X connect 16 0 27 0; #X connect 17 0 12 0; #X connect 20 0 25 0; #X connect 21 0 17 0; #X connect 21 0 23 0; #X connect 22 0 21 1; #X connect 24 0 21 0; #X connect 25 0 24 0; #X connect 26 0 10 0; #X connect 27 0 13 0; #X connect 27 0 19 0; pd-smlib-0.13.0/help/lrange-help.pd000066400000000000000000000114751434442070000167630ustar00rootroot00000000000000#N canvas 453 83 558 505 10; #X obj -1 468 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289 0; #X obj 1 308 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0 ; #N canvas 720 353 424 317 META 0; #X text 12 125 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 25 LICENSE GPL v2; #X text 12 5 KEYWORDS control filter; #X text 12 85 OUTLET_0 float; #X text 12 105 AUTHOR Johannes Taelman (johannes.taelman@rug.ac.be) ; #X text 12 45 DESCRIPTION leaky maximum minus leaky minimum; #X text 12 65 INLET_0 float clear decay; #X restore 499 470 pd META; #X obj 0 384 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0 ; #X obj 0 422 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1 0; #N canvas 124 490 428 85 Related_objects 0; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 Related Objects; #X obj 4 26 smlib/lhist; #X restore 195 471 pd Related_objects; #X obj 0 0 cnv 15 552 40 empty empty lrange 3 12 0 18 -204280 -1 0 ; #X obj 79 393 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 79 318 cnv 17 3 50 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X text 82 441 a) float; #X obj 85 103 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 85 59 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 1 ; #X floatatom 112 104 5 0 0 0 - - -, f 5; #X floatatom 85 275 5 0 0 0 - - -, f 5; #X obj 85 130 float; #X msg 175 104 clear; #X msg 221 104 decay 5; #X obj 182 73 hsl 128 15 0 127 0 0 empty empty empty -2 -8 0 10 -262144 -1 -1 0 1; #X text 99 317 clear; #N canvas 651 427 450 387 view 0; #N canvas 0 50 450 250 (subpatch) 0; #X array \$0-lrange 200 float 5; #A 0 6.05315 5.64779 5.26957 4.91669 4.91669 4.58743 4.28022 3.99359 3.72615 3.47662 3.2438 3.02658 2.82389 2.63479 2.45834 2.29372 2.14011 1.9968 1.86308 1.73831 1.6219 1.51329 45.1823 42.1566 39.3335 36.6994 34.2418 31.9487 29.8092 27.813 25.9504 24.2126 22.5911 21.0783 19.6667 18.3497 17.1209 15.9743 14.9046 13.9065 12.9752 12.1063 11.2956 10.5391 9.83337 9.17486 8.56045 7.98719 7.45231 6.95325 6.48761 6.05316 5.6478 5.26958 4.91669 4.58744 4.28024 3.9936 3.72617 3.47664 3.24382 3.02659 2.82391 2.63481 2.45836 2.29374 2.14013 1.99681 1.86309 1.73833 1.62192 1.51331 45.1823 42.1566 39.3335 36.6994 34.2418 31.9487 29.8092 27.813 25.9504 24.2126 22.5912 21.0783 19.6667 18.3497 17.1209 15.9744 14.9046 13.9065 12.9752 12.1063 11.2956 10.5391 9.83337 9.17486 8.56045 7.98718 7.4523 6.95324 6.48761 6.05315 5.64779 5.26957 4.91669 4.58743 4.28022 3.99359 3.72615 3.47662 3.2438 3.02658 2.82389 2.63479 2.45834 2.29372 2.14011 1.9968 1.86308 1.73831 1.6219 1.51329 45.1823 42.1566 39.3335 36.6994 34.2418 31.9487 29.8092 27.813 25.9504 24.2126 22.5911 21.0783 19.6667 18.3497 17.1209 15.9743 14.9046 13.9065 12.9752 12.1063 11.2956 10.5391 9.83337 9.17486 8.56045 7.98719 7.45231 6.95325 6.48761 6.05316 5.6478 5.26958 4.91669 4.58744 4.28024 3.9936 3.72617 3.47664 3.24382 3.02659 2.82391 2.63481 2.45836 2.29374 2.14013 1.99681 1.86309 1.73833 1.62192 1.51331 45.1823 42.1566 39.3335 36.6994 34.2418 31.9487 29.8092 27.813 25.9504 24.2126 22.5912 21.0783 19.6667 18.3497 17.1209 15.9744 14.9046 13.9065 12.9752 12.1063 11.2956 10.5391 9.83337 9.17486 8.56045 7.98718 7.4523 6.48761; #X coords 0 100 199 0 300 140 1 0 0; #X restore 91 193 graph; #X obj 91 38 inlet; #X obj 91 63 t f b; #X obj 118 88 f 0; #X obj 144 88 + 1; #X msg 199 58 0; #X obj 118 113 moses 200; #X floatatom 39 95 8 0 0 0 - - -, f 8; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 View; #X obj 91 154 tabwrite \$0-lrange; #X connect 1 0 2 0; #X connect 2 0 7 0; #X connect 2 0 10 0; #X connect 2 1 3 0; #X connect 3 0 4 0; #X connect 3 0 6 0; #X connect 3 0 10 1; #X connect 4 0 3 1; #X connect 5 0 3 1; #X connect 6 1 5 0; #X restore 124 275 pd view; #X obj 357 56 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 1; #X obj 355 115 * 1; #X obj 397 100 hsl 128 15 0 50 0 0 empty empty empty -2 -8 0 10 -262144 -1 -1 12300 1; #X floatatom 354 139 5 0 0 0 - - -, f 5; #X obj 355 97 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1; #X obj 355 76 metro 5000; #X obj 85 80 metro 100; #X text 99 395 float; #X text 99 355 float; #X text 99 336 decay; #X text 174 395 - output value; #X text 173 356 - input value; #X obj 85 208 smlib/lrange 10; #X obj 500 6 lrange; #X text 11 23 leaky maximum minus leaky minimum, f 71; #X text 174 318 - clear accumulator; #X text 174 337 - sets the half-decay time; #X text 174 441 - initial half-decay value (in number of activations) ; #X connect 10 0 14 0; #X connect 11 0 26 0; #X connect 12 0 14 1; #X connect 14 0 32 0; #X connect 15 0 32 0; #X connect 16 0 32 0; #X connect 17 0 12 0; #X connect 20 0 25 0; #X connect 21 0 17 0; #X connect 21 0 23 0; #X connect 22 0 21 1; #X connect 24 0 21 0; #X connect 25 0 24 0; #X connect 26 0 10 0; #X connect 32 0 13 0; #X connect 32 0 19 0; pd-smlib-0.13.0/help/lstd-help.pd000066400000000000000000000047751434442070000164660ustar00rootroot00000000000000#N canvas 422 80 558 505 10; #X obj -1 468 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289 0; #X obj 1 308 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0 ; #N canvas 718 354 424 317 META 0; #X text 12 125 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 25 LICENSE GPL v2; #X text 12 5 KEYWORDS control filter; #X text 12 85 OUTLET_0 float; #X text 12 105 AUTHOR Johannes Taelman (johannes.taelman@rug.ac.be) ; #X text 12 45 DESCRIPTION leaky standard deviation; #X text 12 65 INLET_0 float; #X restore 499 470 pd META; #X obj 0 384 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0 ; #X obj 0 422 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1 0; #N canvas 124 490 428 85 Related_objects 0; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 Related Objects; #X obj 4 26 smlib/lhist; #X restore 195 471 pd Related_objects; #X obj 0 0 cnv 15 552 40 empty empty lstd 3 12 0 18 -204280 -1 0; #X obj 79 393 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 79 318 cnv 17 3 50 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X text 82 441 a) float; #X text 99 317 clear; #X text 99 395 float; #X text 99 355 float; #X text 99 336 decay; #X text 174 395 - output value; #X text 173 356 - input value; #X text 174 318 - clear accumulator; #X text 174 337 - sets the half-decay time; #X text 174 441 - initial half-decay value (in number of activations) ; #X floatatom 128 275 8 0 0 0 - - -, f 8; #X obj 131 53 hsl 128 15 0 127 0 0 empty empty empty -2 -8 0 10 -262144 -1 -1 5600 1; #X obj 154 76 hsl 128 15 0 127 0 0 empty empty empty -2 -8 0 10 -262144 -1 -1 6800 1; #X obj 151 122 * 2; #X obj 304 73 metro 500; #X obj 304 53 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 1; #X obj 304 154 * 5; #X obj 304 94 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 1; #X obj 151 99 t f f; #X obj 341 52 hsl 128 15 0 127 0 0 empty empty empty -2 -8 0 10 -262144 -1 -1 0 1; #X obj 304 113 * 2; #X obj 304 133 - 1; #X obj 128 217 smlib/lstd 1; #X obj 510 6 lstd; #X text 12 23 leaky standard deviation, f 71; #X floatatom 87 217 5 0 0 0 - - -, f 5; #X msg 223 100 clear; #X connect 20 0 31 0; #X connect 20 0 34 0; #X connect 21 0 27 0; #X connect 22 0 31 0; #X connect 22 0 34 0; #X connect 23 0 26 0; #X connect 24 0 23 0; #X connect 25 0 31 0; #X connect 25 0 34 0; #X connect 26 0 29 0; #X connect 27 0 22 0; #X connect 27 1 22 1; #X connect 28 0 25 1; #X connect 29 0 30 0; #X connect 30 0 25 0; #X connect 31 0 19 0; #X connect 35 0 31 0; pd-smlib-0.13.0/help/prevl-help.pd000066400000000000000000000054151434442070000166400ustar00rootroot00000000000000#N canvas 453 83 558 505 10; #X obj -1 468 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289 0; #X obj 1 290 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0 ; #N canvas 726 350 424 317 META 0; #X text 12 165 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 25 LICENSE GPL v2; #X text 12 145 AUTHOR Johannes Taelman (johannes.taelman@rug.ac.be) ; #X text 12 5 KEYWORDS control; #X text 12 45 DESCRIPTION generate vector with past input values (float) ; #X text 12 65 INLET_0 float bang clear; #X text 12 85 INLET_1 float; #X text 12 105 INLET_2 float; #X text 12 125 OUTLET_0 list; #X restore 499 470 pd META; #X obj 0 348 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0 ; #X obj 0 386 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1 0; #N canvas 124 490 428 85 Related_objects 0; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 Related Objects; #X obj 4 26 smlib/lhist; #X restore 195 471 pd Related_objects; #X obj 0 0 cnv 15 552 40 empty empty prevl 3 12 0 18 -204280 -1 0; #X obj 79 357 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 79 300 cnv 17 3 35 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X text 82 405 a) float; #X obj 86 266 print; #X text 174 319 - input float; #X text 99 318 float; #X text 99 298 clear; #X text 99 359 list; #X text 82 423 b) float; #X text 82 442 c) float; #X text 174 299 - reinitialize histogram bins; #X floatatom 86 51 5 0 0 0 - - -, f 5; #X obj 86 95 t b f; #X obj 86 196 smlib/prevl 0 10 10; #X msg 136 97 clear; #N canvas 752 458 450 300 upcounter 0; #X obj 71 51 inlet; #X obj 81 104 f; #X obj 111 103 + 1; #X obj 126 190 moses 10; #X obj 97 73 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X msg 137 52 0; #X obj 81 190 outlet; #X obj 81 153 t f f; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 upcounter; #X connect 0 0 1 0; #X connect 1 0 2 0; #X connect 1 0 7 0; #X connect 2 0 1 1; #X connect 3 1 5 0; #X connect 4 0 1 0; #X connect 5 0 1 1; #X connect 7 0 6 0; #X connect 7 1 3 0; #X restore 123 72 pd upcounter; #X obj 123 50 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 1; #X obj 140 50 metro 500; #X floatatom 141 123 5 0 0 0 - - -, f 5; #X floatatom 197 124 5 0 0 0 - - -, f 5; #X obj 505 6 prevl; #X text 11 23 generates vector with past input values (float), f 71 ; #X text 174 359 - list of previous values; #X text 174 442 - buffer size; #X text 175 405 - value of first previous value from buffer (0 = current) ; #X text 174 423 - value of last previous value from buffer; #X connect 18 0 19 0; #X connect 19 0 20 0; #X connect 19 1 20 0; #X connect 20 0 10 0; #X connect 21 0 20 0; #X connect 22 0 19 0; #X connect 23 0 24 0; #X connect 24 0 22 0; #X connect 25 0 20 1; #X connect 26 0 20 2; pd-smlib-0.13.0/help/threshold-help.pd000066400000000000000000000126501434442070000175030ustar00rootroot00000000000000#N canvas 451 84 558 505 10; #X obj -1 626 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289 0; #X obj 1 290 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0 ; #N canvas 724 351 424 317 META 0; #X text 12 145 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 25 LICENSE GPL v2; #X text 12 125 AUTHOR Johannes Taelman (johannes.taelman@rug.ac.be) ; #X text 12 5 KEYWORDS control; #X text 12 45 DESCRIPTION trigger float from stream; #X text 12 65 INLET_0 float set; #X text 12 85 OUTLET_0 bang; #X text 12 105 OUTLET_1 bang; #X restore 499 628 pd META; #X obj 0 355 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0 ; #X obj 0 417 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1 0; #N canvas 120 492 428 85 Related_objects 0; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 Related Objects; #X obj 4 26 threshold~; #X restore 195 629 pd Related_objects; #X obj 0 0 cnv 15 552 40 empty empty threshold 3 12 0 18 -204280 -1 0; #X obj 79 364 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 79 300 cnv 17 3 40 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X text 82 436 a) float; #X text 82 454 b) float; #X text 82 473 c) float; #X floatatom 83 135 5 0 0 0 - - -, f 5; #X obj 105 263 print trigger; #X obj 246 263 print rest; #X obj 83 112 float; #X obj 83 89 metro 100; #X obj 83 48 loadbang; #X obj 83 70 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 ; #X obj 195 71 hsl 128 15 0 127 0 0 empty empty empty -2 -6 0 8 -262144 -1 -1 5900 1; #X msg 192 108 set 50 0 10 0; #X msg 193 131 set 50 15 10 15; #X obj 227 263 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 83 263 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 83 232 threshold 70 10 30 10; #N canvas 768 736 450 300 upDownCounter 0; #X obj 125 60 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1; #X obj 160 138 f; #X obj 189 138 + 1; #X msg 240 82 -1; #X msg 241 106 1; #X floatatom 106 216 5 0 0 0 - - -, f 5; #X obj 160 173 t f f f; #X obj 199 245 outlet; #X obj 160 98 metro 100; #X obj 160 41 inlet; #X obj 210 223 moses 2; #X obj 70 112 vsl 15 128 0 80 0 0 empty empty empty 0 -9 0 10 -262144 -1 -1 9366 1; #X obj 205 200 moses 29; #X msg 301 112 29; #X msg 304 167 79; #X msg 302 140 59; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 up-down counter; #N canvas 254 711 450 300 updown 0; #X obj 125 60 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 1; #X obj 160 138 f; #X obj 189 138 + 1; #X msg 240 82 -1; #X msg 241 106 1; #X floatatom 106 216 5 0 0 0 - - -, f 5; #X obj 187 245 outlet; #X obj 160 98 metro 100; #X obj 160 41 inlet; #X obj 70 112 vsl 15 128 0 80 0 0 empty empty empty 0 -9 0 10 -262144 -1 -1 9049 1; #X obj 160 211 smlib/threshold 60 0 0 0; #X msg 302 140 60 0 0 0; #X msg 304 167 80 0 0 0; #X msg 301 112 30 0 0 0; #X obj 160 244 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 301 246 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X msg 213 57 0; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 up-down counter with threshold; #X obj 160 173 t f f; #X connect 0 0 7 0; #X connect 1 0 2 0; #X connect 1 0 5 0; #X connect 1 0 19 0; #X connect 2 0 1 1; #X connect 3 0 2 1; #X connect 4 0 2 1; #X connect 5 0 9 0; #X connect 7 0 1 0; #X connect 8 0 7 0; #X connect 10 0 14 0; #X connect 10 0 3 0; #X connect 10 1 15 0; #X connect 10 1 4 0; #X connect 11 0 10 0; #X connect 12 0 10 0; #X connect 13 0 10 0; #X connect 16 0 1 0; #X connect 19 0 10 0; #X connect 19 1 6 0; #X restore 286 259 pd updown with threshold; #X connect 0 0 8 0; #X connect 1 0 2 0; #X connect 1 0 5 0; #X connect 1 0 6 0; #X connect 2 0 1 1; #X connect 3 0 2 1; #X connect 4 0 2 1; #X connect 5 0 11 0; #X connect 6 0 10 0; #X connect 6 1 12 0; #X connect 6 2 7 0; #X connect 8 0 1 0; #X connect 9 0 8 0; #X connect 10 0 4 0; #X connect 12 1 3 0; #X connect 13 0 12 1; #X connect 14 0 12 1; #X connect 15 0 12 1; #X restore 192 50 pd upDownCounter; #X obj 170 51 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1; #X text 99 298 float; #X text 174 299 - input value; #X text 99 316 set t d r d; #X text 174 317 - sets trigger threshold \, trigger debounce number \, rest threshold \, rest debounce number; #X obj 79 388 cnv 17 3 17 empty empty 1 5 9 0 16 -228856 -162280 0 ; #X text 99 366 bang; #X text 174 366 - input float higher than trigger threshold; #X text 174 390 - input float lower than rest threshold; #X text 175 436 - trigger threshold; #X text 174 454 - trigger debounce number; #X text 174 473 - rest threshold; #X text 174 491 - rest debounce number; #X text 82 491 d) float; #X text 99 390 bang; #X obj 0 510 cnv 3 550 3 empty empty more_info 8 12 0 13 -228856 -1 0; #X text 78 532 threshold monitors its input float stream and outputs bangs when the signal exceeds a specified "trigger" value \, and also when the input value recedes below a "rest" value. You can specify debounce in number of floats received \, for the threshold~ to wait after the two event types before triggering again.; #X obj 485 5 threshold; #X text 11 23 trigger on upper and lower boundaries of float stream , f 71; #X connect 12 0 24 0; #X connect 15 0 12 0; #X connect 16 0 15 0; #X connect 17 0 18 0; #X connect 18 0 16 0; #X connect 19 0 15 1; #X connect 20 0 24 0; #X connect 21 0 24 0; #X connect 24 0 13 0; #X connect 24 0 23 0; #X connect 24 1 14 0; #X connect 24 1 22 0; #X connect 25 0 19 0; #X connect 26 0 25 0; pd-smlib-0.13.0/help/vabs-help.pd000066400000000000000000000031201434442070000164320ustar00rootroot00000000000000#N canvas 451 84 558 505 10; #X obj -1 468 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289 0; #X obj 1 301 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0 ; #N canvas 722 352 424 317 META 0; #X text 12 125 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 25 LICENSE GPL v2; #X text 12 105 AUTHOR Johannes Taelman (johannes.taelman@rug.ac.be) ; #X text 12 5 KEYWORDS control list_op; #X text 12 65 INLET_0 list float; #X text 12 85 OUTLET_0 float list; #X text 12 45 DESCRIPTION absolute value for lists; #X restore 499 470 pd META; #X obj 0 366 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0 ; #X obj 0 428 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1 0; #N canvas 120 492 428 85 Related_objects 0; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 Related Objects; #X obj 4 26 threshold~; #X restore 195 471 pd Related_objects; #X obj 0 0 cnv 15 552 40 empty empty vabs 3 12 0 18 -204280 -1 0; #X obj 79 311 cnv 17 3 35 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X text 99 309 float; #X text 174 310 - input value; #X msg 106 68 1 2 3 -4 -5 -6; #X obj 106 235 print; #X obj 106 169 smlib/vabs; #X text 11 23 absolute values of a list of floats, f 71; #X obj 508 5 vabs; #X msg 118 94 -42; #X text 99 333 list; #X text 174 334 - list of input values; #X obj 79 380 cnv 17 3 35 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X text 99 378 float; #X text 99 402 list; #X text 174 379 - output value; #X text 174 403 - list of output values; #X connect 10 0 12 0; #X connect 12 0 11 0; #X connect 15 0 12 0; pd-smlib-0.13.0/help/vclip-help.pd000066400000000000000000000040761434442070000166270ustar00rootroot00000000000000#N canvas 451 84 558 505 10; #X obj -1 468 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289 0; #X obj 1 259 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0 ; #N canvas 720 353 424 317 META 0; #X text 12 165 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 25 LICENSE GPL v2; #X text 12 145 AUTHOR Johannes Taelman (johannes.taelman@rug.ac.be) ; #X text 12 5 KEYWORDS control list_op; #X text 12 45 DESCRIPTION clip each element in a vector; #X text 12 65 INLET_0 list float; #X text 12 85 INLET_1 float; #X text 12 105 INLET_2 float; #X text 12 125 OUTLET_0 list float; #X restore 499 470 pd META; #X obj 0 366 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0 ; #X obj 0 428 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1 0; #N canvas 118 493 428 85 Related_objects 0; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 Related Objects; #X restore 195 471 pd Related_objects; #X obj 0 0 cnv 15 552 40 empty empty vclip 3 12 0 18 -204280 -1 0; #X obj 79 272 cnv 17 3 35 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X text 99 270 float; #X text 174 271 - input value; #X text 99 294 list; #X text 174 295 - list of input values; #X obj 79 380 cnv 17 3 35 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X text 99 378 float; #X text 99 402 list; #X text 174 379 - output value; #X text 174 403 - list of output values; #X obj 83 226 print; #X msg 83 61 -4 -3 -2 -1 0 1 2 3 4; #X floatatom 129 90 5 0 0 0 - - -, f 5; #X floatatom 176 90 5 0 0 0 - - -, f 5; #X obj 83 152 smlib/vclip -1 1; #X obj 508 5 vclip; #X text 11 23 clips each element in a vector, f 71; #X obj 79 315 cnv 17 3 17 empty empty 1 5 9 0 16 -228856 -162280 0 ; #X obj 79 340 cnv 17 3 17 empty empty 2 5 9 0 16 -228856 -162280 0 ; #X text 99 316 float; #X text 100 340 float; #X text 79 448 default values for lower bound and upper bound; #X text 174 317 - lower bound; #X text 174 341 - upper bound; #X msg 499 492; #X msg 52 90 42; #X connect 18 0 21 0; #X connect 19 0 21 1; #X connect 20 0 21 2; #X connect 21 0 17 0; #X connect 32 0 21 0; pd-smlib-0.13.0/help/vcog-help.pd000066400000000000000000000036141434442070000164450ustar00rootroot00000000000000#N canvas 451 84 558 505 10; #X obj -1 465 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289 0; #X obj 1 305 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0 ; #N canvas 718 354 424 317 META 0; #X text 12 135 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 25 LICENSE GPL v2; #X text 12 115 AUTHOR Johannes Taelman (johannes.taelman@rug.ac.be) ; #X text 12 5 KEYWORDS control list_op; #X text 12 75 INLET_0 list float; #X text 12 45 DESCRIPTION compute the center of gravity of a list of floats; #X text 12 95 OUTLET_0 float; #X restore 499 467 pd META; #X obj 0 372 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0 ; #X obj 0 434 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1 0; #N canvas 116 494 428 85 Related_objects 0; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 Related Objects; #X restore 195 468 pd Related_objects; #X obj 0 0 cnv 15 552 40 empty empty vcog 3 12 0 18 -204280 -1 0; #X obj 79 318 cnv 17 3 35 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X text 99 316 float; #X text 174 317 - input value; #X text 99 340 list; #X text 174 341 - list of input values; #X obj 79 386 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X text 99 384 float; #X msg 81 54 1 2 3 4; #X floatatom 81 248 5 0 0 0 - - -, f 5; #X msg 147 54 3 4 5; #X msg 198 74 0 0 1 1; #X msg 255 54 8; #X msg 294 54 1 -1; #X obj 81 165 smlib/vcog; #X text 11 23 vcog computes the center of gravity of a list of floats , f 71; #X obj 509 5 vcog; #X text 174 385 - the virtual position in the list where the sum of the values at the left it equals the sum at the right.; #X msg 86 74 4 3 2 1; #X msg 146 74 5 4 3; #X msg 197 54 1 1 0 0; #X connect 14 0 20 0; #X connect 16 0 20 0; #X connect 17 0 20 0; #X connect 18 0 20 0; #X connect 19 0 20 0; #X connect 20 0 15 0; #X connect 24 0 20 0; #X connect 25 0 20 0; #X connect 26 0 20 0; pd-smlib-0.13.0/help/vdbtorms-help.pd000066400000000000000000000030771434442070000173520ustar00rootroot00000000000000#N canvas 451 84 558 505 10; #X obj -1 465 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289 0; #X obj 1 284 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0 ; #N canvas 714 356 424 317 META 0; #X text 12 125 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 25 LICENSE GPL v2; #X text 12 105 AUTHOR Johannes Taelman (johannes.taelman@rug.ac.be) ; #X text 12 5 KEYWORDS control list_op; #X text 12 65 INLET_0 list float; #X text 12 85 OUTLET_0 list float; #X text 12 45 DESCRIPTION db to rms on a vector; #X restore 499 467 pd META; #X obj 0 353 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0 ; #X obj 0 434 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1 0; #N canvas 116 494 428 85 Related_objects 0; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 Related Objects; #X restore 195 468 pd Related_objects; #X obj 0 0 cnv 15 552 40 empty empty vdbtorms 3 12 0 18 -204280 -1 0; #X obj 79 297 cnv 17 3 35 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X text 99 295 float; #X text 174 296 - input value; #X text 99 319 list; #X text 174 320 - list of input values; #X obj 80 231 print vdbtorms; #X obj 80 154 smlib/vdbtorms; #X obj 79 368 cnv 17 3 35 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X text 99 366 float; #X text 99 390 list; #X text 174 367 - output value; #X text 174 391 - list of output values; #X msg 91 81 100 80 60 40 20; #X msg 80 58 100 97 94; #X text 11 23 db to rms on a vector, f 71; #X obj 486 5 vdbtorms; #X connect 13 0 12 0; #X connect 19 0 13 0; #X connect 20 0 13 0; pd-smlib-0.13.0/help/vdelta-help.pd000066400000000000000000000044611434442070000167670ustar00rootroot00000000000000#N canvas 451 84 558 505 10; #X obj -1 496 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289 0; #X obj 1 284 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0 ; #N canvas 712 357 424 317 META 0; #X text 12 125 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 25 LICENSE GPL v2; #X text 12 105 AUTHOR Johannes Taelman (johannes.taelman@rug.ac.be) ; #X text 12 5 KEYWORDS control list_op; #X text 12 65 INLET_0 list float; #X text 12 45 DESCRIPTION difference between consecutive vectors; #X text 12 85 OUTLET_0 list float; #X restore 499 498 pd META; #X obj 0 353 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0 ; #X obj 0 434 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1 0; #N canvas 116 494 428 85 Related_objects 0; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 Related Objects; #X restore 195 499 pd Related_objects; #X obj 79 297 cnv 17 3 35 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X text 99 295 float; #X text 174 296 - input value; #X text 99 319 list; #X obj 79 368 cnv 17 3 50 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X text 99 366 float; #X text 99 390 list; #X msg 82 51 1 1 1 1 1 1 1 1 1 1; #X msg 82 73 1 0 1 0 1 0 1 0 1 0; #X msg 82 95 0 1 0 1 0 1 0 1 0 1; #X msg 82 117 0 0 0 0 0 0 0 0 0 0; #X msg 82 139 -1 -1 0 0 -1 -1 0 0 -1 -1; #X msg 82 161 0 0 0 0 0 1 1 1 1 1; #X obj 82 255 print vdelta; #X msg 298 52 0; #X msg 298 78 0 0 0; #X msg 298 100 1 2 3; #X msg 298 122 3 2 1; #X obj 82 211 smlib/vdelta; #X text 174 367 - output value = current input value - previous input value; #X obj 0 462 cnv 3 550 3 empty empty more_info 8 12 0 13 -228856 -1 0; #X text 89 477 sending a vector of a different length resets its state ; #X text 174 391 - list of output values. Each output list value = current input value - previous input value; #X text 174 320 - list of input values (floats); #X obj 0 1 cnv 15 552 40 empty empty vdelta 3 12 0 18 -204280 -1 0 ; #X text 11 23 vdelta: difference between consecutive vectors, f 71 ; #X obj 498 5 vdelta; #X connect 13 0 24 0; #X connect 14 0 24 0; #X connect 15 0 24 0; #X connect 16 0 24 0; #X connect 17 0 24 0; #X connect 18 0 24 0; #X connect 20 0 24 0; #X connect 21 0 24 0; #X connect 22 0 24 0; #X connect 23 0 24 0; #X connect 24 0 19 0; #X coords 0 10100 20 10080 0 0 0; pd-smlib-0.13.0/help/vfmod-help.pd000066400000000000000000000042171434442070000166220ustar00rootroot00000000000000#N canvas 451 84 558 505 10; #X obj -1 515 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289 0; #X obj 1 270 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0 ; #N canvas 708 359 424 317 META 0; #X text 12 145 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 25 LICENSE GPL v2; #X text 12 125 AUTHOR Johannes Taelman (johannes.taelman@rug.ac.be) ; #X text 12 5 KEYWORDS control list_op; #X text 12 65 INLET_0 list float; #X text 12 105 OUTLET_0 list float; #X text 12 45 DESCRIPTION compute the modulo of each element in a vector ; #X text 12 85 INLET_1 float; #X restore 499 517 pd META; #X obj 0 353 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0 ; #X obj 0 429 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1 0; #N canvas 116 494 428 85 Related_objects 0; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 Related Objects; #X restore 195 518 pd Related_objects; #X obj 79 283 cnv 17 3 35 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X text 99 281 float; #X text 174 282 - input value; #X text 99 305 list; #X obj 79 365 cnv 17 3 50 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X text 99 363 float; #X text 99 387 list; #X obj 0 473 cnv 3 550 3 empty empty more_info 8 12 0 13 -228856 -1 0; #X text 174 306 - list of input values (floats); #X obj 0 1 cnv 15 552 40 empty empty vfmod 3 12 0 18 -204280 -1 0; #X obj 498 5 vdelta; #X obj 83 241 print; #X floatatom 158 104 5 0 0 0 - - -, f 5; #X msg 83 56 0 0.5 1 1.5 2 2.5 3 3.5; #X msg 94 81 0 -0.5 -1 -1.5 -2 -2.5 -3 -3.5; #X obj 83 171 smlib/vfmod 2; #X text 11 23 vfmod computes the modulo of each element in a vector , f 71; #X text 174 364 - output value = current input value % argument; #X text 174 388 - list of output values. Each output list value = current input value % argument; #X text 89 445 the default modulo base; #X obj 79 329 cnv 17 3 17 empty empty 1 5 9 0 16 -228856 -162280 0 ; #X text 99 327 float; #X text 174 328 - modulo base; #X text 89 488 base zero becomes one default argument is 1; #X connect 18 0 21 1; #X connect 19 0 21 0; #X connect 20 0 21 0; #X connect 21 0 17 0; #X coords 0 10100 20 10080 0 0 0; pd-smlib-0.13.0/help/vftom-help.pd000066400000000000000000000032111434442070000166330ustar00rootroot00000000000000#N canvas 451 84 558 505 10; #X obj -1 470 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289 0; #X obj 1 270 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0 ; #N canvas 706 360 424 317 META 0; #X text 12 125 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 25 LICENSE GPL v2; #X text 12 105 AUTHOR Johannes Taelman (johannes.taelman@rug.ac.be) ; #X text 12 65 INLET_0 list float; #X text 12 85 OUTLET_0 list float; #X text 12 45 DESCRIPTION frequency to midi on a vector; #X text 12 5 KEYWORDS control list_op conversion MIDI; #X restore 499 472 pd META; #X obj 0 353 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0 ; #X obj 0 429 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1 0; #N canvas 116 494 428 85 Related_objects 0; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 Related Objects; #X restore 195 473 pd Related_objects; #X obj 79 283 cnv 17 3 35 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X text 99 281 float; #X text 99 305 list; #X obj 79 365 cnv 17 3 50 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X text 99 363 float; #X text 99 387 list; #X obj 0 1 cnv 15 552 40 empty empty vftom 3 12 0 18 -204280 -1 0; #X msg 81 70 440 446.164 880; #X obj 81 226 print vftom; #X text 174 282 - input value (frequency); #X text 174 306 - list of input values (ffrequencies); #X obj 81 149 smlib/vftom; #X text 174 364 - output value (MIDI note number); #X text 174 388 - list of output values (MIDI note numbers); #X text 11 23 frequency to midi on a vector, f 71; #X obj 509 6 vftom; #X connect 13 0 17 0; #X connect 17 0 14 0; #X coords 0 10100 20 10080 0 0 0; pd-smlib-0.13.0/help/vlavg-help.pd000066400000000000000000000045751434442070000166350ustar00rootroot00000000000000#N canvas 449 85 558 505 10; #X obj -1 500 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289 0; #X obj 1 336 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0 ; #N canvas 704 361 424 317 META 0; #X text 12 125 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 25 LICENSE GPL v2; #X text 12 105 AUTHOR Johannes Taelman (johannes.taelman@rug.ac.be) ; #X text 12 5 KEYWORDS control list_op; #X text 12 45 DESCRIPTION vector leaky average; #X text 12 65 INLET_0 list float decay; #X text 12 85 OUTLET_0 list float; #X restore 499 502 pd META; #X obj 0 409 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0 ; #X obj 0 460 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1 0; #N canvas 116 494 428 85 Related_objects 0; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 Related Objects; #X restore 195 503 pd Related_objects; #X obj 79 349 cnv 17 3 50 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X text 99 365 float; #X text 99 384 list; #X obj 79 421 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X text 99 419 float; #X obj 0 1 cnv 15 552 40 empty empty vlavg 3 12 0 18 -204280 -1 0; #X msg 80 49 1 1 1 1 1 1 1 1 1 1; #X msg 80 68 1 0 1 0 1 0 1 0 1 0; #X msg 80 87 0 1 0 1 0 1 0 1 0 1; #X msg 80 106 0 0 0 0 0 0 0 0 0 0; #X msg 80 125 -1 -1 0 0 -1 -1 0 0 -1 -1; #X msg 80 144 0 0 0 0 0 1 1 1 1 1; #X msg 99 203 decay 20; #X obj 80 296 list trim; #X obj 80 277 list prepend 0; #X obj 80 315 s \$0-vlavg; #N canvas 0 50 450 300 (subpatch) 0; #X array \$0-vlavg 10 float 0; #X coords 0 1 9 -1 200 140 1 0 0; #X restore 322 188 graph; #X obj 80 227 smlib/vlavg 6; #X obj 504 6 vlavg; #X text 174 366 - input value; #X text 174 385 - list of input values; #X text 99 346 decay n; #X text 174 347 - half-decay expressed in activations; #X text 84 478 the argument is the half-decay expressed in number of activations, f 65; #X text 11 23 vector leaky average, f 71; #X msg 50 49 0; #X text 99 439 list; #X text 174 420 - the average of the current and previous input values ; #X text 174 439 - list of averages of the current and previous input values; #X connect 12 0 23 0; #X connect 13 0 23 0; #X connect 14 0 23 0; #X connect 15 0 23 0; #X connect 16 0 23 0; #X connect 17 0 23 0; #X connect 18 0 23 0; #X connect 19 0 21 0; #X connect 20 0 19 0; #X connect 23 0 20 0; #X connect 31 0 23 0; #X coords 0 10100 20 10080 0 0 0; pd-smlib-0.13.0/help/vlmax-help.pd000066400000000000000000000044631434442070000166410ustar00rootroot00000000000000#N canvas 447 86 558 505 10; #X obj -1 493 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289 0; #X obj 1 313 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0 ; #N canvas 692 367 424 317 META 0; #X text 12 145 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 25 LICENSE GPL v2; #X text 12 125 AUTHOR Johannes Taelman (johannes.taelman@rug.ac.be) ; #X text 12 65 INLET_0 list float; #X text 12 5 KEYWORDS control list_op; #X text 12 85 OUTLET_0 float; #X text 12 105 OUTLET_1 float; #X text 12 45 DESCRIPTION maximum of a list of floats; #X restore 499 495 pd META; #X obj 0 393 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0 ; #X obj 0 453 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1 0; #N canvas 116 494 428 85 Related_objects 0; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 Related Objects; #X restore 195 496 pd Related_objects; #X obj 79 326 cnv 17 3 50 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X text 99 345 float; #X text 99 363 list; #X obj 79 405 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X text 99 403 float; #X obj 0 1 cnv 15 552 40 empty empty vlmax 3 12 0 18 -204280 -1 0; #X text 174 346 - input value; #X text 174 364 - list of input values; #N canvas 1 79 450 300 (subpatch) 0; #X array \$0_vlmax 10 float 0; #X coords 0 1 9 -1 200 140 1; #X restore 319 58 graph; #X msg 88 44 1 1 1 1 1 1 1 1 1 1; #X msg 88 63 1 0 1 0 1 0 1 0 1 0; #X msg 88 82 0 1 0 1 0 1 0 1 0 1; #X msg 88 101 0 0 0 0 0 0 0 0 0 0; #X msg 88 120 -1 -1 0 0 -1 -1 0 0 -1 -1; #X msg 88 139 0 0 0 0 0 1 1 1 1 1; #X msg 174 161 decay 20; #X obj 88 272 list trim; #X obj 88 253 list prepend 0; #X text 99 324 decay n; #X text 174 326 - the half-decay expressed in number of activations ; #X text 90 468 the default half-decay expressed in number of activations ; #X text 99 422 list; #X text 174 423 - list of input values; #X text 11 23 vector leaky maximum, f 76; #X obj 507 6 vlmax; #X obj 88 210 smlib/vlmax 6; #X text 174 404 - the maximum value in the list; #X obj 88 291 s \$0_vlmax; #X connect 15 0 31 0; #X connect 16 0 31 0; #X connect 17 0 31 0; #X connect 18 0 31 0; #X connect 19 0 31 0; #X connect 20 0 31 0; #X connect 21 0 31 0; #X connect 22 0 33 0; #X connect 23 0 22 0; #X connect 31 0 23 0; #X coords 0 10100 20 10080 0 0 0; pd-smlib-0.13.0/help/vlmin-help.pd000066400000000000000000000045151434442070000166350ustar00rootroot00000000000000#N canvas 447 86 558 505 10; #X obj -1 493 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289 0; #X obj 1 313 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0 ; #N canvas 694 366 424 317 META 0; #X text 12 145 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 25 LICENSE GPL v2; #X text 12 125 AUTHOR Johannes Taelman (johannes.taelman@rug.ac.be) ; #X text 12 65 INLET_0 list float; #X text 12 45 DESCRIPTION minimum of a list of floats; #X text 12 5 KEYWORDS control list_op; #X text 12 85 OUTLET_0 float; #X text 12 105 OUTLET_1 float; #X restore 499 495 pd META; #X obj 0 393 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0 ; #X obj 0 453 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1 0; #N canvas 116 494 428 85 Related_objects 0; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 Related Objects; #X restore 195 496 pd Related_objects; #X obj 79 326 cnv 17 3 50 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X text 99 345 float; #X text 99 363 list; #X obj 79 405 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X text 99 403 float; #X obj 0 1 cnv 15 552 40 empty empty vlmin 3 12 0 18 -204280 -1 0; #X text 174 346 - input value; #X text 174 364 - list of input values; #X text 11 23 finds the minimum and its location in the list, f 76 ; #X obj 517 6 vmin; #X text 174 404 - the minimum value in the list; #N canvas 1 79 450 300 (subpatch) 0; #X array \$0_vlmin 10 float 0; #X coords 0 1 9 -1 200 140 1; #X restore 319 58 graph; #X msg 88 44 1 1 1 1 1 1 1 1 1 1; #X msg 88 63 1 0 1 0 1 0 1 0 1 0; #X msg 88 82 0 1 0 1 0 1 0 1 0 1; #X msg 88 101 0 0 0 0 0 0 0 0 0 0; #X msg 88 120 -1 -1 0 0 -1 -1 0 0 -1 -1; #X msg 88 139 0 0 0 0 0 1 1 1 1 1; #X msg 174 161 decay 20; #X obj 88 272 list trim; #X obj 88 253 list prepend 0; #X obj 88 210 smlib/vlmin 6; #X obj 88 291 s \$0_vlmin; #X text 99 324 decay n; #X text 174 326 - the half-decay expressed in number of activations ; #X text 90 468 the default half-decay expressed in number of activations ; #X text 99 422 list; #X text 174 423 - list of input values; #X connect 18 0 27 0; #X connect 19 0 27 0; #X connect 20 0 27 0; #X connect 21 0 27 0; #X connect 22 0 27 0; #X connect 23 0 27 0; #X connect 24 0 27 0; #X connect 25 0 28 0; #X connect 26 0 25 0; #X connect 27 0 26 0; #X coords 0 10100 20 10080 0 0 0; pd-smlib-0.13.0/help/vlrange-help.pd000066400000000000000000000037721434442070000171520ustar00rootroot00000000000000#N canvas 445 87 558 505 10; #X obj -1 470 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289 0; #X obj 1 270 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0 ; #N canvas 706 360 424 317 META 0; #X text 12 125 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 25 LICENSE GPL v2; #X text 12 105 AUTHOR Johannes Taelman (johannes.taelman@rug.ac.be) ; #X text 12 65 INLET_0 list float; #X text 12 85 OUTLET_0 list float; #X text 12 45 DESCRIPTION frequency to midi on a vector; #X text 12 5 KEYWORDS control list_op conversion MIDI; #X restore 499 472 pd META; #X obj 0 353 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0 ; #X obj 0 429 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1 0; #N canvas 116 494 428 85 Related_objects 0; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 Related Objects; #X restore 195 473 pd Related_objects; #X obj 79 283 cnv 17 3 35 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X text 99 281 float; #X text 99 305 list; #X obj 79 365 cnv 17 3 50 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X text 99 363 float; #X text 99 387 list; #X obj 0 1 cnv 15 552 40 empty empty vlrange 3 12 0 18 -204280 -1 0 ; #X msg 81 51 1 2 3 0; #X obj 81 155 smlib/vlrange 6; #X msg 87 70 0 0 0 0; #X msg 305 73 decay 4; #X msg 262 72 0; #X obj 81 245 print vlrange; #X obj 503 6 vlrange; #X msg 260 50 1; #X msg 144 51 1 2 4 8; #X msg 146 73 2 4 8 16; #X text 174 282 - input value; #X text 174 306 - list of input values; #X text 11 23 leaky maximum minus leaky minimum for a float list, f 71; #X text 174 364 - output value = leaky maximum - leaky minimum; #X text 174 388 - list of output values = leaky maximum - leaky minimum ; #X text 87 450 the argument is the half-decay expressed in number of activations, f 66; #X connect 13 0 14 0; #X connect 14 0 18 0; #X connect 15 0 14 0; #X connect 16 0 14 0; #X connect 17 0 14 0; #X connect 20 0 14 0; #X connect 21 0 14 0; #X connect 22 0 14 0; #X coords 0 10100 20 10080 0 0 0; pd-smlib-0.13.0/help/vmax-help.pd000066400000000000000000000037161434442070000164650ustar00rootroot00000000000000#N canvas 449 85 558 505 10; #X obj -1 469 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289 0; #X obj 1 299 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0 ; #N canvas 698 364 424 317 META 0; #X text 12 145 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 25 LICENSE GPL v2; #X text 12 125 AUTHOR Johannes Taelman (johannes.taelman@rug.ac.be) ; #X text 12 5 KEYWORDS control list_op; #X text 12 65 INLET_0 list float; #X text 12 45 DESCRIPTION maximum of a list of floats; #X text 12 85 OUTLET_0 float; #X text 12 105 OUTLET_1 float; #X restore 499 471 pd META; #X obj 0 357 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0 ; #X obj 0 429 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1 0; #N canvas 116 494 428 85 Related_objects 0; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 Related Objects; #X restore 195 472 pd Related_objects; #X obj 79 312 cnv 17 3 35 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X text 99 311 float; #X text 99 330 list; #X obj 79 369 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X text 99 367 float; #X obj 0 1 cnv 15 552 40 empty empty vmax 3 12 0 18 -204280 -1 0; #X text 174 312 - input value; #X text 174 331 - list of input values; #X floatatom 76 263 5 0 0 0 - - -, f 5; #X msg 194 58 0; #X msg 229 58 0 1 0 1; #X msg 304 59 0 0 1 1; #X floatatom 133 263 5 0 0 0 - - -, f 5; #X msg 76 58 1 2 3 1; #X msg 142 58 3 4 1; #X obj 76 181 smlib/vmax; #X obj 504 6 vmax; #X text 11 23 finds the maximum and its location in the list, f 76 ; #X obj 79 399 cnv 17 3 25 empty empty 1 5 9 0 16 -228856 -162280 0 ; #X text 99 397 float; #X text 174 368 - the maximum value in the list; #X text 174 398 - the location in the list where maximum first occurrs (1 based); #X connect 15 0 21 0; #X connect 16 0 21 0; #X connect 17 0 21 0; #X connect 19 0 21 0; #X connect 20 0 21 0; #X connect 21 0 14 0; #X connect 21 1 18 0; #X coords 0 10100 20 10080 0 0 0; pd-smlib-0.13.0/help/vmin-help.pd000066400000000000000000000037161434442070000164630ustar00rootroot00000000000000#N canvas 447 86 558 505 10; #X obj -1 469 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289 0; #X obj 1 299 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0 ; #N canvas 696 365 424 317 META 0; #X text 12 145 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 25 LICENSE GPL v2; #X text 12 125 AUTHOR Johannes Taelman (johannes.taelman@rug.ac.be) ; #X text 12 65 INLET_0 list float; #X text 12 45 DESCRIPTION minimum of a list of floats; #X text 12 5 KEYWORDS control list_op; #X text 12 85 OUTLET_0 float; #X text 12 105 OUTLET_1 float; #X restore 499 471 pd META; #X obj 0 357 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0 ; #X obj 0 429 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1 0; #N canvas 116 494 428 85 Related_objects 0; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 Related Objects; #X restore 195 472 pd Related_objects; #X obj 79 312 cnv 17 3 35 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X text 99 311 float; #X text 99 330 list; #X obj 79 369 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X text 99 367 float; #X obj 0 1 cnv 15 552 40 empty empty vmin 3 12 0 18 -204280 -1 0; #X text 174 312 - input value; #X text 174 331 - list of input values; #X floatatom 76 263 5 0 0 0 - - -, f 5; #X msg 194 58 0; #X msg 229 58 0 1 0 1; #X msg 304 59 0 0 1 1; #X floatatom 133 263 5 0 0 0 - - -, f 5; #X msg 76 58 1 2 3 1; #X msg 142 58 3 4 1; #X obj 79 399 cnv 17 3 25 empty empty 1 5 9 0 16 -228856 -162280 0 ; #X text 99 397 float; #X obj 76 181 smlib/vmin; #X text 11 23 finds the minimum and its location in the list, f 76 ; #X obj 517 6 vmin; #X text 174 368 - the minimum value in the list; #X text 173 398 - the location in the list where minimum first occurrs (1 based); #X connect 15 0 23 0; #X connect 16 0 23 0; #X connect 17 0 23 0; #X connect 19 0 23 0; #X connect 20 0 23 0; #X connect 23 0 14 0; #X connect 23 1 18 0; #X coords 0 10100 20 10080 0 0 0; pd-smlib-0.13.0/help/vmtof-help.pd000066400000000000000000000032011434442070000166320ustar00rootroot00000000000000#N canvas 449 85 558 505 10; #X obj -1 470 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289 0; #X obj 1 270 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0 ; #N canvas 704 361 424 317 META 0; #X text 12 125 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 25 LICENSE GPL v2; #X text 12 105 AUTHOR Johannes Taelman (johannes.taelman@rug.ac.be) ; #X text 12 65 INLET_0 list float; #X text 12 45 DESCRIPTION midi to frequency on a vector; #X text 12 85 OUTLET_0 list float; #X text 12 5 KEYWORDS control list_op conversion MIDI; #X restore 499 472 pd META; #X obj 0 353 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0 ; #X obj 0 429 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1 0; #N canvas 116 494 428 85 Related_objects 0; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 Related Objects; #X restore 195 473 pd Related_objects; #X obj 79 283 cnv 17 3 35 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X text 99 281 float; #X text 99 305 list; #X obj 79 365 cnv 17 3 50 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X text 99 363 float; #X text 99 387 list; #X obj 0 1 cnv 15 552 40 empty empty vmtof 3 12 0 18 -204280 -1 0; #X obj 81 226 print vftom; #X msg 81 70 69 70 81; #X obj 81 149 smlib/vmtof; #X text 11 23 midi to frequency on a vector, f 71; #X obj 509 6 vmtof; #X text 174 364 - output value (frequency); #X text 174 281 - input value (MIDI note number); #X text 174 388 - list of output values (frequencies); #X text 174 306 - list of input values (MIDI note numbers); #X connect 14 0 15 0; #X connect 15 0 13 0; #X coords 0 10100 20 10080 0 0 0; pd-smlib-0.13.0/help/vnmax-help.pd000066400000000000000000000037431434442070000166430ustar00rootroot00000000000000#N canvas 425 82 558 505 10; #X obj -1 469 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289 0; #X obj 1 299 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0 ; #N canvas 698 364 424 317 META 0; #X text 12 145 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 25 LICENSE GPL v2; #X text 12 125 AUTHOR Johannes Taelman (johannes.taelman@rug.ac.be) ; #X text 12 5 KEYWORDS control list_op; #X text 12 65 INLET_0 list float; #X text 12 45 DESCRIPTION maximum of a list of floats; #X text 12 85 OUTLET_0 float; #X text 12 105 OUTLET_1 float; #X restore 499 471 pd META; #X obj 0 357 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0 ; #X obj 0 429 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1 0; #N canvas 116 494 428 85 Related_objects 0; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 Related Objects; #X restore 195 472 pd Related_objects; #X obj 79 312 cnv 17 3 35 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X text 99 311 float; #X text 99 330 list; #X obj 79 369 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X text 99 367 float; #X obj 0 1 cnv 15 552 40 empty empty vnmax 3 12 0 18 -204280 -1 0; #X text 174 312 - input value; #X text 174 331 - list of input values; #X floatatom 76 263 5 0 0 0 - - -, f 5; #X msg 194 58 0; #X msg 229 58 0 1 0 1; #X msg 304 59 0 0 1 1; #X floatatom 139 263 5 0 0 0 - - -, f 5; #X msg 76 58 1 2 3 1; #X msg 142 58 3 4 1; #X obj 79 399 cnv 17 3 25 empty empty 1 5 9 0 16 -228856 -162280 0 ; #X text 99 397 float; #X text 174 368 - the maximum value in the list; #X text 174 398 - the location in the list where maximum first occurrs (1 based); #X obj 76 181 smlib/vnmax; #X text 11 23 maximum n values in a list of float and their locations (indices), f 76; #X obj 504 6 vnmax; #X connect 15 0 25 0; #X connect 16 0 25 0; #X connect 17 0 25 0; #X connect 19 0 25 0; #X connect 20 0 25 0; #X connect 25 0 14 0; #X connect 25 1 18 0; #X coords 0 10100 20 10080 0 0 0; pd-smlib-0.13.0/help/vpow-help.pd000066400000000000000000000040531434442070000165000ustar00rootroot00000000000000#N canvas 427 79 558 505 10; #X obj -1 475 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289 0; #X obj 1 269 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0 ; #N canvas 696 365 424 317 META 0; #X text 12 145 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 25 LICENSE GPL v2; #X text 12 125 AUTHOR Johannes Taelman (johannes.taelman@rug.ac.be) ; #X text 12 65 INLET_0 list float; #X text 12 5 KEYWORDS control list_op; #X text 12 45 DESCRIPTION compute y(i)=x(i)^a; #X text 12 85 INLET_0 float; #X text 12 105 OUTLET_0 float list; #X restore 499 477 pd META; #X obj 0 353 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0 ; #X obj 0 401 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1 0; #N canvas 116 494 428 85 Related_objects 0; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 Related Objects; #X restore 195 478 pd Related_objects; #X obj 79 282 cnv 17 3 35 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X text 99 281 float; #X text 99 300 list; #X obj 79 365 cnv 17 3 30 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X text 99 363 float; #X obj 0 1 cnv 15 552 40 empty empty vpow 3 12 0 18 -204280 -1 0; #X text 174 282 - input value; #X text 174 301 - list of input values; #X obj 79 323 cnv 17 3 17 empty empty 1 5 9 0 16 -228856 -162280 0 ; #X text 99 321 float; #X obj 83 237 print; #X floatatom 152 98 5 0 0 0 - - -, f 5; #X msg 83 68 0.01 0.5 1 1.5 2 2.5 3 3.5 0; #X text 11 23 vpow computes y(i)=x(i)^a, f 76; #X obj 83 166 smlib/vpow 2; #X obj 504 6 vpow; #X text 99 382 list; #X text 174 364 - input value to the specified power; #X text 174 322 - the power to which the float or list values will be raised; #X msg 40 95 -1; #X text 174 383 - input values to the specified power; #X obj 0 437 cnv 3 550 3 empty empty more_info 8 12 0 13 -228856 -1 0; #X text 84 456 if (x(i)<=0) then y(i)=-1000; #X text 84 420 default power value. No value assumes 1; #X connect 17 0 20 1; #X connect 18 0 20 0; #X connect 20 0 16 0; #X connect 25 0 20 0; #X coords 0 10100 20 10080 0 0 0; pd-smlib-0.13.0/help/vrms-help.pd000066400000000000000000000034751434442070000165030ustar00rootroot00000000000000#N canvas 427 79 558 505 10; #X obj -1 467 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289 0; #X obj 1 296 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0 ; #N canvas 694 366 424 317 META 0; #X text 12 125 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 25 LICENSE GPL v2; #X text 12 105 AUTHOR Johannes Taelman (johannes.taelman@rug.ac.be) ; #X text 12 65 INLET_0 list float; #X text 12 5 KEYWORDS control list_op; #X text 12 85 OUTLET_0 float list; #X text 12 45 DESCRIPTION root-mean-square of a vector; #X restore 499 469 pd META; #X obj 0 356 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0 ; #X obj 0 419 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1 0; #N canvas 116 494 428 85 Related_objects 0; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 Related Objects; #X restore 195 470 pd Related_objects; #X obj 79 309 cnv 17 3 35 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X text 99 308 float; #X text 99 327 list; #X obj 79 368 cnv 17 3 40 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X text 99 366 float; #X obj 0 1 cnv 15 552 40 empty empty vrms 3 12 0 18 -204280 -1 0; #X text 174 309 - input value; #X text 174 328 - list of input values; #X text 99 394 list; #X text 174 395 - input values to the specified power; #X msg 90 63 1 2 3 4; #X floatatom 90 245 8 0 0 0 - - -, f 8; #X msg 157 63 3 4 5; #X msg 207 63 1 1 1 1; #X msg 273 63 1 -1 1 -1; #X obj 90 164 smlib/vrms; #X msg 51 63 -2; #X text 174 367 - the root mean square of a single value is the absolute of the value; #X obj 504 6 vrms; #X text 11 23 vrms computes the root-mean-square of a vector, f 76 ; #X connect 16 0 21 0; #X connect 18 0 21 0; #X connect 19 0 21 0; #X connect 20 0 21 0; #X connect 21 0 17 0; #X connect 22 0 21 0; #X coords 0 10100 20 10080 0 0 0; pd-smlib-0.13.0/help/vrmstodb-help.pd000066400000000000000000000034061434442070000173460ustar00rootroot00000000000000#N canvas 449 85 558 505 10; #X obj -1 465 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289 0; #X obj 1 298 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0 ; #N canvas 712 357 424 317 META 0; #X text 12 125 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 25 LICENSE GPL v2; #X text 12 105 AUTHOR Johannes Taelman (johannes.taelman@rug.ac.be) ; #X text 12 5 KEYWORDS control list_op; #X text 12 65 INLET_0 list float; #X text 12 85 OUTLET_0 list float; #X text 12 45 DESCRIPTION rms to db on a vector; #X restore 499 467 pd META; #X obj 0 367 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0 ; #X obj 0 434 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1 0; #N canvas 116 494 428 85 Related_objects 0; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 Related Objects; #X restore 195 468 pd Related_objects; #X obj 0 0 cnv 15 552 40 empty empty vdrmstodb 3 12 0 18 -204280 -1 0; #X obj 79 311 cnv 17 3 35 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X text 99 309 float; #X text 174 310 - input value; #X text 99 333 list; #X text 174 334 - list of input values; #X obj 82 259 print vdbtorms; #X obj 79 382 cnv 17 3 35 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X text 99 380 float; #X text 99 400 list; #X obj 82 182 smlib/vrmstodb; #X msg 91 79 1 3.1625 10 31.625; #X floatatom 201 101 5 0 0 0 - - -, f 5; #X msg 82 59 0.001 0.01 0.1 1 10 100; #X msg 100 100 0.00125895; #X text 174 381 - output value = 100 + 20./LOGTEN * log(f); #X text 174 399 - list of output values \, each the rms to db of the input value; #X text 11 23 rms to db on a vector, f 71; #X obj 486 5 vrmstodb; #X connect 16 0 12 0; #X connect 17 0 16 0; #X connect 18 0 16 0; #X connect 19 0 16 0; #X connect 20 0 16 0; pd-smlib-0.13.0/help/vstd-help.pd000066400000000000000000000031311434442070000164610ustar00rootroot00000000000000#N canvas 449 85 558 505 10; #X obj -1 465 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289 0; #X obj 1 342 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0 ; #N canvas 710 358 424 317 META 0; #X text 12 125 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 25 LICENSE GPL v2; #X text 12 105 AUTHOR Johannes Taelman (johannes.taelman@rug.ac.be) ; #X text 12 65 INLET_0 list float; #X text 12 45 DESCRIPTION standard deviation of a vector; #X text 12 85 OUTLET_0 float; #X text 12 5 KEYWORDS control list_op; #X restore 499 467 pd META; #X obj 0 386 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0 ; #X obj 0 434 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1 0; #N canvas 116 494 428 85 Related_objects 0; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 Related Objects; #X restore 195 468 pd Related_objects; #X obj 0 0 cnv 15 552 40 empty empty vstd 3 12 0 18 -204280 -1 0; #X obj 79 355 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X text 99 356 list; #X text 174 357 - list of input values; #X obj 79 401 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X msg 85 92 1 2 3 4; #X floatatom 85 253 8 0 0 0 - - -, f 8; #X msg 152 93 3 4 5; #X msg 202 93 1 1 1 1; #X msg 268 93 1 -1 1 -1 1; #X obj 85 188 smlib/vstd; #X text 11 23 vstd computes the standard deviation of a vector, f 71; #X obj 508 5 vstd; #X text 99 403 float; #X text 174 402 - the standard deviation if the list values; #X connect 11 0 16 0; #X connect 13 0 16 0; #X connect 14 0 16 0; #X connect 15 0 16 0; #X connect 16 0 12 0; pd-smlib-0.13.0/help/vsum-help.pd000066400000000000000000000030421434442070000164740ustar00rootroot00000000000000#N canvas 449 85 558 505 10; #X obj -1 465 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289 0; #X obj 1 342 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0 ; #N canvas 708 359 424 317 META 0; #X text 12 125 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 25 LICENSE GPL v2; #X text 12 105 AUTHOR Johannes Taelman (johannes.taelman@rug.ac.be) ; #X text 12 65 INLET_0 list float; #X text 12 85 OUTLET_0 float list; #X text 12 5 KEYWORDS control list_op; #X text 12 45 DESCRIPTION sum of a list of floats; #X restore 499 467 pd META; #X obj 0 386 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0 ; #X obj 0 434 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1 0; #N canvas 116 494 428 85 Related_objects 0; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 Related Objects; #X restore 195 468 pd Related_objects; #X obj 0 0 cnv 15 552 40 empty empty vsum 3 12 0 18 -204280 -1 0; #X obj 79 355 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X text 99 356 list; #X obj 79 401 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X text 99 403 float; #X text 174 402 - the standard deviation if the list values; #X text 174 357 - list of input values (floats); #X msg 80 80 1 2 3 4; #X msg 147 80 3 4 5; #X msg 199 80 0; #X obj 80 190 smlib/vsum; #X floatatom 80 292 5 0 0 0 - - -, f 5; #X text 11 23 vsum computes the sum of a list of floats, f 71; #X obj 508 5 vsum; #X connect 13 0 16 0; #X connect 14 0 16 0; #X connect 15 0 16 0; #X connect 16 0 17 0; pd-smlib-0.13.0/help/vthreshold-help.pd000066400000000000000000000134141434442070000176700ustar00rootroot00000000000000#N canvas 449 85 558 505 10; #X obj -1 626 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289 0; #X obj 1 290 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0 ; #N canvas 724 351 424 317 META 0; #X text 12 145 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 25 LICENSE GPL v2; #X text 12 125 AUTHOR Johannes Taelman (johannes.taelman@rug.ac.be) ; #X text 12 5 KEYWORDS control; #X text 12 45 DESCRIPTION trigger float from stream; #X text 12 65 INLET_0 float set; #X text 12 85 OUTLET_0 bang; #X text 12 105 OUTLET_1 bang; #X restore 499 628 pd META; #X obj 0 355 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0 ; #X obj 0 417 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1 0; #N canvas 118 493 428 85 Related_objects 0; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 Related Objects; #X obj 4 26 threshold~; #X restore 195 629 pd Related_objects; #X obj 0 0 cnv 15 552 40 empty empty vthreshold 3 12 0 18 -204280 -1 0; #X obj 79 364 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 79 300 cnv 17 3 40 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X text 82 436 a) float; #X text 82 454 b) float; #X text 82 473 c) float; #X obj 133 263 print trigger; #X obj 277 263 print rest; #X obj 114 69 hsl 128 15 0 30 0 0 empty empty empty -2 -6 0 8 -262144 -1 -1 1270 1; #X obj 258 263 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 111 263 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #N canvas 768 736 450 300 upDownCounter 0; #X obj 125 60 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1; #X obj 160 138 f; #X obj 189 138 + 1; #X msg 240 82 -1; #X msg 241 106 1; #X floatatom 106 216 5 0 0 0 - - -, f 5; #X obj 160 173 t f f f; #X obj 199 245 outlet; #X obj 160 98 metro 100; #X obj 160 41 inlet; #X obj 210 223 moses 2; #X obj 70 112 vsl 15 128 0 80 0 0 empty empty empty 0 -9 0 10 -262144 -1 -1 476 1; #X obj 205 200 moses 29; #X msg 301 112 29; #X msg 304 167 79; #X msg 302 140 59; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 up-down counter; #N canvas 254 711 450 300 updown 0; #X obj 125 60 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1; #X obj 160 138 f; #X obj 189 138 + 1; #X msg 240 82 -1; #X msg 241 106 1; #X floatatom 106 216 5 0 0 0 - - -, f 5; #X obj 187 245 outlet; #X obj 160 98 metro 100; #X obj 160 41 inlet; #X obj 70 112 vsl 15 128 0 80 0 0 empty empty empty 0 -9 0 10 -262144 -1 -1 0 1; #X obj 160 211 smlib/threshold 60 0 0 0; #X msg 302 140 60 0 0 0; #X msg 304 167 80 0 0 0; #X msg 301 112 30 0 0 0; #X obj 160 244 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 301 246 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X msg 213 57 0; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 up-down counter with threshold; #X obj 160 173 t f f; #X connect 0 0 7 0; #X connect 1 0 2 0; #X connect 1 0 5 0; #X connect 1 0 19 0; #X connect 2 0 1 1; #X connect 3 0 2 1; #X connect 4 0 2 1; #X connect 5 0 9 0; #X connect 7 0 1 0; #X connect 8 0 7 0; #X connect 10 0 14 0; #X connect 10 0 3 0; #X connect 10 1 15 0; #X connect 10 1 4 0; #X connect 11 0 10 0; #X connect 12 0 10 0; #X connect 13 0 10 0; #X connect 16 0 1 0; #X connect 19 0 10 0; #X connect 19 1 6 0; #X restore 286 259 pd updown with threshold; #X connect 0 0 8 0; #X connect 1 0 2 0; #X connect 1 0 5 0; #X connect 1 0 6 0; #X connect 2 0 1 1; #X connect 3 0 2 1; #X connect 4 0 2 1; #X connect 5 0 11 0; #X connect 6 0 10 0; #X connect 6 1 12 0; #X connect 6 2 7 0; #X connect 8 0 1 0; #X connect 9 0 8 0; #X connect 10 0 4 0; #X connect 12 1 3 0; #X connect 13 0 12 1; #X connect 14 0 12 1; #X connect 15 0 12 1; #X restore 111 48 pd upDownCounter; #X obj 89 50 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 1 ; #X text 99 298 float; #X text 174 299 - input value; #X text 99 316 set t d r d; #X text 174 317 - sets trigger threshold \, trigger debounce number \, rest threshold \, rest debounce number; #X obj 79 388 cnv 17 3 17 empty empty 1 5 9 0 16 -228856 -162280 0 ; #X text 99 366 bang; #X text 174 366 - input float higher than trigger threshold; #X text 174 390 - input float lower than rest threshold; #X text 175 436 - trigger threshold; #X text 174 454 - trigger debounce number; #X text 174 473 - rest threshold; #X text 174 491 - rest debounce number; #X text 82 491 d) float; #X text 99 390 bang; #X obj 0 510 cnv 3 550 3 empty empty more_info 8 12 0 13 -228856 -1 0; #X text 78 532 threshold monitors its input float stream and outputs bangs when the signal exceeds a specified "trigger" value \, and also when the input value recedes below a "rest" value. You can specify debounce in number of floats received \, for the threshold~ to wait after the two event types before triggering again.; #X text 11 23 trigger on upper and lower boundaries of float stream , f 71; #X obj 111 202 smlib/vthreshold 25 0 3 0; #X floatatom 111 88 5 0 0 0 - - -, f 5; #X obj 34 132 print; #X msg 231 117 set 25 0 3 0 4; #X msg 230 94 set 25 10 3 5 4; #N canvas 1 79 450 300 listvariator 0; #X obj 147 105 t f f f f; #X obj 198 131 + 10; #X obj 181 153 + 5; #X obj 164 176 + 2; #X obj 147 203 pack f f f f; #X obj 147 44 inlet; #X obj 147 264 outlet; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 Variation in list; #X connect 0 0 4 0; #X connect 0 1 3 0; #X connect 0 2 2 0; #X connect 0 3 1 0; #X connect 1 0 4 3; #X connect 2 0 4 2; #X connect 3 0 4 1; #X connect 4 0 6 0; #X connect 5 0 0 0; #X restore 111 107 pd listvariator; #X obj 479 5 vthreshold; #X connect 14 0 37 0; #X connect 17 0 14 0; #X connect 18 0 17 0; #X connect 36 0 12 0; #X connect 36 0 16 0; #X connect 36 1 13 0; #X connect 36 1 15 0; #X connect 37 0 41 0; #X connect 39 0 36 0; #X connect 40 0 36 0; #X connect 41 0 36 0; #X connect 41 0 38 0; pd-smlib-0.13.0/help/vvconv-help.pd000066400000000000000000000044401434442070000170260ustar00rootroot00000000000000#N canvas 447 86 558 505 10; #X obj -1 478 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289 0; #X obj 1 310 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0 ; #N canvas 722 352 424 317 META 0; #X text 12 145 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 25 LICENSE GPL v2; #X text 12 125 AUTHOR Johannes Taelman (johannes.taelman@rug.ac.be) ; #X text 12 65 INLET_0 list float; #X text 12 5 KEYWORDS control list_op; #X text 12 45 DESCRIPTION convolution of 2 vectors; #X text 12 105 OUTLET_0 list; #X text 12 85 INLET_1 float; #X restore 499 480 pd META; #X obj 0 392 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0 ; #X obj 0 429 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1 0; #N canvas 118 493 428 85 Related_objects 0; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 Related Objects; #X obj 4 26 threshold~; #X restore 195 481 pd Related_objects; #X obj 0 0 cnv 15 552 40 empty empty vvconv 3 12 0 18 -204280 -1 0 ; #X obj 79 401 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 79 320 cnv 17 3 30 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X text 99 318 float; #X text 174 319 - input value; #X msg 190 76 1 2 1; #X msg 190 53 1 0 1; #X msg 87 53 1; #X msg 454 78 1 2 1; #X msg 303 78 1 0 0; #X msg 454 55 1 0 1; #X msg 303 55 1; #X msg 303 102 1 0 1 0 0 1; #X msg 87 100 1 0 1 0 0 1; #X msg 87 76 2 0 1; #X msg 190 101 1 0 2; #X obj 87 176 smlib/vvconv; #X obj 303 178 smlib/vvconv -1 2 -1; #X obj 87 251 print vvconv1; #X obj 303 253 print vvconv2; #X obj 496 5 vvconv; #X text 99 336 list; #X text 174 337 - list of floats; #X obj 79 356 cnv 17 3 30 empty empty 1 5 9 0 16 -228856 -162280 0 ; #X text 99 354 float; #X text 174 355 - input value; #X text 99 372 list; #X text 174 373 - list of floats; #X text 99 403 list; #X text 174 403 - convolution of the two lists; #X text 99 443 list of floats \, the default for the right inlet list \, the convolution kernel; #X text 11 23 convolution of 2 vectors, f 71; #X connect 11 0 22 1; #X connect 12 0 22 1; #X connect 13 0 22 0; #X connect 14 0 23 1; #X connect 15 0 23 0; #X connect 16 0 23 1; #X connect 17 0 23 0; #X connect 18 0 23 0; #X connect 19 0 22 0; #X connect 20 0 22 0; #X connect 21 0 22 1; #X connect 22 0 24 0; #X connect 23 0 25 0; pd-smlib-0.13.0/help/vvminus-help.pd000066400000000000000000000041521434442070000172140ustar00rootroot00000000000000#N canvas 449 85 558 505 10; #X obj -1 468 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289 0; #X obj 1 310 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0 ; #N canvas 718 354 424 317 META 0; #X text 12 145 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 25 LICENSE GPL v2; #X text 12 125 AUTHOR Johannes Taelman (johannes.taelman@rug.ac.be) ; #X text 12 65 INLET_0 list float; #X text 12 5 KEYWORDS control list_op; #X text 12 85 INLET_1 list float; #X text 12 105 OUTLET_0 list float; #X text 12 45 DESCRIPTION substracts two lists of floats; #X restore 499 470 pd META; #X obj 0 392 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0 ; #X obj 0 429 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1 0; #N canvas 118 493 428 85 Related_objects 0; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 Related Objects; #X obj 4 26 threshold~; #X restore 195 471 pd Related_objects; #X obj 0 0 cnv 15 552 40 empty empty vvminus 3 12 0 18 -204280 -1 0 ; #X obj 79 401 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 79 320 cnv 17 3 30 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X text 99 318 float; #X text 174 319 - input value; #X text 99 336 list; #X text 174 337 - list of floats; #X obj 79 356 cnv 17 3 30 empty empty 1 5 9 0 16 -228856 -162280 0 ; #X text 99 354 float; #X text 174 355 - input value; #X text 99 372 list; #X text 174 373 - list of floats; #X text 99 403 list; #X msg 93 96 1 2 3; #X msg 168 100 4 5 6; #X msg 233 101 1 2 3; #X msg 320 101 4; #X msg 93 72 1; #X msg 233 77 1; #X obj 93 183 smlib/vvminus; #X obj 233 184 smlib/vvminus 0; #X obj 233 261 print vvminus2; #X obj 93 260 print vvminus1; #X text 11 23 substracts two lists of floats or a float from a list of floats, f 71; #X text 104 447 the default list for the right side inlet; #X text 174 403 - subtraction of the right side list from the left side list; #X obj 496 5 vvminus; #X connect 19 0 25 0; #X connect 20 0 25 1; #X connect 21 0 26 0; #X connect 22 0 26 1; #X connect 23 0 25 0; #X connect 24 0 26 0; #X connect 25 0 28 0; #X connect 26 0 27 0; pd-smlib-0.13.0/help/vvplus-help.pd000066400000000000000000000040671434442070000170510ustar00rootroot00000000000000#N canvas 449 85 558 505 10; #X obj -1 468 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289 0; #X obj 1 310 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0 ; #N canvas 716 355 424 317 META 0; #X text 12 145 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.; #X text 12 25 LICENSE GPL v2; #X text 12 125 AUTHOR Johannes Taelman (johannes.taelman@rug.ac.be) ; #X text 12 65 INLET_0 list float; #X text 12 5 KEYWORDS control list_op; #X text 12 85 INLET_1 list float; #X text 12 105 OUTLET_0 list float; #X text 12 45 DESCRIPTION add two lists of floats; #X restore 499 470 pd META; #X obj 0 392 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0 ; #X obj 0 429 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1 0; #N canvas 118 493 428 85 Related_objects 0; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 Related Objects; #X obj 4 26 threshold~; #X restore 195 471 pd Related_objects; #X obj 0 0 cnv 15 552 40 empty empty vvplus 3 12 0 18 -204280 -1 0 ; #X obj 79 401 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 79 320 cnv 17 3 30 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X text 99 318 float; #X text 174 319 - input value; #X text 99 336 list; #X text 174 337 - list of floats; #X obj 79 356 cnv 17 3 30 empty empty 1 5 9 0 16 -228856 -162280 0 ; #X text 99 354 float; #X text 174 355 - input value; #X text 99 372 list; #X text 174 373 - list of floats; #X text 99 403 list; #X msg 93 96 1 2 3; #X msg 162 100 4 5 6; #X msg 233 101 1 2 3; #X msg 314 101 4; #X msg 93 72 1; #X msg 233 77 1; #X text 104 447 the default list for the right side inlet; #X obj 93 183 smlib/vvplus; #X obj 233 184 smlib/vvplus 0; #X obj 233 261 print vvplus2; #X obj 93 260 print vvplus1; #X text 11 23 adds two lists of floats or a float from a list of floats , f 71; #X obj 496 5 vvplus; #X text 174 403 - addition of the two lists; #X connect 19 0 26 0; #X connect 20 0 26 1; #X connect 21 0 27 0; #X connect 22 0 27 1; #X connect 23 0 26 0; #X connect 24 0 27 0; #X connect 26 0 29 0; #X connect 27 0 28 0; pd-smlib-0.13.0/objects.txt000066400000000000000000000037201434442070000154740ustar00rootroot00000000000000bp bandpass filter on float stream decimator reduces the number of floats in a stream deltas generates vector with differences between last input and past inputs hip highpass filter on float stream hist histograms itov index to value lavg leaky average lhist "leaky" histograms lhisti "leaky" histograms without clipping the input linspace generates a vector with linear spaced floats lmax leaky maximum lmin leaky minimum lrange leaky maximum minus leaky minimum lstd leaky standard deviation prevl generates vector with past input values (float) threshold trigger on upper and lower boundaries of float stream vabs absolute values of a list of floats vclip clips each element in a vector vcog vcog computes the center of gravity of a list of floats vdbtorms db to rms on a vector vdelta vdelta: difference between consecutive vectors vfmod vfmod computes the modulo of each element in a vector vftom frequency to midi on a vector vlavg vector leaky average vlmax vector leaky maximum vlmin vector leaky minimum vlrange leaky maximum minus leaky minimum for a float list vmax finds the maximum and its location in the list vmin finds the minimum and its location in the list vmtof midi to frequency on a vector vnmax maximum n values in a list of float and their locations (indices) vpow vpow computes y(i)=x(i)^a vrms vrms computes the root-mean-square of a vector vrmstodb rms to db on a vector vstd vstd computes the standard deviation of a vector vsum vsum computes the sum of a list of floats vthreshold trigger on upper and lower boundaries of float stream vvconv convolution of 2 vectors vvminus substracts two lists of floats or a float from a list of floats vvplus adds two lists of floats or a float from a list of floats pd-smlib-0.13.0/pd-lib-builder/000077500000000000000000000000001434442070000160735ustar00rootroot00000000000000pd-smlib-0.13.0/pd-lib-builder/Makefile.pdlibbuilder000066400000000000000000001266041434442070000222040ustar00rootroot00000000000000# Makefile.pdlibbuilder dated 2019-12-21 version = 0.6.0 # Helper makefile for Pure Data external libraries. # Written by Katja Vetter March-June 2015 for the public domain. No warranties. # Inspired by Hans Christoph Steiner's Makefile Template and Stephan Beal's # ShakeNMake. # # Grab the newest version of Makefile.pdlibbuilder from # https://github.com/pure-data/pd-lib-builder/ # # GNU make version >= 3.81 required. # # #=== characteristics =========================================================== # # # - defines build settings based on autodetected OS and architecture # - defines rules to build Pd class- or lib executables from C or C++ sources # - defines rules for libdir installation # - defines convenience targets for developer and user # - evaluates implicit dependencies for non-clean builds # # #=== basic usage =============================================================== # # # In your Makefile, define your Pd lib name and class files, and include # Makefile.pdlibbuilder at the end of the Makefile. Like so: # # ________________________________________________________________________ # # # Makefile for mylib # # lib.name = mylib # # class.sources = myclass1.c myclass2.c # # datafiles = myclass1-help.pd myclass2-help.pd README.txt LICENSE.txt # # include Makefile.pdlibbuilder # ________________________________________________________________________ # # # For files in class.sources it is assumed that class basename == source file # basename. The default target builds all classes as individual executables # with Pd's default extension for the platform. For anything more than the # most basic usage, continue reading. # # #=== list of Makefile.pdlibbuilder API variables =============================== # # # Variables available for definition in your library Makefile: # # - lib.name # - lib.setup.sources # - class.sources # - common.sources # - shared.sources # - .class.sources # - .class.ldflags # - .class.ldlibs # - cflags # - ldflags # - ldlibs # - datafiles # - datadirs # - makefiles # - makefiledirs # - externalsdir # # Optional multiline defines evaluated per operating system: # # - forLinux # - forDarwin # - forWindows # # Variables available for your makefile or make command line: # # - make-lib-executable # - suppress-wunused # # Path variables for make command line or environment: # # - PDDIR # - PDINCLUDEDIR # - PDBINDIR # - PDLIBDIR # # Standard make variables for make command line or environment: # # - CPPFLAGS # - CFLAGS # - LDFLAGS # - CC # - CXX # - INSTALL # - STRIP # - DESTDIR # # Optional user variables for make command line or environment: # # - PLATFORM # # Deprecated path variables: # # - pdincludepath # - pdbinpath # - objectsdir # # #=== descriptions of Makefile.pdlibbuilder API variables ======================= # # # lib.name: # Name of the library directory as it will be installed / distributed. Also the # name of the lib executable in the case where all classes are linked into # a single binary. # # lib.setup.sources: # Source file(s) (C or C++) which must be compiled only when linking all classes # into a single lib binary. # # class.sources: # All sources files (C or C++) for which the condition holds that # class name == source file basename. # # .class.sources: # Source file(s) (C or C++) specific to class . Use this for # multiple-source classes or when class name != source file basename. # # common.sources: # Source file(s) which must be statically linked to each class in the library. # # shared.sources: # Source file(s) (C or C++) to build a shared dynamic link lib, to be linked # with all class executables. # # cflags, ldflags, ldlibs: # Define cflags (preprocessor&compiler), ldflags (linker) and ldlibs (dynamic # link libs) for the whole library. These flags are added to platform-specific # flags defined by Makefile.pdlibbuilder. # # .class.ldflags and .class.ldlibs: # Define ldflags resp. ldlibs specific to class . These flags are # added to platform-specific flags defined by Makefile.pdlibbuilder, and flags # defined in your Makefile for the whole library. Note: cflags can not be # defined per class in the current implementation. # # datafiles and datadirs: # All extra files you want to include in binary distributions of the # library: abstractions and help patches, example patches, meta patch, readme # and license texts, manuals, sound files, etcetera. Use 'datafiles' for all # files that should go into your lib rootdir and 'datadirs' for complete # directories you want to copy from source to distribution. # # forLinux, forDarwin, forWindows: # Shorthand for 'variable definitions for Linux only' etc. Use like: # define forLinux # cflags += -DLINUX # class.sources += linuxthing.c # endef # # makefiles and makefiledirs: # Extra makefiles or directories with makefiles that should be made in sub-make # processes. # # make-lib-executable: # When this variable is defined 'yes' in your makefile or as command argument, # Makefile.pdlibbuilder will try to build all classes into a single library # executable (but it will force exit if lib.setup.sources is undefined). # If your makefile defines 'make-lib-executable=yes' as the library default, # this can still be overridden with 'make-lib-executable=no' as command argument # to build individual class executables (the Makefile.pdlibbuilder default.) # # suppress-wunused: # When this variable is defined ('yes' or any other value), -Wunused-variable, # -Wunused-parameter, -Wunused-value and -Wunused-function are suppressed, # but the other warnings from -Wall are retained. # # PDDIR: # Root directory of 'portable' pd package. When defined, PDINCLUDEDIR and # PDBINDIR will be evaluated as $(PDDIR)/src and $(PDDIR)/bin. # # PDINCLUDEDIR: # Directory where Pd API m_pd.h should be found, and other Pd header files. # Overrides the default search path. # # PDBINDIR: # Directory where pd.dll should be found for linking (Windows only). Overrides # the default search path. # # PDLIBDIR: # Root directory for installation of Pd library directories. Overrides the # default install location. # # DESTDIR: # Prepended path component for staged install. # # PLATFORM: # Target platform for cross compilation in the form of GNU triplet: # cpu-vendor-os. Example: x86_64-w64-mingw32. This specifies the tool chain that # pdlibbuilder will use, if installed and locatable. System and architecture # will then be autodefined accordingly. In most cases no other variables need to # be overridden. # # CPPFLAGS: # Preprocessor flags which are not strictly required for building. # # CFLAGS: # Compiler flags which are not strictly required for building. Compiler flags # defined by Makefile.pdlibbuilder for warning, optimization and architecture # specification are overriden by CFLAGS. # # LDFLAGS: # Linker flags which are not strictly required for building. Linker flags # defined by Makefile.pdlibbuilder for architecture specification are overriden # by LDFLAGS. # # CC and CXX: # C and C++ compiler programs as defined in your build environment. # # INSTALL # Definition of install program. # # STRIP # Name of strip program. Default 'strip' can be overridden in cross compilation # environments. # # objectsdir: # Root directory for installation of Pd library directories, like PDLIBDIR but # not overridable by environment. Supported for compatibility with pd-extended # central makefile, but deprecated otherwise. # # pdincludepath, pdbinpath: # As PDINCLUDEDIR and PDBINDIR but not overridable by environment. Deprecated # as user variables. # # #=== paths ===================================================================== # # # Source files in directories other than current working directory must be # prefixed with their relative path. Do not rely on VPATH or vpath. # Object (.o) files are built in the directory of their source files. # Executables are built in current working directory. # # Default search path for m_pd.h and other API header files is platform # dependent, and overridable by PDINCLUDEDIR: # # Linux: /usr/include/pd # # OSX: /Applications/Pd*.app/Contents/Resources/src # # Windows: %PROGRAMFILES%/Pd/src # %PROGRAMFILES(X86)%/Pd/src (32 bit builds on 64 bit Windows) # # Default search path for binary pd.dll (Windows), overridable by PDBINDIR # # %PROGRAMFILES%/Pd/bin # %PROGRAMFILES(X86)%/Pd/bin (32 bit builds on 64 bit Windows) # # Default location to install pd libraries is platform dependent, and # overridable by PDLIBDIR: # # Linux: /usr/local/lib/pd-externals # OSX: ~/Library/Pd # Windows: %APPDATA%/Pd # # https://puredata.info/docs/faq/how-do-i-install-externals-and-help-files # The rationale for not installing to ~/pd-externals by default on Linux # is that some people share the home dir between 32 and 64 bit installations. # # #=== targets =================================================================== # # # all: build $(executables) plus optional post target # post: target to build after $(executables) # alldebug: build all with -g option turned on for debug symbols # : force clean build of an individual class # .pre: make preprocessor output file in current working directory # .lst: make asm/source output file in current working directory # # install: install executables and data files # clean: remove build products from source tree # # help: print help text # vars: print makefile variables # allvars: print all variables # depend: print generated prerequisites # dumpmachine: print compiler output of option '-dumpmachine' # coffee: dummy target # # Variable $(executables) expands to class executables plus optional shared lib, # or alternatively to single lib executable when make-lib-executable=true. # Targets pre and post can be defined by library makefile. Make sure to include # Makefile.pdlibbuilder first so default target all will not be redefined. # # #=== Pd-extended libdir concept ================================================ # # # For libdir layout as conceived by Hans-Christoph Steiner, see: # # https://puredata.info/docs/developer/Libdir # # Files README.txt, LICENSE.txt and -meta.pd are part of the libdir # convention. Help patches for each class and abstraction are supposed to be # available. Makefile.pdlibbuilder does not force the presence of these files # however. It does not automatically include such files in libdir installations. # Data files you want to include in distributions must be defined explicitly in # your Makefile. # # #=== Makefile.pdlibbuilder syntax conventions ================================== # # # Makefile.pdlibbuilder variable names are lower case. Default make variables, # environment variables, and standard user variables (CC, CXX, CFLAGS, DESTDIR) # are upper case. Use target 'allvars' to print all variables and their values. # # 'Fields' in data variables are separated by dots, like in 'foo.class.sources'. # Words in variables expressing a function or command are separated by dashes, # like in 'make-lib-executable'. # # #=== useful make options ======================================================= # # # Use 'make -d ' to print debug details of the make process. # Use 'make -p ' to print make's database. # # #=== TODO ====================================================================== # # # - decide whether to use -static-libgcc or shared dll in MinGW # - cygwin support # - android support # - figure out how to handle '$' in filenames # - add makefile template targets dpkg-source dist libdir distclean tags? # # #=== end of documentation sections ============================================= # # ################################################################################ ################################################################################ ################################################################################ # GNU make version 3.81 (2006) or higher is required because of the following: # - function 'info' # - variable '.DEFAULT_GOAL' # force exit when make version is < 3.81 ifneq ($(firstword $(sort 3.81 $(MAKE_VERSION))), 3.81) $(error GNU make version 3.81 or higher is required) endif # Relative path to externals root dir in multi-lib source tree like # pd-extended SVN. Default is parent of current working directory. May be # defined differently in including makefile. externalsdir ?= .. # variable you can use to check if Makefile.pdlibbuilder is already included Makefile.pdlibbuilder = true ################################################################################ ### variables: library name and version ######################################## ################################################################################ # strip possibles spaces from lib.name, they mess up calculated file names lib.name := $(strip $(lib.name)) # if meta file exists, check library version metafile := $(wildcard $(lib.name)-meta.pd) ifdef metafile lib.version := $(shell sed -n \ 's|^\#X text [0-9][0-9]* [0-9][0-9]* VERSION \(.*\);|\1|p' \ $(metafile)) endif ################################################################################ ### variables: files ########################################################### ################################################################################ #=== sources =================================================================== # (re)define .class.sources using file names in class.sources define add-class-source $(notdir $(basename $v)).class.sources += $v endef $(foreach v, $(class.sources), $(eval $(add-class-source))) # derive class names from .class.sources variables sourcevariables := $(filter %.class.sources, $(.VARIABLES)) classes := $(basename $(basename $(sourcevariables))) # accumulate all source files specified in makefile classes.sources := $(sort $(foreach v, $(sourcevariables), $($v))) all.sources := $(classes.sources) $(lib.setup.sources) \ $(shared.sources) $(common.sources) #=== object files ============================================================== # construct object filenames from all C and C++ source file names classes.objects := $(addsuffix .o, $(basename $(classes.sources))) common.objects := $(addsuffix .o, $(basename $(common.sources))) shared.objects := $(addsuffix .o, $(basename $(shared.sources))) lib.setup.objects := $(addsuffix .o, $(basename $(lib.setup.sources))) all.objects = $(classes.objects) $(common.objects) $(shared.objects) \ $(lib.setup.objects) #=== executables =============================================================== # use recursive variables here because executable extension is not yet known # construct class executable names from class names classes.executables = $(addsuffix .$(extension), $(classes)) # construct shared lib executable name if shared sources are defined ifdef shared.sources shared.lib = lib$(lib.name).$(shared.extension) else shared.lib = endif ################################################################################ ### target platform detection ################################################## ################################################################################ #=== target platform =========================================================== # PLATFORM: optional user variable to define target platform for cross # compilation. Redefine build tools accordingly. PLATFORM should match # the exact target prefix of tools present in $PATH, like x86_64-w64-mingw32, # x86_64-apple-darwin12 etc. Tool definitions are exported to ensure submakes # will get the same. ifneq ($(PLATFORM),) ifneq ($(findstring darwin, $(PLATFORM)),) export CC = $(PLATFORM)-cc export CXX = $(PLATFORM)-c++ export CPP = $(PLATFORM)-cc else export CC = $(PLATFORM)-gcc export CXX = $(PLATFORM)-g++ export CPP = $(PLATFORM)-cpp endif STRIP = $(PLATFORM)-strip endif # Let (native or cross-) compiler report target triplet and isolate individual # words therein to facilitate later processing. target.triplet := $(subst -, ,$(shell $(CC) -dumpmachine)) #=== operating system ========================================================== # The following systems are defined: Linux, Darwin, Windows. GNU and # GNU/kFreeBSD are treated as Linux to get the same options. ifneq ($(filter linux gnu% kfreebsd, $(target.triplet)),) system = Linux endif ifneq ($(filter darwin%, $(target.triplet)),) system = Darwin endif ifneq ($(filter mingw% cygwin%, $(target.triplet)),) system = Windows endif # evaluate possible system-specific multiline defines from library makefile $(eval $(for$(system))) # TODO: Cygwin, Android #=== architecture ============================================================== # The following CPU names can be processed by pdlibbuilder: # i*86 Intel 32 bit # x86_64 Intel 64 bit # arm ARM 32 bit # aarch64 ARM 64 bit target.arch := $(firstword $(target.triplet)) ################################################################################ ### variables per platform ##################################################### ################################################################################ #=== flags per architecture ==================================================== # Set architecture-dependent cflags, mainly for Linux. For Mac and Windows, # arch.c.flags are overriden below. To see gcc's default architecture flags: # $ gcc -Q --help=target # ARMv6: Raspberry Pi 1st gen, not detectable from target.arch ifeq ($(shell uname), armv6l) arch.c.flags = -march=armv6 -mfpu=vfp -mfloat-abi=hard # ARMv7: Beagle, Udoo, RPi2 etc. else ifeq ($(target.arch), arm) arch.c.flags = -march=armv7-a -mfpu=vfpv3 -mfloat-abi=hard # ARMv8 64 bit, not tested yet else ifeq ($(target.arch), aarch64) arch.c.flags = -mcpu=cortex-a53 # Intel 32 bit, build with SSE and SSE2 instructions else ifneq ($(filter i%86, $(target.arch)),) arch.c.flags = -march=pentium4 -mfpmath=sse -msse -msse2 # Intel/AMD 64 bit, build with SSE, SSE2 and SSE3 instructions else ifeq ($(target.arch), x86_64) arch.c.flags = -march=core2 -mfpmath=sse -msse -msse2 -msse3 # if none of the above architectures detected else arch.c.flags = endif #=== flags and paths for Linux ================================================= ifeq ($(system), Linux) prefix = /usr/local libdir := $(prefix)/lib pkglibdir = $(libdir)/pd-externals pdincludepath := $(wildcard /usr/include/pd) extension = pd_linux cpp.flags := -DUNIX c.flags := -fPIC c.ldflags := -rdynamic -shared -fPIC -Wl,-rpath,"\$$ORIGIN",--enable-new-dtags c.ldlibs := -lc -lm cxx.flags := -fPIC -fcheck-new cxx.ldflags := -rdynamic -shared -fPIC -Wl,-rpath,"\$$ORIGIN",--enable-new-dtags cxx.ldlibs := -lc -lm -lstdc++ shared.extension = so shared.ldflags := -rdynamic -fPIC -shared -Wl,-soname,$(shared.lib) endif #=== flags and paths for Darwin ================================================ # LLVM-clang doesn't support -fcheck-new, therefore this flag is only used when # compiling with g++. ifeq ($(system), Darwin) pkglibdir = $(HOME)/Library/Pd pdincludepath := $(firstword $(wildcard \ /Applications/Pd*.app/Contents/Resources/src)) extension = pd_darwin cpp.flags := -DUNIX -DMACOSX -I /sw/include c.flags := c.ldflags := -undefined suppress -flat_namespace -bundle c.ldlibs := -lc cxx.ldflags := -undefined suppress -flat_namespace -bundle cxx.ldlibs := -lc shared.extension = dylib shared.ldflags = -dynamiclib -undefined dynamic_lookup \ -install_name @loader_path/$(shared.lib) \ -compatibility_version 1 -current_version 1.0 ifneq ($(filter %g++, $(CXX)),) cxx.flags := -fcheck-new endif ifeq ($(extension), d_fat) arch := i386 x86_64 else arch := $(target.arch) endif ifneq ($(filter -mmacosx-version-min=%, $(cflags)),) version.flag := $(filter -mmacosx-version-min=%, $(cflags)) else version.flag = -mmacosx-version-min=10.6 endif arch.c.flags := $(addprefix -arch , $(arch)) $(version.flag) arch.ld.flags := $(arch.c.flags) endif #=== flags and paths for Windows =============================================== # Standard paths on Windows contain spaces, and GNU make functions treat such # paths as lists, with unintended effects. Therefore we must use shell function # ls instead of make's wildcard when probing for a path, and use double quotes # when specifying a path in a command argument. # Default paths in Mingw / Mingw-w64 environments. 'PROGRAMFILES' is standard # location for builds with native architecture, 'ProgramFiles(x86)' for i686 # builds on x86_64 Windows (detection method by Lucas Cordiviola). Curly braces # required because of parentheses in variable name. ifeq ($(system), Windows) pkglibdir := $(APPDATA)/Pd ifeq ($(target.arch), i686) programfiles := ${ProgramFiles(x86)} else programfiles := $(PROGRAMFILES) endif pdbinpath := $(programfiles)/Pd/bin pdincludepath := $(programfiles)/Pd/src endif # Store default path to pd.dll in PDBINDIR if the latter is not user-defined. # For include path this is done in the platform-independent paths section below, # but for PDBINDIR it is done here so ld flags can be evaluated as immediate # variables. ifeq ($(system), Windows) ifdef PDDIR PDBINDIR := $(PDDIR)/bin endif PDBINDIR ?= $(pdbinpath) endif # TODO: decide whether -mms-bitfields should be specified. ifeq ($(system), Windows) cpp.flags := -DMSW -DNT ifeq ($(target.arch), i686) arch.c.flags := -march=pentium4 -msse -msse2 -mfpmath=sse else ifeq ($(target.arch), x86_64) cpp.flags := -DMSW -DNT -DPD_LONGINTTYPE=__int64 arch.c.flags := -march=core2 -msse -msse2 -msse3 -mfpmath=sse else arch.c.flags = endif extension = dll c.flags := c.ldflags := -static-libgcc -shared \ -Wl,--enable-auto-import "$(PDBINDIR)/pd.dll" c.ldlibs := cxx.flags := -fcheck-new cxx.ldflags := -static-libgcc -static-libstdc++ -shared \ -Wl,--enable-auto-import "$(PDBINDIR)/pd.dll" cxx.ldlibs := shared.extension = dll shared.ldflags := -static-libgcc -shared "$(PDBINDIR)/pd.dll" stripflags = --strip-all endif #=== paths ===================================================================== # Platform-dependent default paths are specified above, but overridable. # Path variables in upper case can be defined as make command argument or in the # environment. Variable 'objectsdir' is supported for compatibility with # the build system that pd-l2ork has inherited from pd-extended. PDINCLUDEDIR ?= $(pdincludepath) PDLIBDIR ?= $(firstword $(objectsdir) $(pkglibdir)) ifdef PDDIR PDINCLUDEDIR := $(wildcard $(PDDIR)/src) endif # base path where all components of the lib will be installed by default installpath := $(DESTDIR)$(PDLIBDIR)/$(lib.name) # check if include path contains spaces (as is often the case on Windows) # if so, store the path so we can later do checks with it pdincludepathwithspaces := $(if $(word 2, $(PDINCLUDEDIR)), $(PDINCLUDEDIR)) #=== accumulated build flags =================================================== # From GNU make docs: 'Users expect to be able to specify CFLAGS freely # themselves.' So we use CFLAGS to define options which are not strictly # required for compilation: optimizations, architecture specifications, and # warnings. CFLAGS can be safely overriden using a make command argument. # Variables cflags, ldflags and ldlibs may be defined in including makefile. optimization.flags = -O3 -ffast-math -funroll-loops -fomit-frame-pointer warn.flags = -Wall -Wextra -Wshadow -Winline -Wstrict-aliasing # suppress -Wunused-variable & Co if you don't want to clutter a build log ifdef suppress-wunused warn.flags += $(addprefix -Wno-unused-, function parameter value variable) endif CFLAGS = $(warn.flags) $(optimization.flags) $(arch.c.flags) # preprocessor flags cpp.flags := -DPD -I "$(PDINCLUDEDIR)" $(cpp.flags) $(CPPFLAGS) # flags for dependency checking (cflags from makefile may define -I options) depcheck.flags := $(cpp.flags) $(cflags) # architecture specifications for linker are overridable by LDFLAGS LDFLAGS := $(arch.ld.flags) # now add the same ld flags to shared dynamic lib shared.ldflags := $(shared.ldflags) $(LDFLAGS) # accumulated flags for C compiler / linker c.flags := $(cpp.flags) $(c.flags) $(cflags) $(CFLAGS) c.ldflags := $(c.ldflags) $(ldflags) $(LDFLAGS) c.ldlibs := $(c.ldlibs) $(ldlibs) # accumulated flags for C++ compiler / linker cxx.flags := $(cpp.flags) $(cxx.flags) $(cflags) $(CFLAGS) cxx.ldflags := $(cxx.ldflags) $(ldflags) $(LDFLAGS) cxx.ldlibs := $(cxx.ldlibs) $(ldlibs) ################################################################################ ### variables: tools ########################################################### ################################################################################ # aliases so we can later define 'compile-$1' and set 'c' or 'cxx' as argument compile-c := $(CC) compile-cxx := $(CXX) ################################################################################ ### checks ##################################################################### ################################################################################ # At this point most variables are defined. Now do some checks and info's # before rules begin. # print Makefile.pdlibbuilder version before possible termination $(info ++++ info: using Makefile.pdlibbuilder version $(version)) # Terminate if target triplet remained empty, to avoid all sorts of confusing # scenarios and spurious bugs. ifeq ($(target.triplet),) $(error Command "$(CC) -dumpmachine" did not return a target triplet, \ needed for a build. \ Is compiler "$(CC)" installed in your PATH? ($(PATH)). \ Does compiler "$(CC)" support option "-dumpmachine"?) endif # 'forward declaration' of default target, needed to do checks all: # To avoid unpredictable results, make sure the default target is not redefined # by including makefile. ifneq ($(.DEFAULT_GOAL), all) $(error Default target must be 'all'.) endif # find out which target(s) will be made ifdef MAKECMDGOALS goals := $(MAKECMDGOALS) else goals := all endif # store path to Pd API m_pd.h if it is found ifdef PDINCLUDEDIR mpdh := $(shell ls "$(PDINCLUDEDIR)/m_pd.h") endif # store path to pd.dll; if not found, ls will give a useful error ifeq ($(system), Windows) pddll := $(shell ls "$(PDBINDIR)/pd.dll") endif # when making target all, check if m_pd.h is found and print info about it ifeq ($(goals), all) $(if $(mpdh), \ $(info ++++ info: using Pd API $(mpdh)), \ $(warning Where is Pd API m_pd.h? Do 'make help' for info.)) endif # print target info $(info ++++ info: making target $(goals) $(if $(lib.name),in lib $(lib.name))) # when installing, print installpath info $(if $(filter install install-lib, $(goals)), $(info ++++ info: \ installpath is '$(installpath)')) #=== define executables ======================================================== # By default we build class executables, and optionally a shared dynamic link # lib. When make-lib-executable=yes we build all classes into a single lib # executable, on the condition that variable lib.setup.sources is defined. ifeq ($(make-lib-executable),yes) $(if $(lib.setup.sources), ,\ $(error Can not build library blob because lib.setup.sources is undefined)) executables := $(lib.name).$(extension) else executables := $(classes.executables) $(shared.lib) endif ################################################################################ ### rules: special targets ##################################################### ################################################################################ # Disable built-in rules. If some target can't be built with the specified # rules, it should not be built at all. MAKEFLAGS += --no-builtin-rules .PRECIOUS: .SUFFIXES: .PHONY: all post build-lib \ $(classes) $(makefiledirs) $(makefiles) \ install install-executables install-datafiles install-datadirs \ force clean vars allvars depend help ################################################################################ ### rules: build targets ####################################################### ################################################################################ # Target all forces the build of targets [$(executables) post] in # deterministic order. Target $(executables) builds class executables plus # optional shared lib or alternatively a single lib executable when # make-lib-executable=true. Target post is optionally defined by # library makefile. all: post post: $(executables) all: $(info ++++info: target all in lib $(lib.name) completed) # build all with -g option turned on for debug symbols alldebug: c.flags += -g alldebug: cxx.flags += -g alldebug: all #=== class executable ========================================================== # recipe for linking objects in class executable # argument $1 = compiler type (c or cxx) # argument $2 = class basename define link-class $(compile-$1) \ $($1.ldflags) $($2.class.ldflags) \ -o $2.$(extension) \ $(addsuffix .o, $(basename $($2.class.sources))) \ $(addsuffix .o, $(basename $(common.sources))) \ $($1.ldlibs) $($2.class.ldlibs) $(shared.lib) endef # general rule for linking object files in class executable %.$(extension): $(shared.lib) $(info ++++ info: linking objects in $@ for lib $(lib.name)) $(if $(filter %.cc %.cpp, $($*.class.sources)), \ $(call link-class,cxx,$*), \ $(call link-class,c,$*)) #=== library blob ============================================================== # build all classes into single executable build-lib: $(lib.name).$(extension) $(info ++++ info: library blob $(lib.name).$(extension) completed) # recipe for linking objects in lib executable # argument $1 = compiler type (c or cxx) define link-lib $(compile-$1) \ $($1.ldflags) $(lib.ldflags) \ -o $(lib.name).$(extension) $(all.objects) \ $($1.ldlibs) $(lib.ldlibs) endef # rule for linking objects in lib executable # declared conditionally to avoid name clashes ifeq ($(make-lib-executable),yes) $(lib.name).$(extension): $(all.objects) $(if $(filter %.cc %.cpp, $(all.sources)), \ $(call link-lib,cxx), \ $(call link-lib,c)) endif #=== shared dynamic lib ======================================================== # recipe for linking objects in shared executable # argument $1 = compiler type (c or cxx) define link-shared $(compile-$1) \ $(shared.ldflags) \ -o lib$(lib.name).$(shared.extension) $(shared.objects) \ $($1.ldlibs) $(shared.ldlibs) endef # rule for linking objects in shared executable # build recipe is in macro 'link-shared' lib$(lib.name).$(shared.extension): $(shared.objects) $(info ++++ info: linking objects in shared lib $@) $(if $(filter %.cc %.cpp, $(shared.sources)), \ $(call link-shared,cxx), \ $(call link-shared,c)) #=== object files ============================================================== # recipe to make .o file from source # argument $1 is compiler type (c or cxx) define make-object-file $(info ++++ info: making $@ in lib $(lib.name)) $(compile-$1) \ $($1.flags) \ -o $@ -c $< endef # Three rules to create .o files. These are double colon 'terminal' rules, # meaning they are the last in a rules chain. %.o:: %.c $(call make-object-file,c) %.o:: %.cc $(call make-object-file,cxx) %.o:: %.cpp $(call make-object-file,cxx) #=== explicit prerequisites for class executables ============================== # For class executables, prerequisite rules are declared in run time. Target # 'depend' prints these rules for debugging purposes. # declare explicit prerequisites rule like 'class: class.extension' # argument $v is class basename define declare-class-target $v: $v.$(extension) endef # declare explicit prerequisites rule like 'class.extension: object1.o object2.o' # argument $v is class basename define declare-class-executable-target $v.$(extension): $(addsuffix .o, $(basename $($v.class.sources))) \ $(addsuffix .o, $(basename $(common.sources))) endef # evaluate explicit prerequisite rules for all classes $(foreach v, $(classes), $(eval $(declare-class-target))) $(foreach v, $(classes), $(eval $(declare-class-executable-target))) #=== implicit prerequisites for class executables ============================== # Evaluating implicit prerequisites (header files) with help from the # preprocessor is 'expensive' so this is done conditionally and selectively. # Note that it is also possible to trigger a build via install targets, in # which case implicit prerequisites are not checked. # When the Pd include path contains spaces it will mess up the implicit # prerequisites rules. disable-dependency-tracking := $(strip $(pdincludepathwithspaces)) ifndef disable-dependency-tracking must-build-everything := $(filter all, $(goals)) must-build-class := $(filter $(classes), $(goals)) must-build-sources := $(foreach v, $(must-build-class), $($v.class.sources)) endif # declare implicit prerequisites rule like 'object.o: header1.h header2.h ...' # argument $1 is input source file(s) # dir is explicitly added because option -MM strips it by default define declare-object-target $(dir $1)$(filter %.o: %.h, $(shell $(CPP) $(depcheck.flags) -MM $1)) $(MAKEFILE_LIST) endef # evaluate implicit prerequisite rules when rebuilding everything ifdef must-build-everything $(if $(wildcard $(all.objects)), \ $(info ++++ info: evaluating implicit prerequisites in lib $(lib.name).....) \ $(foreach v, $(all.sources), $(eval $(call declare-object-target, $v)))) endif # evaluate implicit prerequisite rules when selectively building classes ifdef must-build-class $(foreach v, $(must-build-sources), \ $(eval $(call declare-object-target, $v))) $(foreach v, $(shared.sources), \ $(eval $(call declare-object-target, $v))) endif ################################################################################ ### rules: preprocessor and assembly files ##################################### ################################################################################ # Preprocessor and assembly output files for bug tracing etc. They are not part # of the build processes for executables. By default these files are created in # the current working directory. Dependency tracking is not performed, the build # is forced instead to make sure it's up to date. force: #=== preprocessor file ========================================================= # make preprocessor output file with extension .pre # argument $1 = compiler type (c or cxx) define make-preprocessor-file $(info ++++ info: making preprocessor output file $(notdir $*.pre) \ in current working directory) $(compile-$1) -E $< $(c.flags) $($1.flags) -o $(notdir $*.pre) endef %.pre:: %.c force $(call make-preprocessor-file,c) %.pre:: %.cc force $(call make-preprocessor-file,cxx) %.pre:: %.cpp force $(call make-preprocessor-file,cxx) #=== assembly file ============================================================= # make C / assembly interleaved output file with extension .lst # argument $1 = compiler type (c or cxx) define make-assembly-file $(info ++++ info: making assembly output file $(notdir $*.lst) \ in current working directory) $(compile-$1) \ -c -Wa,-a,-ad -fverbose-asm \ $($1.flags) \ $< > $(notdir $*.lst) endef %.lst:: %.c force $(call make-assembly-file,c) %.lst:: %.cc force $(call make-assembly-file,cxx) %.lst:: %.cpp force $(call make-assembly-file,cxx) ################################################################################ ### rules: installation targets ################################################ ################################################################################ #=== strip ===================================================================== # Stripping of installed binaries will only be done when variable 'stripflags' # is defined non-empty. No default definition is provided except for Windows # where the unstripped binaries are large, especially in the case of Mingw-w64. # Note: while stripping all symbols ('-s' or '--strip-all') is possible for # Linux and Windows, in the case of OSX only non-global symbols can be stripped # (option '-x' or '--discard-all'). # Make definition of strip command overridable so it can be defined in an # environment for cross-compilation. STRIP ?= strip # Commands in 'strip-executables' will be executed conditionally in the rule for # target 'install-executables'. strip-executables = cd "$(installpath)" && \ $(foreach v, $(executables), $(STRIP) $(stripflags) '$v';) #=== install =================================================================== # Install targets depend on successful exit status of target all because nothing # must be installed in case of a build error. # -p = preserve time stamps # -m = set permission mode (as in chmod) # -d = create all components of specified directories INSTALL = install INSTALL_PROGRAM := $(INSTALL) -p -m 644 INSTALL_DATA := $(INSTALL) -p -m 644 INSTALL_DIR := $(INSTALL) -m 755 -d # strip spaces from file names executables := $(strip $(executables)) datafiles := $(strip $(datafiles)) datadirs := $(strip $(datadirs)) # Do not make any install sub-target with empty variable definition because the # install program would exit with an error. install: $(if $(executables), install-executables) install: $(if $(datafiles), install-datafiles) install: $(if $(datadirs), install-datadirs) install-executables: all $(INSTALL_DIR) -v "$(installpath)" $(foreach v, $(executables), \ $(INSTALL_PROGRAM) '$v' "$(installpath)";) $(info ++++ info: executables of lib $(lib.name) installed \ from $(CURDIR) to $(installpath)) $(if $(stripflags), $(strip-executables),) install-datafiles: all $(INSTALL_DIR) -v "$(installpath)" $(foreach v, $(datafiles), \ $(INSTALL_DATA) '$(v)' "$(installpath)";) $(info ++++ info: data files of lib $(lib.name) installed \ from $(CURDIR) to $(installpath)) install-datadirs: all $(foreach v, $(datadirs), $(INSTALL_DIR) "$(installpath)/$v";) $(foreach v, $(datadirs), \ $(INSTALL_DATA) $(wildcard $v/*) "$(installpath)/$v";) $(info ++++ info: data directories of lib $(lib.name) installed \ from $(CURDIR) to $(installpath)) ################################################################################ ### rules: distribution targets ################################################ ################################################################################ # TODO # These targets are implemented in Makefile Template, but I have to figure out # how to do it under the not-so-strict conditions of Makefile.pdlibbuilder. # make source package dist: @echo "target dist not yet implemented" # make Debian source package dpkg-source: @echo "target dpkg-source not yet implemented" $(ORIGDIR): $(DISTDIR): ################################################################################ ### rules: clean targets ####################################################### ################################################################################ # delete build products from build tree clean: rm -f $(all.objects) rm -f $(classes.executables) $(lib.name).$(extension) $(shared.lib) rm -f *.pre *.lst # remove distribution directories and tarballs from build tree distclean: clean @echo "target distclean not yet implemented" ################################################################################ ### rules: submake targets ##################################################### ################################################################################ # Iterate over sub-makefiles or makefiles in other directories. # When 'continue-make=yes' is set, sub-makes will report 'true' to the parent # process regardless of their real exit status. This prevents the parent make # from being aborted by a sub-make error. Useful when you want to quickly find # out which sub-makes from a large set will succeed. ifeq ($(continue-make),yes) continue = || true endif # These targets will trigger sub-make processes for entries in 'makefiledirs' # and 'makefiles'. all alldebug install clean distclean dist dkpg-source: \ $(makefiledirs) $(makefiles) # this expands to identical rules for each entry in 'makefiledirs' $(makefiledirs): $(MAKE) --directory=$@ $(MAKECMDGOALS) $(continue) # this expands to identical rules for each entry in 'makefiles' $(makefiles): $(MAKE) --directory=$(dir $@) --makefile=$(notdir $@) $(MAKECMDGOALS) $(continue) ################################################################################ ### rules: convenience targets ################################################# ################################################################################ #=== show variables ============================================================ # Several 'function' macro's cause errors when expanded within a rule or without # proper arguments. Variables which are set with the define directive are only # shown by name for that reason. functions = \ add-class-source \ declare-class-target \ declare-class-executable-target \ declare-object-target \ link-class \ link-lib \ link-shared \ make-object-file \ make-preprocessor-file \ make-assembly-file # show variables from makefiles vars: $(info ++++ info: showing makefile variables:) $(foreach v,\ $(sort $(filter-out $(functions) functions, $(.VARIABLES))),\ $(if $(filter file, $(origin $v)),\ $(info variable $v = $($v)))) $(foreach v, $(functions), $(info 'function' name: $v)) @echo # show all variables allvars: $(info ++++ info: showing default, automatic and makefile variables:) $(foreach v, \ $(sort $(filter-out $(functions) functions, $(.VARIABLES))), \ $(info variable ($(origin $v)) $v = $($v))) $(foreach v, $(functions), $(info 'function' name: $v)) @echo #=== show dependencies ========================================================= # show generated prerequisites rules depend: $(info ++++ info: generated prerequisite rules) $(foreach v, $(classes), $(info $(declare-class-target))) $(foreach v, $(classes), $(info $(declare-class-executable-target))) $(foreach v, $(all.sources), $(info $(call declare-object-target, $v))) @echo #=== show help text ============================================================ # brief info about targets and paths ifdef mpdh mpdhinfo := $(mpdh) else mpdhinfo := m_pd.h was not found. Is Pd installed? endif help: @echo @echo " Main targets:" @echo " all: build executables (default target)" @echo " install: install all components of the library" @echo " vars: print makefile variables for troubleshooting" @echo " allvars: print all variables for troubleshooting" @echo " help: print this help text" @echo @echo " Pd API m_pd.h:" @echo " $(mpdhinfo)" @echo " You may specify your preferred Pd include directory as argument" @echo " to the make command, like 'PDINCLUDEDIR=path/to/pd/src'." @echo @echo " Path for installation of your libdir(s):" @echo " $(PDLIBDIR)" @echo " Alternatively you may specify your path for installation as argument" @echo " to the make command, like 'PDLIBDIR=path/to/pd-externals'." @echo @echo " Default paths are listed in the doc sections in Makefile.pdlibbuilder." @echo #=== platform test ============================================================= # This target can be used to test if the compiler for specified PLATFORM is # correctly defined and available. dumpmachine: @$(CC) -dumpmachine #=== dummy target ============================================================== coffee: @echo "Makefile.pdlibbuilder: Can not make coffee. Sorry." ################################################################################ ### end of rules sections ###################################################### ################################################################################ # for syntax highlighting in vim and github # vim: set filetype=make: pd-smlib-0.13.0/smlib-meta.pd000066400000000000000000000007751434442070000156700ustar00rootroot00000000000000#N canvas 420 63 200 200 10; #N canvas 26 71 420 300 META 0; #X text 10 10 META this is a prototype of a libdir meta file; #X text 10 30 NAME smlib; #X text 10 50 AUTHOR Johannes Taelman ; #X text 10 70 MAINTAINER Fred Jan Kraan ; #X text 10 90 LICENSE GNU GPL; #X text 10 110 DESCRIPTION vector processing \, vector analysis \, vector synthesis \, number stream analysis \, number stream filters; #X text 10 130 VERSION 0.13.0; #X restore 10 10 pd META; pd-smlib-0.13.0/source/000077500000000000000000000000001434442070000146005ustar00rootroot00000000000000pd-smlib-0.13.0/source/SMLib.c000066400000000000000000000215161434442070000157170ustar00rootroot00000000000000/* --------------------- SMLib ----------------------------- */ /* Signal processing for Mapping objects: float stream - pid controller? - deltas (generate difference vector between current values and values of the past) vector - vquant (quantizer with hysteresis) - vv/ - vv> - vv< - s2v (stream to vector, incl ola) - v2s (vector to stream, incl ola) vector math - vreverse - delread - delwrite - upsample - fir - autorescale */ #include "defines.h" // in alphabetical order extern void bp_setup(); extern void decimator_setup(); extern void deltas_setup(); extern void hip_setup(); extern void hist_setup(); extern void itov_setup(); extern void lavg_setup(); extern void lhist_setup(); extern void lhisti_setup(); extern void linspace_setup(); extern void lmax_setup(); extern void lmin_setup(); extern void lrange_setup(); extern void lstd_setup(); extern void prevl_setup(); extern void threshold_setup(); extern void vabs_setup(); extern void vclip_setup(); extern void vcog_setup(); extern void vdbtorms_setup(); extern void vdelta_setup(); extern void vfmod_setup(); extern void vftom_setup(); extern void vlavg_setup(); extern void vlmax_setup(); extern void vlmin_setup(); extern void vlrange_setup(); extern void vmax_setup(); extern void vmin_setup(); extern void vmtof_setup(); extern void vpow_setup(); extern void vrms_setup(); extern void vrmstodb_setup(); extern void vstd_setup(); extern void vsum_setup(); extern void vthreshold_setup(); extern void vvconv_setup(); extern void vvminus_setup(); extern void vvplus_setup(); static t_class *SMLib_class; typedef struct _lstd { t_object x_obj; } t_SMLib; static void SMLib_help(t_SMLib *x) { /* */ post(""); post(""); post(" .........................................................."); post(" . SMLib ."); post(" . Signal processing for Mapping ."); post(" . v0.12 24/11/2002 ."); post(" .........................................................."); post(" . processing stream of floats (context) (float output) ."); post(" . ."); post(" . lavg leaky average ."); post(" . lmax leaky maximum ."); post(" . lmin leaky minimum ."); post(" . lrange leaky range ."); post(" u lstd leaky standard deviation ."); post(" u decimator passes 1 in n input values ."); post(" . threshold detection with hysteresis ."); post(" . hip first order high-pass filter ."); post(" . bp second order (resonant) high-pass filter ."); post(" .........................................................."); post(" . analyzing stream of floats (vector output) ."); post(" . ."); post(" . hist histogram ."); post(" . lhist leaky histogram, clips samples ."); post(" . lhisti leaky histogram, ignore samples ."); post(" . outside bins ."); post(" . itov bin index to value (for the histograms ."); post(" . prevl previous floats in a list ."); post(" . deltas difference between last float and ."); post(" . previous floats ."); // post(" o filterbank lineairly spaced set of bandpass filters ."); post(" .........................................................."); post(" . immediate vector analysis (float output) ."); post(" . ."); post(" . vsum sum of vector elements ."); post(" . vcog center of gravity ."); post(" . vmax maximum and its location ."); post(" . vmin minimum and its location ."); post(" . vrms root mean square ."); post(" . vstd standard deviation ."); post(" .........................................................."); post(" . vector processors (vector output) ."); post(" . ."); post(" . vv+ vector addition ."); post(" . vv- vector substraction ."); post(" . vvconv vector convolution ."); post(" . vclip clip elements ."); post(" . vfmod floating point modulo ."); post(" . vpow power ."); post(" . vthreshold detections with hysteresises ."); post(" . ."); post(" . unit conversions on vectors ."); post(" . ."); post(" . vftom frequency to midi ."); post(" . vmtof midi to frequency ."); post(" . vdbtorms dB to rms ."); post(" . vrmstodb rms to dB ."); post(" .........................................................."); post(" . vector synthesis (vector output) ."); post(" . ."); post(" . linspace linearly spaced vector ."); // post(" o logspace logarithmically spaced vector ."); // post(" o rand uniformly distributed random vector ."); // post(" o randn normally distributed random vector ."); post(" .........................................................."); post(" . vector stream processing (vector output) (context) ."); post(" . ."); post(" . vlavg leaky averages ."); post(" . vlmax leaky maxima ."); post(" . vlmin leaky minima ."); post(" . vlrange leaky ranges ."); post(" . vdelta difference between successive vectors ."); post(" .........................................................."); // post(" . o = future additions ."); // post(" . e = experimental ."); post(" . u = undocumented ."); post(" . j#|@ = johannes.taelman@rug.ac.be ."); post(" .........................................................."); post(""); post(""); } static void *SMLib_new() { t_SMLib *x=(t_SMLib *)pd_new(SMLib_class); return (void *)x; } #ifdef WIN32 __declspec(dllexport) void __cdecl SMLib_setup( void) #else void SMLib_setup( void) #endif { // dummy object for help-system SMLib_class = class_new(gensym("SMLib"), (t_newmethod)SMLib_new, 0, sizeof(t_SMLib), CLASS_DEFAULT, 0); class_addbang(SMLib_class, (t_method)SMLib_help); class_addmethod(SMLib_class, (t_method)SMLib_help, gensym("help"),0); // real objects in alphabetical order bp_setup(); decimator_setup(); deltas_setup(); hip_setup(); hist_setup(); itov_setup(); lavg_setup(); lhist_setup(); lhisti_setup(); linspace_setup(); lmax_setup(); lmin_setup(); lrange_setup(); lstd_setup(); prevl_setup(); threshold_setup(); vabs_setup(); vclip_setup(); vcog_setup(); vdbtorms_setup(); vdelta_setup(); vfmod_setup(); vftom_setup(); vlavg_setup(); vlmax_setup(); vlmin_setup(); vlrange_setup(); vmax_setup(); vmin_setup(); vmtof_setup(); vpow_setup(); vrms_setup(); vrmstodb_setup(); vstd_setup(); vsum_setup(); vthreshold_setup(); vvconv_setup(); vvminus_setup(); vvplus_setup(); post(""); post(" .........................................................."); post(" . SMLib ."); post(" . Signal processing for Mapping ."); post(" . v0.12 24/11/2002 ."); post(" .........................................................."); post(""); } pd-smlib-0.13.0/source/bp.c000066400000000000000000000057411434442070000153540ustar00rootroot00000000000000#include "defines.h" /*--------------- bp ---------------*/ typedef struct bpctl { t_float c_x1; t_float c_x2; t_float c_coef1; t_float c_coef2; t_float c_gain; } t_bpctl; typedef struct bp { t_object x_obj; t_float x_freq; t_float x_q; t_bpctl x_cspace; t_bpctl *x_ctl; t_float x_f; } t_bp; t_class *bp_class; static void bp_docoef(t_bp *x, t_floatarg f, t_floatarg q); static void *bp_new(t_floatarg f, t_floatarg q) { t_bp *x = (t_bp *)pd_new(bp_class); inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("float"), gensym("ft1")); inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("float"), gensym("ft2")); outlet_new(&x->x_obj, gensym("float")); x->x_ctl = &x->x_cspace; x->x_cspace.c_x1 = 0; x->x_cspace.c_x2 = 0; bp_docoef(x, f, q); x->x_f = 0; return (x); } static t_float bp_qcos(t_float f) { if (f >= -(0.5*3.141592653589793) && f <= 0.5*3.141592653589793) { t_float g = f*f; return (((g*g*g * (-1.0/720.0) + g*g*(1.0/24.0)) - g*0.5) + 1); } else return (0); } static void bp_docoef(t_bp *x, t_floatarg f, t_floatarg q) { t_float r, oneminusr, omega; if (f < 0.0001) f = 0.0001; if (q < 0) q = 0; x->x_freq = f; x->x_q = q; omega = f * (2.0 * 3.141592653589793); if (q < 0.001) oneminusr = 1.0; else oneminusr = omega/q; if (oneminusr > 1.0) oneminusr = 1.0; r = 1.0 - oneminusr; x->x_ctl->c_coef1 = 2.0 * bp_qcos(omega) * r; x->x_ctl->c_coef2 = - r * r; x->x_ctl->c_gain = 2 * oneminusr * (oneminusr + r * omega); /* post("r %f, omega %f, coef1 %f, coef2 %f", r, omega, x->x_ctl->c_coef1, x->x_ctl->c_coef2); */ } static void bp_ft1(t_bp *x, t_floatarg f) { bp_docoef(x, f, x->x_q); } static void bp_ft2(t_bp *x, t_floatarg q) { bp_docoef(x, x->x_freq, q); } static void bp_clear(t_bp *x, t_floatarg q) { x->x_ctl->c_x1 = x->x_ctl->c_x2 = 0; } static void bp_perform(t_bp *x, t_float in) { t_float out; t_bpctl *c = x->x_ctl; t_float last = c->c_x1; t_float prev = c->c_x2; t_float coef1 = c->c_coef1; t_float coef2 = c->c_coef2; t_float gain = c->c_gain; t_float output = in + coef1 * last + coef2 * prev; out = gain * output; prev = last; last = output; /* NAN protect */ if (!((last <= 0) || (last >= 0))) last = 0; if (!((prev <= 0) || (prev >= 0))) prev = 0; c->c_x1 = last; c->c_x2 = prev; outlet_float(x->x_obj.ob_outlet, out); } void bp_setup(void) { bp_class = class_new(gensym("bp"), (t_newmethod)bp_new, 0, sizeof(t_bp), 0, A_DEFFLOAT, A_DEFFLOAT, 0); class_addfloat(bp_class, (t_method)bp_perform); class_addmethod(bp_class, (t_method)bp_ft1, gensym("ft1"), A_FLOAT, 0); class_addmethod(bp_class, (t_method)bp_ft2, gensym("ft2"), A_FLOAT, 0); class_addmethod(bp_class, (t_method)bp_clear, gensym("clear"), 0); } pd-smlib-0.13.0/source/decimator.c000066400000000000000000000024731434442070000167210ustar00rootroot00000000000000#include "defines.h" /*--------------- decimator ---------------*/ static t_class *decimator_class; typedef struct _decimator { t_object x_obj; int m_state; int m_factor; } t_decimator; static void decimator_perform(t_decimator *x, t_float in) { if (!x->m_state) { outlet_float(x->x_obj.ob_outlet, in); x->m_state=x->m_factor; } else { x->m_state--; } } static void decimator_setFactor(t_decimator *x, t_float factor) { if (factor < 1) return; x->m_factor=(int)factor - 1; } static void decimator_clear(t_decimator *x) { x->m_state=0; } static void *decimator_new(t_float factor) { t_decimator *x=(t_decimator *)pd_new(decimator_class); outlet_new(&x->x_obj, gensym("float")); if (factor<1) factor=2; decimator_setFactor(x, factor); decimator_clear(x); return (void *)x; } void decimator_setup(void) { decimator_class = class_new(gensym("decimator"), (t_newmethod)decimator_new, 0, sizeof(t_decimator), CLASS_DEFAULT, A_DEFFLOAT, 0); class_addfloat(decimator_class, (t_method)decimator_perform); class_addmethod(decimator_class, (t_method)decimator_clear, gensym("clear"), A_GIMME, NULL); class_addmethod(decimator_class, (t_method)decimator_setFactor, gensym("factor"), A_DEFFLOAT, NULL); } pd-smlib-0.13.0/source/defines.h000066400000000000000000000006211434442070000163650ustar00rootroot00000000000000#include #include #ifndef MAXFLOAT #define MAXFLOAT 1e18; #endif #define LOGTEN 2.302585092994 #ifndef PD_FLOAT_PRECISION #define PD_FLOAT_PRECISION 32 #endif #if PD_FLOAT_PRECISION == 64 #define sinf sin #define cosf cos #define atanf atan #define atan2f atan2 #define sqrtf sqrt #define logf log #define expf exp #define fabsf fabs #define powf pow #endif pd-smlib-0.13.0/source/deltas.c000066400000000000000000000076361434442070000162340ustar00rootroot00000000000000#include "defines.h" /*--------------- deltas ---------------*/ static t_class *deltas_class; typedef struct _deltas { t_object x_obj; t_float m_lo; t_float m_hi; int m_buffer_size; int m_buffer_index; t_float *m_buffer; // circular buffer } t_deltas; static void deltas_set(t_deltas *x, t_float lo, t_float hi, t_float size); static void deltas_perform_float(t_deltas *x, t_float f) { int index; index=x->m_buffer_index+1; index=(index==x->m_buffer_size)?0:index; x->m_buffer_index=index; x->m_buffer[index]=f; } static void deltas_bang(t_deltas *x) { int lo,hi,n,index,size; t_atom *ap,*app; t_float last; t_float *buffer, *bp; deltas_set(x, x->m_lo, x->m_hi, x->m_buffer_size); lo=(int)x->m_lo; hi=(int)x->m_hi; n=hi-lo; size=x->m_buffer_size; index=x->m_buffer_index; ap = (t_atom *)getbytes(sizeof(t_atom)*n); app=ap; buffer=x->m_buffer; last=buffer[index]; bp=buffer+index-lo; bp=(bp>=buffer)?bp:bp+size; // wrap if (bp-buffer>=n) { // no wrap-around needed index=n; while(index--){ SETFLOAT(app, last-*bp--); app++; } // post("not wrapped, app-ap=%i",app-ap); } else // need to wrap { int ps, nn; ps = bp-buffer; nn=n; // post(" nn=%i",nn); for(;ps>=0;ps--) // don't we miss one sample in signal??? { // post("ps=%i",ps); SETFLOAT(app, last-buffer[ps]); app++; nn--; } ps=size-1; // post(" nn=%i",nn); for(;nn>0;nn--) { // post("ps=%i",ps); SETFLOAT(app, last-buffer[ps--]); app++; } /* int i2; index=bp-buffer; i2=index; post("first part %i",index); while(index--){ SETFLOAT(app, last-*bp--); app++; } index=n-i2; post("2nd part %i",index); bp=buffer+size-1; while(index--){ SETFLOAT(app, last-*bp--); app++; } */ // post("wrapped, app-ap=%i",app-ap); } outlet_list(x->x_obj.ob_outlet,gensym("list"),n,ap); freebytes(ap, sizeof(t_atom)*n); } static void deltas_clear(t_deltas *x) { int i,s; t_float *f; f=x->m_buffer; s=x->m_buffer_size; for (i=0;isize) { logpost(x, 2, "[deltas]: higher bound (%g) cannot be greater than the buffer size (%g)", hi, size); hi=size; } if (lo<0) { logpost(x, 2, "[deltas]: lower bound cannot be negative"); lo=0; } if (hi<1) { logpost(x, 2, "[deltas]: higher bound cannot be smaller than one"); hi=1; } if (hi<=lo) { logpost(x, 2, "[deltas]: higher bound (%g) must be greater than lower bound (%g)", hi, lo); lo=hi-1.0; } x->m_hi=(t_float)((int)hi); x->m_lo=(t_float)((int)lo); if (x->m_buffer_size != size) { freebytes(x->m_buffer, x->m_buffer_size); x->m_buffer_size = (int)size; x->m_buffer = (t_float*)getbytes(sizeof(t_float)*x->m_buffer_size); deltas_clear(x); x->m_buffer_index=0; } } static void *deltas_new(t_float lo, t_float hi, t_float size) { t_deltas *x=(t_deltas *)pd_new(deltas_class); outlet_new(&x->x_obj, gensym("list")); x->m_buffer_size=0; x->m_buffer=0; deltas_set(x, lo, hi, size); floatinlet_new(&x->x_obj, &x->m_lo); floatinlet_new(&x->x_obj, &x->m_hi); return (void *)x; } static void deltas_free(t_deltas *x) { freebytes(x->m_buffer, x->m_buffer_size); } void deltas_setup(void) { deltas_class = class_new(gensym("deltas"), (t_newmethod)deltas_new, (t_method)deltas_free, sizeof(t_deltas), CLASS_DEFAULT, A_DEFFLOAT, A_DEFFLOAT, A_DEFFLOAT,0); class_addmethod(deltas_class, (t_method)deltas_clear, gensym("clear"),0); class_addfloat(deltas_class, (t_method)deltas_perform_float); class_addbang(deltas_class, (t_method)deltas_bang); } pd-smlib-0.13.0/source/hip.c000066400000000000000000000032301434442070000155220ustar00rootroot00000000000000#include "defines.h" /*--------------- hip ---------------*/ typedef struct hipctl { t_float c_x; t_float c_coef; } t_hipctl; typedef struct hip { t_object x_obj; t_float x_sr; t_float x_hz; t_hipctl x_cspace; t_hipctl *x_ctl; t_float x_f; } t_hip; t_class *hip_class; static void hip_ft1(t_hip *x, t_floatarg f); static void *hip_new(t_floatarg f) { t_hip *x = (t_hip *)pd_new(hip_class); inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("float"), gensym("ft1")); outlet_new(&x->x_obj, gensym("float")); x->x_ctl = &x->x_cspace; x->x_cspace.c_x = 0; hip_ft1(x, f); x->x_f = 0; return (x); } static void hip_ft1(t_hip *x, t_floatarg f) { if (f < 0.001) f = 10; x->x_hz = f; x->x_ctl->c_coef = 1 - f * (2 * 3.14159f); if (x->x_ctl->c_coef < 0) x->x_ctl->c_coef = 0; } static void hip_perform(t_hip *x, t_float in) { t_hipctl *c = x->x_ctl; t_float last = c->c_x; t_float coef = c->c_coef; t_float out; t_float new = in + coef * last; out = new - last; last = new; /* NAN protect */ if (!((last <= 0) || (last >= 0))) last = 0; c->c_x = last; outlet_float(x->x_obj.ob_outlet, out); } static void hip_clear(t_hip *x, t_floatarg q) { x->x_cspace.c_x = 0; } void hip_setup(void) { hip_class = class_new(gensym("hip"), (t_newmethod)hip_new, 0, sizeof(t_hip), 0, A_DEFFLOAT, 0); class_addfloat(hip_class, (t_method)hip_perform); class_addmethod(hip_class, (t_method)hip_ft1, gensym("ft1"), A_FLOAT, 0); class_addmethod(hip_class, (t_method)hip_clear, gensym("clear"), 0); }pd-smlib-0.13.0/source/hist.c000066400000000000000000000063341434442070000157210ustar00rootroot00000000000000#include "defines.h" /*--------------- hist ---------------*/ static t_class *hist_class; typedef struct _hist { t_object x_obj; t_float m_lo; t_float m_hi; t_float m_scale; int m_nbins; int m_n_observations; t_float *m_hist; } t_hist; static void hist_perform_float(t_hist *x, t_float f) { int j; j=(int)(.5+(f-x->m_lo)*x->m_scale); j=(j>0)?(jm_nbins?j:x->m_nbins-1):0; // limit without IF x->m_hist[j]++; x->m_n_observations++; } static void hist_perform_list(t_hist *x, t_symbol *s, int argc, t_atom *argv) { int i,j; for (i = 0; i < argc; i++) { j=(int)(.5f+(atom_getfloat(&argv[i])-x->m_lo)*x->m_scale); j=(j>0)?(jm_nbins?j:x->m_nbins-1):0; // limit without IF x->m_hist[j]++; } x->m_n_observations+=argc; } static void hist_bang(t_hist *x) { int i,n; t_float *f; t_atom *ap,*app; n=x->m_nbins; ap = (t_atom *)getbytes(sizeof(t_atom)*n); app=ap; i=x->m_nbins; f=x->m_hist; while(i--){ SETFLOAT(app, *f); f++; app++; } outlet_list(x->x_obj.ob_outlet,gensym("list"),n,ap); freebytes(ap, sizeof(t_atom)*n); } static void hist_relative(t_hist *x) { int i,n; t_float *f; t_float invn; t_atom *ap,*app; n=x->m_nbins; ap = (t_atom *)getbytes(sizeof(t_atom)*n); app=ap; invn=1.0f/(1e-10f+x->m_n_observations); i=n; f=x->m_hist; while(i--){ SETFLOAT(app, (*f*invn)); f++; app++; } outlet_list(x->x_obj.ob_outlet,gensym("list"),n,ap); freebytes(ap, sizeof(t_atom)*n); } static void hist_clear(t_hist *x) { int i; t_float *f; f=x->m_hist; for (i=0;im_nbins;i++) *f++=0.0f; x->m_n_observations=0; } static void hist_set(t_hist *x, t_float lo, t_float hi, t_float nbins) { if (nbins<1) { nbins=1; logpost(x, 2, "[hist] minimum number of bins is 1"); } if (hi<=lo) { logpost(x, 2, "[hist] higher bound (%g) must be greater than lower bound (%g)", hi, lo); hi=lo+1.0f; } freebytes(x->m_hist, x->m_nbins); x->m_hi=hi; x->m_lo=lo; x->m_nbins=(int)nbins; x->m_scale=(t_float)x->m_nbins/(hi-lo); x->m_hist = (t_float*)getbytes(sizeof(t_float)*x->m_nbins); hist_clear(x); } static void *hist_new(t_float lo, t_float hi, t_float nbins) { t_hist *x=(t_hist *)pd_new(hist_class); outlet_new(&x->x_obj, gensym("list")); x->m_hist=0; x->m_nbins=0; hist_set(x, lo, hi, nbins); return (void *)x; } static void hist_free(t_hist *x) { freebytes(x->m_hist, x->m_nbins); } void hist_setup(void) { hist_class = class_new(gensym("hist"), (t_newmethod)hist_new, (t_method)hist_free, sizeof(t_hist), CLASS_DEFAULT, A_DEFFLOAT, A_DEFFLOAT, A_DEFFLOAT,0); class_addmethod(hist_class, (t_method)hist_clear, gensym("clear"),0); class_addmethod(hist_class, (t_method)hist_bang, gensym("absolute"),0); class_addmethod(hist_class, (t_method)hist_relative, gensym("relative"),0); class_addmethod(hist_class, (t_method)hist_set, gensym("set"),A_DEFFLOAT, A_DEFFLOAT, A_DEFFLOAT,0); class_addlist(hist_class, (t_method)hist_perform_list); class_addfloat(hist_class, (t_method)hist_perform_float); class_addbang(hist_class, (t_method)hist_bang); } pd-smlib-0.13.0/source/itov.c000066400000000000000000000033271434442070000157320ustar00rootroot00000000000000#include "defines.h" /*--------------- itov ---------------*/ static t_class *itov_class; typedef struct _itov { t_object x_obj; t_outlet *f_out1; t_outlet *f_out2; t_outlet *f_out3; t_float m_lo; t_float m_hi; t_float m_scale; int m_nbins; } t_itov; static void itov_perform_float(t_itov *x, t_float j) { t_float i; j-=1.0f; j=(j>0)?(jm_nbins?j:x->m_nbins-1):0; // limit without IF // j=(int)((f-x->m_lo)*x->m_scale); i=(j/x->m_scale)-x->m_lo; outlet_float(x->f_out2, i); } //static void itov_perform_list(t_itov *x, t_symbol *s, int argc, t_atom *argv) //{ // //} static void itov_set(t_itov *x, t_float lo, t_float hi, t_float nbins) { if (nbins<1) { nbins=1; logpost(x, 2, "[itov] minimum number of bins is 1"); } if (hi<=lo) { logpost(x, 2, "[itov] higher bound (%g) must be higher than lower bound (%g)", hi, lo); hi=lo+1.0f; } x->m_hi=hi; x->m_lo=lo; x->m_nbins=(int)nbins; x->m_scale=(t_float)x->m_nbins/(hi-lo); } static void *itov_new(t_float lo, t_float hi, t_float nbins) { t_itov *x=(t_itov *)pd_new(itov_class); x->f_out1=outlet_new(&x->x_obj, gensym("float")); x->f_out2=outlet_new(&x->x_obj, gensym("float")); x->f_out3=outlet_new(&x->x_obj, gensym("float")); x->m_nbins=0; itov_set(x, lo, hi, nbins); return (void *)x; } //static void itov_free(t_itov *x) //{ //} void itov_setup(void) { itov_class = class_new(gensym("itov"), (t_newmethod)itov_new, 0, sizeof(t_itov), CLASS_DEFAULT, A_DEFFLOAT, A_DEFFLOAT, A_DEFFLOAT,0); // class_addlist(itov_class, (t_method)itov_perform_list); class_addfloat(itov_class, (t_method)itov_perform_float); } pd-smlib-0.13.0/source/lavg.c000066400000000000000000000022501434442070000156740ustar00rootroot00000000000000#include "defines.h" /*--------------- lavg ---------------*/ static t_class *lavg_class; typedef struct _lavg { t_object x_obj; t_float m_avg; t_float m_c_leak; t_float m_leak; } t_lavg; static void lavg_perform(t_lavg *x, t_float in) { x->m_avg= x->m_avg * x->m_c_leak + in * x->m_leak; outlet_float(x->x_obj.ob_outlet, x->m_avg); } static void lavg_clear(t_lavg *x) { x->m_avg=0.0; } static void lavg_setHalfDecay(t_lavg *x, t_float halfDecayTime) { x->m_c_leak=(t_float)powf(.5,(1.0/halfDecayTime)); x->m_leak=1.0-x->m_c_leak; } static void *lavg_new( t_float halfDecayTime) { t_lavg *x=(t_lavg *)pd_new(lavg_class); outlet_new(&x->x_obj, gensym("float")); lavg_setHalfDecay(x, halfDecayTime); return (void *)x; } void lavg_setup(void) { lavg_class = class_new(gensym("lavg"), (t_newmethod)lavg_new, 0, sizeof(t_lavg), CLASS_DEFAULT, A_DEFFLOAT, 0); class_addfloat(lavg_class, (t_method)lavg_perform); class_addmethod(lavg_class, (t_method)lavg_setHalfDecay, gensym("decay"), A_DEFFLOAT, NULL); class_addmethod(lavg_class, (t_method)lavg_clear, gensym("clear"), 0); } pd-smlib-0.13.0/source/lhist.c000066400000000000000000000074201434442070000160720ustar00rootroot00000000000000#include "defines.h" /*--------------- lhist ---------------*/ static t_class *lhist_class; typedef struct _lhist { t_object x_obj; t_float m_lo; t_float m_hi; t_float m_scale; t_float m_c_leak; t_float m_leak; int m_nbins; // int m_n_observations; t_float *m_lhist; } t_lhist; static void lhist_setHalfDecay(t_lhist *x, t_float halfDecayTime) { x->m_c_leak=(t_float)powf(.5,(1.0f/halfDecayTime)); x->m_leak=1.0f-x->m_c_leak; } static void lhist_perform_float(t_lhist *x, t_float f) { int j; j=(int)(.5+(f-x->m_lo)*x->m_scale); j=(j>0)?(jm_nbins?j:x->m_nbins-1):0; // limit without IF x->m_lhist[j]++; // x->m_n_observations++; } static void lhist_perform_list(t_lhist *x, t_symbol *s, int argc, t_atom *argv) { int i,j; for (i = 0; i < argc; i++) { j=(int)(.5f+(atom_getfloat(&argv[i])-x->m_lo)*x->m_scale); j=(j>0)?(jm_nbins?j:x->m_nbins-1):0; // limit without IF x->m_lhist[j]++; } // x->m_n_observations+=argc; } static void lhist_leak(t_lhist *x) { int i; t_float *f; t_float sc; f=x->m_lhist; sc=x->m_c_leak; i=x->m_nbins; while(i--) *f++*=sc; } static void lhist_bang(t_lhist *x) { int i,n; t_float *f; t_atom *ap,*app; n=x->m_nbins; ap = (t_atom *)getbytes(sizeof(t_atom)*n); app=ap; i=n; f=x->m_lhist; while(i--){ SETFLOAT(app, *f); f++; app++; } outlet_list(x->x_obj.ob_outlet,gensym("list"),n,ap); freebytes(ap,n); } static void lhist_relative(t_lhist *x) { int i,n; t_float *f; t_float invn,sum; t_atom *ap,*app; n=x->m_nbins; ap = (t_atom *)getbytes(sizeof(t_atom)*n); app=ap; i=x->m_nbins; f=x->m_lhist; sum=0.0f; while(i--) sum+=*f++; invn=1.0f/(1e-10f+sum); i=x->m_nbins; f=x->m_lhist; while(i--){ SETFLOAT(app, (*f*invn)); f++; app++; } outlet_list(x->x_obj.ob_outlet,gensym("list"),n,ap); freebytes(ap,n); } static void lhist_clear(t_lhist *x) { int i; t_float *f; f=x->m_lhist; for (i=0;im_nbins;i++) *f++=0.0f; // x->m_n_observations=0; } static void lhist_set(t_lhist *x, t_float lo, t_float hi, t_float nbins) { if (nbins<1) { nbins=1; logpost(x, 2, "[lhist] minimum number of bins is 1"); } if (hi<=lo) { logpost(x, 2, "[lhist] higher bound (%g) must be greater than lower bound (%g)", hi, lo); hi=lo+1.0f; } freebytes(x->m_lhist, x->m_nbins); x->m_hi=hi; x->m_lo=lo; x->m_nbins=(int)nbins; x->m_scale=(t_float)x->m_nbins/(hi-lo); x->m_lhist = (t_float*)getbytes(sizeof(t_float)*x->m_nbins); lhist_clear(x); } static void *lhist_new(t_float lo, t_float hi, t_float nbins, t_float decay) { t_lhist *x=(t_lhist *)pd_new(lhist_class); outlet_new(&x->x_obj, gensym("list")); lhist_setHalfDecay(x,decay); x->m_nbins=0; x->m_lhist=0; lhist_set(x, lo, hi, nbins); return (void *)x; } static void lhist_free(t_lhist *x) { freebytes(x->m_lhist, x->m_nbins); } void lhist_setup(void) { lhist_class = class_new(gensym("lhist"), (t_newmethod)lhist_new, (t_method)lhist_free, sizeof(t_lhist), CLASS_DEFAULT, A_DEFFLOAT, A_DEFFLOAT, A_DEFFLOAT,A_DEFFLOAT,0); class_addmethod(lhist_class, (t_method)lhist_clear, gensym("clear"),0); class_addmethod(lhist_class, (t_method)lhist_bang, gensym("absolute"),0); class_addmethod(lhist_class, (t_method)lhist_relative, gensym("relative"),0); class_addmethod(lhist_class, (t_method)lhist_leak, gensym("leak"),0); class_addmethod(lhist_class, (t_method)lhist_setHalfDecay, gensym("decay"), A_DEFFLOAT, NULL); class_addlist(lhist_class, (t_method)lhist_perform_list); class_addfloat(lhist_class, (t_method)lhist_perform_float); class_addbang(lhist_class, (t_method)lhist_bang); } pd-smlib-0.13.0/source/lhisti.c000066400000000000000000000074131434442070000162450ustar00rootroot00000000000000#include "defines.h" /*--------------- lhisti ---------------*/ // ignores samples outside bins static t_class *lhisti_class; typedef struct _lhisti { t_object x_obj; t_float m_lo; t_float m_hi; t_float m_scale; t_float m_c_leak; t_float m_leak; int m_nbins; // int m_n_observations; t_float *m_lhisti; } t_lhisti; static void lhisti_setHalfDecay(t_lhisti *x, t_float halfDecayTime) { x->m_c_leak=(t_float)powf(.5,(1.0f/halfDecayTime)); x->m_leak=1.0f-x->m_c_leak; } static void lhisti_perform_float(t_lhisti *x, t_float f) { int j; j=(int)(.5+(f-x->m_lo)*x->m_scale); if ((j>=0)&&(jm_nbins)) x->m_lhisti[j]++; } static void lhisti_perform_list(t_lhisti *x, t_symbol *s, int argc, t_atom *argv) { int i,j; for (i = 0; i < argc; i++) { j=(int)(.5f+(atom_getfloat(&argv[i])-x->m_lo)*x->m_scale); if ((j>=0)&&(jm_nbins)) x->m_lhisti[j]++; } // x->m_n_observations+=argc; } static void lhisti_leak(t_lhisti *x) { int i; t_float *f; t_float sc; f=x->m_lhisti; sc=x->m_c_leak; i=x->m_nbins; while(i--) *f++*=sc; } static void lhisti_bang(t_lhisti *x) { int i,n; t_float *f; t_atom *ap,*app; n=x->m_nbins; ap = (t_atom *)getbytes(sizeof(t_atom)*n); app=ap; i=n; f=x->m_lhisti; while(i--){ SETFLOAT(app, *f); f++; app++; } outlet_list(x->x_obj.ob_outlet,gensym("list"),n,ap); freebytes(ap,n); } static void lhisti_relative(t_lhisti *x) { int i,n; t_float *f; t_float invn,sum; t_atom *ap,*app; n=x->m_nbins; ap = (t_atom *)getbytes(sizeof(t_atom)*n); app=ap; i=x->m_nbins; f=x->m_lhisti; sum=0.0f; while(i--) sum+=*f++; invn=1.0f/(1e-10f+sum); i=x->m_nbins; f=x->m_lhisti; while(i--){ SETFLOAT(app, (*f*invn)); f++; app++; } outlet_list(x->x_obj.ob_outlet,gensym("list"),n,ap); freebytes(ap,n); } static void lhisti_clear(t_lhisti *x) { int i; t_float *f; f=x->m_lhisti; for (i=0;im_nbins;i++) *f++=0.0f; // x->m_n_observations=0; } static void lhisti_set(t_lhisti *x, t_float lo, t_float hi, t_float nbins) { if (nbins<1) { nbins=1; logpost(x, 2, "[lhisti] number of bins is minimum 1"); } if (hi<=lo) { post("[lhisti] higher bound (%g) must be greater than lower bound (%g)", hi, lo); hi=lo+1.0f; } freebytes(x->m_lhisti, x->m_nbins); x->m_hi=hi; x->m_lo=lo; x->m_nbins=(int)nbins; x->m_scale=(t_float)x->m_nbins/(hi-lo); x->m_lhisti = (t_float*)getbytes(sizeof(t_float)*x->m_nbins); lhisti_clear(x); } static void *lhisti_new(t_float lo, t_float hi, t_float nbins, t_float decay) { t_lhisti *x=(t_lhisti *)pd_new(lhisti_class); outlet_new(&x->x_obj, gensym("list")); lhisti_setHalfDecay(x,decay); x->m_nbins=0; x->m_lhisti=0; lhisti_set(x, lo, hi, nbins); return (void *)x; } static void lhisti_free(t_lhisti *x) { freebytes(x->m_lhisti, x->m_nbins); } void lhisti_setup(void) { lhisti_class = class_new(gensym("lhisti"), (t_newmethod)lhisti_new, (t_method)lhisti_free, sizeof(t_lhisti), CLASS_DEFAULT, A_DEFFLOAT, A_DEFFLOAT, A_DEFFLOAT,A_DEFFLOAT,0); class_addmethod(lhisti_class, (t_method)lhisti_clear, gensym("clear"),0); class_addmethod(lhisti_class, (t_method)lhisti_bang, gensym("absolute"),0); class_addmethod(lhisti_class, (t_method)lhisti_relative, gensym("relative"),0); class_addmethod(lhisti_class, (t_method)lhisti_leak, gensym("leak"),0); class_addmethod(lhisti_class, (t_method)lhisti_setHalfDecay, gensym("decay"), A_DEFFLOAT, NULL); class_addlist(lhisti_class, (t_method)lhisti_perform_list); class_addfloat(lhisti_class, (t_method)lhisti_perform_float); class_addbang(lhisti_class, (t_method)lhisti_bang); } pd-smlib-0.13.0/source/linspace.c000066400000000000000000000026031434442070000165430ustar00rootroot00000000000000#include "defines.h" /*--------------- linspace ----------------*/ /* clips a vector */ static t_class *linspace_class; typedef struct _linspace { t_object x_obj; t_float m_lo; t_float m_hi; t_float m_n; } t_linspace; static void linspace_bang(t_linspace *x) { int n; n=(int)x->m_n; if ((n<256)&&(n>1)) { int i; t_float lo,step; t_atom *ap,*app; ap = (t_atom *)getbytes(sizeof(t_atom)*n); app=ap; lo=x->m_lo; step=(x->m_hi-lo)/(n-1); for (i = 0; i < n; i++) { SETFLOAT(app, lo); app++; lo+=step; } outlet_list(x->x_obj.ob_outlet,gensym("list"),n,ap); freebytes(ap,n); } } static void linspace_float(t_linspace *x, t_float lo) { x->m_lo=lo; linspace_bang(x); } static void *linspace_new(t_float lo, t_float hi, t_float n) { t_linspace *x=(t_linspace *)pd_new(linspace_class); floatinlet_new(&x->x_obj, &x->m_hi); floatinlet_new(&x->x_obj, &x->m_n); outlet_new(&x->x_obj, gensym("list")); x->m_lo=lo; x->m_hi=hi; x->m_n=n; return (void *)x; } void linspace_setup(void) { linspace_class = class_new(gensym("linspace"), (t_newmethod)linspace_new, 0, sizeof(t_linspace), CLASS_DEFAULT, A_DEFFLOAT,A_DEFFLOAT,A_DEFFLOAT,0); class_addfloat(linspace_class, (t_method)linspace_float); class_addbang(linspace_class, (t_method)linspace_bang); } pd-smlib-0.13.0/source/lmax.c000066400000000000000000000023451434442070000157110ustar00rootroot00000000000000#include "defines.h" /*--------------- lmax ---------------*/ static t_class *lmax_class; typedef struct _lmax { t_object x_obj; t_float m_max; t_float m_leak; t_float m_c_leak; } t_lmax; static void lmax_perform(t_lmax *x, t_float in) { x->m_max=(in > x->m_max) ? in : x->m_max * x->m_c_leak + in * x->m_leak; outlet_float(x->x_obj.ob_outlet, x->m_max); } static void lmax_setHalfDecay(t_lmax *x, t_float halfDecayTime) { x->m_c_leak=(t_float)powf(.5,(1.0/halfDecayTime)); x->m_leak=1.0-x->m_c_leak; } static void lmax_clear(t_lmax *x) { x->m_max= - MAXFLOAT; } static void *lmax_new( t_float halfDecayTime) { t_lmax *x=(t_lmax *)pd_new(lmax_class); outlet_new(&x->x_obj, gensym("float")); lmax_setHalfDecay(x, halfDecayTime); lmax_clear(x); return (void *)x; } void lmax_setup(void) { lmax_class = class_new(gensym("lmax"), (t_newmethod)lmax_new, 0, sizeof(t_lmax), CLASS_DEFAULT, A_DEFFLOAT, 0); class_addfloat(lmax_class, (t_method)lmax_perform); class_addmethod(lmax_class, (t_method)lmax_clear, gensym("clear"), A_GIMME, NULL); class_addmethod(lmax_class, (t_method)lmax_setHalfDecay, gensym("decay"), A_DEFFLOAT, NULL); } pd-smlib-0.13.0/source/lmin.c000066400000000000000000000023451434442070000157070ustar00rootroot00000000000000#include "defines.h" /*--------------- lmin ---------------*/ static t_class *lmin_class; typedef struct _lmin { t_object x_obj; t_float m_min; t_float m_leak; t_float m_c_leak; } t_lmin; static void lmin_perform(t_lmin *x, t_float in) { x->m_min=(in < x->m_min) ? in : x->m_min * x->m_c_leak + in * x->m_leak; outlet_float(x->x_obj.ob_outlet, x->m_min); } static void lmin_setHalfDecay(t_lmin *x, t_float halfDecayTime) { x->m_c_leak=(t_float)powf(.5,(1.0f/halfDecayTime)); x->m_leak=1.0f-x->m_c_leak; } static void lmin_clear(t_lmin *x) { x->m_min= MAXFLOAT; } static void *lmin_new( t_float halfDecayTime) { t_lmin *x=(t_lmin *)pd_new(lmin_class); outlet_new(&x->x_obj, gensym("float")); lmin_setHalfDecay(x, halfDecayTime); lmin_clear(x); return (void *)x; } void lmin_setup(void) { lmin_class = class_new(gensym("lmin"), (t_newmethod)lmin_new, 0, sizeof(t_lmin), CLASS_DEFAULT, A_DEFFLOAT, 0); class_addfloat(lmin_class, (t_method)lmin_perform); class_addmethod(lmin_class, (t_method)lmin_clear, gensym("clear"), A_GIMME, NULL); class_addmethod(lmin_class, (t_method)lmin_setHalfDecay, gensym("decay"), A_DEFFLOAT, NULL); } pd-smlib-0.13.0/source/lrange.c000066400000000000000000000026321434442070000162170ustar00rootroot00000000000000#include "defines.h" /*--------------- lrange ---------------*/ static t_class *lrange_class; typedef struct _lrange { t_object x_obj; t_float m_min; t_float m_max; t_float m_c_leak; t_float m_leak; } t_lrange; static void lrange_perform(t_lrange *x, t_float in) { x->m_max=(in > x->m_max) ? in : x->m_max * x->m_c_leak + in * x->m_leak; x->m_min=(in < x->m_min) ? in : x->m_min * x->m_c_leak + in * x->m_leak; outlet_float(x->x_obj.ob_outlet, x->m_max-x->m_min); } static void lrange_setHalfDecay(t_lrange *x, t_float halfDecayTime) { x->m_c_leak=(t_float)powf(.5,(1.0f/halfDecayTime)); x->m_leak=1.0f-x->m_c_leak; } static void lrange_clear(t_lrange *x) { x->m_max = - MAXFLOAT; x->m_min = MAXFLOAT; } static void *lrange_new( t_float halfDecayTime) { t_lrange *x=(t_lrange *)pd_new(lrange_class); outlet_new(&x->x_obj, gensym("float")); lrange_setHalfDecay(x, halfDecayTime); lrange_clear(x); return (void *)x; } void lrange_setup(void) { lrange_class = class_new(gensym("lrange"), (t_newmethod)lrange_new, 0, sizeof(t_lrange), CLASS_DEFAULT, A_DEFFLOAT, 0); class_addfloat(lrange_class, (t_method)lrange_perform); class_addmethod(lrange_class, (t_method)lrange_clear, gensym("clear"), A_GIMME, NULL); class_addmethod(lrange_class, (t_method)lrange_setHalfDecay, gensym("decay"), A_DEFFLOAT, NULL); } pd-smlib-0.13.0/source/lstd.c000066400000000000000000000026141434442070000157150ustar00rootroot00000000000000#include "defines.h" /*--------------- lstd ---------------*/ static t_class *lstd_class; typedef struct _lstd { t_object x_obj; t_float m_avg; t_float m_sum_squares; t_float m_std; t_float m_c_leak; t_float m_leak; } t_lstd; static void lstd_perform(t_lstd *x, t_float in) { t_float tmp=x->m_avg-in; x->m_avg= x->m_avg * x->m_c_leak + in * x->m_leak; x->m_sum_squares=x->m_sum_squares * x->m_c_leak + x->m_leak*tmp*tmp; x->m_std=(t_float)sqrtf(x->m_sum_squares); outlet_float(x->x_obj.ob_outlet, x->m_std); } static void lstd_setHalfDecay(t_lstd *x, t_float halfDecayTime) { x->m_c_leak=(t_float)powf(.5,(1.0f/halfDecayTime)); x->m_leak=1.0f-x->m_c_leak; } static void lstd_clear(t_lstd *x) { x->m_sum_squares=0.0f; x->m_avg=0.0f; } static void *lstd_new( t_float halfDecayTime) { t_lstd *x=(t_lstd *)pd_new(lstd_class); outlet_new(&x->x_obj, gensym("float")); lstd_setHalfDecay(x, halfDecayTime); return (void *)x; } void lstd_setup(void) { lstd_class = class_new(gensym("lstd"), (t_newmethod)lstd_new, 0, sizeof(t_lstd), CLASS_DEFAULT, A_DEFFLOAT, 0); class_addfloat(lstd_class, (t_method)lstd_perform); class_addmethod(lstd_class, (t_method)lstd_setHalfDecay, gensym("decay"), A_DEFFLOAT, NULL); class_addmethod(lstd_class, (t_method)lstd_clear, gensym("clear"), A_DEFFLOAT, NULL);} pd-smlib-0.13.0/source/prevl.c000066400000000000000000000070161434442070000161000ustar00rootroot00000000000000#include "defines.h" /*--------------- prevl ---------------*/ static t_class *prevl_class; typedef struct _prevl { t_object x_obj; t_float m_lo; t_float m_hi; int m_buffer_size; int m_buffer_index; t_float *m_buffer; // circular buffer } t_prevl; static void prevl_set(t_prevl *x, t_float lo, t_float hi, t_float size); static void prevl_perform_float(t_prevl *x, t_float f) { int index; index=x->m_buffer_index+1; index=(index==x->m_buffer_size)?0:index; x->m_buffer_index=index; x->m_buffer[index]=f; } static void prevl_bang(t_prevl *x) { int lo,hi,n,index,size; t_atom *ap,*app; t_float *buffer, *bp; prevl_set(x, x->m_lo, x->m_hi, x->m_buffer_size); lo=(int)x->m_lo; hi=(int)x->m_hi; n=hi-lo; size=x->m_buffer_size; index=x->m_buffer_index; ap = (t_atom *)getbytes(sizeof(t_atom)*n); app=ap; buffer=x->m_buffer; bp=buffer+index-lo; bp=(bp>=buffer)?bp:bp+size; // wrap if (bp-buffer>=n) { // no wrap-around needed index=n; while(index--){ SETFLOAT(app, *bp--); app++; } // post("not wrapped, app-ap=%i",app-ap); } else // need to wrap { int ps, nn; ps = bp-buffer; nn=n; // post(" nn=%i",nn); for(;ps>=0;ps--) // don't we miss one sample in signal??? { // post("ps=%i",ps); SETFLOAT(app, buffer[ps]); app++; nn--; } ps=size-1; // post(" nn=%i",nn); for(;nn>0;nn--) { // post("ps=%i",ps); SETFLOAT(app, buffer[ps--]); app++; } } outlet_list(x->x_obj.ob_outlet,gensym("list"),n,ap); freebytes(ap, sizeof(t_atom)*n); } static void prevl_clear(t_prevl *x) { int i,s; t_float *f; f=x->m_buffer; s=x->m_buffer_size; for (i=0;isize) { logpost(x, 2, "[prevl] higher bound (%g) cannot be greater than the buffer size (%g)", hi, size); hi=size; } if (lo<0) { logpost(x, 2, "[prevl] lower bound cannot be negative"); lo=0; } if (hi<1) { logpost(x, 2, "[prevl] higher bound (%g) cannot be smaller than 1", hi); hi=1; } if (hi<=lo) { logpost(x, 2, "[prevl] higher bound (%g) must be greater than lower bound (%g)", hi, lo); lo=hi-1.0; } x->m_hi=(t_float)((int)hi); x->m_lo=(t_float)((int)lo); if (x->m_buffer_size != size) { x->m_buffer_size=(int)size; freebytes(x->m_buffer, x->m_buffer_size); x->m_buffer = (t_float*)getbytes(sizeof(t_float)*x->m_buffer_size); prevl_clear(x); x->m_buffer_index=0; } } static void *prevl_new(t_float lo, t_float hi, t_float size) { t_prevl *x=(t_prevl *)pd_new(prevl_class); outlet_new(&x->x_obj, gensym("list")); x->m_buffer_size=0; x->m_buffer=0; prevl_set(x, lo, hi, size); floatinlet_new(&x->x_obj, &x->m_lo); floatinlet_new(&x->x_obj, &x->m_hi); return (void *)x; } static void prevl_free(t_prevl *x) { freebytes(x->m_buffer, x->m_buffer_size); } void prevl_setup(void) { prevl_class = class_new(gensym("prevl"), (t_newmethod)prevl_new, (t_method)prevl_free, sizeof(t_prevl), CLASS_DEFAULT, A_DEFFLOAT, A_DEFFLOAT, A_DEFFLOAT,0); class_addmethod(prevl_class, (t_method)prevl_clear, gensym("clear"),0); class_addfloat(prevl_class, (t_method)prevl_perform_float); class_addbang(prevl_class, (t_method)prevl_bang); } pd-smlib-0.13.0/source/threshold.c000066400000000000000000000065241434442070000167470ustar00rootroot00000000000000/* --------------------- threshold ----------------------------- */ #include "defines.h" static t_class *threshold_class; typedef struct _threshold { t_object x_obj; t_outlet *x_outlet1; /* bang out for high thresh */ t_outlet *x_outlet2; /* bang out for low thresh */ t_clock *x_clock; /* wakeup for message output */ int x_state; /* 1 = high, 0 = low */ t_float x_hithresh; /* value of high threshold */ t_float x_lothresh; /* value of low threshold */ t_float x_deadwait; /* msec remaining in dead period */ t_float x_hideadtime; /* hi dead */ t_float x_lodeadtime; /* lo dead */ } t_threshold; static void threshold_tick(t_threshold *x); static void threshold_set(t_threshold *x, t_floatarg hithresh, t_floatarg hideadtime, t_floatarg lothresh, t_floatarg lodeadtime); static t_threshold *threshold_new(t_floatarg hithresh, t_floatarg hideadtime, t_floatarg lothresh, t_floatarg lodeadtime) { t_threshold *x = (t_threshold *) pd_new(threshold_class); x->x_state = 0; /* low state */ x->x_deadwait = 0; /* no dead time */ x->x_clock = clock_new(x, (t_method)threshold_tick); x->x_outlet1 = outlet_new(&x->x_obj, gensym("bang")); x->x_outlet2 = outlet_new(&x->x_obj, gensym("bang")); threshold_set(x, hithresh, hideadtime, lothresh, lodeadtime); return (x); } /* "set" message to specify thresholds and dead times */ static void threshold_set(t_threshold *x, t_floatarg hithresh, t_floatarg hideadtime, t_floatarg lothresh, t_floatarg lodeadtime) { if (lothresh > hithresh) lothresh = hithresh; x->x_hithresh = hithresh; x->x_hideadtime = hideadtime; x->x_lothresh = lothresh; x->x_lodeadtime = lodeadtime; } /* number in inlet sets state -- note incompatible with JMAX which used "int" message for this, impossible here because of auto signal conversion */ static void threshold_ft1(t_threshold *x, t_floatarg f) { x->x_state = (f != 0); x->x_deadwait = 0; } static void threshold_tick(t_threshold *x) { if (x->x_state) outlet_bang(x->x_outlet1); else outlet_bang(x->x_outlet2); } static void threshold_perform(t_threshold *x, t_float in) { if (x->x_deadwait > 0) x->x_deadwait -= 1; else if (x->x_state) { /* we're high; look for low sample */ if (in < x->x_lothresh) { clock_delay(x->x_clock, 0L); x->x_state = 0; x->x_deadwait = x->x_lodeadtime; } } else { /* we're low; look for high sample */ if (in >= x->x_hithresh) { clock_delay(x->x_clock, 0L); x->x_state = 1; x->x_deadwait = x->x_hideadtime; } } } static void threshold_ff(t_threshold *x) { clock_free(x->x_clock); } void threshold_setup( void) { threshold_class = class_new(gensym("threshold"), (t_newmethod)threshold_new, (t_method)threshold_ff, sizeof(t_threshold), 0, A_DEFFLOAT, A_DEFFLOAT, A_DEFFLOAT, A_DEFFLOAT, 0); class_addfloat(threshold_class, (t_method)threshold_perform); class_addmethod(threshold_class, (t_method)threshold_set, gensym("set"), A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, 0); class_addmethod(threshold_class, (t_method)threshold_ft1, gensym("ft1"), A_FLOAT, 0); } pd-smlib-0.13.0/source/vabs.c000066400000000000000000000016251434442070000157030ustar00rootroot00000000000000#include "defines.h" /*--------------- vabs ----------------*/ /* absolute values of a list of floats */ static t_class *vabs_class; typedef struct _vabs { t_object x_obj; } t_vabs; static void vabs_perform(t_vabs *x, t_symbol *s, int argc, t_atom *argv) { int i; t_atom *ap,*app; ap = (t_atom *)getbytes(sizeof(t_atom)*argc); app=ap; for (i = 0; i < argc; i++) { t_float f=atom_getfloat(argv++); SETFLOAT(app, f>0?f:-f); app++; } outlet_list(x->x_obj.ob_outlet,gensym("list"),argc,ap); freebytes(ap,argc); } static void *vabs_new() { t_vabs *x=(t_vabs *)pd_new(vabs_class); outlet_new(&x->x_obj, gensym("list")); return (void *)x; } void vabs_setup(void) { vabs_class = class_new(gensym("vabs"), (t_newmethod)vabs_new, 0, sizeof(t_vabs), CLASS_DEFAULT, 0); class_addlist(vabs_class, (t_method)vabs_perform); } pd-smlib-0.13.0/source/vclip.c000066400000000000000000000022111434442070000160550ustar00rootroot00000000000000#include "defines.h" /*--------------- vclip ----------------*/ /* clips a vector */ static t_class *vclip_class; typedef struct _vclip { t_object x_obj; t_float m_lo; t_float m_hi; } t_vclip; static void vclip_perform(t_vclip *x, t_symbol *s, int argc, t_atom *argv) { int i; t_float lo,hi; t_atom *ap,*app; ap = (t_atom *)getbytes(sizeof(t_atom)*argc); app=ap; lo=x->m_lo; hi=x->m_hi; for (i = 0; i < argc; i++) { t_float f=atom_getfloat(argv++); SETFLOAT(app, (fhi?hi:f))); app++; } outlet_list(x->x_obj.ob_outlet,gensym("list"),argc,ap); freebytes(ap,argc); } static void *vclip_new(t_float lo, t_float hi) { t_vclip *x=(t_vclip *)pd_new(vclip_class); floatinlet_new(&x->x_obj, &x->m_lo); floatinlet_new(&x->x_obj, &x->m_hi); outlet_new(&x->x_obj, gensym("list")); x->m_hi=hi; x->m_lo=lo; return (void *)x; } void vclip_setup(void) { vclip_class = class_new(gensym("vclip"), (t_newmethod)vclip_new, 0, sizeof(t_vclip), CLASS_DEFAULT, A_DEFFLOAT,A_DEFFLOAT,0); class_addlist(vclip_class, (t_method)vclip_perform); } pd-smlib-0.13.0/source/vcog.c000066400000000000000000000015311434442070000157020ustar00rootroot00000000000000#include "defines.h" /*--------------- vcog ---------------*/ static t_class *vcog_class; typedef struct _vcog { t_object x_obj; } t_vcog; static void vcog_perform(t_vcog *x, t_symbol *s, int argc, t_atom *argv) { t_float sum=0.; t_float wsum=0.0; int i; for (i = 0; i < argc; i++) { t_float tmp=atom_getfloat(&argv[i]); sum+= tmp; wsum+= tmp*i; } if (sum!=0.0f) outlet_float(x->x_obj.ob_outlet, 1.0+(wsum/sum)); if (s) {} // prevent compiler complaint } static void *vcog_new() { t_vcog *x=(t_vcog *)pd_new(vcog_class); outlet_new(&x->x_obj, gensym("float")); return (void *)x; } void vcog_setup(void) { vcog_class = class_new(gensym("vcog"), (t_newmethod)vcog_new, 0, sizeof(t_vcog), CLASS_DEFAULT, 0); class_addlist(vcog_class, (t_method)vcog_perform); } pd-smlib-0.13.0/source/vdbtorms.c000066400000000000000000000021521434442070000166040ustar00rootroot00000000000000#include "defines.h" /*--------------- vdbtorms ----------------*/ static t_class *vdbtorms_class; typedef struct _vdbtorms { t_object x_obj; } t_vdbtorms; static t_float decibelbtorms(t_float f) { if (f <= 0) return(0); else { if (f > 485) f = 485; } return (t_float)(exp((LOGTEN * 0.05) * (f-100.))); } static void vdbtorms_perform(t_vdbtorms *x, t_symbol *s, int argc, t_atom *argv) { int i; t_atom *ap,*app; ap = (t_atom *)getbytes(sizeof(t_atom)*argc); app=ap; for (i = 0; i < argc; i++) { SETFLOAT(app, decibelbtorms(atom_getfloat(argv++))); app++; } outlet_list(x->x_obj.ob_outlet,gensym("list"),argc,ap); freebytes(ap,argc); } static void *vdbtorms_new() { t_vdbtorms *x=(t_vdbtorms *)pd_new(vdbtorms_class); outlet_new(&x->x_obj, gensym("list")); return (void *)x; } void vdbtorms_setup(void) { vdbtorms_class = class_new(gensym("vdbtorms"), (t_newmethod)vdbtorms_new, 0, sizeof(t_vdbtorms), CLASS_DEFAULT, 0); class_addlist(vdbtorms_class, (t_method)vdbtorms_perform); } pd-smlib-0.13.0/source/vdelta.c000066400000000000000000000026051434442070000162260ustar00rootroot00000000000000#include "defines.h" /*--------------- vdelta ----------------------------*/ /* differences between element in succesive vectors */ static t_class *vdelta_class; typedef struct _vdelta { t_object x_obj; t_float *m_prev; int m_n; } t_vdelta; static void vdelta_perform(t_vdelta *x, t_symbol *s, int argc, t_atom *argv) { int i; t_atom *ap,*app; t_float *fp; if (argc!=x->m_n) { if (x->m_prev) freebytes(x->m_prev,x->m_n); x->m_prev=(t_float*)getbytes(argc*sizeof(t_float)); for(i=0;im_prev[i]=0.0f; x->m_n=argc; } fp=x->m_prev; ap = (t_atom *)getbytes(sizeof(t_atom)*argc); app=ap; for (i = 0; i < argc; i++) { t_float f=atom_getfloat(argv++); SETFLOAT(app, f-*fp); app++; *fp++=f; } outlet_list(x->x_obj.ob_outlet,gensym("list"),argc,ap); freebytes(ap,argc); if (s) {} // prevent compiler complaint } static void *vdelta_new() { t_vdelta *x=(t_vdelta *)pd_new(vdelta_class); outlet_new(&x->x_obj, gensym("list")); x->m_n=0; x->m_prev=0; return (void *)x; } static void vdelta_free(t_vdelta *x) { freebytes(x->m_prev,x->m_n); } void vdelta_setup(void) { vdelta_class = class_new(gensym("vdelta"), (t_newmethod)vdelta_new, (t_method)vdelta_free, sizeof(t_vdelta), CLASS_DEFAULT, 0); class_addlist(vdelta_class, (t_method)vdelta_perform); } pd-smlib-0.13.0/source/vfmod.c000066400000000000000000000021201434442070000160520ustar00rootroot00000000000000#include "defines.h" /*--------------- vfmod ----------------*/ /* floating point modulo of a vector */ static t_class *vfmod_class; typedef struct _vfmod { t_object x_obj; t_float m_y; } t_vfmod; static void vfmod_perform(t_vfmod *x, t_symbol *s, int argc, t_atom *argv) { int i; t_float y; t_atom *ap,*app; ap = (t_atom *)getbytes(sizeof(t_atom)*argc); app=ap; y=x->m_y; if (y==0.0f) y=1.0f; for (i = 0; i < argc; i++) { SETFLOAT(app, (t_float)fmod(atom_getfloat(argv++),y)); app++; } outlet_list(x->x_obj.ob_outlet,gensym("list"),argc,ap); freebytes(ap,argc); } static void *vfmod_new(t_float y) { t_vfmod *x=(t_vfmod *)pd_new(vfmod_class); floatinlet_new(&x->x_obj, &x->m_y); outlet_new(&x->x_obj, gensym("list")); if (y==0.0f) y=1.0f; x->m_y=y; return (void *)x; } void vfmod_setup(void) { vfmod_class = class_new(gensym("vfmod"), (t_newmethod)vfmod_new, 0, sizeof(t_vfmod), CLASS_DEFAULT, A_DEFFLOAT,A_DEFFLOAT,0); class_addlist(vfmod_class, (t_method)vfmod_perform); } pd-smlib-0.13.0/source/vftom.c000066400000000000000000000017301434442070000161000ustar00rootroot00000000000000#include "defines.h" /*--------------- vftom ----------------*/ static t_class *vftom_class; typedef struct _vftom { t_object x_obj; } t_vftom; t_float ftom(t_float f) { return (t_float)(f > 0 ? 17.3123405046 * log(.12231220585 * f) : -1500); } static void vftom_perform(t_vftom *x, t_symbol *s, int argc, t_atom *argv) { int i; t_atom *ap,*app; ap = (t_atom *)getbytes(sizeof(t_atom)*argc); app=ap; for (i = 0; i < argc; i++) { SETFLOAT(app, ftom(atom_getfloat(argv++))); app++; } outlet_list(x->x_obj.ob_outlet,gensym("list"),argc,ap); freebytes(ap,argc); } static void *vftom_new() { t_vftom *x=(t_vftom *)pd_new(vftom_class); outlet_new(&x->x_obj, gensym("list")); return (void *)x; } void vftom_setup(void) { vftom_class = class_new(gensym("vftom"), (t_newmethod)vftom_new, 0, sizeof(t_vftom), CLASS_DEFAULT, 0); class_addlist(vftom_class, (t_method)vftom_perform); } pd-smlib-0.13.0/source/vlavg.c000066400000000000000000000035471434442070000160740ustar00rootroot00000000000000#include "defines.h" /*--------------- vlavg -----------------------*/ /* leaky average of each element in a list */ /* arguments: [halfdecay] */ static t_class *vlavg_class; typedef struct _vlavg { t_object x_obj; t_float m_c_leak; t_float m_leak; t_float *m_avg; int m_n; } t_vlavg; static void vlavg_perform(t_vlavg *x, t_symbol *s, int argc, t_atom *argv) { int i; t_atom *ap,*app; t_float *fp; t_float m_leak; t_float m_c_leak; m_leak=x->m_leak; m_c_leak=x->m_c_leak; if (argc!=x->m_n) { if (x->m_avg) freebytes(x->m_avg,x->m_n); x->m_avg=(t_float*)getbytes(argc*sizeof(t_float)); for(i=0;im_avg[i]=0.0f; x->m_n=argc; } fp=x->m_avg; ap = (t_atom *)getbytes(sizeof(t_atom)*argc); app=ap; for (i = 0; i < argc; i++) { t_float f=atom_getfloat(argv++); *fp = *fp * m_c_leak + f * m_leak; SETFLOAT(app, *fp); app++; fp++; } outlet_list(x->x_obj.ob_outlet,gensym("list"),argc,ap); freebytes(ap,argc); if (s) {} // prevent compiler complaint } static void vlavg_setHalfDecay(t_vlavg *x, t_floatarg halfDecayTime) { x->m_c_leak=(t_float)powf(.5,(1.0f/halfDecayTime)); x->m_leak=1.0f-x->m_c_leak; } static void *vlavg_new(t_float halfDecayTime) { t_vlavg *x=(t_vlavg *)pd_new(vlavg_class); outlet_new(&x->x_obj, gensym("list")); vlavg_setHalfDecay(x, halfDecayTime); x->m_n=0; x->m_avg=0; return (void *)x; } static void vlavg_free(t_vlavg *x) { freebytes(x->m_avg,x->m_n); } void vlavg_setup(void) { vlavg_class = class_new(gensym("vlavg"), (t_newmethod)vlavg_new, (t_method)vlavg_free, sizeof(t_vlavg), CLASS_DEFAULT, A_DEFFLOAT, 0); class_addmethod(vlavg_class, (t_method)vlavg_setHalfDecay, gensym("decay"), A_DEFFLOAT, NULL); class_addlist(vlavg_class, (t_method)vlavg_perform); } pd-smlib-0.13.0/source/vlmax.c000066400000000000000000000036371434442070000161040ustar00rootroot00000000000000#include "defines.h" /*--------------- vlmax -----------------------*/ /* leaky maximum of each element in a list */ /* arguments: [halfdecay] */ static t_class *vlmax_class; typedef struct _vlmax { t_object x_obj; t_float m_c_leak; t_float m_leak; t_float *m_max; int m_n; } t_vlmax; static void vlmax_perform(t_vlmax *x, t_symbol *s, int argc, t_atom *argv) { int i; t_atom *ap,*app; t_float *fp; t_float m_leak; t_float m_c_leak; m_leak=x->m_leak; m_c_leak=x->m_c_leak; if (argc!=x->m_n) { if (x->m_max) freebytes(x->m_max,x->m_n); x->m_max=(t_float*)getbytes(argc*sizeof(t_float)); for(i=0;im_max[i]=0.0; x->m_n=argc; } fp=x->m_max; ap = (t_atom *)getbytes(sizeof(t_atom)*argc); app=ap; for (i = 0; i < argc; i++) { t_float f=atom_getfloat(argv++); *fp =(f > *fp ) ? f : *fp *m_c_leak + f*m_leak; SETFLOAT(app, *fp); app++; fp++; } outlet_list(x->x_obj.ob_outlet,gensym("list"),argc,ap); freebytes(ap,argc); if (s) {} // prevent compiler complaint } static void vlmax_setHalfDecay(t_vlmax *x, t_floatarg halfDecayTime) { if (halfDecayTime <= 1.) halfDecayTime = 1; x->m_c_leak=(t_float)powf(.5,(1.0/halfDecayTime)); x->m_leak=1.0-x->m_c_leak; } static void *vlmax_new(t_float halfDecayTime) { t_vlmax *x=(t_vlmax *)pd_new(vlmax_class); outlet_new(&x->x_obj, gensym("list")); vlmax_setHalfDecay(x, halfDecayTime); x->m_n=0; x->m_max=0; return (void *)x; } static void vlmax_free(t_vlmax *x) { freebytes(x->m_max,x->m_n); } void vlmax_setup(void) { vlmax_class = class_new(gensym("vlmax"), (t_newmethod)vlmax_new, (t_method)vlmax_free, sizeof(t_vlmax), CLASS_DEFAULT, A_DEFFLOAT, 0); class_addmethod(vlmax_class, (t_method)vlmax_setHalfDecay, gensym("decay"), A_DEFFLOAT, NULL); class_addlist(vlmax_class, (t_method)vlmax_perform); } pd-smlib-0.13.0/source/vlmin.c000066400000000000000000000036371434442070000161020ustar00rootroot00000000000000#include "defines.h" /*--------------- vlmin -----------------------*/ /* leaky minimum of each element in a list */ /* arguments: [halfdecay] */ static t_class *vlmin_class; typedef struct _vlmin { t_object x_obj; t_float m_c_leak; t_float m_leak; t_float *m_min; int m_n; } t_vlmin; static void vlmin_perform(t_vlmin *x, t_symbol *s, int argc, t_atom *argv) { int i; t_atom *ap,*app; t_float *fp; t_float m_leak; t_float m_c_leak; m_leak=x->m_leak; m_c_leak=x->m_c_leak; if (argc!=x->m_n) { if (x->m_min) freebytes(x->m_min,x->m_n); x->m_min=(t_float*)getbytes(argc*sizeof(t_float)); for(i=0;im_min[i]=0.0; x->m_n=argc; } fp=x->m_min; ap = (t_atom *)getbytes(sizeof(t_atom)*argc); app=ap; for (i = 0; i < argc; i++) { t_float f=atom_getfloat(argv++); *fp =(f < *fp ) ? f : *fp *m_c_leak + f*m_leak; SETFLOAT(app, *fp); app++; fp++; } outlet_list(x->x_obj.ob_outlet,gensym("list"),argc,ap); freebytes(ap,argc); if (s) {} // prevent compiler complaint } static void vlmin_setHalfDecay(t_vlmin *x, t_floatarg halfDecayTime) { if (halfDecayTime <= 1.) halfDecayTime = 1; x->m_c_leak=(t_float)powf(.5,(1.0/halfDecayTime)); x->m_leak=1.0-x->m_c_leak; } static void *vlmin_new(t_float halfDecayTime) { t_vlmin *x=(t_vlmin *)pd_new(vlmin_class); outlet_new(&x->x_obj, gensym("list")); vlmin_setHalfDecay(x, halfDecayTime); x->m_n=0; x->m_min=0; return (void *)x; } static void vlmin_free(t_vlmin *x) { freebytes(x->m_min,x->m_n); } void vlmin_setup(void) { vlmin_class = class_new(gensym("vlmin"), (t_newmethod)vlmin_new, (t_method)vlmin_free, sizeof(t_vlmin), CLASS_DEFAULT, A_DEFFLOAT, 0); class_addmethod(vlmin_class, (t_method)vlmin_setHalfDecay, gensym("decay"), A_DEFFLOAT, NULL); class_addlist(vlmin_class, (t_method)vlmin_perform); } pd-smlib-0.13.0/source/vlrange.c000066400000000000000000000053471434442070000164130ustar00rootroot00000000000000#include "defines.h" /*--------------- vlrange -----------------------*/ /* leaky range of each element in a list */ /* arguments: [halfdecay] */ static t_class *vlrange_class; typedef struct _vlrange { t_object x_obj; t_float m_c_leak; t_float m_leak; t_float *m_min; t_float *m_max; int m_n; } t_vlrange; static void vlrange_perform(t_vlrange *x, t_symbol *s, int argc, t_atom *argv) { int i; t_atom *ap,*app; t_float *fmin, *fmax; t_float m_leak; t_float m_c_leak; m_leak=x->m_leak; m_c_leak=x->m_c_leak; if (argc!=x->m_n) { if (x->m_min) { freebytes(x->m_min,x->m_n); freebytes(x->m_max,x->m_n); } x->m_min=(t_float*)getbytes(argc*sizeof(t_float)); x->m_max=(t_float*)getbytes(argc*sizeof(t_float)); for(i=0;im_min[i]=0.0; x->m_max[i]=0.0; } x->m_n=argc; } fmin=x->m_min; fmax=x->m_max; ap = (t_atom *)getbytes(sizeof(t_atom)*argc); app=ap; for (i = 0; i < argc; i++) { t_float f=atom_getfloat(argv++); *fmax =(f > *fmax ) ? f : *fmax *m_c_leak + f*m_leak; *fmin =(f < *fmin ) ? f : *fmin *m_c_leak + f*m_leak; SETFLOAT(app, *fmax-*fmin); app++; fmax++; fmin++; } outlet_list(x->x_obj.ob_outlet,gensym("list"),argc,ap); freebytes(ap,argc); if (s) {} // prevent compiler complaint } static void vlrange_setHalfDecay(t_vlrange *x, t_floatarg halfDecayTime) { x->m_c_leak=(t_float)powf(.5,(1.0/halfDecayTime)); x->m_leak=1.0f-x->m_c_leak; } static void vlrange_status(t_vlrange *x) { post("--==## vlrange status ##==--"); int i; int n = x->m_n; t_float *fmin = x->m_min; t_float *fmax = x->m_max; post("m_c_leak: %f", x->m_c_leak); post("m_leak: %f", x->m_leak); post("m_n: %d", x->m_n); post("fmax - fmin"); for (i = 0; i < n; i++) { post("fmax: %f, fmin: %f", *fmax++, *fmin++); } } static void *vlrange_new(t_float halfDecayTime) { t_vlrange *x=(t_vlrange *)pd_new(vlrange_class); outlet_new(&x->x_obj, gensym("list")); vlrange_setHalfDecay(x, halfDecayTime); x->m_n=0; x->m_min=0; x->m_max=0; return (void *)x; } static void vlrange_free(t_vlrange *x) { freebytes(x->m_max,x->m_n); freebytes(x->m_min,x->m_n); } void vlrange_setup(void) { vlrange_class = class_new(gensym("vlrange"), (t_newmethod)vlrange_new, (t_method)vlrange_free, sizeof(t_vlrange), CLASS_DEFAULT, A_DEFFLOAT, 0); class_addmethod(vlrange_class, (t_method)vlrange_status, gensym("status"), A_DEFFLOAT, NULL); class_addmethod(vlrange_class, (t_method)vlrange_setHalfDecay, gensym("decay"), A_DEFFLOAT, NULL); class_addlist(vlrange_class, (t_method)vlrange_perform); } pd-smlib-0.13.0/source/vmax.c000066400000000000000000000020261434442070000157170ustar00rootroot00000000000000#include "defines.h" /*--------------- vmax ---------------*/ /* maximum value in a list of float and its location (index) */ static t_class *vmax_class; typedef struct _vmax { t_object x_obj; t_outlet *m_out_maxi; } t_vmax; static void vmax_perform(t_vmax *x, t_symbol *s, int argc, t_atom *argv) { int i; int maxi = 0; t_float max=-MAXFLOAT; for (i = 0; i < argc; i++) { t_float f=atom_getfloat(&argv[i]); if (f>max) { max=f; maxi=i; } } outlet_float(x->x_obj.ob_outlet, max); outlet_float(x->m_out_maxi, (t_float)(maxi+1)); if (s) {} // prevent compiler complaint } static void *vmax_new() { t_vmax *x=(t_vmax *)pd_new(vmax_class); outlet_new(&x->x_obj, gensym("float")); x->m_out_maxi=outlet_new(&x->x_obj, gensym("float")); return (void *)x; } void vmax_setup(void) { vmax_class = class_new(gensym("vmax"), (t_newmethod)vmax_new, 0, sizeof(t_vmax), CLASS_DEFAULT, 0); class_addlist(vmax_class, (t_method)vmax_perform); } pd-smlib-0.13.0/source/vmin.c000066400000000000000000000020301434442070000157100ustar00rootroot00000000000000#include "defines.h" /*--------------- vmin ---------------*/ /* maximum value in a list of float and its location (index) */ static t_class *vmin_class; typedef struct _vmin { t_object x_obj; t_outlet *m_out_maxi; } t_vmin; static void vmin_perform(t_vmin *x, t_symbol *s, int argc, t_atom *argv) { int i; int mini = 0; t_float min=MAXFLOAT; for (i = 0; i < argc; i++) { t_float f=atom_getfloat(&argv[i]); if (fx_obj.ob_outlet, min); outlet_float(x->m_out_maxi, (t_float)(mini+1)); if (s) {} // prevent compiler complaint } static void *vmin_new() { t_vmin *x=(t_vmin *)pd_new(vmin_class); outlet_new(&x->x_obj, gensym("float")); x->m_out_maxi=outlet_new(&x->x_obj, gensym("float")); return (void *)x; } void vmin_setup(void) { vmin_class = class_new(gensym("vmin"), (t_newmethod)vmin_new, 0, sizeof(t_vmin), CLASS_DEFAULT, 0); class_addlist(vmin_class, (t_method)vmin_perform); } pd-smlib-0.13.0/source/vmtof.c000066400000000000000000000020301434442070000160720ustar00rootroot00000000000000#include "defines.h" /*--------------- vmtof ----------------*/ static t_class *vmtof_class; typedef struct _vmtof { t_object x_obj; } t_vmtof; t_float mtof(t_float f) { if (f <= -1500) return(0); else if (f > 1499) return(mtof(1499)); else return (t_float)(8.17579891564 * exp(.0577622650 * f)); } static void vmtof_perform(t_vmtof *x, t_symbol *s, int argc, t_atom *argv) { int i; t_atom *ap,*app; ap = (t_atom *)getbytes(sizeof(t_atom)*argc); app=ap; for (i = 0; i < argc; i++) { SETFLOAT(app, mtof(atom_getfloat(argv++))); app++; } outlet_list(x->x_obj.ob_outlet,gensym("list"),argc,ap); freebytes(ap,argc); } static void *vmtof_new() { t_vmtof *x=(t_vmtof *)pd_new(vmtof_class); outlet_new(&x->x_obj, gensym("list")); return (void *)x; } void vmtof_setup(void) { vmtof_class = class_new(gensym("vmtof"), (t_newmethod)vmtof_new, 0, sizeof(t_vmtof), CLASS_DEFAULT, 0); class_addlist(vmtof_class, (t_method)vmtof_perform); } pd-smlib-0.13.0/source/vnmax.c000066400000000000000000000021051434442070000160730ustar00rootroot00000000000000#include "defines.h" /*--------------- vnmax ---------------*/ /* maximum n values in a list of float and their locations (indices) */ //// UNCOMPLETE static t_class *vnmax_class; typedef struct _vnmax { t_object x_obj; t_outlet *m_out_maxi; } t_vnmax; static void vnmax_perform(t_vnmax *x, t_symbol *s, int argc, t_atom *argv) { int i; int maxi = 0; t_float max=-MAXFLOAT; for (i = 0; i < argc; i++) { t_float f=atom_getfloat(&argv[i]); if (f>max) { max=f; maxi=i; } } outlet_float(x->x_obj.ob_outlet, max); outlet_float(x->m_out_maxi, (t_float)(maxi+1)); if (s) {} // prevent compiler complaint } static void *vnmax_new() { t_vnmax *x=(t_vnmax *)pd_new(vnmax_class); outlet_new(&x->x_obj, gensym("list")); x->m_out_maxi=outlet_new(&x->x_obj, gensym("list")); return (void *)x; } void vnmax_setup(void) { vnmax_class = class_new(gensym("vnmax"), (t_newmethod)vnmax_new, 0, sizeof(t_vnmax), CLASS_DEFAULT, 0); class_addlist(vnmax_class, (t_method)vnmax_perform); } pd-smlib-0.13.0/source/vpow.c000066400000000000000000000021231434442070000157350ustar00rootroot00000000000000#include "defines.h" /*--------------- vpow ----------------*/ static t_class *vpow_class; typedef struct _vpow { t_object x_obj; t_float m_y; } t_vpow; static void vpow_perform(t_vpow *x, t_symbol *s, int argc, t_atom *argv) { int i; t_float y; t_atom *ap,*app; ap = (t_atom *)getbytes(sizeof(t_atom)*argc); app=ap; y=x->m_y; if (y==0.0f) y=1.0f; for (i = 0; i < argc; i++) { t_float x=atom_getfloat(argv++); if (x>0) x=(t_float)powf(x,y); else x=-1000.; SETFLOAT(app, x); app++; } outlet_list(x->x_obj.ob_outlet,gensym("list"),argc,ap); freebytes(ap,argc); } static void *vpow_new(t_float y) { t_vpow *x=(t_vpow *)pd_new(vpow_class); floatinlet_new(&x->x_obj, &x->m_y); outlet_new(&x->x_obj, gensym("list")); if (y==0.0f) y=1.0f; x->m_y=y; return (void *)x; } void vpow_setup(void) { vpow_class = class_new(gensym("vpow"), (t_newmethod)vpow_new, 0, sizeof(t_vpow), CLASS_DEFAULT, A_DEFFLOAT,A_DEFFLOAT,0); class_addlist(vpow_class, (t_method)vpow_perform); } pd-smlib-0.13.0/source/vrms.c000066400000000000000000000014631434442070000157370ustar00rootroot00000000000000#include "defines.h" /*--------------- vrms ---------------*/ static t_class *vrms_class; typedef struct _vrms { t_object x_obj; } t_vrms; static void vrms_perform(t_vrms *x, t_symbol *s, int argc, t_atom *argv) { t_float sum=0.; int i; for (i = 0; i < argc; i++) { t_float tmp=atom_getfloat(&argv[i]); sum+= tmp*tmp; } outlet_float(x->x_obj.ob_outlet, (t_float)sqrtf(sum/argc)); if (s) {} // prevent compiler complaint } static void *vrms_new() { t_vrms *x=(t_vrms *)pd_new(vrms_class); outlet_new(&x->x_obj, gensym("float")); return (void *)x; } void vrms_setup(void) { vrms_class = class_new(gensym("vrms"), (t_newmethod)vrms_new, 0, sizeof(t_vrms), CLASS_DEFAULT, 0); class_addlist(vrms_class, (t_method)vrms_perform); } pd-smlib-0.13.0/source/vrmstodb.c000066400000000000000000000021451434442070000166060ustar00rootroot00000000000000#include "defines.h" /*--------------- vrmstodb ----------------*/ static t_class *vrmstodb_class; typedef struct _vrmstodb { t_object x_obj; } t_vrmstodb; static t_float rmstodecibel(t_float f) { if (f <= 0) return (0); else { t_float val = (t_float)(100 + 20./LOGTEN * log(f)); return (val < 0 ? 0 : val); } } static void vrmstodb_perform(t_vrmstodb *x, t_symbol *s, int argc, t_atom *argv) { int i; t_atom *ap,*app; ap = (t_atom *)getbytes(sizeof(t_atom)*argc); app=ap; for (i = 0; i < argc; i++) { SETFLOAT(app, rmstodecibel(atom_getfloat(argv++))); app++; } outlet_list(x->x_obj.ob_outlet,gensym("list"),argc,ap); freebytes(ap,argc); } static void *vrmstodb_new() { t_vrmstodb *x=(t_vrmstodb *)pd_new(vrmstodb_class); outlet_new(&x->x_obj, gensym("list")); return (void *)x; } void vrmstodb_setup(void) { vrmstodb_class = class_new(gensym("vrmstodb"), (t_newmethod)vrmstodb_new, 0, sizeof(t_vrmstodb), CLASS_DEFAULT, 0); class_addlist(vrmstodb_class, (t_method)vrmstodb_perform); } pd-smlib-0.13.0/source/vstd.c000066400000000000000000000015731434442070000157320ustar00rootroot00000000000000#include "defines.h" /*--------------- vstd ---------------*/ static t_class *vstd_class; typedef struct _vstd { t_object x_obj; } t_vstd; static void vstd_perform(t_vstd *x, t_symbol *s, int argc, t_atom *argv) { t_float sumsq=0.0f; t_float sum=0.0f; int i; for (i = 0; i < argc; i++) { t_float tmp=atom_getfloat(&argv[i]); sumsq+= tmp*tmp; sum+=tmp; } sumsq/=argc; sum/=argc; outlet_float(x->x_obj.ob_outlet, (t_float)sqrtf(sumsq-sum*sum)); if (s) {} // prevent compiler complaint } static void *vstd_new() { t_vstd *x=(t_vstd *)pd_new(vstd_class); outlet_new(&x->x_obj, gensym("float")); return (void *)x; } void vstd_setup(void) { vstd_class = class_new(gensym("vstd"), (t_newmethod)vstd_new, 0, sizeof(t_vstd), CLASS_DEFAULT, 0); class_addlist(vstd_class, (t_method)vstd_perform); } pd-smlib-0.13.0/source/vsum.c000066400000000000000000000013341434442070000157370ustar00rootroot00000000000000#include "defines.h" /*--------------- vsum ---------------*/ static t_class *vsum_class; typedef struct _vsum { t_object x_obj; } t_vsum; static void vsum_perform(t_vsum *x, t_symbol *s, int argc, t_atom *argv) { t_float sum=0.; int i; for (i = 0; i < argc; i++) { sum+= atom_getfloat(&argv[i]); } outlet_float(x->x_obj.ob_outlet, sum); } static void *vsum_new() { t_vsum *x=(t_vsum *)pd_new(vsum_class); outlet_new(&x->x_obj, gensym("float")); return (void *)x; } void vsum_setup(void) { vsum_class = class_new(gensym("vsum"), (t_newmethod)vsum_new, 0, sizeof(t_vsum), CLASS_DEFAULT, 0); class_addlist(vsum_class, (t_method)vsum_perform); } pd-smlib-0.13.0/source/vthreshold.c000066400000000000000000000066011434442070000171310ustar00rootroot00000000000000/* --------------------- vthreshold ----------------------------- */ #include "defines.h" #include "memory.h" static t_class *vthreshold_class; typedef struct _vthreshold { t_object x_obj; t_outlet *x_outlet1; /* bang out for high thresh */ t_outlet *x_outlet2; /* bang out for low thresh */ int *x_state; /* 1 = high, 0 = low */ int x_n; t_float x_hithresh; /* value of high vthreshold */ t_float x_lothresh; /* value of low vthreshold */ t_float x_hideadtime; /* hi dead */ t_float x_lodeadtime; /* lo dead */ } t_vthreshold; /* "set" message to specify vthresholds and dead times */ static void vthreshold_set(t_vthreshold *x, t_floatarg hithresh, t_floatarg hideadtime, t_floatarg lothresh, t_floatarg lodeadtime, t_floatarg nf) { if (lothresh > hithresh) lothresh = hithresh; x->x_hithresh = hithresh; x->x_hideadtime = hideadtime; x->x_lothresh = lothresh; x->x_lodeadtime = lodeadtime; freebytes(x->x_state,x->x_n); x->x_n=(int)nf; x->x_state = (int *)getbytes(sizeof(int)*x->x_n); memset(x->x_state , 0, x->x_n); } static t_vthreshold *vthreshold_new(t_floatarg hithresh, t_floatarg hideadtime, t_floatarg lothresh, t_floatarg lodeadtime, t_floatarg n) { t_vthreshold *x = (t_vthreshold *) pd_new(vthreshold_class); x->x_state = 0; /* low state */ x->x_outlet1 = outlet_new(&x->x_obj, gensym("float")); x->x_outlet2 = outlet_new(&x->x_obj, gensym("float")); vthreshold_set(x, hithresh, hideadtime, lothresh, lodeadtime, n); return (x); } static void vthreshold_free(t_vthreshold *x) { freebytes(x->x_state,x->x_n); } static void vthreshold_perform(t_vthreshold *x, t_symbol *s, int argc, t_atom *argv) { int i; int *state; state=x->x_state; if (argc>x->x_n) argc=x->x_n; for (i=0;ix->x_hithresh) { outlet_float(x->x_outlet1, (t_float)i); // on *state=1; } } else { if (fx_lothresh) { outlet_float(x->x_outlet2, (t_float)i); // off *state=-1; } } state++; } } static void vthreshold_status(t_vthreshold *x) { post("--==## vthreshold status ##==--"); int *state = x->x_state; int i; for (i = 0; i < x->x_n; i++) { post("*%d x_state: %d", i, *state++); } post("int x_n: %d", x->x_n); post("x_hithresh: %f", x->x_hithresh); post("x_lothresh: %f", x->x_lothresh); post("x_hideadtime: %f", x->x_hideadtime); post("x_lodeadtime: %f", x->x_lodeadtime); } /* static void vthreshold_ff(t_vthreshold *x) { freebytes(x->x_state,x->x_n); } */ void vthreshold_setup( void) { vthreshold_class = class_new(gensym("vthreshold"), (t_newmethod)vthreshold_new, (t_method)vthreshold_free, sizeof(t_vthreshold), 0, A_DEFFLOAT, A_DEFFLOAT, A_DEFFLOAT, A_DEFFLOAT, A_DEFFLOAT, 0); class_addlist(vthreshold_class, (t_method)vthreshold_perform); class_addmethod(vthreshold_class, (t_method)vthreshold_set, gensym("set"), A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, 0); class_addmethod(vthreshold_class, (t_method)vthreshold_status, gensym("status"), 0); // class_addmethod(vthreshold_class, (t_method)vthreshold_ft1, // gensym("ft1"), A_FLOAT, 0); } pd-smlib-0.13.0/source/vvconv.c000066400000000000000000000064631434442070000162760ustar00rootroot00000000000000#include "defines.h" /*--------------- vvconv ---------------*/ /* vector convolution */ static t_class *vvconv_class; static t_class *vvconv_scal_class; typedef struct _vvconv { t_object x_obj; t_int n1, n2; t_float *buf1, *buf2; t_float f; } t_vvconv; static void vvconv_lst2(t_vvconv *x, t_symbol *s, int argc, t_atom *argv) { t_float *fp; if (x->n2 != argc) { freebytes(x->buf2, x->n2 * sizeof(t_float)); x->n2 = argc; x->buf2=(t_float *)getbytes(sizeof(t_float)*x->n2); }; fp = x->buf2; while(argc--)*fp++=atom_getfloat(argv++); } static void vvconv_lst(t_vvconv *x, t_symbol *s, int argc, t_atom *argv) { t_float *fp; t_atom *ap; int n; if (argc){ if (x->n1 != argc) { freebytes(x->buf1, x->n1 * sizeof(t_float)); x->n1 = argc; x->buf1=(t_float *)getbytes(sizeof(t_float)*x->n1); }; fp = x->buf1; while(argc--)*fp++=atom_getfloat(argv++); } if (x->n1*x->n2==1){ outlet_float(x->x_obj.ob_outlet, *x->buf1**x->buf2); return; } if (x->n1==1){ t_atom *a; int i = x->n2; t_float f = *x->buf1; fp = x->buf2; n = x->n2; ap = (t_atom *)getbytes(sizeof(t_atom)*n); a = ap; while(i--){ SETFLOAT(a, *fp++*f); a++; } } else if (x->n2==1){ t_float f = *x->buf2; t_atom *a; int i = x->n1; n = x->n1; ap = (t_atom *)getbytes(sizeof(t_atom)*n); a = ap; fp = x->buf1; while(i--){ SETFLOAT(a, *fp++*f); a++; } } else { t_atom *a; int i,j,n1,n2; t_float *f; t_float *g; t_float *fp2=x->buf2; fp = x->buf1; n1=x->n1; n2=x->n2; n = n1 + n2 - 1; f = (t_float *)getbytes(sizeof(t_float)*n); g=f; for(i=0;ix_obj.ob_outlet, gensym("list"), n, ap); freebytes(ap, sizeof(t_atom)*n); } static void vvconv_free(t_vvconv *x) { freebytes(x->buf1, sizeof(t_float)*x->n1); freebytes(x->buf2, sizeof(t_float)*x->n2); } static void *vvconv_new(t_symbol *s, int argc, t_atom *argv) { t_vvconv *x; if (argc-1){ x = (t_vvconv *)pd_new(vvconv_class); inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("list"), gensym("")); } else x = (t_vvconv *)pd_new(vvconv_scal_class); outlet_new(&x->x_obj, 0); x->n1 =1; x->buf1 =(t_float*)getbytes(sizeof(t_float)); *x->buf1=0; if (argc)vvconv_lst2(x, gensym("list"), argc, argv); else { x->n2 =1; x->buf2 =(t_float*)getbytes(sizeof(t_float)); *x->buf2=0; } if (argc==1)floatinlet_new(&x->x_obj, x->buf2); return (x); } void vvconv_setup(void) { vvconv_class = class_new(gensym("vvconv"), (t_newmethod)vvconv_new, (t_method)vvconv_free, sizeof(t_vvconv), 0, A_GIMME, 0); class_addlist(vvconv_class, vvconv_lst); class_addmethod (vvconv_class, (t_method)vvconv_lst2, gensym(""), A_GIMME, 0); vvconv_scal_class = class_new(gensym("vv+"), 0, (t_method)vvconv_free, sizeof(t_vvconv), 0, 0); class_addlist(vvconv_scal_class, vvconv_lst); } pd-smlib-0.13.0/source/vvminus.c000066400000000000000000000064471434442070000164660ustar00rootroot00000000000000#include "defines.h" /*--------------- vvminus ---------------*/ /* vector substraction */ static t_class *vvminus_class; static t_class *vvminus_scal_class; typedef struct _vvminus { t_object x_obj; t_int n1, n2; t_float *buf1, *buf2; t_float f; } t_vvminus; static void vvminus_lst2(t_vvminus *x, t_symbol *s, int argc, t_atom *argv) { t_float *fp; if (x->n2 != argc) { freebytes(x->buf2, x->n2 * sizeof(t_float)); x->n2 = argc; x->buf2=(t_float *)getbytes(sizeof(t_float)*x->n2); }; fp = x->buf2; while(argc--)*fp++=atom_getfloat(argv++); } static void vvminus_lst(t_vvminus *x, t_symbol *s, int argc, t_atom *argv) { t_float *fp; t_atom *ap; int n; if (argc){ if (x->n1 != argc) { freebytes(x->buf1, x->n1 * sizeof(t_float)); x->n1 = argc; x->buf1=(t_float *)getbytes(sizeof(t_float)*x->n1); }; fp = x->buf1; while(argc--)*fp++=atom_getfloat(argv++); } if (x->n1*x->n2==1){ outlet_float(x->x_obj.ob_outlet, *x->buf1-*x->buf2); return; } if (x->n1==1){ t_atom *a; int i = x->n2; t_float f = *x->buf1; fp = x->buf2; n = x->n2; ap = (t_atom *)getbytes(sizeof(t_atom)*n); a = ap; while(i--){ SETFLOAT(a, f-*fp++); a++; } } else if (x->n2==1){ t_float f = *x->buf2; t_atom *a; int i = x->n1; n = x->n1; ap = (t_atom *)getbytes(sizeof(t_atom)*n); a = ap; fp = x->buf1; while(i--){ SETFLOAT(a, *fp++-f); a++; } } else { t_atom *a; int i; t_float *fp2=x->buf2; fp = x->buf1; n = x->n1; if (x->n1!=x->n2){ post("scalar multiplication: truncating vectors to the same length"); if (x->n2n1)n=x->n2; } ap = (t_atom *)getbytes(sizeof(t_atom)*n); a = ap; i=n; while(i--){ SETFLOAT(a, *fp++-*fp2++); a++; } } outlet_list(x->x_obj.ob_outlet, gensym("list"), n, ap); freebytes(ap, sizeof(t_atom)*n); } static void vvminus_free(t_vvminus *x) { freebytes(x->buf1, sizeof(t_float)*x->n1); freebytes(x->buf2, sizeof(t_float)*x->n2); } static void *vvminus_new(t_symbol *s, int argc, t_atom *argv) { t_vvminus *x; if (argc-1){ x = (t_vvminus *)pd_new(vvminus_class); inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("list"), gensym("")); } else x = (t_vvminus *)pd_new(vvminus_scal_class); outlet_new(&x->x_obj, 0); x->n1 =1; x->buf1 =(t_float*)getbytes(sizeof(t_float)); *x->buf1=0; if (argc)vvminus_lst2(x, gensym("list"), argc, argv); else { x->n2 =1; x->buf2 =(t_float*)getbytes(sizeof(t_float)); *x->buf2=0; } if (argc==1)floatinlet_new(&x->x_obj, x->buf2); return (x); } void vvminus_setup(void) { vvminus_class = class_new(gensym("vvminus"), (t_newmethod)vvminus_new, (t_method)vvminus_free, sizeof(t_vvminus), 0, A_GIMME, 0); class_addcreator((t_newmethod)vvminus_new, gensym("vv-"), A_GIMME, 0); class_addlist(vvminus_class, vvminus_lst); class_addmethod (vvminus_class, (t_method)vvminus_lst2, gensym(""), A_GIMME, 0); vvminus_scal_class = class_new(gensym("vv-"), 0, (t_method)vvminus_free, sizeof(t_vvminus), 0, 0); class_addlist(vvminus_scal_class, vvminus_lst); } pd-smlib-0.13.0/source/vvplus.c000066400000000000000000000064011434442070000163040ustar00rootroot00000000000000#include "defines.h" /*--------------- vvplus ---------------*/ /* vector addition */ static t_class *vvplus_class; static t_class *vvplus_scal_class; typedef struct _vvplus { t_object x_obj; t_int n1, n2; t_float *buf1, *buf2; t_float f; } t_vvplus; static void vvplus_lst2(t_vvplus *x, t_symbol *s, int argc, t_atom *argv) { t_float *fp; if (x->n2 != argc) { freebytes(x->buf2, x->n2 * sizeof(t_float)); x->n2 = argc; x->buf2=(t_float *)getbytes(sizeof(t_float)*x->n2); }; fp = x->buf2; while(argc--)*fp++=atom_getfloat(argv++); } static void vvplus_lst(t_vvplus *x, t_symbol *s, int argc, t_atom *argv) { t_float *fp; t_atom *ap; int n; if (argc){ if (x->n1 != argc) { freebytes(x->buf1, x->n1 * sizeof(t_float)); x->n1 = argc; x->buf1=(t_float *)getbytes(sizeof(t_float)*x->n1); }; fp = x->buf1; while(argc--)*fp++=atom_getfloat(argv++); } if (x->n1*x->n2==1){ outlet_float(x->x_obj.ob_outlet, *x->buf1+*x->buf2); return; } if (x->n1==1){ t_atom *a; int i = x->n2; t_float f = *x->buf1; fp = x->buf2; n = x->n2; ap = (t_atom *)getbytes(sizeof(t_atom)*n); a = ap; while(i--){ SETFLOAT(a, *fp+++f); a++; } } else if (x->n2==1){ t_float f = *x->buf2; t_atom *a; int i = x->n1; n = x->n1; ap = (t_atom *)getbytes(sizeof(t_atom)*n); a = ap; fp = x->buf1; while(i--){ SETFLOAT(a, *fp+++f); a++; } } else { t_atom *a; int i; t_float *fp2=x->buf2; fp = x->buf1; n = x->n1; if (x->n1!=x->n2){ post("scalar multiplication: truncating vectors to the same length"); if (x->n2n1)n=x->n2; } ap = (t_atom *)getbytes(sizeof(t_atom)*n); a = ap; i=n; while(i--){ SETFLOAT(a, *fp+++*fp2++); a++; } } outlet_list(x->x_obj.ob_outlet, gensym("list"), n, ap); freebytes(ap, sizeof(t_atom)*n); } static void vvplus_free(t_vvplus *x) { freebytes(x->buf1, sizeof(t_float)*x->n1); freebytes(x->buf2, sizeof(t_float)*x->n2); } static void *vvplus_new(t_symbol *s, int argc, t_atom *argv) { t_vvplus *x; if (argc-1){ x = (t_vvplus *)pd_new(vvplus_class); inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("list"), gensym("")); } else x = (t_vvplus *)pd_new(vvplus_scal_class); outlet_new(&x->x_obj, 0); x->n1 =1; x->buf1 =(t_float*)getbytes(sizeof(t_float)); *x->buf1=0; if (argc)vvplus_lst2(x, gensym("list"), argc, argv); else { x->n2 =1; x->buf2 =(t_float*)getbytes(sizeof(t_float)); *x->buf2=0; } if (argc==1)floatinlet_new(&x->x_obj, x->buf2); return (x); } void vvplus_setup(void) { vvplus_class = class_new(gensym("vvplus"), (t_newmethod)vvplus_new, (t_method)vvplus_free, sizeof(t_vvplus), 0, A_GIMME, 0); class_addcreator((t_newmethod)vvplus_new, gensym("vv+"), A_GIMME, 0); class_addlist(vvplus_class, vvplus_lst); class_addmethod (vvplus_class, (t_method)vvplus_lst2, gensym(""), A_GIMME, 0); vvplus_scal_class = class_new(gensym("vv+"), 0, (t_method)vvplus_free, sizeof(t_vvplus), 0, 0); class_addlist(vvplus_scal_class, vvplus_lst); } pd-smlib-0.13.0/toDo.txt000066400000000000000000000000531434442070000147440ustar00rootroot00000000000000fix itov fix vnmax (now the same as vmax) pd-smlib-0.13.0/unittests/000077500000000000000000000000001434442070000153425ustar00rootroot00000000000000pd-smlib-0.13.0/unittests/bp-unittest.pd000066400000000000000000000007701434442070000201510ustar00rootroot00000000000000#N canvas 125 86 728 520 10; #X msg 49 90 bp 0; #X obj 49 58 loadbang; #X obj 370 23 - 0.5; #X msg 382 58 clear; #X obj 370 -34 & 127; #X obj 370 -3 / 128; #X obj 370 89 smlib/bp 0.05 4; #X text 48 -23 bp: bandpass filter on float stream; #X text 46 -5 the non-audio version of bp~; #X obj 49 128 testtools/unit-test-frame; #X connect 0 0 9 0; #X connect 1 0 0 0; #X connect 2 0 6 0; #X connect 3 0 6 0; #X connect 4 0 5 0; #X connect 5 0 2 0; #X connect 6 0 9 1; #X connect 9 2 4 0; #X connect 9 3 3 0; pd-smlib-0.13.0/unittests/bp.wav000066400000000000000000000040541434442070000164650ustar00rootroot00000000000000RIFF$WAVEfmt D dataJ!V,ɾ9ξ:ʾFjOwW7>,x@!+cIp%$.ߵ7@G~KMzJTE=@X48)Gr Jݽֽ0ѽ̽ȽĽ9E30񵉽"{rc2K+C43鼲üSw2vYݻ(:gB;+< w<g>? >@>l>> >V%> *>.>3>[x8>?=> B>=F>K>7gP>3U>Z>^>c>mh>l r>v>}{>9>>>k>щ>r7>:>>i>ϕ>D8u>C>ɛ<,{緾&pk @ľբLIB i+Ͻ ƽ9ӽV@4$;ZM7[c;Id|_{UGp7&] bAC߽r`нJƽTm½½cպ}cdNR(Q4i#rM$2$׼a|t\m:JƻZ6:i;`{<g<5<$<<><Ɉ ==v4=\I=]=Fq==N=F==A=6q===7= =$==i=$=_t>X>!; >`>^>A>ӟ >cl%>4*>.>3>J8>A=>B>F>K>]P>}*U>Y>^>c>jh>;m> r>vv>{>;>>>m>҉>'8>y>>h>YΕ>6u>A><<{$跾&pkԯľEբSI- jϽƽ ӽW$:;MC[cId|_GUG?7&; K)C߽`нlƽIUn½½jպqNd2R QiqM$2$&׼a}=u\:.ƻ\:4i;V{<g<5<$<ֈ ==4=\I=]=Oq==N=J==A=3q==}=7=={$==i=$=ct> X>%; >c>`>D>՟ >el%>4*>.>3>G8>A=>B>F>K>]P>z*U>Y>^>}c>jh>~;m> r>rv>{>;>>>m>҉>'8>w>>h>VΕ>y6u>A>k<<{#跾&pkԯľEբSI- jϽƽ ӽW$:;MC[cId|_GUG?7&; K)C߽`нlƽIUn½½jպqNd2R QiqM$2$&׼a}=u\:.ƻ\:4i;V{<g<5<$<ֈ ==4=\I=]=Oq==N=J==A=3q==}=7=={$==i=$=ct> X>%; >c>`>D>՟ >el%>4*>.>3>G8>A=>B>F>K>]P>z*U>Y>^>}c>jh>~;m> r>rv>{>;>>>m>҉>'8>w>>h>VΕ>pd-smlib-0.13.0/unittests/decimator-unittest.pd000066400000000000000000000005411434442070000215130ustar00rootroot00000000000000#N canvas 429 42 759 521 10; #X obj 49 128 testtools/unit-test-frame; #X obj 49 58 loadbang; #X obj 370 -14 & 127; #X msg 49 91 decimator 0; #X obj 370 45 - 1; #X obj 370 14 / 64; #X obj 370 73 smlib/decimator 2; #X connect 0 2 2 0; #X connect 1 0 3 0; #X connect 2 0 5 0; #X connect 3 0 0 0; #X connect 4 0 6 0; #X connect 5 0 4 0; #X connect 6 0 0 1; pd-smlib-0.13.0/unittests/decimator.wav000066400000000000000000000040541434442070000200330ustar00rootroot00000000000000RIFF$WAVEfmt D dataxph`XPH@80( о`@ ===> >@>`>>>>>>>>>???? ?(?0?8?@?H?P?X?`?h?p?x?xph`XPH@80( о`@ ===> >@>`>>>>>>>>>???? ?(?0?8?@?H?P?X?`?h?p?x?xph`XPH@80( о`@ ===> >@>`>>>>>>>>>???? ?(?0?8?@?H?P?X?`?h?p?x?xph`XPH@80( о`@ ===> >@>`>>>>>>>>>???? ?(?0?8?@?H?P?X?`?h?p?x?pd-smlib-0.13.0/unittests/deltas-unittest.pd000066400000000000000000000015531434442070000210240ustar00rootroot00000000000000#N canvas 429 42 759 521 10; #X obj 49 128 testtools/unit-test-frame; #X obj 49 58 loadbang; #X obj 397 67 - 1; #X msg 49 91 deltas 0; #X text 39 -60 deltas: generates vector with differences between last input and past inputs; #X text 235 31 x(i)-x(i-a); #X text 235 45 x(i)-x(i-(a+1)); #X text 235 59 x(i)-x(i-(a+2)); #X text 235 85 x(i)-x(i-(b)); #X text 526 28 [deltas a b c]; #X text 525 74 requires b<=c; #X text 525 58 c = buffer size; #X obj 370 -11 cos; #X obj 370 38 t b f; #X text 41 -22 ('vector' = list); #X obj 370 13 * 0.25; #X obj 370 -38 / 32; #X msg 427 67 clear; #X obj 370 96 smlib/deltas 64 64 128; #X connect 0 2 16 0; #X connect 0 3 17 0; #X connect 1 0 3 0; #X connect 2 0 18 0; #X connect 3 0 0 0; #X connect 12 0 15 0; #X connect 13 0 18 0; #X connect 13 1 2 0; #X connect 15 0 13 0; #X connect 16 0 12 0; #X connect 17 0 18 0; #X connect 18 0 0 1; pd-smlib-0.13.0/unittests/deltas.wav000066400000000000000000000040541434442070000173400ustar00rootroot00000000000000RIFF$WAVEfmt D data@@@G@@@(ApAWABCCrD5E&FHFG"H`I&J.L0KM߉NO,QΎRSvUVXZ?[k]_`+bgd8fh{ikmoqs9u~wzy y{>x}xһ/޹1WШ`ǕɈ)yL4޻|ľxƾFɾ`˾G;@ξ8{оѾ|Ҿ0ӾnԾԾ +վ09վ վԾ$Ծl]ӾaҾ1ѾϾL5ξxi̾jʾ9Ⱦjž`@þz:_J ۯzˣs򚾤KyCyncgX0LA 5(xӽ幽 ̟OVT!bؼ[PӹN<<` =` S=P=,=I= 7==> V>>$(>pN4> K@>L>XW>c>?n>T/y>0>>(>>>1>> >,>ć>ع>>6>P>ն>+>T>L>>>>:I>PK>P>е>`>P>dO>J>*> >P8>z->V>w>|>>>J>>d>(>li>X >~>z>>>dո>k> ձ>>"> >ơ>p[>Ș>>$2>0>V >̍>t>i>x^>R>PG>xo;>`/>$#>>7 >=X~====\r= |==pl=`u<;кDP6kp?PqxĽN޽x85!-9E Q]4Yhhs;~fXTw"5̜<@b `k澾\jSľhƾ#ɾ@˾*;ξdоѾҾӾeԾԾj(վ9վվԾ.ԾFkӾsҾHFѾ,ϾPξn̾ʾ>]Ⱦžjþ䴽vdA³>;4;,̑f݌fˇxązoHzdxYhMA5)YI@iս k,@Y $޼hxeA<@4<=O=G==`=p=`Z=`>> >hb'>3>x?> ^K>V>bb>m>x>^>xֆ>>J>|>@a>n>C>x>P>8c>H>>:>^#>@>>6>>'>,>$>ԝ>>(?>&A>T>z>| ><7>/>>ƀ>>n>>(>->L>>>F>>>>%>K>`B> >T>@>N>b>K>x >>j>[>Z>䀊>^>h>ou>kj>,_>DS> H>,-<> 0>#>\> >`==`I=J=8 =u=@=ж = <FH+뗾ℜB(cYh%Ĵ6zu*ľ$ƾɾ ˾ ;ξzNо̠ѾҾӾP\ԾԾ%վV:վվԾ8ԾxӾҾpZѾϾjξ4̾ʾHȾ#ƾþ 彾źPw@2R}|rR8ᖾ2,pd-smlib-0.13.0/unittests/hip-unittest.pd000066400000000000000000000007741434442070000203340ustar00rootroot00000000000000#N canvas 453 60 728 520 10; #X obj 49 128 testtools/unit-test-frame; #X obj 49 58 loadbang; #X msg 382 31 clear; #X obj 370 -34 & 127; #X msg 49 90 hip 0; #X obj 370 62 smlib/hip 0.01 4; #X obj 370 -3 / 64; #X obj 370 91 + 0.5; #X text 49 -33 hip: highpass filter on float stream; #X text 47 -15 the non-audio version of hip~; #X connect 0 2 3 0; #X connect 0 3 2 0; #X connect 1 0 4 0; #X connect 2 0 5 0; #X connect 3 0 6 0; #X connect 4 0 0 0; #X connect 5 0 7 0; #X connect 6 0 5 0; #X connect 7 0 0 1; pd-smlib-0.13.0/unittests/hip.wav000066400000000000000000000040541434442070000166440ustar00rootroot00000000000000RIFF$WAVEfmt D data???C ??ƣ? ?=??E)?Ld?s{ ?p"?F$?x%?F'?$)?*?|+?-?XF.?^/?d0?Y1??2?3?3?T4?P5?L5?H6?p%7?h7?.8?8?9?9?9?PA:?H:?:?06;?};?;?;?:?p/>?0G>?p]>?Pr>?>?0>?`>?p>?>?>?>?P>?>???????#??,??3??P;??@B??H??N??T??Y??^??c??g??l??o??s??v?? z?? }????????@??`??`??@??????@???? ??`??????????????`?? ?????? ????@????@???? ??????@?????? ??@-`@@e`LK{29n฻חolh-k&="=@>@)>IO>@nr> >@> >@#>`>@>>\>)> X>p>(?I? ?@&?B?-??x?`? ?9 ?P3"?@ $?P%?i'?(? ]*?+?,?!.?;/?C0?;1?#2?02?3?4?;5?5? 6?7?7?8?P8? 9?t9?P9?5:?:?:?,;?t;?;?;?`3?`,>?@D>?Z>?o>?>?>?@>?>?>?>?@>?>?>???????"??+??3??`:??`A??G??N??S?? Y??@^??c??`g??k??`o?? s??v??y??|???? ??????p;$e@bK2L#⾀ػ@l-ld%=׭=>@)>*O>@Qr>>> > >>`>`>S>!>P>P>~?F? ?#? @?*?@?u?`?@?7 ?1"? $?%?0h'?P(?[*?+?,? .?:/?C0?:1?"2?p2?`3?p4?:5?P5?6?7? 7?8?8? 9?0t9?9?5:?P:?:?,;?t;?`;?;?03?@,>?@D>?Z>?o>?`>?>?@>?`>?>?>?@>?>?>???????"??+??2??`:??`A??G??N??S?? Y??@^??c??`g??k??`o?? s??v??y??|???? ??????p;$e@bK2L#⾀ػ@l-ld%=׭=>@)>*O>@Qr>>> > >>`>`>S>!>P>P>~?F? ?#? @?*?@?u?`?@?7 ?1"? $?%?0h'?P(?[*?+?,? .?:/?C0?:1?"2?p2?`3?p4?:5?P5?6?7? 7?8?8? 9?0t9?9?5:?P:?:?,;?t;?`;?;?03?@,>?@D>?Z>?o>?`>?>?@>?`>?>?>?@>?>?>???????"??+??2??`:??`A??G??N??S?? Y??@^??c??`g??k??`o?? s??v??y??|???? ??????pd-smlib-0.13.0/unittests/hist-unittest.pd000066400000000000000000000037521434442070000205220ustar00rootroot00000000000000#N canvas 90 37 722 560 10; #X obj 49 186 testtools/unit-test-frame; #X obj 49 58 loadbang; #X msg 426 64 clear; #X msg 49 90 hist 0; #X obj 370 6 cos; #X msg 306 64 absolute; #N canvas 628 152 504 542 list-drip 0; #X obj 68 94 t a a; #X obj 68 251 spigot; #X obj 101 159 bang; #X obj 101 185 1; #X obj 207 160 route bang; #X obj 170 160 bang; #X obj 170 186 0; #X obj 101 124 list split 2; #X obj 134 348 list split; #X obj 191 297 list length; #X obj 191 319 >> 1; #X obj 68 280 t a a a a; #X obj 68 439 list split; #X obj 125 391 list length; #X obj 125 416 >> 1; #X obj 41 29 inlet; #X obj 264 186 outlet; #X text 83 29 Copyright 2009 by Mathieu Bouchard; #X obj 41 63 t b a; #X obj 328 80 outlet; #X text 383 82 signal end of list; #X text 35 502 made compatible with [list-drip]: fbar 2009; #X connect 0 0 1 0; #X connect 0 1 7 0; #X connect 1 0 11 0; #X connect 2 0 3 0; #X connect 3 0 1 1; #X connect 4 1 16 0; #X connect 5 0 6 0; #X connect 6 0 1 1; #X connect 7 0 2 0; #X connect 7 2 4 0; #X connect 7 2 5 0; #X connect 8 0 0 0; #X connect 9 0 10 0; #X connect 10 0 8 1; #X connect 11 0 12 0; #X connect 11 1 13 0; #X connect 11 2 8 0; #X connect 11 3 9 0; #X connect 12 1 0 0; #X connect 13 0 14 0; #X connect 14 0 12 1; #X connect 15 0 18 0; #X connect 18 0 19 0; #X connect 18 1 0 0; #X restore 370 125 pd list-drip; #X obj 370 -46 / 128; #X obj 370 36 abs; #X obj 370 -19 * 3.14159; #X text 116 -52 hist: histograms; #X text 116 -9 - value of first class; #X text 116 18 - number of classes; #X text 116 5 - value of last class; #X text 114 -24 arguments:; #X text 116 53 - array of samples in classes; #X text 114 38 output:; #X obj 370 64 pow 0.5; #X obj 370 98 smlib/hist 0 1 512; #X obj 370 151 / 8; #X connect 0 1 5 0; #X connect 0 2 7 0; #X connect 0 3 2 0; #X connect 1 0 3 0; #X connect 2 0 18 0; #X connect 3 0 0 0; #X connect 4 0 8 0; #X connect 5 0 18 0; #X connect 6 0 19 0; #X connect 7 0 9 0; #X connect 8 0 17 0; #X connect 9 0 4 0; #X connect 17 0 18 0; #X connect 18 0 6 0; #X connect 19 0 0 1; pd-smlib-0.13.0/unittests/hist.wav000066400000000000000000000040541434442070000170330ustar00rootroot00000000000000RIFF$WAVEfmt D data>>???????????????????????????????????????????????????????????@pd-smlib-0.13.0/unittests/itov-unittest.pd000066400000000000000000000014751434442070000205340ustar00rootroot00000000000000#N canvas 407 51 722 560 10; #X obj 49 186 testtools/unit-test-frame; #X obj 49 58 loadbang; #X msg 49 90 itov 0; #X text 118 41 - value of first class; #X text 118 68 - number of classes; #X text 118 55 - value of last class; #X text 117 26 arguments:; #X text 117 88 output:; #X text 121 -33 itov: intex to value; #X text 118 -4 input:; #X text 119 12 - class index; #X text 114 151 out-of-range input is clipped; #X text 118 117 - center value of class i; #X text 118 103 - lower value of class i; #X text 118 131 - upper value of class i; #X obj 318 66 cos; #X obj 318 42 / 128; #X obj 318 89 + 1; #X obj 318 138 smlib/itov 0 1 512; #X obj 318 112 * 256; #X connect 0 2 16 0; #X connect 1 0 2 0; #X connect 2 0 0 0; #X connect 15 0 17 0; #X connect 16 0 15 0; #X connect 17 0 19 0; #X connect 18 1 0 1; #X connect 19 0 18 0; pd-smlib-0.13.0/unittests/itov.wav000066400000000000000000000040541434442070000170450ustar00rootroot00000000000000RIFF$WAVEfmt D data??|?w?p?g?\?O?@?/? ??~?&~?2~?B~?V~?m_~?<~?~?}?}?1}?lp}?A}?}?R|?|?s|?:|?|?{?R{?E{?{?z?xz?0z?y?y?Ly?Sx?ūx?SXx?x?ƫw?Rw?v?v?.?=?-?,? +?f*?)?(?|'?;&?\%?%? $?6#? "?N)!?2 ?K:? B?MI?P?rV?\\?a?f?k?o?s?w?z?}????? ? ?I ?U ?4 ??}??F???ȏ?Տ?ڏ?>>>> >V > >r!>P">m#>$>&>(>*>->1>4>8>=> C>H>tO>V>x^>g>Up>iz>L>>>>~>ȿ>6ٽ>>>>%>:>Q>i>:>ҝ>>֨>t>a>6>xY>}>j>ʛ>r>>I>fw>>א>V >>>t>>>">2`>>/>z>cw> s>8p>(m>@i>8lf>c>N_>r\>J(Y>U>R>2eO>-L>H>E>B>H?>`<>E9>06> 3>0>->*>'>$>.!>C>r^>~>d>>>7 >8t >>>L>A=== =hZ=?=0=p-=\7=M=q===h'=~==lR=\Ы=[===\M=@=ܑ=不==h=쟁=f{=ps=Hl=Xd=]=pU=N=G=`@=9=x2=`,=%=x=h1=`= = =;=<0<<б< p<``<@.M<@\<`l<@:}<<0֏<Ϙ<@=xE=hL=T=8I[=تb=(j=q=Hyy=ĥ=М==t=Ԑ= =>==ޡ=C==P3=L=hX===q=>=X===$==d=:=j=̧==>TS> > > >O>,>^>6>>>"u >d#>xX&>6R)>HQ,>pd-smlib-0.13.0/unittests/lavg-unittest.pd000066400000000000000000000007751434442070000205060ustar00rootroot00000000000000#N canvas 390 195 737 489 10; #X obj 49 128 testtools/unit-test-frame; #X obj 49 58 loadbang; #X msg 382 58 clear; #X obj 370 -34 & 127; #X obj 370 88 smlib/lavg 10; #X obj 370 -3 / 64; #X obj 370 24 - 1; #X text 37 -16 lavg: leaky average; #X text 36 1 argument: half-decay time (in number of activations); #X msg 49 88 lavg 0; #X connect 0 2 3 0; #X connect 0 3 2 0; #X connect 1 0 9 0; #X connect 2 0 4 0; #X connect 3 0 5 0; #X connect 4 0 0 1; #X connect 5 0 6 0; #X connect 6 0 4 0; #X connect 9 0 0 0; pd-smlib-0.13.0/unittests/lavg.wav000066400000000000000000000040541434442070000170150ustar00rootroot00000000000000RIFF$WAVEfmt D data&|d=xqn7ڦbB̾ݾM^ j"U=a$]enCQ_-]o> ؔ lQ\gKzl*[OھӾ ;yHƾn#YqP 㔾`A}1n_[PA2#NY|o!̽ѭj䎽_!Ƽ;<={U=*=Z=)!==>>W#>3>`C>F9S>vc>r>i>Z>!L>?>2>'>>4> >j>g>>>r>`>>i?>g?d?b ?`?^?/]?[? Z ?X$?MW(?V,?T0?S4?R8?Q>>^8>0=%=FJjg3_gOdzB^h;p׾فnEmڌL65!I9xĀTRt ye3;ݾؾEҾ~);uǾ'wP5ըYÛOu1HsdVUKHH9@9+ 0߽YڣoNqw–vk<ڝ>']%>5>D>T>`Sd>t>>ۉ>đ>߯>->͉>x>h>Y>K>>>2>a'>>> >?|?x?fu ?&r?o?Jl?i?1g ?d$?b(?`,?^0?$]4?[8?Z>>$q8>=&=0a&]Z3_KbT_Ԟ>Z ; m׾fґ~Blj624 и(N8Ax1*TPsE jx뾻\3L;ݾFؾIJҾ);uǾQw4ԨX›Ousd3VKH98+ j߽W٣nNvrm<<*"=*`=&=G=w=ص=m>>5]%>5>D> T>kSd>t>>ۉ>đ>⯙>0>Љ>x>h>Y>K>>>2>c'>>> >?|?x?fu ?&r?o?Jl?i?1g ?d$?b(?`,?^0?$]4?[8?Z>>$q8>=&=0a&]Z3_KbT_Ԟ>Z ; m׾fґ~Blj624 и(N8Ax1*TPsE jx뾻\3L;ݾFؾIJҾ);uǾQw4ԨX›Ousd3VKH98+ j߽W٣nNvrm<<*"=*`=&=G=w=ص=m>>5]%>5>D> T>kSd>t>>ۉ>đ>⯙>0>Љ>x>h>Y>K>>>2>c'>>> >?|?x?fu ?&r?o?Jl?i?1g ?d$?b(?`,?^0?$]4?[8?Z> 1; #X obj 68 280 t a a a a; #X obj 68 439 list split; #X obj 125 391 list length; #X obj 125 416 >> 1; #X obj 41 29 inlet; #X obj 264 186 outlet; #X text 83 29 Copyright 2009 by Mathieu Bouchard; #X obj 41 63 t b a; #X obj 328 80 outlet; #X text 383 82 signal end of list; #X text 35 502 made compatible with [list-drip]: fbar 2009; #X connect 0 0 1 0; #X connect 0 1 7 0; #X connect 1 0 11 0; #X connect 2 0 3 0; #X connect 3 0 1 1; #X connect 4 1 16 0; #X connect 5 0 6 0; #X connect 6 0 1 1; #X connect 7 0 2 0; #X connect 7 2 4 0; #X connect 7 2 5 0; #X connect 8 0 0 0; #X connect 9 0 10 0; #X connect 10 0 8 1; #X connect 11 0 12 0; #X connect 11 1 13 0; #X connect 11 2 8 0; #X connect 11 3 9 0; #X connect 12 1 0 0; #X connect 13 0 14 0; #X connect 14 0 12 1; #X connect 15 0 18 0; #X connect 18 0 19 0; #X connect 18 1 0 0; #X restore 370 123 pd list-drip; #X obj 370 -46 / 128; #X obj 370 36 abs; #X obj 370 -19 * 3.14159; #X text 116 -52 hist: histograms; #X text 116 -9 - value of first class; #X text 116 18 - number of classes; #X text 116 5 - value of last class; #X text 114 -24 arguments:; #X text 116 53 - array of samples in classes; #X text 114 38 output:; #X obj 370 64 pow 0.5; #X obj 370 151 / 8; #X msg 306 64 absolute; #X obj 370 98 smlib/lhist 0 1 512 20; #X msg 49 90 lhist 0; #X connect 0 1 17 0; #X connect 0 2 5 0; #X connect 0 3 2 0; #X connect 1 0 19 0; #X connect 2 0 18 0; #X connect 3 0 6 0; #X connect 4 0 16 0; #X connect 5 0 7 0; #X connect 6 0 15 0; #X connect 7 0 3 0; #X connect 15 0 18 0; #X connect 16 0 0 1; #X connect 17 0 18 0; #X connect 18 0 4 0; #X connect 19 0 0 0; pd-smlib-0.13.0/unittests/lhist.wav000066400000000000000000000040541434442070000172070ustar00rootroot00000000000000RIFF$WAVEfmt D data>>???????????????????????????????????????????????????????????@pd-smlib-0.13.0/unittests/linspace-unittest.pd000066400000000000000000000006211434442070000213410ustar00rootroot00000000000000#N canvas 235 59 721 476 10; #X obj 49 128 testtools/unit-test-frame; #X obj 49 58 loadbang; #X msg 49 90 linspace 0; #X obj 370 51 t b b b b; #X text 47 -9 generates a vector with linear spaced floats; #X obj 370 89 smlib/linspace 0 1 128; #X connect 0 3 3 0; #X connect 1 0 2 0; #X connect 2 0 0 0; #X connect 3 0 5 0; #X connect 3 1 5 0; #X connect 3 2 5 0; #X connect 3 3 5 0; #X connect 5 0 0 1; pd-smlib-0.13.0/unittests/linspace.wav000066400000000000000000000040541434442070000176620ustar00rootroot00000000000000RIFF$WAVEfmt D data<<<=B!=A=a==D"=B=b==D===>" >B">b2>B!>R)>b1>r9>A>"I>BQ>bY>a>i>q>y>> >!>1>A">Q*>a2>q:>B>J>R>Z>b>j>r>z>>>!>1>A>Q>a>q>>>>>>>>>? ? ??! ?) ?1 ?9?A"?I&?Q*?Y.?a2?i6?q:?y>?B!?F#?J%?N'?R)?V+?Z-?^/?b1?f3?j5?n7?r9?v;?z=?~??A? C?E?G?!I?)K?1M?9O?AQ?IS?QU?YW?aY?i[?q]?y_?a?c?e?g?i?k?m?o?q?s?u?w?y?{?}??<<<=B!=A=a==D"=B=b==D===>" >B">b2>B!>R)>b1>r9>A>"I>BQ>bY>a>i>q>y>> >!>1>A">Q*>a2>q:>B>J>R>Z>b>j>r>z>>>!>1>A>Q>a>q>>>>>>>>>? ? ??! ?) ?1 ?9?A"?I&?Q*?Y.?a2?i6?q:?y>?B!?F#?J%?N'?R)?V+?Z-?^/?b1?f3?j5?n7?r9?v;?z=?~??A? C?E?G?!I?)K?1M?9O?AQ?IS?QU?YW?aY?i[?q]?y_?a?c?e?g?i?k?m?o?q?s?u?w?y?{?}??<<<=B!=A=a==D"=B=b==D===>" >B">b2>B!>R)>b1>r9>A>"I>BQ>bY>a>i>q>y>> >!>1>A">Q*>a2>q:>B>J>R>Z>b>j>r>z>>>!>1>A>Q>a>q>>>>>>>>>? ? ??! ?) ?1 ?9?A"?I&?Q*?Y.?a2?i6?q:?y>?B!?F#?J%?N'?R)?V+?Z-?^/?b1?f3?j5?n7?r9?v;?z=?~??A? C?E?G?!I?)K?1M?9O?AQ?IS?QU?YW?aY?i[?q]?y_?a?c?e?g?i?k?m?o?q?s?u?w?y?{?}??<<<=B!=A=a==D"=B=b==D===>" >B">b2>B!>R)>b1>r9>A>"I>BQ>bY>a>i>q>y>> >!>1>A">Q*>a2>q:>B>J>R>Z>b>j>r>z>>>!>1>A>Q>a>q>>>>>>>>>? ? ??! ?) ?1 ?9?A"?I&?Q*?Y.?a2?i6?q:?y>?B!?F#?J%?N'?R)?V+?Z-?^/?b1?f3?j5?n7?r9?v;?z=?~??A? C?E?G?!I?)K?1M?9O?AQ?IS?QU?YW?aY?i[?q]?y_?a?c?e?g?i?k?m?o?q?s?u?w?y?{?}??pd-smlib-0.13.0/unittests/lmax-unittest.pd000066400000000000000000000007771434442070000205200ustar00rootroot00000000000000#N canvas 390 195 728 520 10; #X obj 49 128 testtools/unit-test-frame; #X obj 49 58 loadbang; #X obj 370 23 - 0.5; #X msg 382 58 clear; #X obj 370 -34 & 127; #X obj 370 -3 / 128; #X obj 370 87 smlib/lmax 10; #X msg 49 90 lmax 0; #X text 48 8 argument: half-decay time (in number of activations); #X text 49 -9 lmax: leaky maximum; #X connect 0 2 4 0; #X connect 0 3 3 0; #X connect 1 0 7 0; #X connect 2 0 6 0; #X connect 3 0 6 0; #X connect 4 0 5 0; #X connect 5 0 2 0; #X connect 6 0 0 1; #X connect 7 0 0 0; pd-smlib-0.13.0/unittests/lmax.wav000066400000000000000000000040541434442070000170250ustar00rootroot00000000000000RIFF$WAVEfmt D dataܾؾԾо̾Ⱦľxph`XPH@80( н`@ <<<= =@=`=========>>>> >(>0>8>@>H>P>X>`>h>p>x>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>h>V>QnS>%>l=&a=D='<\$^gܽ,b!8/;"FWP4XU`f3.l޸pltWwry{{6-|xph`XPH@80( н`@ <<<= =@=`=========>>>> >(>0>8>@>H>P>X>`>h>p>x>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>h>V>QnS>%>l=&a=D='<\$^gܽ,b!8/;"FWP4XU`f3.l޸pltWwry{{6-|xph`XPH@80( н`@ <<<= =@=`=========>>>> >(>0>8>@>H>P>X>`>h>p>x>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>h>V>QnS>%>l=&a=D='<\$^gܽ,b!8/;"FWP4XU`f3.l޸pltWwry{{6-|xph`XPH@80( н`@ <<<= =@=`=========>>>> >(>0>8>@>H>P>X>`>h>p>x>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>pd-smlib-0.13.0/unittests/lmin-unittest.pd000066400000000000000000000010021434442070000204740ustar00rootroot00000000000000#N canvas 390 195 728 520 10; #X obj 49 128 testtools/unit-test-frame; #X obj 49 58 loadbang; #X obj 370 23 - 0.5; #X msg 382 58 clear; #X obj 370 -34 & 127; #X obj 370 -3 / 128; #X msg 49 89 lmin 0; #X text 38 -2 argument: half-decay time (in number of activations) ; #X text 39 -19 lmin: leaky minimum; #X obj 370 87 smlib/lmin 20; #X connect 0 2 4 0; #X connect 0 3 3 0; #X connect 1 0 6 0; #X connect 2 0 9 0; #X connect 3 0 9 0; #X connect 4 0 5 0; #X connect 5 0 2 0; #X connect 6 0 0 0; #X connect 9 0 0 1; pd-smlib-0.13.0/unittests/lmin.wav000066400000000000000000000040541434442070000170230ustar00rootroot00000000000000RIFF$WAVEfmt D datal3ޮ Ko'wd8Aؗk$ĚG쾬꾬ֽPǽYYGQ"@Mxm Z;Y"̃A Õ;:bU >(>>!>)>1>r\9>7A>.I>P>X>°`>ّh>sp>'Wx>>2>3>>l3ޮ Ko'wd8Aؗk$ĚG쾬꾬ֽPǽYYGQ"@Mxm Z;Y"̃A Õ;:bU >(>>!>)>1>r\9>7A>.I>P>X>°`>ّh>sp>'Wx>>2>3>>l3ޮ Ko'wd8Aؗk$ĚG쾬꾬ֽPǽYYGQ"@Mxm Z;Y"̃A Õ;:bU >(>>!>)>1>r\9>7A>.I>P>X>°`>ّh>sp>'Wx>>2>3>>l3ޮ Ko'wd8Aؗk$ĚG쾬꾬ֽPǽYYGQ"@Mxm Z;Y"̃A Õ;:bU >(>>!>)>1>r\9>7A>.I>P>X>°`>ّh>sp>'Wx>>2>3>>pd-smlib-0.13.0/unittests/lrange-unittest.pd000066400000000000000000000010321434442070000210100ustar00rootroot00000000000000#N canvas 390 195 728 520 10; #X obj 49 128 testtools/unit-test-frame; #X obj 49 58 loadbang; #X obj 370 23 - 0.5; #X msg 382 58 clear; #X obj 370 -34 & 127; #X obj 370 -3 / 128; #X text 24 1 argument: half-decay time (in number of activations); #X text 25 -16 lrange: leaky maximum minus leaky minimum; #X obj 370 87 smlib/lrange 20; #X msg 49 89 lrange 0; #X connect 0 2 4 0; #X connect 0 3 3 0; #X connect 1 0 9 0; #X connect 2 0 8 0; #X connect 3 0 8 0; #X connect 4 0 5 0; #X connect 5 0 2 0; #X connect 8 0 0 1; #X connect 9 0 0 0; pd-smlib-0.13.0/unittests/lrange.wav000066400000000000000000000040541434442070000173340ustar00rootroot00000000000000RIFF$WAVEfmt D dataG;`s<6<<_=]*=xC=8[= &s=`=я=`_==k===|=x==== =A=6>Jy> >t > >>0>a>0>‘>>h>!>6#>&>$(>$*>,>H->/>p{1>)3>4>[6>7>bV9>l:>"<>o=>6>>b?>!A>GB>cC>PvD>WE>WF>vG>zeH>2LI>+J>SK>CK>L> ]M>N>N>g|O>L%P>pP>fQ>>Q>FR>LS>|S>-T>T>(U>U>mV>ۂV>~V>vVW>W>X>yX>X>+Y>Y>Y>W Z>slZ>Z>Z>A[>ԃ[>[>\>]=\> w\>®\>\>]>J]>G{]>!]>b]>^>Q-^>V^>}^>^>P^>^>_>?/_>>O_>'n_>_>٨_>_>_>_>`> Yu?l?d?]?qU?ON?HG?~@?X9?3?|-?Փ'?!?Z?}?x?O ?|?z?>Y>>>>j>O>H>~>S>ᚳ>|>Г>|ޡ>Z>x>s>J>x>z>}>Xu>zl>d>]>bU>ON>HG>~@>J9>bV9>l:>"<>o=>6>>b?>!A>GB>cC>PvD>WE>WF>vG>zeH>2LI>+J>SK>CK>L> ]M>N>N>g|O>L%P>pP>fQ>>Q>FR>LS>|S>-T>T>(U>U>mV>ۂV>~V>vVW>W>X>yX>X>+Y>Y>Y>W Z>slZ>Z>Z>A[>ԃ[>[>\>]=\> w\>®\>\>]>J]>G{]>!]>b]>^>Q-^>V^>}^>^>P^>^>_>?/_>>O_>'n_>_>٨_>_>_>_>`> Yu?l?d?]?qU?ON?HG?~@?X9?3?|-?Փ'?!?Z?}?x?O ?|?z?>Y>>>>j>O>H>~>S>ᚳ>|>Г>|ޡ>Z>x>s>J>x>z>}>Xu>zl>d>]>bU>ON>HG>~@>J9>bV9>l:>"<>o=>6>>b?>!A>GB>cC>PvD>WE>WF>vG>zeH>2LI>+J>SK>CK>L> ]M>N>N>g|O>L%P>pP>fQ>>Q>FR>LS>|S>-T>T>(U>U>mV>ۂV>~V>vVW>W>X>yX>X>+Y>Y>Y>W Z>slZ>Z>Z>A[>ԃ[>[>\>]=\> w\>®\>\>]>J]>G{]>!]>b]>^>Q-^>V^>}^>^>P^>^>_>?/_>>O_>'n_>_>٨_>_>_>_>`> Yu?l?d?]?qU?ON?HG?~@?X9?3?|-?Փ'?!?Z?}?x?O ?|?z?>Y>>>>j>O>H>~>S>ᚳ>|>Г>|ޡ>Z>x>s>J>x>z>}>Xu>zl>d>]>bU>ON>HG>~@>J9>bV9>l:>"<>o=>6>>b?>!A>GB>cC>PvD>WE>WF>vG>zeH>2LI>+J>SK>CK>L> ]M>N>N>g|O>L%P>pP>fQ>>Q>FR>LS>|S>-T>T>(U>U>mV>ۂV>~V>vVW>W>X>yX>X>+Y>Y>Y>W Z>slZ>Z>Z>A[>ԃ[>[>\>]=\> w\>®\>\>]>J]>G{]>!]>b]>^>Q-^>V^>}^>^>P^>^>_>?/_>>O_>'n_>_>٨_>_>_>_>`>pd-smlib-0.13.0/unittests/lsdt.wav000066400000000000000000000040541434442070000170320ustar00rootroot00000000000000RIFF$WAVEfmt D data?|=C>>!>>p?%?>>S>pe>H=,<!>4*>H>z>f>?F>J>>잂>0 >$;u= {>>>Q>?V>>2>( >,>@(=K=Z>٥>t>p>?nm?'>>|Ơ>N> =\=p8>e>m>f>z? c?ܖ>D>>o>P+=@5>,E>`>>?E>>,һ>(>XJ>U<`=p>4>>9>h?k?>>ݖ>7>@XW=p7=O>hI> >g>y??Y>;>X>]Y>p=-=P.>얒>P>>>j?g>n> >y>=;K >t.>*>%>s>z?l@>|> ׿>|> v >@Ѫ>B]>C>,??j>(>>B>p==0E>Ԥ>>p> ??m>|>թ>c>p=<">>>B+>>?>v|>>>>X>;=.|>>>>̖?>vB>8>x>h+>`#=ٸ=ظ[>lY>>>.?a?B>tV>C>{M>=a=(3:>`>\>>?]?a>N><>in>p=<0>ˆ>>ba>v'>9?V>\m>^>\> ><9=q>>>>an?[?>>U>6>@/R= ȡ=0Q>̡>`>>c?'?T>>פ>.X>/=3=@9/>@ > >!>>?5>t>>8x>pk=<؊ >$>t>&z>>?>A>e>>89>t<_=pg>O>^>h>C4??DO>4Q>>xA>W=@=HIF>8)>>F]>?W?G3>B>V>(b>2=p=)$>@>H)>w>>ʩ?P>(>DǶ>\>>PP;>>`P}>tq>:u>`>N?^h>4>PU>>S*>j=f=\>٦>^>a>?fV?>>>`IL>@=f=i;>r>C>4>?_W?*>>>l>Cm>=o<`>O>,>">Q>ϵ?}>,>>>>-o<=s>*>T>/6>>s?L?>+>Ε>W5>M=`W= ?R>M>>X>??/>Bx>hV>W>= C8=r0>Ȩ>z>j>- ??>>>w>P=< >L>>>R>?L>T>>> ><=Ph>˫>>iN>x;??>,>>D@> {=2=|G>>X>>r$? ?>>0ب>Xa>Ф= =c%>ˎ>>>>R?`>>P>(>I>:>t~>(>.>,>?F>ު><>n>)>;=p=^>xX>>>H>?HI?d>(> <>K>= k=<>d>Ȭ>8>X?O?Z>P0>XD>l>=ϵ<@>݉>>R>vz>1?5T>>w>>8>sẒ>>Dh>dy?;?F>>,E> 4>`G==mS>Ϣ>M>$>?I?\>>pd-smlib-0.13.0/unittests/lstd-unittest.pd000066400000000000000000000006661434442070000205220ustar00rootroot00000000000000#N canvas 366 131 728 520 10; #X obj 49 128 testtools/unit-test-frame; #X obj 49 58 loadbang; #X obj 370 78 smlib/lstd; #X obj 370 27 cos; #X obj 370 0 line 0 1; #X msg 49 91 lsdt 500; #X msg 370 -25 0 \, 128 500; #X obj 370 53 * 2; #X obj 370 102 clip 0 1; #X connect 0 3 6 0; #X connect 1 0 5 0; #X connect 2 0 8 0; #X connect 3 0 7 0; #X connect 4 0 3 0; #X connect 5 0 0 0; #X connect 6 0 4 0; #X connect 7 0 2 0; #X connect 8 0 0 1; pd-smlib-0.13.0/unittests/prevl-unittest.pd000066400000000000000000000014021434442070000206710ustar00rootroot00000000000000#N canvas 429 42 759 521 10; #X obj 49 128 testtools/unit-test-frame; #X obj 49 58 loadbang; #X text 526 28 [deltas a b c]; #X text 525 74 requires b<=c; #X text 525 58 c = buffer size; #X obj 370 -11 cos; #X obj 370 38 t b f; #X obj 370 13 * 0.25; #X obj 370 -38 / 32; #X msg 427 67 clear; #X obj 370 96 smlib/prevl 64 64 128; #X msg 49 91 prevl 0; #X text -7 -44 prevl: generates vector with past input values (float) ; #X text 215 66 ...; #X text 217 27 x(i-a); #X text 217 41 x(i-(a+1)); #X text 217 55 x(i-(a+2)); #X text 217 81 x(i-(b)); #X connect 0 2 8 0; #X connect 0 3 9 0; #X connect 1 0 11 0; #X connect 5 0 7 0; #X connect 6 0 10 0; #X connect 6 1 10 0; #X connect 7 0 6 0; #X connect 8 0 5 0; #X connect 9 0 10 0; #X connect 10 0 0 1; #X connect 11 0 0 0; pd-smlib-0.13.0/unittests/prevl.wav000066400000000000000000000040541434442070000172140ustar00rootroot00000000000000RIFF$WAVEfmt D data>> >6~>~>|>_{>>y> x> u>s>q>5n>)k>hg>bd>@`>w\>X>j/T>GO>?J>E>Q@>O;>5>) 0>'*>_$>0>>>AQ >>d/==+=}8=Bz=*=q=Y/=7Ȃ=Ȁf=7G=r'=s=۠<ސ8e3M-0U'2!v^ -%3IPeսpTǽL|fN2wW@y8.g򼳾e˻o:<{v >j>:>E|>#>)>/>bk5>k:>X@>E>ÅJ>PO>ZS>JX>w\>Vl`>w)d>g>j>-n>p>rs>u>&w>y>k{>|>}>8~>x>>>>؇>~>\~>>|>{>z>)x> v>s>0q>dn>[k>h>d>`>\> X>EvT>cO> K>(F>@>S;>6>(h0>7*>y$>C>>{c> >> === =me=/z=b=b"=g=nh=)I=ذ)=6 =#<Ҕ<,)<֡';w+gUتؒ4SV-s]jŽq*Խ{M (t:m &,e2 8b=JBGL~QwUFZEY^N4be?inl/bor;tZvxz|!^}Zc~(ӮF~v}Z|z$,y=7wuroqli_}f}b_ [dVXR*MXHRC]>9u38-' !LYHԐyHֽ=ȽkPk2@ExY1l:Vfmݷۻr:<)<<)=-#=SC=b=w݀=H=-==a=g==S=s=>{ >)>Ƴ>3>\U#>i)>S/>5>:>@>'7E>8J>vO>S>X>6\>5/`>c>}wg>Gj>am>p>Ks>*u>iw>y>S{>|>}>~>o>>>p>e>x~>~>}>,{>z>Hx>6v>zs>[q>3n>k>nNh>d>o"a>7]>_Y>T>L/P>mK>yF>RA>;>w6>0>*>$>>L>>p& >J^>==~=s=hP= h=S=F=v=\j=gK=+= =pd-smlib-0.13.0/unittests/threshold-unittest.pd000066400000000000000000000014361434442070000215440ustar00rootroot00000000000000#N canvas 136 22 740 495 10; #X obj 49 186 testtools/unit-test-frame; #X obj 49 121 loadbang; #X msg 370 152 1; #X msg 529 152 0; #X obj 370 120 smlib/threshold 0.9 0 0.1 0; #X obj 370 58 line 0 1; #X obj 370 88 & 1; #X msg 370 31 0 \, 512 600; #X msg 49 154 threshold 700; #X text 3 18 threshold monitors its input float stream and outputs bangs when the signal exceeds a specified "trigger" value \, and also when the input value recedes below a "rest" value. You can specify debounce in number of floats received \, for the threshold~ to wait after the two event types before triggering again.; #X connect 0 3 7 0; #X connect 1 0 8 0; #X connect 2 0 0 1; #X connect 3 0 0 1; #X connect 4 0 2 0; #X connect 4 1 3 0; #X connect 5 0 6 0; #X connect 6 0 4 0; #X connect 7 0 5 0; #X connect 8 0 0 0; pd-smlib-0.13.0/unittests/threshold.wav000066400000000000000000000040541434442070000200600ustar00rootroot00000000000000RIFF$WAVEfmt D data????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????pd-smlib-0.13.0/unittests/vabs-unittest.pd000066400000000000000000000012411434442070000204750ustar00rootroot00000000000000#N canvas 407 51 731 495 10; #X obj 49 186 testtools/unit-test-frame; #X obj 49 121 loadbang; #X obj 391 65 cos; #X obj 391 38 / 128; #X obj 370 152 smlib/vabs; #X msg 49 152 vabs 0; #X obj 391 93 list prepend; #X obj 460 45 t l; #X obj 469 69 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 370 123 list; #X obj 337 65 sel 511; #X obj 364 12 t f f; #X connect 0 2 11 0; #X connect 0 3 8 0; #X connect 1 0 5 0; #X connect 2 0 6 0; #X connect 3 0 2 0; #X connect 4 0 0 1; #X connect 5 0 0 0; #X connect 6 0 7 0; #X connect 6 0 9 1; #X connect 7 0 6 1; #X connect 8 0 6 1; #X connect 9 0 4 0; #X connect 10 0 9 0; #X connect 11 0 10 0; #X connect 11 1 3 0; pd-smlib-0.13.0/unittests/vabs.wav000066400000000000000000000040541434442070000170170ustar00rootroot00000000000000RIFF$WAVEfmt D data???????? ?^?8?&?6~?K~?dx~?>~?~?ھ}?y}?S/}?|?|?b:|?{?_{?!{?z?fSz?>y?/uy?:y?`x? x? w?w?:}v? u?au?&t?v5t?s?r?Wr?q?q?Wp?Zo?jn?5n?[xm?Al?uk?)k?]j?i?h?hg?g?U*f?eHe?bd?yc?$b?a?@`?_?Q^? ]?w\?\[?ҩZ?ݝY?X?{W?eV?4LU?j/T?OS?Q?9P?GO?nN?=M? L??J?DI?$\H?G?E? D?HC?A?Q@?Y??>?~d/>>*>~>>)> >\]>+>%>>#>}8>>>s.>Bz>û>>K>*>ɬ>T>l<>q>줝>rՙ>>Y/>X>>7>7Ȃ>Y}>Lv>gJn>Ȁf>^>V>O>7G>]?>7>t/>r'>>>2>s>(>do==۠==IŰ=;Ӡ=ސ==a=A=!==<3< >>?>0&>.>"6>c>>>F>\N>U>]>e>Sm> u>|>M>*>>ލ>ǵ>I>u\>;,>>[Ĥ>>/R>>>ճ>>M>>,>j>>`>ll>3>>P>S>r>>>@2>Ѻ>?>>=>ö>?}N??d?k? ? ?u ?Y??k??8?gM?9?????\@? ?]"?#?o%?&?w(?")?u+?,?h.?/?P1?2?-4?5?6?+d8?9?$;?E?F?4H?)rI?J?K?M?HN?&vO?P?Q?eR? T?)U?BV?YW?lX?p|Y?шZ?Ǒ[?P\?f]?^?+_?Ҋ`?~a?ob?\c?2Fd?),e?f?Tf?g?h?si?DDj?k?k?l?`m?~n?n?o?Ap?p?q?Cr?r?ns?h"t?t?Nu?iu?lv?v?yw?w?#xx?xx?fy?ty?Fz?үz?{?w{?{{?/|?|?|?%}?&p}?l}?}?7~?pq~?է~??~??3?Y? |?????|??y??w??u??t??v??~b?=??~?~?I~?E~?~?8}?}?8}?w|?N|?3E|?&{?*{??.{?hz?`z?y?fy?y?x?Nx?-w?.w?Sv?v?su?t?uHt?ms?s?kr?q?Rq?Zmp?o?'o?Ln?m?`l? l?Ck?Kwj?i?h??g?#g?Ff?de?d?ٖc?b?a?`?_?^?]?\?[?Z?=Y?MX?W?JV??oU?RT?,3S?-R?P?\O?N?cM?T0L?J?TI?H?CG?F?D?qC?K%B? @?̃??.>?V>+>}8>Bz>*>q>Y/>7Ȃ>Ȁf>7G>r'>s>۠=ސ=!=<]ˮw"6U uu\jƾ3վrѺödu  &,2+d8=@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.>8e3M-0U'2!v^ -%3IPeվpTǾL|fN2wW@y8.g򽳾e˼o;={=a= >%>EE>]d>ҁ>,<>">>鎾>6P>1>55>Q> ?v ?j?:?E|?#?)?/?bk5?k:?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?S;?6?(h0?7*?y$?C??{c? ?? >>> >me>/z>b>b">g>nh>)I>ذ)>6 >#=Ҕ=,)=֡'9u38-' !LYHԐyH־=ȾkPk2@ExY1l:Vfmݷۼr;=)==)>-#>SC>b>w݀>H>->>a>g>>S>s>?{ ?)?Ƴ?3?\U#?i)?S/?5?:?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?@?;?w6?0?*?$??L??p& ?J^?>>~>s>hP> h>S>F>v>\j>gK>+> >6=Ƙ=1=VGB?>B?m>B?/>B?=B?=B?v=B?8=B?2B?2B?1B?1B?1B?c1B?71B? 1B?0B?0B?0B?b0B?70B?0B?/B?/B?/B?i/B?@/B?/B?.B?.B?.B?x.B?P.B?).B?.B?-B?-B?-B?g-B?A-B?-B?,B?,B?,B?,B?_,B?;,B?,B?+B?+B?+B?+B?a+B?>+B?+B?*B?*B?*B?*B?l*B?I*B?&*B?*B?)B?)B?)B?})B?[)B?:)B?)B?(B?(B?(B?(B?v(B?U(B?5(B?(B?'B?'B?'B?'B?w'B?X'B?:'B?'B?&B?&B?&B?&B?&B?d&B?F&B?)&B? &B?%B?%B?%B?%B?y%B?\%B??%B?#%B?%B?$B?$B?$B?$B?y$B?^$B?B$B?'$B? $B?#B?#B?#B?#B?#B?g#B?M#B?2#B?#B?"B?"B?"B?"B?"B?|"B?b"B?I"B?/"B?"B?!B?!B?!B?!B?!B?!B?g!B?M!B?5!B?!B?!B? B?pd-smlib-0.13.0/unittests/vdbtorms-unittest.pd000066400000000000000000000012011434442070000213760ustar00rootroot00000000000000#N canvas 152 59 718 503 10; #X obj 34 193 testtools/unit-test-frame; #X obj 34 128 loadbang; #X obj 376 100 list prepend; #X obj 445 52 t l; #X obj 454 76 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 355 130 list; #X obj 322 72 sel 511; #X obj 349 19 t f f; #X obj 355 159 smlib/vdbtorms; #X msg 34 159 vdbtorms 0; #X obj 376 52 / 5.12; #X connect 0 2 7 0; #X connect 0 3 4 0; #X connect 1 0 9 0; #X connect 2 0 3 0; #X connect 2 0 5 1; #X connect 3 0 2 1; #X connect 4 0 2 1; #X connect 5 0 8 0; #X connect 6 0 5 0; #X connect 7 0 6 0; #X connect 7 1 10 0; #X connect 8 0 0 1; #X connect 9 0 0 0; #X connect 10 0 2 0; pd-smlib-0.13.0/unittests/vdbtorms.wav000066400000000000000000000040541434442070000177240ustar00rootroot00000000000000RIFF$WAVEfmt D datac+7P}/7z37Տ77x;7h@73_D7iH7gM7kR7jV77[7w`7e7k7lkp7u7z{7H777777,7K77q7`7ϯ7n7C7-7/7H7sy77$77d6777j77.77p]77w78W 8 86 8DA 8w8888F8x!8U%8)8,8Q084898-7=8A8TE8kJ8O81S8ӋX8|x]8Ёb8vg8l8hPr8w8u}88A88>8uύ8 8aU88(8c83K88T©88]88[88G88P78_8U8e8mW8e888TD88t8+99s93 96^999M9M9 O9"9&97m*9aM.9D29Q69Sw:9޴>9 C9zG9L9P9NfU9@Z9>7_9Jd9{i9 n969t9y9u9(99v999-999a9~99J9999s 939t9p9bC9?9y9=9Z9909f9j9/9o9#;:%:'!:. :L :g}:::::} :>7$:A':+:/:3:7:y;:5@:D: I:mM:~LR:W:[:`:@f:Rk:p:%v:ܾ{:8::,::ٌ: :{T:0:f::2:ܤ:R:q:]:`:z:::oZ:\:jn:0 :K:Y:::?:::G:=;6.;/;B ;g ;۞;;E;;7;;c!;%; F);-;_1;(5;b49;j=;MA;!F;J;7>O;S;X;];Zb;fg;x-m;=r;hx;};鿁;E;Ϸ;͊;;o0;};%ޗ;ER;ڞ;Jw;);r;ͭ;;r̵;;B);P|;;n;;;ߠ;Փ;;;8;k;$;;B<8<@C<ưGR>sT>Lh > >%>>n>>4f>Z">y%> t)>N->y?1>ZG5>f9> =>A>VF>J>vO>M.T>Y>]>b>g&h>mm>$r>Yx>}>)>Rׄ>܇>>>W>>g>w|>>n>BV>>>>>U!>\>&>>ʥ>\G>>>M>s>>\>>S>O>e? ]?qe? ??0?;?q???&G#?&?*?$.?2? 6?:???"uC?G?rL?Q?RU?MZ?_?d?i?Lo?t?Nz?pd-smlib-0.13.0/unittests/vdelta-unittest.pd000066400000000000000000000013711434442070000210250ustar00rootroot00000000000000#N canvas 407 51 741 577 10; #X obj 52 241 testtools/unit-test-frame; #X obj 52 176 loadbang; #X obj 373 117 pack f f f f; #X obj 373 63 t f f f f; #X obj 373 148 smlib/vdelta; #X msg 52 207 vdelta 0; #X text 17 13 vdelta: difference between consecutive vectors; #X obj 373 35 cos; #X obj 396 90 * 0.1; #X obj 440 90 * -0.9; #X obj 487 90 * 0.3; #X obj 406 172 != 0; #X obj 373 198 spigot; #X obj 373 11 t f f; #X connect 0 2 13 0; #X connect 1 0 5 0; #X connect 2 0 4 0; #X connect 3 0 2 0; #X connect 3 1 8 0; #X connect 3 2 9 0; #X connect 3 3 10 0; #X connect 4 0 12 0; #X connect 5 0 0 0; #X connect 7 0 3 0; #X connect 8 0 2 1; #X connect 9 0 2 2; #X connect 10 0 2 3; #X connect 11 0 12 1; #X connect 12 0 0 1; #X connect 13 0 7 0; #X connect 13 1 11 0; pd-smlib-0.13.0/unittests/vdelta.wav000066400000000000000000000040541434442070000173430ustar00rootroot00000000000000RIFF$WAVEfmt D data~]J<$>8 t|ý]\?钾 k6?I05> =T=Fo?=W^>/-?=O>7S>>Pv}:?f28O?%XD͜f0?3k=@;фpV?7=~gA><=a;mj I<8ME`םL1?l|eNN?߰J-\s6>xDs.?tƋ=B?Q>{o?=܈W>v">=8R=m?^2 t ý 8\?В;9ic> `+>U?=@׾n>t?=~\?>y(?@h=l0.>E V>ӽfpQ[X?E=+Oy?M[> ¯B?=7/pi>(礽 i=0żXiCC?-Uqs@?Ma3K=w$F?ޞ=T2Mn>hd?=M 9> 6B>^Ľ\?p=Sfo4>Xt?=\>>R)6=|̾>t*]BϨ>uĽ\?o|fpep?,fR>A=(Jb="p?=XH>b*?N=XvL>(dWM>H刽g_P?ZA.?hp7=<T?;5={?O>?=ژ;`+ Ge<Gw⟽3?ocHSM?vL9@'>\^c1?1=&JU>}n?"˾=VZ>><򏾚=Qs?(}6Mtcqý[? ߾3tu>NN>`E= ޾f>9u?8.=\"> ?1b=$)>@[2|>L:ݽR=qY?e(Άۧ?&5Jpl>\H9@?a=,if>ǽ=Hk\Z*E?`SUM>?h~U #z =@;I?6=4Tq>;c?0=aL#A>$1>> ? v=re B8>9t?.D=["s>>w_Hk>GOu?Ľ\?/ _r>L'h`>=J =q?#N=wY>{&?/=U:MH>Tuļ\>fYi}Q?iދǥ>4+?d=p-<ýp=[?=QE>:R?r==|>0`NJs4?=4"X>mm?=Ut>>(<( = vx> ?:s ýnu[?JNؾ,Xw>*2>V[K=侀>$au?M=l\H:>h ?r\= %>a$>,rY?3Q%A?fbFTo}>xE=?j=(X*8 c>@;=p b\走F?n:oQ/}ga?S=tJN>>( > <0@=-6Z#?yZl~-U?Fpd-smlib-0.13.0/unittests/vfmod-unittest.pd000066400000000000000000000013621434442070000206610ustar00rootroot00000000000000#N canvas 407 51 739 534 10; #X obj 42 212 testtools/unit-test-frame; #X obj 42 147 loadbang; #X msg 42 178 vfmod 0; #X obj 363 167 smlib/vfmod 0.75; #X text 21 34 vfmod computes the modulo of each element in a vector ; #X obj 384 82 cos; #X obj 384 55 / 128; #X obj 384 110 list prepend; #X obj 453 62 t l; #X obj 462 86 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 363 140 list; #X obj 330 82 sel 511; #X obj 357 29 t f f; #X connect 0 2 12 0; #X connect 0 3 9 0; #X connect 1 0 2 0; #X connect 2 0 0 0; #X connect 3 0 0 1; #X connect 5 0 7 0; #X connect 6 0 5 0; #X connect 7 0 8 0; #X connect 7 0 10 1; #X connect 8 0 7 1; #X connect 9 0 7 1; #X connect 10 0 3 0; #X connect 11 0 10 0; #X connect 12 0 11 0; #X connect 12 1 6 0; pd-smlib-0.13.0/unittests/vfmod.wav000066400000000000000000000040541434442070000171770ustar00rootroot00000000000000RIFF$WAVEfmt D data>>>>>8>~>x~>,~>Dx}>h|>8|>؀{>,z>y>x>x>hv>Hu>Lt>s>?r>p>`o>| n>l>j>Mi>g>e>d>b>*`>((^>@\>Y>,W> U>4S>P>gN>K>(^I>F>D>,^A>h>>;>8>l5>2>/>,>7&> ">>">T>!>|>$ >4 >s>>@=====N==t= ޻=H-=a=P{=xz=@_=)=py=pf=S=@=3-=@=@= |<`?~d/>>*>~>>)> >\]>+>%>>#>}8>>>s.>Bz>û>>K>*>ɬ>T>l<>q>줝>rՙ>>Y/>X>>7>7Ȃ>Y}>Lv>gJn>Ȁf>^>V>O>7G>]?>7>t/>r'>>>2>s>(>do==۠==IŰ=;Ӡ=ސ==a=A=!==<3<>F\NU]eSm u|M*ލǵIu\;,[Ĥ/R>ճM,¾jƾʾ`;llѾ3վؾPܾS߾r@2Ѻ?=ö}Ndk u Yk8gM9?\@ ]"#o%&w(")u+,h./P12-456+d89$;<=/?C@G,޼@J"p*;>{Qd`bw<([H_H̺Heý˽FԽ8ܽ0(XH+T r ,:P"D"%)C,Lg/P|25y8|b;<>ALCnFL IKNPDR;U}WLY[\]_aceag\iHjVlmUop\r^stuvwHxyTzh{"|||Tf}4}j~ ~.wԽЇA~؅~~}|@N|x{z$yy,"xwvtܭs8irqo<39@6=3 ,0 -,)&S#؏DLd[ x`޽(VֽͽhŽ]PBy𖢽`h0O| 9i8V@C/@p9v`T`\R Ṽ?.>V<+{;:8,X7j5ч4e3-1.:0o.M-+V*\(pd-smlib-0.13.0/unittests/vftom-unittest.pd000066400000000000000000000005351434442070000207020ustar00rootroot00000000000000#N canvas 457 36 730 465 10; #X obj 40 153 testtools/unit-test-frame; #X obj 40 88 loadbang; #X obj 361 73 smlib/vftom; #X msg 40 119 vftom 0; #X obj 361 112 / 80; #X obj 361 40 + 20; #X text 36 37 frequency to midi on a vector; #X connect 0 2 5 0; #X connect 1 0 3 0; #X connect 2 0 4 0; #X connect 3 0 0 0; #X connect 4 0 0 1; #X connect 5 0 2 0; pd-smlib-0.13.0/unittests/vftom.wav000066400000000000000000000040541434442070000172170ustar00rootroot00000000000000RIFF$WAVEfmt D data6;F> Q>Z[>3e>&n>w>r/>]>}e>H>p >> 1>ޙ>>>=>G>;>G>h>ͦ>RR>>y>E>f>>>f>ƣ>v>@>>*>33>J2>S(>>>=>>Ny>&?>>>f>5>n>S>>}> >>>>K>{>>jR>5>>s>e??f?F]?<?R?C? ?~???J??Vu?N ?ę ?) ?I ?gE ?" ?[ ? ?>l ? ?w??{~??Y??}??nv?8?j??V[??G?q?70?????Re??5A???ń??sX??)?)??:\?*?f%???M?_?. ?Up ? ?.!?!?!?G"?"?"?Z#?#?$?i$?$?^%?/r%?v%?3 &?jv&?&?J!'?u'?!'?(?p(?(?)?g)?)? *?Z*?*?m*?oH+?+?&+?2,?%,?,?x-?e-?'-?d-?;G.?.?.?j%/?n/?/?*0?WH0?&0?0?1?ke1?Ϋ1?1?72?|2?2?3?J3?3?3?4?Y4?Л4?=4?[ 5?+b5?5?5?%6?ff6?6?6?}&7?e7?7?7?"8?`8?8?8?[9?W9?9?[9? :?J:?:?:?4:?k8;?cs;?;?;?"?}\>?6>?>???:??p???? ??I@?OJ@?"@?@?+@?c A?hUA?:A?ھA?GA?'B?[B?jB?B?B?)C?\C?C?C?0C?'D?YD?̋D?D?RD? E?'RE?PE?ME?E?F?BFF?vF?F?F?G?<6G?eG?G?LG?VG?8"H?PH?H?H?8H?W I?P8I?"fI?ϓI?WI?I?J?IJ?vJ?ҢJ?}J?J?g(K?TK?ĀK?K?K?JL?/L?L[L?L?ƱL?L?M?2M?*]M?M?M?[M?N?0N?mZN?3N?ڭN?bN?O?*O?>SO?K|O?8O?O?O?NP?GP?pP?ZP?xP?zP?^Q?(8Q?_Q?bQ?ծQ?-Q?hQ?$R?KR?urR?BR?R?R? S?j3S?YS?S?S?S?S?T?8=T?bT?BT?T?T?T?(U?#BU?gU?ЋU?U?U?U?V?VBV?fV?V?V?V?V?RW?=W?aW?W?~W?W?W?5X?C5X?=XX?"{X?X?X?HX?Y?K(Y?JY?lY?2Y?SY?`Y?XY?;Z? 9Z?ZZ?j|Z?Z?xZ?Z?6[?v#[?D[?e[?†[?[?[?[[? \?*\?HK\?k\?0\?\?\?\? ]?+-]?&M]?m]?]?]?X]?]? ^?+^?hJ^?i^?^?:^?]^?n^?n_?]$_?:C_?b_?€_?k_?_?_?_?k`?7`?V`?;t`?``?u`?x`?m`?P a?#(a?Ea?ca?>a?Ҟa?Va?a?.a?b?1b?Ob?&lb?>b?Fb?@b?*b?b?c?6c?;Sc?oc?kc?c?`c?c?c?bd?6d?Rd?nd?d?d?d?d?d?ee?2e?Me?jie?e?}e?e?[e?e?f?B)f?sDf?_f?zf?f?f?f?f?^g?&g?6g?pd-smlib-0.13.0/unittests/vlavg-unittest.pd000066400000000000000000000013211434442070000206600ustar00rootroot00000000000000#N canvas 374 132 746 533 10; #X obj 49 165 testtools/unit-test-frame; #X obj 49 58 loadbang; #X obj 370 -34 & 127; #X obj 370 -3 / 64; #X obj 370 24 - 1; #X obj 370 131 smlib/vlavg 10; #X msg 49 87 vlavg 0; #X obj 370 103 pack; #X obj 370 55 t f f; #X obj 397 80 + 0.1; #X text 11 -32 vlavg: vector leaky average; #X text 12 -13 the argument is the half-decay expressed in number of activations; #X text 12 18 This test only works one time after patch load because the averager has no reset option.; #X connect 0 2 2 0; #X connect 1 0 6 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 4 0 8 0; #X connect 5 0 0 1; #X connect 6 0 0 0; #X connect 7 0 5 0; #X connect 8 0 7 0; #X connect 8 1 9 0; #X connect 9 0 7 1; pd-smlib-0.13.0/unittests/vlavg.wav000066400000000000000000000040541434442070000172030ustar00rootroot00000000000000RIFF$WAVEfmt D data&v|Qud=)xqYnj7ڦnbB̾)ݾNž뾂!ҾbݾM,/^ :bjdl( "kdU" t  N7 =Q)  F a$V{ ]exnBCTQK_)i-J4]xhoڜ> Lؔ {dl߾Qlھ\ԾgξKȾ¾zlU*ﵾ[ྩnOھӨӾ ;WyHƾynz#%~YqǘpP2b S㔾E`c6AԚ'}1n _[P1g׽A2#zoxNY9;|o!̽v!ѭsm{U=?l>*=(+>Z=w:>)!=J>=wZ>>WDj>>z>W#>>3>ߌ>`C>˔>F9S>>vc>>r>ژ>i>!>Z>d|>!L>o>?>c>2>tX>'> N>>TD>4>D;> >2>j>*>g>?>X?>$ ?r>'?`>]?>?i?U?>g??d?!?b ?%?`?$)?^?l-?/]?1?[?S5? Z ?9?X$?=?MW(?jA?V,?HE?T0?9I?S4? ?>>>߷>^8>Ca>0=DT>%=C>F=Dvc*`=p>b&=->G=-=>w=:"M>==\>\>fl>>Q|>']%>>5>>D>>T>z>`Sd>\>t> A>> '>ۉ>>đ>.>߯>>->`>͉>>x>۫>h>ܛ>Y>>K>>>>9?2>2?a'>J- ?>(?>#? >??6?|?6?x?{"?fu ?&?&r? *?o?.?Jl?2?i?A6?1g ?:?d$?=?b(?ZA?`,?ZE?^0?|I?$]4?M?[8?Q?Z@=ff>=ff&>=ff6>=ffF>=ffV>>fff>>ffv> >33>0>33>@>33>P>33>`>33>p>33>>33>>33>>33>>33>>33>>33>>33>>33>>33>>33>>?>?> ?> ?>?>??????!? ?%??)??-??1??5? ?9?$?=?(?A?,?E?0?I?4?M?8?Q?P?⩥>>lv>g>&a)>>=$oH>'=)>ܼ̕=䤽<<^g2R\C,怾e=bC_\8u xze"ƾgWо$4ؾU!剳3.޸𾬅lU9Wa$ľr@Tƾ{ǾijȾ6-Ⱦľ̴̼̬ؾ̤о̜Ⱦ̔̌̄yiYI9)p `33P33ӽ@33033 fffff&̼མ;43<=@Y=̌=̬==<==ff>@=ff>=ff&>=ff6>=ffF>=ffV>>fff>>ffv> >33>0>33>@>33>P>33>`>33>p>33>>33>>33>>33>>33>>33>>33>>33>>33>>33>>33>>?>?> ?> ?>?>??????!? ?%??)??-??1??5? ?9?$?=?(?A?,?E?0?I?4?M?8?Q?5G=I>?=<(>A=/8>y="H>`b=X>> h>Ȝ>.x>!>>1>>A>>{Q>>ta>~>nq>>>>6>0>b>>>>H>ʩ>>>>>>ǣ>> >;>i>>> ?{>W?)> ?> ?ș>}?>?K?t?dK??J?!?J ?&%?+J?)?I?j-?|I?1?-I?5?H ?}9?H$?8=?_H(?A?#H,?E?G0?I?G4?PM?G8? Q?ZG5G=I>?=<(>A=/8>y="H>`b=X>> h>Ȝ>.x>!>>1>>A>>{Q>>ta>~>nq>>>>6>0>b>>>>H>ʩ>>>>>>ǣ>> >;>i>>> ?{>W?)> ?> ?ș>}?>?K?t?dK??J?!?J ?&%?+J?)?I?j-?|I?1?-I?5?H ?}9?H$?8=?_H(?A?#H,?E?G0?I?G4?PM?G8? Q?ZG>g>I>>lY>>5>>А>>>$>l#|>>@k>/>[>>L>>n>?>f^>I2>O>lY&>B>5>5>>(>>$>n#=>@=/ >=>=D==h=I==4h======='='===(=$=======X=T=8J=4J=<=:=D8=D8===<===L=M=======d=e=T=U=X]=W]=\=[=B=A=X=X===u=u===~l=}l===C=C===h=f=S=S===(=(=0=0=p=p=v=x=-=.=)=*=H=H=u=u=$=&===L=L===.=.=tL=tL=Oh=Ph=M=N===.=/=K=L===_=`=== = =s=t=`*=b*=`7=`7=C=C=N=N=^Y=^Y=8c=8c=il=hl=t=t=|=|=s=p=j=f=========ԧ=ҧ=l=l=====r=p===.=,=6=4= ====$=$=p=p=====p=p=0=,===T=P=====L=L=p=t=====t=x=T=X=$=(=====@=D===l?l?]?]?ON?ON?~@?~@?3?3?ؓ'?ד'?Z?Z?{?{???>>>>>>O>O>~>~>ꚳ>隳>ؓ>ד>Z>Z>{>{>>>~>~>l>l>]>]>ON>ON>~@>~@>3>3>ד'>֓'>Z>Z>{>z>>~>======O=O=8J=4J=<=:=D8=D8===<===L=M=======d=e=T=U=X]=W]=\=[=B=A=X=X===u=u===~l=}l===C=C===h=f=S=S===(=(=0=0=p=p=v=x=-=.=)=*=H=H=u=u=$=&===L=L===.=.=tL=tL=Oh=Ph=M=N===.=/=K=L===_=`=== = =s=t=`*=b*=`7=`7=C=C=N=N=^Y=^Y=8c=8c=il=hl=t=t=|=|=s=p=j=f=========ԧ=ҧ=l=l=====r=p===.=,=6=4= ====$=$=p=p=====p=p=0=,===T=P=====L=L=p=t=====t=x=T=X=$=(=====@=D===pd-smlib-0.13.0/unittests/vmax-unittest.pd000066400000000000000000000010331434442070000205140ustar00rootroot00000000000000#N canvas 136 76 741 577 10; #X obj 52 241 testtools/unit-test-frame; #X obj 52 176 loadbang; #X obj 373 150 pack f f f f; #X obj 373 76 t f f f f; #X obj 396 110 + 1; #X obj 425 109 + 2; #X obj 454 109 + 3; #X obj 373 211 / 512; #X obj 373 180 smlib/vmax; #X msg 52 207 vmax 0; #X connect 0 2 3 0; #X connect 1 0 9 0; #X connect 2 0 8 0; #X connect 3 0 2 0; #X connect 3 1 4 0; #X connect 3 2 5 0; #X connect 3 3 6 0; #X connect 4 0 2 1; #X connect 5 0 2 2; #X connect 6 0 2 3; #X connect 7 0 0 1; #X connect 8 0 7 0; #X connect 9 0 0 0; pd-smlib-0.13.0/unittests/vmax.wav000066400000000000000000000040541434442070000170370ustar00rootroot00000000000000RIFF$WAVEfmt D data;< <@<`<<<<<<<<<==== =(=0=8=@=H=P=X=`=h=p=x=================================>>>>> > >>>>>>>>>> >">$>&>(>*>,>.>0>2>4>6>8>:><>>>@>B>D>F>H>J>L>N>P>R>T>V>X>Z>\>^>`>b>d>f>h>j>l>n>p>r>t>v>x>z>|>~>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>?????????????????? ? ? ? ? ? ? ? ? ? ????????????????????????????????????? ? ?!?!?"?"?#?#?$?$?%?%?&?&?'?'?(?(?)?)?*?*?+?+?,?,?-?-?.?.?/?/?0?0?1?1?2?2?3?3?4?4?5?5?6?6?7?7?8?8?9?9?:?:?;?;??>?????@?@?A?A?B?B?C?C?D?D?E?E?F?F?G?G?H?H?I?I?J?J?K?K?L?L?M?M?N?N?O?O?P?P?Q?Q?R?R?S?S?T?T?U?U?V?V?W?W?X?X?Y?Y?Z?Z?[?[?\?\?]?]?^?^?_?_?`?`?a?a?b?b?c?c?d?d?e?e?f?f?g?g?h?h?i?i?j?j?k?k?l?l?m?m?n?n?o?o?p?p?q?q?r?r?s?s?t?t?u?u?v?v?w?w?x?x?y?y?z?z?{?{?|?|?}?}?~?~????@??pd-smlib-0.13.0/unittests/vmin-unittest.pd000066400000000000000000000010331434442070000205120ustar00rootroot00000000000000#N canvas 358 49 741 577 10; #X obj 52 241 testtools/unit-test-frame; #X obj 52 176 loadbang; #X obj 373 150 pack f f f f; #X obj 373 76 t f f f f; #X obj 396 110 + 1; #X obj 425 109 + 2; #X obj 454 109 + 3; #X obj 373 211 / 512; #X obj 373 180 smlib/vmin; #X msg 52 207 vmin 0; #X connect 0 2 3 0; #X connect 1 0 9 0; #X connect 2 0 8 0; #X connect 3 0 2 0; #X connect 3 1 4 0; #X connect 3 2 5 0; #X connect 3 3 6 0; #X connect 4 0 2 1; #X connect 5 0 2 2; #X connect 6 0 2 3; #X connect 7 0 0 1; #X connect 8 0 7 0; #X connect 9 0 0 0; pd-smlib-0.13.0/unittests/vmin.wav000066400000000000000000000040541434442070000170350ustar00rootroot00000000000000RIFF$WAVEfmt D data;;;< <@<`<<<<<<<<<==== =(=0=8=@=H=P=X=`=h=p=x=================================>>>>> > >>>>>>>>>> >">$>&>(>*>,>.>0>2>4>6>8>:><>>>@>B>D>F>H>J>L>N>P>R>T>V>X>Z>\>^>`>b>d>f>h>j>l>n>p>r>t>v>x>z>|>~>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>?????????????????? ? ? ? ? ? ? ? ? ? ????????????????????????????????????? ? ?!?!?"?"?#?#?$?$?%?%?&?&?'?'?(?(?)?)?*?*?+?+?,?,?-?-?.?.?/?/?0?0?1?1?2?2?3?3?4?4?5?5?6?6?7?7?8?8?9?9?:?:?;?;??>?????@?@?A?A?B?B?C?C?D?D?E?E?F?F?G?G?H?H?I?I?J?J?K?K?L?L?M?M?N?N?O?O?P?P?Q?Q?R?R?S?S?T?T?U?U?V?V?W?W?X?X?Y?Y?Z?Z?[?[?\?\?]?]?^?^?_?_?`?`?a?a?b?b?c?c?d?d?e?e?f?f?g?g?h?h?i?i?j?j?k?k?l?l?m?m?n?n?o?o?p?p?q?q?r?r?s?s?t?t?u?u?v?v?w?w?x?x?y?y?z?z?{?{?|?|?}?}?~?~???pd-smlib-0.13.0/unittests/vmtof-unittest.pd000066400000000000000000000006741434442070000207060ustar00rootroot00000000000000#N canvas 457 36 730 465 10; #X obj 40 153 testtools/unit-test-frame; #X obj 40 88 loadbang; #X obj 361 95 smlib/vmtof; #X msg 40 118 vmtof 0; #X obj 361 71 + 1; #X floatatom 362 26 5 0 0 0 - - -; #X obj 361 125 / 329; #X obj 361 49 & 63; #X text 41 49 midi to frequency on a vector; #X connect 0 2 7 0; #X connect 1 0 3 0; #X connect 2 0 6 0; #X connect 3 0 0 0; #X connect 4 0 2 0; #X connect 5 0 7 0; #X connect 6 0 0 1; #X connect 7 0 4 0; pd-smlib-0.13.0/unittests/vmtof.wav000066400000000000000000000040541434442070000172170ustar00rootroot00000000000000RIFF$WAVEfmt D data===D=ؓ!=w/+=X]5=-&@=.K=W=Od=r=>=އ==D=ؓ=w/=X]=-&=.==O==>>>>D>ؓ!>w/+>X]5>-&@>.K>W>Od>r>>>އ>>D>ؓ>w/>X]>-&>.>>O>>>???D?ؓ!?w/+?X]5?-&@?,K?W?Od?r?>?===D=ؓ!=w/+=X]5=-&@=.K=W=Od=r=>=އ==D=ؓ=w/=X]=-&=.==O==>>>>D>ؓ!>w/+>X]5>-&@>.K>W>Od>r>>>އ>>D>ؓ>w/>X]>-&>.>>O>>>???D?ؓ!?w/+?X]5?-&@?,K?W?Od?r?>?===D=ؓ!=w/+=X]5=-&@=.K=W=Od=r=>=އ==D=ؓ=w/=X]=-&=.==O==>>>>D>ؓ!>w/+>X]5>-&@>.K>W>Od>r>>>އ>>D>ؓ>w/>X]>-&>.>>O>>>???D?ؓ!?w/+?X]5?-&@?,K?W?Od?r?>?===D=ؓ!=w/+=X]5=-&@=.K=W=Od=r=>=އ==D=ؓ=w/=X]=-&=.==O==>>>>D>ؓ!>w/+>X]5>-&@>.K>W>Od>r>>>އ>>D>ؓ>w/>X]>-&>.>>O>>>???D?ؓ!?w/+?X]5?-&@?,K?W?Od?r?>?===D=ؓ!=w/+=X]5=-&@=.K=W=Od=r=>=އ==D=ؓ=w/=X]=-&=.==O==>>>>D>ؓ!>w/+>X]5>-&@>.K>W>Od>r>>>އ>>D>ؓ>w/>X]>-&>.>>O>>>???D?ؓ!?w/+?X]5?-&@?,K?W?Od?r?>?===D=ؓ!=w/+=X]5=-&@=.K=W=Od=r=>=އ==D=ؓ=w/=X]=-&=.==O==>>>>D>ؓ!>w/+>X]5>-&@>.K>W>Od>r>>>އ>>D>ؓ>w/>X]>-&>.>>O>>>???D?ؓ!?w/+?X]5?-&@?,K?W?Od?r?>?===D=ؓ!=w/+=X]5=-&@=.K=W=Od=r=>=އ==D=ؓ=w/=X]=-&=.==O==>>>>D>ؓ!>w/+>X]5>-&@>.K>W>Od>r>>>އ>>D>ؓ>w/>X]>-&>.>>O>>>???D?ؓ!?w/+?X]5?-&@?,K?W?Od?r?>?===D=ؓ!=w/+=X]5=-&@=.K=W=Od=r=>=އ==D=ؓ=w/=X]=-&=.==O==>>>>D>ؓ!>w/+>X]5>-&@>.K>W>Od>r>>>އ>>D>ؓ>w/>X]>-&>.>>O>>>???D?ؓ!?w/+?X]5?-&@?,K?W?Od?r?>?pd-smlib-0.13.0/unittests/vpow-unittest.pd000066400000000000000000000007551434442070000205460ustar00rootroot00000000000000#N canvas 390 195 728 520 10; #X obj 46 189 testtools/unit-test-frame; #X obj 46 119 loadbang; #X obj 367 150 smlib/vpow 0.75; #X obj 367 41 / 512; #X msg 46 152 vpow 0; #X obj 367 11 + 1; #X text 44 82 vpow computes y(i)=x(i)^a; #X obj 367 119 pack; #X obj 367 68 t f f; #X obj 394 92 + 0.5; #X connect 0 2 5 0; #X connect 1 0 4 0; #X connect 2 0 0 1; #X connect 3 0 8 0; #X connect 4 0 0 0; #X connect 5 0 3 0; #X connect 7 0 2 0; #X connect 8 0 7 0; #X connect 8 1 9 0; #X connect 9 0 7 1; pd-smlib-0.13.0/unittests/vpow.wav000066400000000000000000000040541434442070000170570ustar00rootroot00000000000000RIFF$WAVEfmt D data7< ?< ?}<?D<?|<`q?r=?#=cT?5=?ּE=6?5U=?e=?Zu=?fD=?i=k?='?7=L?L= ?F=V- ?v(= ?= !?=}!?H=|!?=E]"?CQ="?Z=<#?=#?G_=j$?=$?=$?Z=h%?=%?>F&? >&?M>d$'?>'?V >(?~>o(?>E(?x>L)?Q>)?%>(*?W>*?>+?">Ir+?>K%>+? (>M,?*> ,?}->v(-?20>Ǖ-?2>.?5>%p.?98>2.?Z:>)J/?=>/? $@>#0?DB>0?[E>!0?G>i1?VJ>1?M>rB2?O>2?B4R>3?T>3?DW>3?Y>^4?K\>4?G^>65?Ha>55?{c> 6?Py6?h>6?&k>P7?m>Z7?~p>&8?8?t>8?Kw>g9?/y>u9?|><=:?|~>:?3o>;?+>};?6΂>;?X>QA{&=?i>=?>=?Չ>d>?>>?&>w8??&N>;??t> @?[>u@?I>@?r>HA?>A?~)>@B?fK>}B?l>B?>VC?Ƭ>ſC?˙>(D?'>D?>cD?$>cE?A>E?\>[4F?w>ޜF? >NG?>mG?ģ>G?;ݤ>3>H? >[H?? >qI?">uvI?8>gI?>N>GFJ?c>J?Jw>K?>~}K? >K?>LL?°>L?ӱ>{M?>ςM?(>M?>CQN?7>cN?">rO?,1>pO?>>\O?L>8TP?X>P?d>!Q?p>fQ?{>Q?>UR?Ȑ>R?>d"S?ϣ>S?>S?>5UT?ּ>ZT?B>n!U?:>rU?>fU?>ISV?s>V?>W?e>W?>7W?>OX?>NX?$>Y?>&Y?>zY?>JZ?5>Z?5>[?>.z[?>4[?>+D\?7>\?<> ]?>r]? >l]?><^?~>^?><_?\>i_?>'_?>2`?f>Ֆ`?>`?>G_a?0>ja?h>~'b?F>b?>zb?>bSc?ʴ>d?m>~d?<>pd?>Fe?ۋ>e?># f?'y>pf?Po>f?&e>U7g?Z>g?O>g?D>ah?L9>%h?->6'i?|!>9i?>.i?n>Pj?r>j?(>k?>vxk?>&k??b?=l??[l?S?m??[em?fD?m??#*n?4?sn?}?n?<$?Po?כ?o?N?-p??9wp??9p?x?+;q??q?f?q?1?`r?S?pr??!$s?N@ ?ąs?i ?Zs?c, ?Ht?: ?`t? ? u? ?1mu? ?u?Mx ?/v? ? v?b ?;v? ?]Sw?VL?sw??|x?5?xvx? ?hx?`?K8y??"y??y?z?Zz?v?Zz?/b?{??|{?DI?#{??=|?/?|??}|??^}??'}??i~?cn?~??~?cS?????7?}?pd-smlib-0.13.0/unittests/vrms-unittest.pd000066400000000000000000000010351434442070000205320ustar00rootroot00000000000000#N canvas 397 37 728 520 10; #X obj 49 179 testtools/unit-test-frame; #X obj 49 109 loadbang; #X obj 370 138 smlib/vrms 20; #X msg 49 140 vrms 0; #X text 26 75 vrms computes the root-mean-square of a vector; #X obj 370 21 / 512; #X obj 398 81 - 0.5; #X obj 370 54 t f f f; #X obj 436 81 + 0.1; #X obj 370 109 pack f f f; #X connect 0 2 5 0; #X connect 1 0 3 0; #X connect 2 0 0 1; #X connect 3 0 0 0; #X connect 5 0 7 0; #X connect 6 0 9 1; #X connect 7 0 9 0; #X connect 7 1 6 0; #X connect 7 2 8 0; #X connect 8 0 9 2; #X connect 9 0 2 0; pd-smlib-0.13.0/unittests/vrms.wav000066400000000000000000000040541434442070000170530ustar00rootroot00000000000000RIFF$WAVEfmt D data>IG>aՕ>d>>>>>;G>3ߒ>x>>鯑>M>->>0>}ԏ>z>!>Ɏ> t>>a͍>x|>1->ߌ>>CI>>>gt>0>>⮊>p>3>>տ>w>R>>>ݼ>w>a>7>1>>>n>|>/]>[?>d#>M >>چ>QƆ>ó>>S>s>z|>gs>:l>f>c>"b>b>d>.i>Wo>fw>\>9>>>/>φ>>(>>>50> M>k>N>>҇>>!>J>vv>壈>#ӈ>/>7>k>>Fډ>:>O>e>̊> >)P>>ڋ>P">k>Զ>>Q>>>F>ܛ>X>iJ> >>>[>D>>e{>6ޑ>B>P>>Fx>l>N>>e)>0>] >|>> f>ܗ>T>͘>:H>ę>A>a>>>>A>Ĝ>nI> ϝ>U>ݞ>f>.>|> >>d%>/> F>ף>j>>>*>*>K>S>T'>Hé>.`>>Ɯ>r<>ݬ>~> >Į>1h>% >>Y>>[>uR>\>>R>>Ы>Y> >e>gg>">ɺ>{>.>(>e>PK>>(>n>%>>>P>2 >>2><>>>Vs>1>`>>o>"0>&>>t>b7>>'>M>F> >>ߗ>y^>%>>">}>F>>> >n>9>w>u>ߝ>j>7>>>>p>@>>>>>Q>C#>>@>Ǚ>l>?>n>T>>!>e>=:>>>ϻ>K>i>/@>>H>F>>$x>Q>(*>>L>[?? 6?o??~?l?YZ?e?6?ߤ?L?ׁ??L_?5?<=?`???~?j ? ?I ? ?) ? ? ?Wz ? ?][ ? ?<????? r?{?T?z?8?ة????q?? V?{?:?s? ???ex?V?[^?u?D??=+??%??\?m??T??<?İ?$ ?% ?p !?́!?;!?j"?L"?S#?#?e=$?:$?'%?%?&?1&?W&?p'?'?([(?(?F)?)?1*?*?j+?)+?,?},?,?i-?-?U.?.?)B/?h/?.0?0?v1?1?m2?~2?2?Bl3?3?Y4?4?eG5?M5?B56?C6?P#7?i7?8?8?8?Cw9?9?e:?a:?T;?X;?C?G>?????@?y@?@?iA?A?YB?B?$JC?ZC?:D?߲D?1+E?E?F?`F? G?ZG?G?xvH?H?gI?kI?"YJ?J?JK?K?\?ȶ ?a??q ? ? #?$&?A|(?͚*?,?Q.?/?R1?2?H4?*5?6?7?8?v:?;?;?#??a??)@?@?A?\YB?C?tC?wWD?D?ʓE?+F?vF?OG?#G?OeH?AH?nI? I?(kJ?J?l]K?K?EL?L?%M?|M?M?WdN?N?/O?O?O?SP?P?LQ?`iQ?Q?FR?/rR?R?S?8oS? S?T?|aT?T?sT?IU?AU?U?)V?qV?=V?V?EW?̊W?W?VX?TX?X?X?Y?WY?Y?Y?[Z?=OZ?zZ?Z?[?t<[??v[?t[?[?. \?W\?\?1\?%\?0]?e]?]?]?^?4^?*g^?R^? ^?R^?.-_?]_?_?M_?_?d`?I`?w`?`? `? a?,a?Xa?a?a?a?b?r1b?[b?ȅb?{b?b?c?*c?MSc?{c?zc?%c?c?d?@d?gd?rd?d?Xd?d??$e?TIe?,ne?Ȓe?(e?Le?6e?"f?]Ff?if?f?vf?f?tf?g?8g?jZg?{g?cg?g?g?ch?!h?qAh?ah?Áh?h?]h?h?Di?ti?z>i?T]i?|i?i?i?i?#i?j?0j?QNj?kj?j?j?j?j?j?k?5k?Qk?mk?׉k?k?`k?k?`k?l?.l?Il?dl?l?Al?̴l?6l?l?m?m?7m?zQm?-km?Äm?;m?m?m?m?n?n?4n?dMn?en?w~n?ؖn?n?Jn?\n?Sn?2o?&o?>o?3Vo?mo?o?Vo?o?o?o?o?Vp?&p??=?{=?pW> v>>ۗ>`)>N>M>o>s>M>i>/>>Z>>>>|>M>>&>>>M>>>!>;>\> >#>9>V>x{>P>߿>+c>6>>Q>>8>@G>">>D> >>I>B>>W>M >>2o>#>uٰ>J>IH>{>仫>w>{4>>G>6s>5>G>{>/>hM>2>>>K~>N> >>ʕ>?>{>bW>4>>R>8ڍ>U>>g>w>o>a>vV>M>aG>C>5C>`E>vJ>~>\|>z>x>H$w>sTu>us>sq>p>[n>l>t k>mi>g>TLf>d>Kc>a> n`>d _>׳]>d\>[>wY>X>mW>hV>TU>JT>KS>WR>cmQ>P>O>N>5N>{M>L>DL>K>O4K>J>TJ>0I>I>F_I>Y&I>H>H>#H>H>ZH>.H>{H>9I>`VI>I>I>EJ>6J>"K>,K>/L>L>lM>N>N>ÝO>oP>LQ>5R>(S>%T>.U>@V>]W>X>Y>Z>a5\>S]>^>:`>=a>Yc>d>Ff>ßg>`3i>j>Url>[n>o>q>Js>u>v>x>Dz>u|>^~>&>P!>>>">'>l0>;>1I>YY>k>耋>5>Ʊ>͎>> >->Q>x>> ʖ>>l#>R>փ>>> >X>>,̢>7>E>>ħ>b>EI>n>Ҭ>{>Pa>Q>v>?>>ٵ>(>w>ȹ>>l>p>>i>#>">m>>' >rz>>]1>>L>[I>>>g>>*>>>5R>+>>>>K>>>>g>WS>ȼ>&>%> >hg>=>?>>>f>>>mc>B>}A>>!>H?#??sr?`+?z??0W????>??< ?m ?|( ?T ?R ?tY ??#??\G?+??,{?^7???l?Z)?%??`?4?r?̗?AU??{?@?L? ?'?Q ?D!?"?`"?#?>$?A$?%?z&?9'?'?!(?\w)?6*? *?+?u,?4-?a-?'.?t/?30?0?1?t2?N43?3?4?Qu5?56?T6?pd-smlib-0.13.0/unittests/vsum-unittest.pd000066400000000000000000000007411434442070000205400ustar00rootroot00000000000000#N canvas 490 35 718 503 10; #X obj 33 117 testtools/unit-test-frame; #X obj 33 52 loadbang; #X obj 354 -8 t f f f f; #X obj 354 47 pack f f f f; #X text 33 -28 vstd computes the standard deviation of a vector; #X obj 354 74 smlib/vsum; #X obj 354 -47 / 2048; #X msg 33 82 vsum 0; #X connect 0 2 6 0; #X connect 1 0 7 0; #X connect 2 0 3 0; #X connect 2 1 3 1; #X connect 2 2 3 2; #X connect 2 3 3 3; #X connect 3 0 5 0; #X connect 5 0 0 1; #X connect 6 0 2 0; #X connect 7 0 0 0; pd-smlib-0.13.0/unittests/vsum.wav000066400000000000000000000040541434442070000170560ustar00rootroot00000000000000RIFF$WAVEfmt D data;;;< <@<`<<<<<<<<<==== =(=0=8=@=H=P=X=`=h=p=x=================================>>>>> > >>>>>>>>>> >">$>&>(>*>,>.>0>2>4>6>8>:><>>>@>B>D>F>H>J>L>N>P>R>T>V>X>Z>\>^>`>b>d>f>h>j>l>n>p>r>t>v>x>z>|>~>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>?????????????????? ? ? ? ? ? ? ? ? ? ????????????????????????????????????? ? ?!?!?"?"?#?#?$?$?%?%?&?&?'?'?(?(?)?)?*?*?+?+?,?,?-?-?.?.?/?/?0?0?1?1?2?2?3?3?4?4?5?5?6?6?7?7?8?8?9?9?:?:?;?;??>?????@?@?A?A?B?B?C?C?D?D?E?E?F?F?G?G?H?H?I?I?J?J?K?K?L?L?M?M?N?N?O?O?P?P?Q?Q?R?R?S?S?T?T?U?U?V?V?W?W?X?X?Y?Y?Z?Z?[?[?\?\?]?]?^?^?_?_?`?`?a?a?b?b?c?c?d?d?e?e?f?f?g?g?h?h?i?i?j?j?k?k?l?l?m?m?n?n?o?o?p?p?q?q?r?r?s?s?t?t?u?u?v?v?w?w?x?x?y?y?z?z?{?{?|?|?}?}?~?~???pd-smlib-0.13.0/unittests/vvconv-unittest.pd000066400000000000000000000006671434442070000210760ustar00rootroot00000000000000#N canvas 195 119 718 503 10; #X obj 33 117 testtools/unit-test-frame; #X obj 423 3 loadbang; #X obj 354 63 smlib/vvconv; #X msg 33 82 vvconv 0; #X obj 33 50 loadbang; #X msg 423 35 -1 0.9; #X obj 354 3 & 127; #X obj 354 35 / 127; #X text 34 14 vvconv: convolution of 2 vectors; #X connect 0 2 6 0; #X connect 1 0 5 0; #X connect 2 0 0 1; #X connect 3 0 0 0; #X connect 4 0 3 0; #X connect 5 0 2 1; #X connect 6 0 7 0; #X connect 7 0 2 0; pd-smlib-0.13.0/unittests/vvconv.wav000066400000000000000000000040541434442070000174050ustar00rootroot00000000000000RIFF$WAVEfmt D data6;6h<)<6e2 >B!D">R)c>b1>r9h&>A).>&Ij5>GQ<>gYCC>a/K>iqR>qgY>y`>6h> xo>$@v>4}>E"מ>U*?>e2>u:i>BD">JÔ>Rc>Z>b>jF>rh>zD>)>žɱ>&ɾj>6; >GѾ>WվhM>gپC>wݾ>/>>龰q>>g>BT>>>6> > x>e>$ @>, [>4 ><i?E"מ?M&Eo?U*??]. ?e2 ?m6 ?u:i ?}>Q?B!D"?F#?J%?N'?R)c?V+h4?Z-?^/C?b1?f3 v!?j5F#?n7%?r9h&?v;ַ(?z=D*?~?X,?A).?C/?E1?Gg3?&Ij5?.KC;7?6M 9?>O:?GQ?WUhM@?_WB?gYCC?o[E?w]G?__I?a/K?cgM?eN?gBP?iqR?kBT?mV?oW?qgY?sԃ[?uBT]?w$_?y`?{b?}d?fff?6;6h<)<6e2 >B!D">R)c>b1>r9h&>A).>&Ij5>GQ<>gYCC>a/K>iqR>qgY>y`>6h> xo>$@v>4}>E"מ>U*?>e2>u:i>BD">JÔ>Rc>Z>b>jF>rh>zD>)>žɱ>&ɾj>6; >GѾ>WվhM>gپC>wݾ>/>>龰q>>g>BT>>>6> > x>e>$ @>, [>4 ><i?E"מ?M&Eo?U*??]. ?e2 ?m6 ?u:i ?}>Q?B!D"?F#?J%?N'?R)c?V+h4?Z-?^/C?b1?f3 v!?j5F#?n7%?r9h&?v;ַ(?z=D*?~?X,?A).?C/?E1?Gg3?&Ij5?.KC;7?6M 9?>O:?GQ?WUhM@?_WB?gYCC?o[E?w]G?__I?a/K?cgM?eN?gBP?iqR?kBT?mV?oW?qgY?sԃ[?uBT]?w$_?y`?{b?}d?fff?pd-smlib-0.13.0/unittests/vvminus-unittest.pd000066400000000000000000000010551434442070000212540ustar00rootroot00000000000000#N canvas 195 119 718 503 10; #X obj 32 186 testtools/unit-test-frame; #X obj 428 72 loadbang; #X obj 32 119 loadbang; #X obj 353 132 smlib/vvminus; #X msg 32 151 vvminus 0; #X obj 353 66 t f f; #X obj 353 95 pack; #X obj 353 25 / 256; #X msg 428 103 1 -0.2; #X text 37 39 vv- substracts two lists of floats; #X text 37 55 or a float from a list of floats; #X connect 0 2 7 0; #X connect 1 0 8 0; #X connect 2 0 4 0; #X connect 3 0 0 1; #X connect 4 0 0 0; #X connect 5 0 6 0; #X connect 5 1 6 1; #X connect 6 0 3 0; #X connect 7 0 5 0; #X connect 8 0 3 1; pd-smlib-0.13.0/unittests/vvminus.wav000066400000000000000000000040541434442070000175730ustar00rootroot00000000000000RIFF$WAVEfmt D dataL>P>~T>}X>|\>{`>zd>yh>xl>wp>vt>ux>t|>sff>rff>qff>pff>off>nff>mff>lff>kff>jff>iff>hff>gff>fff>eff>dff>cff>bff>aff>`ff>_ff>^ff>]ff>\ff>[ff>Zff>Yff>Xff>Wff>Vff>Uff>Tff>Sff>Rff>Qff>Pff>Off>Nff>Mff>Lff>Kff>Jff>Iff>Hff>Gff>Fff>Eff>Dff>Cff>Bff>Aff>@ff>?ff>>ff>=ff>;ff>:ff>9ff>8ff>7ff>6ff>5ff>4ff>333?233?133?033?/33?.33?-33?,33?+33?*33 ?)33 ?(33 ?'33 ?&33 ?%33?$33?#33?"33?!33? 33?33?33?33?33?33?33?33?33?33?33?33?33?33 ?33!?33"?33#?33$?33%? 33&? 33'? 33(? 33)? 33*?33+?33,?33-?33.?33/?330?331?332?333?334?335?336?337?338?339?33:?33;?33?33??33@?33A?33B?33C?޾33D?ܾ33E?ھ33F?ؾ33G?־33H?Ծ33I?Ҿ33J?о33K?ξ33L?̾33M?ʾ33N?Ⱦ33O?ƾ33P?ľ33Q?¾33R?33S?33T?33U?33V?33W?33X?33Y?33Z?33[?33\?33]?33^?33_?33`?33a?33b?33c?33d?33e?33f?33g?33h?33i?33j?33k?33l?33m?33n?33o?33p?33q?33r?33s?|33t?x33u?t33v?p33w?l33x?h33y?d33z?`33{?\33|?X33}?T33~?P33?L?H?D?@?<?8?4?0?,?(?$? ????? ?????𽚙?轚?ཚ?ؽ?н?Ƚ??????????p?`?P?@?0? ???༚????@??͌ @pd-smlib-0.13.0/unittests/vvplus-unittest.pd000066400000000000000000000011331434442070000211010ustar00rootroot00000000000000#N canvas 195 119 718 503 10; #X obj 32 186 testtools/unit-test-frame; #X obj 422 93 loadbang; #X obj 32 119 loadbang; #X obj 353 87 t f f; #X obj 353 116 pack; #X text 37 39 vv- substracts two lists of floats; #X text 37 55 or a float from a list of floats; #X obj 353 153 smlib/vvplus; #X msg 32 153 vvplus 0; #X msg 422 122 -1.1 0.1; #X obj 353 35 & 127; #X obj 353 62 / 128; #X connect 0 2 10 0; #X connect 1 0 9 0; #X connect 2 0 8 0; #X connect 3 0 4 0; #X connect 3 1 4 1; #X connect 4 0 7 0; #X connect 7 0 0 1; #X connect 8 0 0 0; #X connect 9 0 7 1; #X connect 10 0 11 0; #X connect 11 0 3 0; pd-smlib-0.13.0/unittests/vvplus.wav000066400000000000000000000040541434442070000174230ustar00rootroot00000000000000RIFF$WAVEfmt D datǎ=̋=̊=̉=̈ff>̇ff>̆ff>̅ff>̄ff&>̃ff.>̂ff6>́ff>>̀ffF>ffN>}ffV>{ff^>yfff>wffn>uffv>sff~>q33>o33>m33>k33>i33>g33>e33>c33>a33>_33>]33>[33>Y33>W33>U33>S33>Q33>O33>M33>K33>I33>G33>E33>C33>A33>?33>=33>;33>933>733>533>333>1?/?-?+?) ?' ?% ?#?!????????!?#? %? '? )?+?-?/?1?433?435?437?43󾚙9?43レ;?43뾚=?43羚??43㾚A?43߾C?43۾E?43׾G?43ӾI?43ϾK?43˾M?43ǾO?43þQ?43S?43U?43W?43Y?43[?43]?43_?43a?43c?43e?43g?43i?43k?43m?43o?43q?hf~s?hfvu?hfnw?hffy?hf^{?hfV}?hfN?hfF̀?hf>́?hf6̂?hf.̃?hf&̄?hf̅?hf̆?hḟ?hf̈?̉?̊?ܽ̋?̌=̋=̊=̉=̈ff>̇ff>̆ff>̅ff>̄ff&>̃ff.>̂ff6>́ff>>̀ffF>ffN>}ffV>{ff^>yfff>wffn>uffv>sff~>q33>o33>m33>k33>i33>g33>e33>c33>a33>_33>]33>[33>Y33>W33>U33>S33>Q33>O33>M33>K33>I33>G33>E33>C33>A33>?33>=33>;33>933>733>533>333>1?/?-?+?) ?' ?% ?#?!????????!?#? %? '? )?+?-?/?1?433?435?437?43󾚙9?43レ;?43뾚=?43羚??43㾚A?43߾C?43۾E?43׾G?43ӾI?43ϾK?43˾M?43ǾO?43þQ?43S?43U?43W?43Y?43[?43]?43_?43a?43c?43e?43g?43i?43k?43m?43o?43q?hf~s?hfvu?hfnw?hffy?hf^{?hfV}?hfN?hfF̀?hf>́?hf6̂?hf.̃?hf&̄?hf̅?hf̆?hḟ?hf̈?̉?̊?ܽ̋?