smlib-0.12.2/0000755000076500007650000000000012030354207011354 5ustar hanshanssmlib-0.12.2/LICENSE.txt0000644000076500007650000004325412025365404013214 0ustar hanshans 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. smlib-0.12.2/Makefile0000644000076500007650000004116711661104502013025 0ustar hanshans## Pd library template version 1.0.11 # For instructions on how to use this template, see: # http://puredata.info/docs/developer/MakefileTemplate LIBRARY_NAME = smlib # add your .c source files to the SOURCES variable, help files will be # included automatically SOURCES = bp.c decimator.c deltas.c hip.c hist.c itov.c lavg.c lhist.c lhisti.c linspace.c lmax.c lmin.c lrange.c lstd.c prevl.c threshold.c vabs.c vclip.c vcog.c vdbtorms.c vdelta.c vfmod.c vftom.c vlavg.c vlmax.c vlmin.c vlrange.c vmax.c vmin.c vmtof.c vnmax.c vpow.c vrms.c vrmstodb.c vstd.c vsum.c vthreshold.c vvconv.c vvminus.c vvplus.c # list all pd objects (i.e. myobject.pd) files here, and their helpfiles will # be included automatically PDOBJECTS = SMLib.pd # example patches and related files, in the 'examples' subfolder EXAMPLES = beattracker.pd normalizer.pd resonate-beat.pd # manuals and related files, in the 'manual' subfolder MANUAL = # if you want to include any other files in the source and binary tarballs, # list them here. This can be anything from header files, test patches, # documentation, etc. README.txt and LICENSE.txt are required and therefore # automatically included EXTRA_DIST = SMLib.c SMLib.dsp SMLib.dsw SMLib.opt SMLib.plg defines.h # unit tests and related files here, in the 'unittests' subfolder UNITTESTS = bp-unittest.pd bp.wav decimator-unittest.pd decimator.wav deltas-unittest.pd deltas.wav hip-unittest.pd hip.wav hist-unittest.pd hist.wav itov-unittest.pd itov.wav lavg-unittest.pd lavg.wav lhist-unittest.pd lhist.wav linspace-unittest.pd linspace.wav lmax-unittest.pd lmax.wav lmin-unittest.pd lmin.wav lrange-unittest.pd lrange.wav lsdt.wav lstd-unittest.pd prevl-unittest.pd prevl.wav threshold-unittest.pd threshold.wav vabs-unittest.pd vabs.wav vclip-unittest.pd vclip.wav vcog-unittest.pd vcog.wav vdbtorms-unittest.pd vdbtorms.wav vdelta-unittest.pd vdelta.wav vfmod-unittest.pd vfmod.wav vftom-unittest.pd vftom.wav vlavg-unittest.pd vlavg.wav vlmax-unittest.pd vlmax.wav vlmin-unittest.pd vlmin.wav vlrange-unittest.pd vlrange.wav vmax-unittest.pd vmax.wav vmin-unittest.pd vmin.wav vmtof-unittest.pd vmtof.wav vpow-unittest.pd vpow.wav vrms-unittest.pd vrms.wav vrmstodb-unittest.pd vrmstodb.wav vstd-unittest.pd vstd.wav vsum-unittest.pd vsum.wav vvconv-unittest.pd vvconv.wav vvminus-unittest.pd vvminus.wav vvplus-unittest.pd vvplus.wav #------------------------------------------------------------------------------# # # things you might need to edit if you are using other C libraries # #------------------------------------------------------------------------------# ALL_CFLAGS = -I"$(PD_INCLUDE)" ALL_LDFLAGS = SHARED_LDFLAGS = ALL_LIBS = #------------------------------------------------------------------------------# # # you shouldn't need to edit anything below here, if we did it right :) # #------------------------------------------------------------------------------# # these can be set from outside without (usually) breaking the build CFLAGS = -Wall -W -g LDFLAGS = LIBS = # get library version from meta file LIBRARY_VERSION = $(shell sed -n 's|^\#X text [0-9][0-9]* [0-9][0-9]* VERSION \(.*\);|\1|p' $(LIBRARY_NAME)-meta.pd) ALL_CFLAGS += -DPD -DVERSION='"$(LIBRARY_VERSION)"' PD_INCLUDE = $(PD_PATH)/include/pd # where to install the library, overridden below depending on platform prefix = /usr/local libdir = $(prefix)/lib pkglibdir = $(libdir)/pd-externals objectsdir = $(pkglibdir) INSTALL = install INSTALL_PROGRAM = $(INSTALL) -p -m 644 INSTALL_DATA = $(INSTALL) -p -m 644 INSTALL_DIR = $(INSTALL) -p -m 755 -d ALLSOURCES := $(SOURCES) $(SOURCES_android) $(SOURCES_cygwin) $(SOURCES_macosx) \ $(SOURCES_iphoneos) $(SOURCES_linux) $(SOURCES_windows) DISTDIR=$(LIBRARY_NAME)-$(LIBRARY_VERSION) ORIGDIR=pd-$(LIBRARY_NAME:~=)_$(LIBRARY_VERSION) UNAME := $(shell uname -s) ifeq ($(UNAME),Darwin) CPU := $(shell uname -p) ifeq ($(CPU),arm) # iPhone/iPod Touch SOURCES += $(SOURCES_iphoneos) EXTENSION = pd_darwin SHARED_EXTENSION = dylib OS = iphoneos PD_PATH = /Applications/Pd-extended.app/Contents/Resources IPHONE_BASE=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin CC=$(IPHONE_BASE)/gcc CPP=$(IPHONE_BASE)/cpp CXX=$(IPHONE_BASE)/g++ ISYSROOT = -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk IPHONE_CFLAGS = -miphoneos-version-min=3.0 $(ISYSROOT) -arch armv6 OPT_CFLAGS = -fast -funroll-loops -fomit-frame-pointer ALL_CFLAGS := $(IPHONE_CFLAGS) $(ALL_CFLAGS) ALL_LDFLAGS += -arch armv6 -bundle -undefined dynamic_lookup $(ISYSROOT) SHARED_LDFLAGS += -arch armv6 -dynamiclib -undefined dynamic_lookup $(ISYSROOT) ALL_LIBS += -lc $(LIBS_iphoneos) STRIP = strip -x DISTBINDIR=$(DISTDIR)-$(OS) else # Mac OS X SOURCES += $(SOURCES_macosx) EXTENSION = pd_darwin SHARED_EXTENSION = dylib OS = macosx PD_PATH = /Applications/Pd-extended.app/Contents/Resources OPT_CFLAGS = -ftree-vectorize -ftree-vectorizer-verbose=2 -fast # build universal 32-bit on 10.4 and 32/64 on newer ifeq ($(shell uname -r | sed 's|\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*|\1|'), 8) FAT_FLAGS = -arch ppc -arch i386 -mmacosx-version-min=10.4 else FAT_FLAGS = -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=10.4 SOURCES += $(SOURCES_iphoneos) endif ALL_CFLAGS += $(FAT_FLAGS) -fPIC -I/sw/include # if the 'pd' binary exists, check the linking against it to aid with stripping BUNDLE_LOADER = $(shell test ! -e $(PD_PATH)/bin/pd || echo -bundle_loader $(PD_PATH)/bin/pd) ALL_LDFLAGS += $(FAT_FLAGS) -bundle $(BUNDLE_LOADER) -undefined dynamic_lookup -L/sw/lib SHARED_LDFLAGS += $(FAT_FLAGS) -dynamiclib -undefined dynamic_lookup \ -install_name @loader_path/$(SHARED_LIB) -compatibility_version 1 -current_version 1.0 ALL_LIBS += -lc $(LIBS_macosx) STRIP = strip -x DISTBINDIR=$(DISTDIR)-$(OS) # install into ~/Library/Pd on Mac OS X since /usr/local isn't used much pkglibdir=$(HOME)/Library/Pd endif endif # Tho Android uses Linux, we use this fake uname to provide an easy way to # setup all this things needed to cross-compile for Android using the NDK ifeq ($(UNAME),ANDROID) CPU := arm SOURCES += $(SOURCES_android) EXTENSION = pd_linux SHARED_EXTENSION = so OS = android PD_PATH = /usr NDK_BASE := /usr/local/android-ndk NDK_PLATFORM_VERSION := 5 NDK_SYSROOT=$(NDK_BASE)/platforms/android-$(NDK_PLATFORM_VERSION)/arch-arm NDK_UNAME := $(shell uname -s | tr '[A-Z]' '[a-z]') NDK_TOOLCHAIN_BASE=$(NDK_BASE)/toolchains/arm-linux-androideabi-4.4.3/prebuilt/$(NDK_UNAME)-x86 CC := $(NDK_TOOLCHAIN_BASE)/bin/arm-linux-androideabi-gcc --sysroot=$(NDK_SYSROOT) OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer CFLAGS += LDFLAGS += -rdynamic -shared SHARED_LDFLAGS += -Wl,-soname,$(SHARED_LIB) -shared LIBS += -lc $(LIBS_android) STRIP := $(NDK_TOOLCHAIN_BASE)/bin/arm-linux-androideabi-strip \ --strip-unneeded -R .note -R .comment DISTBINDIR=$(DISTDIR)-$(OS)-$(shell uname -m) endif ifeq ($(UNAME),Linux) CPU := $(shell uname -m) SOURCES += $(SOURCES_linux) EXTENSION = pd_linux SHARED_EXTENSION = so OS = linux PD_PATH = /usr OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer ALL_CFLAGS += -fPIC ALL_LDFLAGS += -rdynamic -shared -fPIC SHARED_LDFLAGS += -Wl,-soname,$(SHARED_LIB) -shared ALL_LIBS += -lc $(LIBS_linux) STRIP = strip --strip-unneeded -R .note -R .comment DISTBINDIR=$(DISTDIR)-$(OS)-$(shell uname -m) endif ifeq ($(UNAME),GNU) # GNU/Hurd, should work like GNU/Linux for basically all externals CPU := $(shell uname -m) SOURCES += $(SOURCES_linux) EXTENSION = pd_linux SHARED_EXTENSION = so OS = linux PD_PATH = /usr OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer ALL_CFLAGS += -fPIC ALL_LDFLAGS += -rdynamic -shared -fPIC SHARED_LDFLAGS += -shared -Wl,-soname,$(SHARED_LIB) ALL_LIBS += -lc $(LIBS_linux) STRIP = strip --strip-unneeded -R .note -R .comment DISTBINDIR=$(DISTDIR)-$(OS)-$(shell uname -m) endif ifeq ($(UNAME),GNU/kFreeBSD) # Debian GNU/kFreeBSD, should work like GNU/Linux for basically all externals CPU := $(shell uname -m) SOURCES += $(SOURCES_linux) EXTENSION = pd_linux SHARED_EXTENSION = so OS = linux PD_PATH = /usr OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer ALL_CFLAGS += -fPIC ALL_LDFLAGS += -rdynamic -shared -fPIC SHARED_LDFLAGS += -shared -Wl,-soname,$(SHARED_LIB) ALL_LIBS += -lc $(LIBS_linux) STRIP = strip --strip-unneeded -R .note -R .comment DISTBINDIR=$(DISTDIR)-$(OS)-$(shell uname -m) endif ifeq (CYGWIN,$(findstring CYGWIN,$(UNAME))) CPU := $(shell uname -m) SOURCES += $(SOURCES_cygwin) EXTENSION = dll SHARED_EXTENSION = dll OS = cygwin PD_PATH = $(shell cygpath $$PROGRAMFILES)/pd OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer ALL_CFLAGS += ALL_LDFLAGS += -rdynamic -shared -L"$(PD_PATH)/src" -L"$(PD_PATH)/bin" SHARED_LDFLAGS += -shared -Wl,-soname,$(SHARED_LIB) ALL_LIBS += -lc -lpd $(LIBS_cygwin) STRIP = strip --strip-unneeded -R .note -R .comment DISTBINDIR=$(DISTDIR)-$(OS) endif ifeq (MINGW,$(findstring MINGW,$(UNAME))) CPU := $(shell uname -m) SOURCES += $(SOURCES_windows) EXTENSION = dll SHARED_EXTENSION = dll OS = windows PD_PATH = $(shell cd "$$PROGRAMFILES/pd" && pwd) # MinGW doesn't seem to include cc so force gcc CC=gcc OPT_CFLAGS = -O3 -funroll-loops -fomit-frame-pointer ALL_CFLAGS += -mms-bitfields ALL_LDFLAGS += -s -shared -Wl,--enable-auto-import -L"$(PD_PATH)/src" -L"$(PD_PATH)/bin" -L"$(PD_PATH)/obj" SHARED_LDFLAGS += -shared ALL_LIBS += -lpd -lwsock32 -lkernel32 -luser32 -lgdi32 $(LIBS_windows) STRIP = strip --strip-unneeded -R .note -R .comment DISTBINDIR=$(DISTDIR)-$(OS) endif # in case somebody manually set the HELPPATCHES above HELPPATCHES ?= $(SOURCES:.c=-help.pd) $(PDOBJECTS:.pd=-help.pd) ALL_CFLAGS := $(ALL_CFLAGS) $(CFLAGS) $(OPT_CFLAGS) ALL_LDFLAGS := $(LDFLAGS) $(ALL_LDFLAGS) ALL_LIBS := $(LIBS) $(ALL_LIBS) SHARED_SOURCE ?= $(shell test ! -e lib$(LIBRARY_NAME).c || \ echo lib$(LIBRARY_NAME).c ) SHARED_HEADER ?= $(shell test ! -e $(LIBRARY_NAME).h || echo $(LIBRARY_NAME).h) SHARED_LIB = $(SHARED_SOURCE:.c=.$(SHARED_EXTENSION)) .PHONY = install libdir_install single_install install-doc install-examples install-manual install-unittests clean distclean dist etags $(LIBRARY_NAME) all: $(SOURCES:.c=.$(EXTENSION)) $(SHARED_LIB) %.o: %.c $(CC) $(ALL_CFLAGS) -o "$*.o" -c "$*.c" %.$(EXTENSION): %.o $(SHARED_LIB) $(CC) $(ALL_LDFLAGS) -o "$*.$(EXTENSION)" "$*.o" $(ALL_LIBS) $(SHARED_LIB) chmod a-x "$*.$(EXTENSION)" # this links everything into a single binary file $(LIBRARY_NAME): $(SOURCES:.c=.o) $(LIBRARY_NAME).o $(CC) $(ALL_LDFLAGS) -o $(LIBRARY_NAME).$(EXTENSION) $(SOURCES:.c=.o) $(LIBRARY_NAME).o $(ALL_LIBS) chmod a-x $(LIBRARY_NAME).$(EXTENSION) $(SHARED_LIB): $(SHARED_SOURCE:.c=.o) $(CC) $(SHARED_LDFLAGS) -o $(SHARED_LIB) $(SHARED_SOURCE:.c=.o) $(LIBS) install: libdir_install # The meta and help files are explicitly installed to make sure they are # actually there. Those files are not optional, then need to be there. libdir_install: $(SOURCES:.c=.$(EXTENSION)) $(SHARED_LIB) install-doc install-examples install-manual install-unittests $(INSTALL_DIR) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) $(INSTALL_DATA) $(LIBRARY_NAME)-meta.pd \ $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) test -z "$(strip $(SOURCES))" || (\ $(INSTALL_PROGRAM) $(SOURCES:.c=.$(EXTENSION)) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) && \ $(STRIP) $(addprefix $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/,$(SOURCES:.c=.$(EXTENSION)))) test -z "$(strip $(SHARED_LIB))" || \ $(INSTALL_DATA) $(SHARED_LIB) \ $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) test -z "$(strip $(wildcard $(SOURCES:.c=.tcl)))" || \ $(INSTALL_DATA) $(wildcard $(SOURCES:.c=.tcl)) \ $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) test -z "$(strip $(PDOBJECTS))" || \ $(INSTALL_DATA) $(PDOBJECTS) \ $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) # install library linked as single binary single_install: $(LIBRARY_NAME) install-doc install-examples install-manual install-unittests $(INSTALL_DIR) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) $(INSTALL_PROGRAM) $(LIBRARY_NAME).$(EXTENSION) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) $(STRIP) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/$(LIBRARY_NAME).$(EXTENSION) install-doc: $(INSTALL_DIR) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) test -z "$(strip $(SOURCES) $(PDOBJECTS))" || \ $(INSTALL_DATA) $(HELPPATCHES) \ $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) $(INSTALL_DATA) README.txt $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/README.txt $(INSTALL_DATA) LICENSE.txt $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/LICENSE.txt install-examples: test -z "$(strip $(EXAMPLES))" || \ $(INSTALL_DIR) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/examples && \ for file in $(EXAMPLES); do \ $(INSTALL_DATA) examples/$$file $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/examples; \ done install-manual: test -z "$(strip $(MANUAL))" || \ $(INSTALL_DIR) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/manual && \ for file in $(MANUAL); do \ $(INSTALL_DATA) manual/$$file $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/manual; \ done install-unittests: test -z "$(strip $(UNITTESTS))" || \ $(INSTALL_DIR) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/unittests && \ for file in $(UNITTESTS); do \ $(INSTALL_DATA) unittests/$$file $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/unittests; \ done clean: -rm -f -- $(SOURCES:.c=.o) $(SOURCES_LIB:.c=.o) $(SHARED_SOURCE:.c=.o) -rm -f -- $(SOURCES:.c=.$(EXTENSION)) -rm -f -- $(LIBRARY_NAME).o -rm -f -- $(LIBRARY_NAME).$(EXTENSION) -rm -f -- $(SHARED_LIB) distclean: clean -rm -f -- $(DISTBINDIR).tar.gz -rm -rf -- $(DISTBINDIR) -rm -f -- $(DISTDIR).tar.gz -rm -rf -- $(DISTDIR) -rm -f -- $(ORIGDIR).tar.gz -rm -rf -- $(ORIGDIR) $(DISTBINDIR): $(INSTALL_DIR) $(DISTBINDIR) libdir: all $(DISTBINDIR) $(INSTALL_DATA) $(LIBRARY_NAME)-meta.pd $(DISTBINDIR) $(INSTALL_DATA) $(SOURCES) $(SHARED_SOURCE) $(SHARED_HEADER) $(DISTBINDIR) $(INSTALL_DATA) $(HELPPATCHES) $(DISTBINDIR) test -z "$(strip $(EXTRA_DIST))" || \ $(INSTALL_DATA) $(EXTRA_DIST) $(DISTBINDIR) # tar --exclude-vcs -czpf $(DISTBINDIR).tar.gz $(DISTBINDIR) $(DISTDIR): $(INSTALL_DIR) $(DISTDIR) $(ORIGDIR): $(INSTALL_DIR) $(ORIGDIR) dist: $(DISTDIR) $(INSTALL_DATA) Makefile $(DISTDIR) $(INSTALL_DATA) README.txt $(DISTDIR) $(INSTALL_DATA) LICENSE.txt $(DISTDIR) $(INSTALL_DATA) $(LIBRARY_NAME)-meta.pd $(DISTDIR) test -z "$(strip $(ALLSOURCES))" || \ $(INSTALL_DATA) $(ALLSOURCES) $(DISTDIR) test -z "$(strip $(wildcard $(ALLSOURCES:.c=.tcl)))" || \ $(INSTALL_DATA) $(wildcard $(ALLSOURCES:.c=.tcl)) $(DISTDIR) test -z "$(strip $(SHARED_HEADER))" || \ $(INSTALL_DATA) $(SHARED_HEADER) $(DISTDIR) test -z "$(strip $(SHARED_SOURCE))" || \ $(INSTALL_DATA) $(SHARED_SOURCE) $(DISTDIR) test -z "$(strip $(PDOBJECTS))" || \ $(INSTALL_DATA) $(PDOBJECTS) $(DISTDIR) test -z "$(strip $(HELPPATCHES))" || \ $(INSTALL_DATA) $(HELPPATCHES) $(DISTDIR) test -z "$(strip $(EXTRA_DIST))" || \ $(INSTALL_DATA) $(EXTRA_DIST) $(DISTDIR) test -z "$(strip $(EXAMPLES))" || \ $(INSTALL_DIR) $(DISTDIR)/examples && \ for file in $(EXAMPLES); do \ $(INSTALL_DATA) examples/$$file $(DISTDIR)/examples; \ done test -z "$(strip $(MANUAL))" || \ $(INSTALL_DIR) $(DISTDIR)/manual && \ for file in $(MANUAL); do \ $(INSTALL_DATA) manual/$$file $(DISTDIR)/manual; \ done test -z "$(strip $(UNITTESTS))" || \ $(INSTALL_DIR) $(DISTDIR)/unittests && \ for file in $(UNITTESTS); do \ $(INSTALL_DATA) unittests/$$file $(DISTDIR)/unittests; \ done tar --exclude-vcs -czpf $(DISTDIR).tar.gz $(DISTDIR) # make a Debian source package dpkg-source: debclean make distclean dist mv $(DISTDIR) $(ORIGDIR) tar --exclude-vcs -czpf ../$(ORIGDIR).orig.tar.gz $(ORIGDIR) rm -f -- $(DISTDIR).tar.gz rm -rf -- $(DISTDIR) $(ORIGDIR) cd .. && dpkg-source -b $(LIBRARY_NAME) etags: etags *.h $(SOURCES) ../../pd/src/*.[ch] /usr/include/*.h /usr/include/*/*.h showsetup: @echo "CC: $(CC)" @echo "CFLAGS: $(CFLAGS)" @echo "LDFLAGS: $(LDFLAGS)" @echo "LIBS: $(LIBS)" @echo "ALL_CFLAGS: $(ALL_CFLAGS)" @echo "ALL_LDFLAGS: $(ALL_LDFLAGS)" @echo "ALL_LIBS: $(ALL_LIBS)" @echo "PD_INCLUDE: $(PD_INCLUDE)" @echo "PD_PATH: $(PD_PATH)" @echo "objectsdir: $(objectsdir)" @echo "LIBRARY_NAME: $(LIBRARY_NAME)" @echo "LIBRARY_VERSION: $(LIBRARY_VERSION)" @echo "SOURCES: $(SOURCES)" @echo "SHARED_HEADER: $(SHARED_HEADER)" @echo "SHARED_SOURCE: $(SHARED_SOURCE)" @echo "SHARED_LIB: $(SHARED_LIB)" @echo "PDOBJECTS: $(PDOBJECTS)" @echo "ALLSOURCES: $(ALLSOURCES)" @echo "ALLSOURCES TCL: $(wildcard $(ALLSOURCES:.c=.tcl))" @echo "UNAME: $(UNAME)" @echo "CPU: $(CPU)" @echo "pkglibdir: $(pkglibdir)" @echo "DISTDIR: $(DISTDIR)" @echo "ORIGDIR: $(ORIGDIR)" smlib-0.12.2/README.txt0000644000076500007650000000772711444434710013075 0ustar hanshans ----------------------------------------- - 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 --------------- 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 ------------------ 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://crca.ucsd.edu/~msp/software.html http://iem.kug.ac.at/pd/ http://www.puredata.info smlib-0.12.2/SMLib-help.pd0000644000076500007650000000610711656244706013620 0ustar hanshans#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; smlib-0.12.2/SMLib.c0000644000076500007650000002151611334442556012506 0ustar hanshans/* --------------------- 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(""); } smlib-0.12.2/SMLib.dsp0000644000076500007650000001474511334442556013060 0ustar hanshans# Microsoft Developer Studio Project File - Name="SMLib" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 CFG=SMLib - Win32 Debug !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE !MESSAGE NMAKE /f "SMLib.mak". !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "SMLib.mak" CFG="SMLib - Win32 Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "SMLib - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE "SMLib - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" CPP=cl.exe MTL=midl.exe RSC=rc.exe !IF "$(CFG)" == "SMLib - Win32 Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "Release" # PROP Intermediate_Dir "Release" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SMLIB_EXPORTS" /YX /FD /c # ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SMLIB_EXPORTS" /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x813 /d "NDEBUG" # ADD RSC /l 0x813 /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib pd.lib /nologo /dll /machine:I386 !ELSEIF "$(CFG)" == "SMLib - Win32 Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "Debug" # PROP BASE Intermediate_Dir "Debug" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "Debug" # PROP Intermediate_Dir "Debug" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SMLIB_EXPORTS" /YX /FD /GZ /c # ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SMLIB_EXPORTS" /YX /FD /GZ /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x813 /d "_DEBUG" # ADD RSC /l 0x813 /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib pd.lib /nologo /dll /debug /machine:I386 /pdbtype:sept !ENDIF # Begin Target # Name "SMLib - Win32 Release" # Name "SMLib - Win32 Debug" # Begin Group "Source Files" # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # Begin Source File SOURCE=.\bp.c # End Source File # Begin Source File SOURCE=.\decimator.c # End Source File # Begin Source File SOURCE=.\deltas.c # End Source File # Begin Source File SOURCE=.\hip.c # End Source File # Begin Source File SOURCE=.\hist.c # End Source File # Begin Source File SOURCE=.\itov.c # End Source File # Begin Source File SOURCE=.\lavg.c # End Source File # Begin Source File SOURCE=.\lhist.c # End Source File # Begin Source File SOURCE=.\lhisti.c # End Source File # Begin Source File SOURCE=.\linspace.c # End Source File # Begin Source File SOURCE=.\lmax.c # End Source File # Begin Source File SOURCE=.\lmin.c # End Source File # Begin Source File SOURCE=.\lrange.c # End Source File # Begin Source File SOURCE=.\lstd.c # End Source File # Begin Source File SOURCE=.\prevl.c # End Source File # Begin Source File SOURCE=.\SMLib.c # End Source File # Begin Source File SOURCE=.\threshold.c # End Source File # Begin Source File SOURCE=.\vabs.c # End Source File # Begin Source File SOURCE=.\vclip.c # End Source File # Begin Source File SOURCE=.\vcog.c # End Source File # Begin Source File SOURCE=.\vdbtorms.c # End Source File # Begin Source File SOURCE=.\vdelta.c # End Source File # Begin Source File SOURCE=.\vfmod.c # End Source File # Begin Source File SOURCE=.\vftom.c # End Source File # Begin Source File SOURCE=.\vlavg.c # End Source File # Begin Source File SOURCE=.\vlmax.c # End Source File # Begin Source File SOURCE=.\vlmin.c # End Source File # Begin Source File SOURCE=.\vlrange.c # End Source File # Begin Source File SOURCE=.\vmax.c # End Source File # Begin Source File SOURCE=.\vmin.c # End Source File # Begin Source File SOURCE=.\vmtof.c # End Source File # Begin Source File SOURCE=.\vnmax.c # End Source File # Begin Source File SOURCE=.\vpow.c # End Source File # Begin Source File SOURCE=.\vrms.c # End Source File # Begin Source File SOURCE=.\vrmstodb.c # End Source File # Begin Source File SOURCE=.\vstd.c # End Source File # Begin Source File SOURCE=.\vsum.c # End Source File # Begin Source File SOURCE=.\vthreshold.c # End Source File # Begin Source File SOURCE=.\vvconv.c # End Source File # Begin Source File SOURCE=.\vvminus.c # End Source File # Begin Source File SOURCE=.\vvplus.c # End Source File # End Group # Begin Group "Header Files" # PROP Default_Filter "h;hpp;hxx;hm;inl" # Begin Source File SOURCE=.\defines.h # End Source File # End Group # Begin Group "Resource Files" # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" # End Group # Begin Source File SOURCE=.\readme.txt # End Source File # End Target # End Project smlib-0.12.2/SMLib.dsw0000644000076500007650000000102511334442556013052 0ustar hanshansMicrosoft Developer Studio Workspace File, Format Version 6.00 # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! ############################################################################### Project: "SMLib"=.\SMLib.dsp - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ }}} ############################################################################### Global: Package=<5> {{{ }}} Package=<3> {{{ }}} ############################################################################### smlib-0.12.2/SMLib.opt0000644000076500007650000013700011334442556013062 0ustar hanshansÐÏࡱá>þÿ þÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿýÿÿÿ  þÿÿÿ þÿÿÿþÿÿÿI"#$%&'()*þÿÿÿ,-./01234þÿÿÿ6789:;<=>þÿÿÿ@ABCDEFGHþÿÿÿþÿÿÿKLMNOPQRSþÿÿÿUVWXYZ[\]þÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿRoot Entryÿÿÿÿÿÿÿÿãñ"”ÂþÿÿÿWorkspace State  ÿÿÿÿBrowserÿÿÿÿ EditorÿÿÿÿÿÿÿÿsmlibD:\devel\SMLib\SMLib.dsp(s), 0 warning(s)Lib - Win32 Release--------------------NPŒÎpÜθ Ï ÏÈNX%ÏØÏÑææ .\SMLib.c&{3486698D-49EB-11CF-BF46-00AA004C12E2},ÿÿÿÿÿÿÿÿüÿÿÿéÿÿÿö>˜C/C++l - 0 error(s), 0 warning(s)Lib - Win32 Release--------------------NPŒÎpÜθ Ï ÏÈNX%ÏØÏ.\vthreshold.c&{3486698D-49EB-11CF-BF46-00AA004C12E2},ÿÿÿÿÿÿÿÿüÿÿÿéÿÿÿ,, >˜C/C++l - 0 error(s), 0 warning(s)Lib - Win32 Release--------------------NPŒÎpÜθ Ï ÏÈNX%ÏØÏ .\defines.h&{2AE27A3D-17F5-11D0-AF1B-00A0C90F9DE6},ÿÿÿÿÿÿÿÿüÿÿÿéÿÿÿBB!P˜Nonel - 0 error(s), 0 warning(s)Lib - Win32 Release--------------------NPŒÎpÜθ Ï ÏÈNX%ÏØÏHVV .\readme.txt&{3486698D-49EB-11CF-BF46-00AA004C12E2},ÿÿÿÿÿÿÿÿüÿÿÿéÿÿÿÜ: "D:\devel\SMLib\vlavg.c" "D:\devel\SMLib\vlmax.c" "D:\devel\SMLib\vlmin.c" "D:\devel\SMLib\vlrange.c" "D:\devel\SMLib\vmax.c" "D:\devel\SMLib\vmin.c" "D:\devel\SMLib\vmtof.c" "D:\devel\SMLib\vnmax.c" "D:\devel\SMLib\vpow.c" "D:\devel\SMLib\vrms.c" "D:\devel\SMLib\vrmstodb.c" "D:\devel\SMLib\vstd.c" "D:\devel\SMLib\vsum.c" "D:\devel\SMLib\vthreshold.c" "D:\devel\SMLib\vvconv.c" "D:\devel\SMLib\vvminus.c" "D:\devel\SMLib\vvplus.c" ] Creating command line "cl.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP6B.tmp" Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP6C.tmp" with contents [ kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib pd.lib /nologo /dll /incremental:no /pdb:"Release/SMLib.pdb" /machine:I386 /out:"Release/SMLib.dll" /implib:"Release/SMLib.lib" .\Release\bp.obj .\Release\decimator.obj .\Release\deltas.obj .\Release\hip.obj .\Release\hist.obj .\Release\itov.obj .\Release\lavg.obj .\Release\lhist.obj .\Release\lhisti.obj .\Release\linspace.obj .\Release\lmax.obj .\Release\lmin.obj .\Release\lrange.obj .\Release\lstd.obj .\Release\prevl.obj .\Release\SMLib.obj .\Release\threshold.obj .\Release\vabs.obj .\Release\vclip.obj .\Release\vcog.obj .\Release\vdbtorms.obj .\Release\vdelta.obj .\Release\vfmod.obj .\Release\vftom.obj .\Release\vlavg.obj .\Release\vlmax.obj .\Release\vlmin.obj .\Release\vlrange.obj .\Release\vmax.obj .\Release\vmin.obj .\Release\vmtof.obj .\Release\vnmax.obj .\Release\vpow.obj .\Release\vrms.obj .\Release\vrmstodb.obj .\Release\vstd.obj .\Release\vsum.obj .\Release\vthreshold.obj .\Release\vvconv.obj .\Release\vvminus.obj .\Release\vvplus.obj ] Creating command line "link.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP6C.tmp"

Output Window

Compiling... bp.c decimator.c deltas.c hip.c hist.c itov.c lavg.c lhist.c lhisti.c linspace.c lmax.c lmin.c lrange.c lstd.c prevl.c SMLib.c threshold.c vabs.c vclip.c vcog.c vdbtorms.c vdelta.c vfmod.c vftom.c vlavg.c vlmax.c vlmin.c vlrange.c vmax.c vmin.c vmtof.c vnmax.c vpow.c vrms.c vrmstodb.c vstd.c vsum.c vthreshold.c vvconv.c vvminus.c vvplus.c Linking... Creating library Release/SMLib.lib and object Release/SMLib.exp

Results

SMLib.dll - 0 error(s), 0 warning(s) D:\devel\SMLib\SMLib.dsp(s), 0 warning(s)Lib - Win32 Release--------------------NPŒÎpÜθ Ï ÏÈNX%ÏØÏÑææ .\SMLib.c&{3486698D-49EB-11CF-BF46-00AA004C12E2},ÿÿÿÿÿÿÿÿüÿÿÿéÿÿÿö>˜C/C++l - 0 error(s), 0 warning(s)Lib - Win32 Release--------------------NPŒÎpÜθ Ï ÏÈNX%ÏØÏ.\vthreshold.c&{3486698D-49EB-11CF-BF46-00AA004C12E2},ÿÿÿÿÿÿÿÿüÿÿÿéÿÿÿ,, >˜C/C++l - 0 error(s), 0 warning(s)Lib - Win32 Release--------------------NPŒÎpÜθ Ï ÏÈNX%ÏØÏ .\defines.h&{2AE27A3D-17F5-11D0-AF1B-00A0C90F9DE6},ÿÿÿÿÿÿÿÿüÿÿÿéÿÿÿBB!P˜Nonel - 0 error(s), 0 warning(s)Lib - Win32 Release--------------------NPŒÎpÜθ Ï ÏÈNX%ÏØÏHVV .\readme.txt&{3486698D-49EB-11CF-BF46-00AA004C12E2},ÿÿÿÿÿÿÿÿüÿÿÿéÿÿÿÜ: "D:\devel\SMLib\vlavg.c" "D:\devel\SMLib\vlmax.c" "D:\devel\SMLib\vlmin.c" "D:\devel\SMLib\vlrange.c" "D:\devel\SMLib\vmax.c" "D:\devel\SMLib\vmin.c" "D:\devel\SMLib\vmtof.c" "D:\devel\SMLib\vnmax.c" "D:\devel\SMLib\vpow.c" "D:\devel\SMLib\vrms.c" "D:\devel\SMLib\vrmstodb.c" "D:\devel\SMLib\vstd.c" "D:\devel\SMLib\vsum.c" "D:\devel\SMLib\vthreshold.c" "D:\devel\SMLib\vvconv.c" "D:\devel\SMLib\vvminus.c" "D:\devel\SMLib\vvplus.c" ] Creating command line "cl.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP6B.tmp" Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP6C.tmp" with contents [ kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib pd.lib /nologo /dll /incremental:no /pdb:"Release/SMLib.pdb" /machine:I386 /out:"Release/SMLib.dll" /implib:"Release/SMLib.lib" .\Release\bp.obj .\Release\decimator.obj .\Release\deltas.obj .\Release\hip.obj .\Release\hist.obj .\Release\itov.obj .\Release\lavg.obj .\Release\lhist.obj .\Release\lhisti.obj .\Release\linspace.obj .\Release\lmax.obj .\Release\lmin.obj .\Release\lrange.obj .\Release\lstd.obj .\Release\prevl.obj .\Release\SMLib.obj .\Release\threshold.obj .\Release\vabs.obj .\Release\vclip.obj .\Release\vcog.obj .\Release\vdbtorms.obj .\Release\vdelta.obj .\Release\vfmod.obj .\Release\vftom.obj .\Release\vlavg.obj .\Release\vlmax.obj .\Release\vlmin.obj .\Release\vlrange.obj .\Release\vmax.obj .\Release\vmin.obj .\Release\vmtof.obj .\Release\vnmax.obj .\Release\vpow.obj .\Release\vrms.obj .\Release\vrmstodb.obj .\Release\vstd.obj .\Release\vsum.obj .\Release\vthreshold.obj .\Release\vvconv.obj .\Release\vvminus.obj .\Release\vvplus.obj ] Creating command line "link.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP6C.tmp"

Output Window

Compiling... bp.c decimator.c deltas.c hip.c hist.c itov.c lavg.c lhist.c lhisti.c linspace.c lmax.c lmin.c lrange.c lstd.c prevl.c SMLib.c threshold.c vabs.c vclip.c vcog.c vdbtorms.c vdelta.c vfmod.c vftom.c vlavg.c vlmax.c vlmin.c vlrange.c vmax.c vmin.c vmtof.c vnmax.c vpow.c vrms.c vrmstodb.c vstd.c vsum.c vthreshold.c vvconv.c vvminus.c vvplus.c Linking... Creating library Release/SMLib.lib and object Release/SMLib.exp

Results

SMLib.dll - 0 error(s), 0 warning(s) MLJLD:\devel\SMLib\SMLib.dsp(s), 0 warning(s)Lib - Win32 Release--------------------NPŒÎpÜθ Ï ÏÈNX%ÏØÏÑææ .\SMLib.c&{3486698D-49EB-11CF-BF46-00AA004C12E2},ÿÿÿÿÿÿÿÿüÿÿÿéÿÿÿö>˜C/C++l - 0 error(s), 0 warning(s)Lib - Win32 Release--------------------NPŒÎpÜθ Ï ÏÈNX%ÏØÏ.\vthreshold.c&{3486698D-49EB-11CF-BF46-00AA004C12E2},ÿÿÿÿÿÿÿÿüÿÿÿéÿÿÿ,, >˜C/C++l - 0 error(s), 0 warning(s)Lib - Win32 Release--------------------NPŒÎpÜθ Ï ÏÈNX%ÏØÏ .\defines.h&{2AE27A3D-17F5-11D0-AF1B-00A0C90F9DE6},ÿÿÿÿÿÿÿÿüÿÿÿéÿÿÿBB!P˜Nonel - 0 error(s), 0 warning(s)Lib - Win32 Release--------------------NPŒÎpÜθ Ï ÏÈNX%ÏØÏHVV .\readme.txt&{3486698D-49EB-11CF-BF46-00AA004C12E2},ÿÿÿÿÿÿÿÿüÿÿÿéÿÿÿÜ: "D:\devel\SMLib\vlavg.c" "D:\devel\SMLib\vlmax.c" "D:\devel\SMLib\vlmin.c" "D:\devel\SMLib\vlrange.c" "D:\devel\SMLib\vmax.c" "D:\devel\SMLib\vmin.c" "D:\devel\SMLib\vmtof.c" "D:\devel\SMLib\vnmax.c" "D:\devel\SMLib\vpow.c" "D:\devel\SMLib\vrms.c" "D:\devel\SMLib\vrmstodb.c" "D:\devel\SMLib\vstd.c" "D:\devel\SMLib\vsum.c" "D:\devel\SMLib\vthreshold.c" "D:\devel\SMLib\vvconv.c" "D:\devel\SMLib\vvminus.c" "D:\devel\SMLib\vvplus.c" ] Creating command line "cl.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP6B.tmp" Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP6C.tmp" with contents [ kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib pd.lib /nologo /dll /incremental:no /pdb:"Release/SMLib.pdb" /machine:I386 /out:"Release/SMLib.dll" /implib:"Release/SMLib.lib" .\Release\bp.obj .\Release\decimator.obj .\Release\deltas.obj .\Release\hip.obj .\Release\hist.obj .\Release\itov.obj .\Release\lavg.obj .\Release\lhist.obj .\Release\lhisti.obj .\Release\linspace.obj .\Release\lmax.obj .\Release\lmin.obj .\Release\lrange.obj .\Release\lstd.obj .\Release\prevl.obj .\Release\SMLib.obj .\Release\threshold.obj .\Release\vabs.obj .\Release\vclip.obj .\Release\vcog.obj .\Release\vdbtorms.obj .\Release\vdelta.obj .\Release\vfmod.obj .\Release\vftom.obj .\Release\vlavg.obj .\Release\vlmax.obj .\Release\vlmin.obj .\Release\vlrange.obj .\Release\vmax.obj .\Release\vmin.obj .\Release\vmtof.obj .\Release\vnmax.obj .\Release\vpow.obj .\Release\vrms.obj .\Release\vrmstodb.obj .\Release\vstd.obj .\Release\vsum.obj .\Release\vthreshold.obj .\Release\vvconv.obj .\Release\vvminus.obj .\Release\vvplus.obj ] Creating command line "link.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP6C.tmp"

Output Window

Compiling... bp.c decimator.c deltas.c hip.c hist.c itov.c lavg.c lhist.c lhisti.c linspace.c lmax.c lmin.c lrange.c lstd.c prevl.c SMLib.c threshold.c vabs.c vclip.c vcog.c vdbtorms.c vdelta.c vfmod.c vftom.c vlavg.c vlmax.c vlmin.c vlrange.c vmax.c vmin.c vmtof.c vnmax.c vpow.c vrms.c vrmstodb.c vstd.c vsum.c vthreshold.c vvconv.c vvminus.c vvplus.c Linking... Creating library Release/SMLib.lib and object Release/SMLib.exp

Results

SMLib.dll - 0 error(s), 0 warning(s) Workspace Window"ÿÿÿÿÿÿÿÿ!IPI_SMLibÿÿÿÿÿÿÿÿÿÿÿÿ+IPI_ ÿÿÿÿÿÿÿÿÿÿÿÿ5ClassView Window"ÿÿÿÿÿÿÿÿÿÿÿÿ?SMLib ClassView SMLib classes SMLib classes SMLib classesFileViewWorkspace 'SMLib': 1 project(s) SMLib files SMLib filesWorkspace 'SMLib': 1 project(s)FileViewÿéÿÿÿö>˜C/C++l - 0 error(s), 0 warning(s)Lib - Win32 Release--------------------NPŒÎpÜθ Ï ÏÈNX%ÏØÏ.\vthreshold.c&{3486698D-49EB-11CF-BF46-00AA004C12E2},ÿÿÿÿÿÿÿÿüÿÿÿéÿÿÿ,, >˜C/C++l - 0 error(s), 0 warning(s)Lib - Win32 Release--------------------NPŒÎpÜθ Ï ÏÈNX%ÏØÏ .\defines.h&{2AE27A3D-17F5-11D0-AF1B-00A0C90F9DE6},ÿÿÿÿÿÿÿÿüÿÿÿéÿÿÿBB!P˜Nonel - 0 error(s), 0 warning(s)Lib - Win32 Release--------------------NPŒÎpÜθ Ï ÏÈNX%ÏØÏHVV .\readme.txt&{3486698D-49EB-11CF-BF46-00AA004C12E2},ÿÿÿÿÿÿÿÿüÿÿÿéÿÿÿÜ: "D:\devel\SMLib\vlavg.c" "D:\devel\SMLib\vlmax.c" "D:\devel\SMLib\vlmin.c" "D:\devel\SMLib\vlrange.c" "D:\devel\SMLib\vmax.c" "D:\devel\SMLib\vmin.c" "D:\devel\SMLib\vmtof.c" "D:\devel\SMLib\vnmax.c" "D:\devel\SMLib\vpow.c" "D:\devel\SMLib\vrms.c" "D:\devel\SMLib\vrmstodb.c" "D:\devel\SMLib\vstd.c" "D:\devel\SMLib\vsum.c" "D:\devel\SMLib\vthreshold.c" "D:\devel\SMLib\vvconv.c" "D:\devel\SMLib\vvminus.c" "D:\devel\SMLib\vvplus.c" ] Creating command line "cl.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP6B.tmp" Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP6C.tmp" with contents [ kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib pd.lib /nologo /dll /incremental:no /pdb:"Release/SMLib.pdb" /machine:I386 /out:"Release/SMLib.dll" /implib:"Release/SMLib.lib" .\Release\bp.obj .\Release\decimator.obj .\Release\deltas.obj .\Release\hip.obj .\Release\hist.obj .\Release\itov.obj .\Release\lavg.obj .\Release\lhist.obj .\Release\lhisti.obj .\Release\linspace.obj .\Release\lmax.obj .\Release\lmin.obj .\Release\lrange.obj .\Release\lstd.obj .\Release\prevl.obj .\Release\SMLib.obj .\Release\threshold.obj .\Release\vabs.obj .\Release\vclip.obj .\Release\vcog.obj .\Release\vdbtorms.obj .\Release\vdelta.obj .\Release\vfmod.obj .\Release\vftom.obj .\Release\vlavg.obj .\Release\vlmax.obj .\Release\vlmin.obj .\Release\vlrange.obj .\Release\vmax.obj .\Release\vmin.obj .\Release\vmtof.obj .\Release\vnmax.obj .\Release\vpow.obj .\Release\vrms.obj .\Release\vrmstodb.obj .\Release\vstd.obj .\Release\vsum.obj .\Release\vthreshold.obj .\Release\vvconv.obj .\Release\vvminus.obj .\Release\vvplus.obj ] Creating command line "link.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP6C.tmp"

Output Window

Compiling... bp.c decimator.c deltas.c hip.c hist.c itov.c lavg.c lhist.c lhisti.c linspace.c lmax.c lmin.c lrange.c lstd.c prevl.c SMLib.c threshold.c vabs.c vclip.c vcog.c vdbtorms.c vdelta.c vfmod.c vftom.c vlavg.c vlmax.c vlmin.c vlrange.c vmax.c vmin.c vmtof.c vnmax.c vpow.c vrms.c vrmstodb.c vstd.c vsum.c vthreshold.c vvconv.c vvminus.c vvplus.c Linking... Creating library Release/SMLib.lib and object Release/SMLib.exp

Results

SMLib.dll - 0 error(s), 0 warning(s) `êSMLIB - WIN32 RELEASE SMLib.dspCProjectSMLIB - WIN32 RELEASESMLib - Win32 ReleaseêûSMLib - Win32 DebugêûSSBR CTargetItemSMLib - Win32 ReleaseSMLib - Win32 DebugSSBR Source Files CProjGroupSSBRDJW Header Files CProjGroupSSBRDJWResource Files CProjGroupSSBRDJWdepCDependencyContainerSSBRm_pd.hCDependencyFileSSBRm_imp.hCDependencyFileSSBRDJWdepCDependencyContainerSSBRm_pd.hCDependencyFileSSBRm_imp.hCDependencyFileSSBRDJWDJWDJW-------------NPŒÎpÜθ Ï ÏÈNX%ÏØÏ .\defines.h&{2AE27A3D-17F5-11D0-AF1B-00A0C90F9DE6},ÿÿÿÿÿÿÿÿüÿÿÿéÿÿÿBB!P˜Nonel - 0 error(s), 0 warning(s)Lib - Win32 Release--------------------NPŒÎpÜθ Ï ÏÈNX%ÏØÏHVV .\readme.txt&{3486698D-49EB-11CF-BF46-00AA004C12E2},ÿÿÿÿÿÿÿÿüÿÿÿéÿÿÿÜ: "D:\devel\SMLib\vlavg.c" "D:\devel\SMLib\vlmax.c" "D:\devel\SMLib\vlmin.c" "D:\devel\SMLib\vlrange.c" "D:\devel\SMLib\vmax.c" "D:\devel\SMLib\vmin.c" "D:\devel\SMLib\vmtof.c" "D:\devel\SMLib\vnmax.c" "D:\devel\SMLib\vpow.c" "D:\devel\SMLib\vrms.c" "D:\devel\SMLib\vrmstodb.c" "D:\devel\SMLib\vstd.c" "D:\devel\SMLib\vsum.c" "D:\devel\SMLib\vthreshold.c" "D:\devel\SMLib\vvconv.c" "D:\devel\SMLib\vvminus.c" "D:\devel\SMLib\vvplus.c" ] Creating command line "cl.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP6B.tmp" Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP6C.tmp" with contents [ kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib pd.lib /nologo /dll /incremental:no /pdb:"Release/SMLib.pdb" /machine:I386 /out:"Release/SMLib.dll" /implib:"Release/SMLib.lib" .\Release\bp.obj .\Release\decimator.obj .\Release\deltas.obj .\Release\hip.obj .\Release\hist.obj .\Release\itov.obj .\Release\lavg.obj .\Release\lhist.obj .\Release\lhisti.obj .\Release\linspace.obj .\Release\lmax.obj .\Release\lmin.obj .\Release\lrange.obj .\Release\lstd.obj .\Release\prevl.obj .\Release\SMLib.obj .\Release\threshold.obj .\Release\vabs.obj .\Release\vclip.obj .\Release\vcog.obj .\Release\vdbtorms.obj .\Release\vdelta.obj .\Release\vfmod.obj .\Release\vftom.obj .\Release\vlavg.obj .\Release\vlmax.obj .\Release\vlmin.obj .\Release\vlrange.obj .\Release\vmax.obj .\Release\vmin.obj .\Release\vmtof.obj .\Release\vnmax.obj .\Release\vpow.obj .\Release\vrms.obj .\Release\vrmstodb.obj .\Release\vstd.obj .\Release\vsum.obj .\Release\vthreshold.obj .\Release\vvconv.obj .\Release\vvminus.obj .\Release\vvplus.obj ] Creating command line "link.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP6C.tmp"

Output Window

Compiling... bp.c decimator.c deltas.c hip.c hist.c itov.c lavg.c lhist.c lhisti.c linspace.c lmax.c lmin.c lrange.c lstd.c prevl.c SMLib.c threshold.c vabs.c vclip.c vcog.c vdbtorms.c vdelta.c vfmod.c vftom.c vlavg.c vlmax.c vlmin.c vlrange.c vmax.c vmin.c vmtof.c vnmax.c vpow.c vrms.c vrmstodb.c vstd.c vsum.c vthreshold.c vvconv.c vvminus.c vvplus.c Linking... Creating library Release/SMLib.lib and object Release/SMLib.exp

Results

SMLib.dll - 0 error(s), 0 warning(s) `êÿÿÿÿÿÿib.dspCProjectSMLIB - WIN32 RELEASESMLib - Win32 ReleaseêûSMLib - Win32 DebugêûSSBR CTargetItemSMLib - Win32 ReleaseSMLib - Win32 DebugSSBR Source Files CProjGroupSSBRDJW Header Files CProjGroupSSBRDJWResource Files CProjGroupSSBRDJWdepCDependencyContainerSSBRm_pd.hCDependencyFileSSBRm_imp.hCDependencyFileSSBRDJWdepCDependencyContainerSSBRm_pd.hCDependencyFileSSBRm_imp.hCDependencyFileSSBRDJWDJWDJW-------------NPŒÎpÜθ Ï ÏÈNX%ÏØÏ .\defines.h&{2AE27A3D-17F5-11D0-AF1B-00A0C90F9DE6},ÿÿÿÿÿÿÿÿüÿÿÿéÿÿÿBB!P˜Nonel - 0 error(s), 0 warning(s)Lib - Win32 Release--------------------NPŒÎpÜθ Ï ÏÈNX%ÏØÏHVV .\readme.txt&{3486698D-49EB-11CF-BF46-00AA004C12E2},ÿÿÿÿÿÿÿÿüÿÿÿéÿÿÿÜ: "D:\devel\SMLib\vlavg.c" "D:\devel\SMLib\vlmax.c" "D:\devel\SMLib\vlmin.c" "D:\devel\SMLib\vlrange.c" "D:\devel\SMLib\vmax.c" "D:\devel\SMLib\vmin.c" "D:\devel\SMLib\vmtof.c" "D:\devel\SMLib\vnmax.c" "D:\devel\SMLib\vpow.c" "D:\devel\SMLib\vrms.c" "D:\devel\SMLib\vrmstodb.c" "D:\devel\SMLib\vstd.c" "D:\devel\SMLib\vsum.c" "D:\devel\SMLib\vthreshold.c" "D:\devel\SMLib\vvconv.c" "D:\devel\SMLib\vvminus.c" "D:\devel\SMLib\vvplus.c" ] Creating command line "cl.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP6B.tmp" Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP6C.tmp" with contents [ kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib pd.lib /nologo /dll /incremental:no /pdb:"Release/SMLib.pdb" /machine:I386 /out:"Release/SMLib.dll" /implib:"Release/SMLib.lib" .\Release\bp.obj .\Release\decimator.obj .\Release\deltas.obj .\Release\hip.obj .\Release\hist.obj .\Release\itov.obj .\Release\lavg.obj .\Release\lhist.obj .\Release\lhisti.obj .\Release\linspace.obj .\Release\lmax.obj .\Release\lmin.obj .\Release\lrange.obj .\Release\lstd.obj .\Release\prevl.obj .\Release\SMLib.obj .\Release\threshold.obj .\Release\vabs.obj .\Release\vclip.obj .\Release\vcog.obj .\Release\vdbtorms.obj .\Release\vdelta.obj .\Release\vfmod.obj .\Release\vftom.obj .\Release\vlavg.obj .\Release\vlmax.obj .\Release\vlmin.obj .\Release\vlrange.obj .\Release\vmax.obj .\Release\vmin.obj .\Release\vmtof.obj .\Release\vnmax.obj .\Release\vpow.obj .\Release\vrms.obj .\Release\vrmstodb.obj .\Release\vstd.obj .\Release\vsum.obj .\Release\vthreshold.obj .\Release\vvconv.obj .\Release\vvminus.obj .\Release\vvplus.obj ] Creating command line "link.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP6C.tmp"

Output Window

Compiling... bp.c decimator.c deltas.c hip.c hist.c itov.c lavg.c lhist.c lhisti.c linspace.c lmax.c lmin.c lrange.c lstd.c prevl.c SMLib.c threshold.c vabs.c vclip.c vcog.c vdbtorms.c vdelta.c vfmod.c vftom.c vlavg.c vlmax.c vlmin.c vlrange.c vmax.c vmin.c vmtof.c vnmax.c vpow.c vrms.c vrmstodb.c vstd.c vsum.c vthreshold.c vvconv.c vvminus.c vvplus.c Linking... Creating library Release/SMLib.lib and object Release/SMLib.exp

Results

SMLib.dll - 0 error(s), 0 warning(s) ÿÿ CClsFldSlobSMLibb.dspCProjectSMLIB - WIN32 RELEASESMLib - Win32 ReleaseêûSMLib - Win32 DebugêûSSBR CTargetItemSMLib - Win32 ReleaseSMLib - Win32 DebugSSBR Source Files CProjGroupSSBRDJW Header Files CProjGroupSSBRDJWResource Files CProjGroupSSBRDJWdepCDependencyContainerSSBRm_pd.hCDependencyFileSSBRm_imp.hCDependencyFileSSBRDJWdepCDependencyContainerSSBRm_pd.hCDependencyFileSSBRm_imp.hCDependencyFileSSBRDJWDJWDJW-------------NPŒÎpÜθ Ï ÏÈNX%ÏØÏ .\defines.h&{2AE27A3D-17F5-11D0-AF1B-00A0C90F9DE6},ÿÿÿÿÿÿÿÿüÿÿÿéÿÿÿBB!P˜Nonel - 0 error(s), 0 warning(s)Lib - Win32 Release--------------------NPŒÎpÜθ Ï ÏÈNX%ÏØÏHVV .\readme.txt&{3486698D-49EB-11CF-BF46-00AA004C12E2},ÿÿÿÿÿÿÿÿüÿÿÿéÿÿÿÜ: "D:\devel\SMLib\vlavg.c" "D:\devel\SMLib\vlmax.c" "D:\devel\SMLib\vlmin.c" "D:\devel\SMLib\vlrange.c" "D:\devel\SMLib\vmax.c" "D:\devel\SMLib\vmin.c" "D:\devel\SMLib\vmtof.c" "D:\devel\SMLib\vnmax.c" "D:\devel\SMLib\vpow.c" "D:\devel\SMLib\vrms.c" "D:\devel\SMLib\vrmstodb.c" "D:\devel\SMLib\vstd.c" "D:\devel\SMLib\vsum.c" "D:\devel\SMLib\vthreshold.c" "D:\devel\SMLib\vvconv.c" "D:\devel\SMLib\vvminus.c" "D:\devel\SMLib\vvplus.c" ] Creating command line "cl.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP6B.tmp" Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP6C.tmp" with contents [ kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib pd.lib /nologo /dll /incremental:no /pdb:"Release/SMLib.pdb" /machine:I386 /out:"Release/SMLib.dll" /implib:"Release/SMLib.lib" .\Release\bp.obj .\Release\decimator.obj .\Release\deltas.obj .\Release\hip.obj .\Release\hist.obj .\Release\itov.obj .\Release\lavg.obj .\Release\lhist.obj .\Release\lhisti.obj .\Release\linspace.obj .\Release\lmax.obj .\Release\lmin.obj .\Release\lrange.obj .\Release\lstd.obj .\Release\prevl.obj .\Release\SMLib.obj .\Release\threshold.obj .\Release\vabs.obj .\Release\vclip.obj .\Release\vcog.obj .\Release\vdbtorms.obj .\Release\vdelta.obj .\Release\vfmod.obj .\Release\vftom.obj .\Release\vlavg.obj .\Release\vlmax.obj .\Release\vlmin.obj .\Release\vlrange.obj .\Release\vmax.obj .\Release\vmin.obj .\Release\vmtof.obj .\Release\vnmax.obj .\Release\vpow.obj .\Release\vrms.obj .\Release\vrmstodb.obj .\Release\vstd.obj .\Release\vsum.obj .\Release\vthreshold.obj .\Release\vvconv.obj .\Release\vvminus.obj .\Release\vvplus.obj ] Creating command line "link.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP6C.tmp"

Output Window

Compiling... bp.c decimator.c deltas.c hip.c hist.c itov.c lavg.c lhist.c lhisti.c linspace.c lmax.c lmin.c lrange.c lstd.c prevl.c SMLib.c threshold.c vabs.c vclip.c vcog.c vdbtorms.c vdelta.c vfmod.c vftom.c vlavg.c vlmax.c vlmin.c vlrange.c vmax.c vmin.c vmtof.c vnmax.c vpow.c vrms.c vrmstodb.c vstd.c vsum.c vthreshold.c vvconv.c vvminus.c vvplus.c Linking... Creating library Release/SMLib.lib and object Release/SMLib.exp

Results

SMLib.dll - 0 error(s), 0 warning(s) DebuggerÿÿÿÿÿÿÿÿÿÿÿÿJDocumentsÿÿÿÿTÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿÿÿWatch1Watch2Watch3Watch4ELEASESMLib - Win32 ReleaseêûSMLib - Win32 DebugêûSSBR CTargetItemSMLib - Win32 ReleaseSMLib - Win32 DebugSSBR Source Files CProjGroupSSBRDJW Header Files CProjGroupSSBRDJWResource Files CProjGroupSSBRDJWdepCDependencyContainerSSBRm_pd.hCDependencyFileSSBRm_imp.hCDependencyFileSSBRDJWdepCDependencyContainerSSBRm_pd.hCDependencyFileSSBRm_imp.hCDependencyFileSSBRDJWDJWDJW-------------NPŒÎpÜθ Ï ÏÈNX%ÏØÏ .\defines.h&{2AE27A3D-17F5-11D0-AF1B-00A0C90F9DE6},ÿÿÿÿÿÿÿÿüÿÿÿéÿÿÿBB!P˜Nonel - 0 error(s), 0 warning(s)Lib - Win32 Release--------------------NPŒÎpÜθ Ï ÏÈNX%ÏØÏHVV .\readme.txt&{3486698D-49EB-11CF-BF46-00AA004C12E2},ÿÿÿÿÿÿÿÿüÿÿÿéÿÿÿÜ: "D:\devel\SMLib\vlavg.c" "D:\devel\SMLib\vlmax.c" "D:\devel\SMLib\vlmin.c" "D:\devel\SMLib\vlrange.c" "D:\devel\SMLib\vmax.c" "D:\devel\SMLib\vmin.c" "D:\devel\SMLib\vmtof.c" "D:\devel\SMLib\vnmax.c" "D:\devel\SMLib\vpow.c" "D:\devel\SMLib\vrms.c" "D:\devel\SMLib\vrmstodb.c" "D:\devel\SMLib\vstd.c" "D:\devel\SMLib\vsum.c" "D:\devel\SMLib\vthreshold.c" "D:\devel\SMLib\vvconv.c" "D:\devel\SMLib\vvminus.c" "D:\devel\SMLib\vvplus.c" ] Creating command line "cl.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP6B.tmp" Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP6C.tmp" with contents [ kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib pd.lib /nologo /dll /incremental:no /pdb:"Release/SMLib.pdb" /machine:I386 /out:"Release/SMLib.dll" /implib:"Release/SMLib.lib" .\Release\bp.obj .\Release\decimator.obj .\Release\deltas.obj .\Release\hip.obj .\Release\hist.obj .\Release\itov.obj .\Release\lavg.obj .\Release\lhist.obj .\Release\lhisti.obj .\Release\linspace.obj .\Release\lmax.obj .\Release\lmin.obj .\Release\lrange.obj .\Release\lstd.obj .\Release\prevl.obj .\Release\SMLib.obj .\Release\threshold.obj .\Release\vabs.obj .\Release\vclip.obj .\Release\vcog.obj .\Release\vdbtorms.obj .\Release\vdelta.obj .\Release\vfmod.obj .\Release\vftom.obj .\Release\vlavg.obj .\Release\vlmax.obj .\Release\vlmin.obj .\Release\vlrange.obj .\Release\vmax.obj .\Release\vmin.obj .\Release\vmtof.obj .\Release\vnmax.obj .\Release\vpow.obj .\Release\vrms.obj .\Release\vrmstodb.obj .\Release\vstd.obj .\Release\vsum.obj .\Release\vthreshold.obj .\Release\vvconv.obj .\Release\vvminus.obj .\Release\vvplus.obj ] Creating command line "link.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP6C.tmp"

Output Window

Compiling... bp.c decimator.c deltas.c hip.c hist.c itov.c lavg.c lhist.c lhisti.c linspace.c lmax.c lmin.c lrange.c lstd.c prevl.c SMLib.c threshold.c vabs.c vclip.c vcog.c vdbtorms.c vdelta.c vfmod.c vftom.c vlavg.c vlmax.c vlmin.c vlrange.c vmax.c vmin.c vmtof.c vnmax.c vpow.c vrms.c vrmstodb.c vstd.c vsum.c vthreshold.c vvconv.c vvminus.c vvplus.c Linking... Creating library Release/SMLib.lib and object Release/SMLib.exp

Results

SMLib.dll - 0 error(s), 0 warning(s) ˜C/C++l - 0 error(s), 0 warning(s)Lib - Win32 Release--------------------NPŒÎpÜθ Ï ÏÈNX%ÏØÏÑææ .\SMLib.c&{3486698D-49EB-11CF-BF46-00AA004C12E2},ÿÿÿÿÿÿÿÿüÿÿÿéÿÿÿö>˜C/C++l - 0 error(s), 0 warning(s)Lib - Win32 Release--------------------NPŒÎpÜθ Ï ÏÈNX%ÏØÏ.\vthreshold.c&{3486698D-49EB-11CF-BF46-00AA004C12E2},ÿÿÿÿÿÿÿÿüÿÿÿéÿÿÿ,, >˜C/C++l - 0 error(s), 0 warning(s)Lib - Win32 Release--------------------NPŒÎpÜθ Ï ÏÈNX%ÏØÏ .\defines.h&{2AE27A3D-17F5-11D0-AF1B-00A0C90F9DE6},ÿÿÿÿÿÿÿÿüÿÿÿéÿÿÿBB!P˜Nonel - 0 error(s), 0 warning(s)Lib - Win32 Release--------------------NPŒÎpÜθ Ï ÏÈNX%ÏØÏHVV .\readme.txt&{3486698D-49EB-11CF-BF46-00AA004C12E2},ÿÿÿÿÿÿÿÿüÿÿÿéÿÿÿÜ: "D:\devel\SMLib\vlavg.c" "D:\devel\SMLib\vlmax.c" "D:\devel\SMLib\vlmin.c" "D:\devel\SMLib\vlrange.c" "D:\devel\SMLib\vmax.c" "D:\devel\SMLib\vmin.c" "D:\devel\SMLib\vmtof.c" "D:\devel\SMLib\vnmax.c" "D:\devel\SMLib\vpow.c" "D:\devel\SMLib\vrms.c" "D:\devel\SMLib\vrmstodb.c" "D:\devel\SMLib\vstd.c" "D:\devel\SMLib\vsum.c" "D:\devel\SMLib\vthreshold.c" "D:\devel\SMLib\vvconv.c" "D:\devel\SMLib\vvminus.c" "D:\devel\SMLib\vvplus.c" ] Creating command line "cl.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP6B.tmp" Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP6C.tmp" with contents [ kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib pd.lib /nologo /dll /incremental:no /pdb:"Release/SMLib.pdb" /machine:I386 /out:"Release/SMLib.dll" /implib:"Release/SMLib.lib" .\Release\bp.obj .\Release\decimator.obj .\Release\deltas.obj .\Release\hip.obj .\Release\hist.obj .\Release\itov.obj .\Release\lavg.obj .\Release\lhist.obj .\Release\lhisti.obj .\Release\linspace.obj .\Release\lmax.obj .\Release\lmin.obj .\Release\lrange.obj .\Release\lstd.obj .\Release\prevl.obj .\Release\SMLib.obj .\Release\threshold.obj .\Release\vabs.obj .\Release\vclip.obj .\Release\vcog.obj .\Release\vdbtorms.obj .\Release\vdelta.obj .\Release\vfmod.obj .\Release\vftom.obj .\Release\vlavg.obj .\Release\vlmax.obj .\Release\vlmin.obj .\Release\vlrange.obj .\Release\vmax.obj .\Release\vmin.obj .\Release\vmtof.obj .\Release\vnmax.obj .\Release\vpow.obj .\Release\vrms.obj .\Release\vrmstodb.obj .\Release\vstd.obj .\Release\vsum.obj .\Release\vthreshold.obj .\Release\vvconv.obj .\Release\vvminus.obj .\Release\vvplus.obj ] Creating command line "link.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP6C.tmp"

Output Window

Compiling... bp.c decimator.c deltas.c hip.c hist.c itov.c lavg.c lhist.c lhisti.c linspace.c lmax.c lmin.c lrange.c lstd.c prevl.c SMLib.c threshold.c vabs.c vclip.c vcog.c vdbtorms.c vdelta.c vfmod.c vftom.c vlavg.c vlmax.c vlmin.c vlrange.c vmax.c vmin.c vmtof.c vnmax.c vpow.c vrms.c vrmstodb.c vstd.c vsum.c vthreshold.c vvconv.c vvminus.c vvplus.c Linking... Creating library Release/SMLib.lib and object Release/SMLib.exp

Results

SMLib.dll - 0 error(s), 0 warning(s) smlib-0.12.2/SMLib.pd0000644000076500007650000000017711645661274012674 0ustar hanshans#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 ; smlib-0.12.2/SMLib.plg0000644000076500007650000000663111334442556013047 0ustar hanshans

Build Log

--------------------Configuration: SMLib - Win32 Release--------------------

Command Lines

Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP6B.tmp" with contents [ /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SMLIB_EXPORTS" /Fp"Release/SMLib.pch" /YX /Fo"Release/" /Fd"Release/" /FD /c "D:\devel\SMLib\bp.c" "D:\devel\SMLib\decimator.c" "D:\devel\SMLib\deltas.c" "D:\devel\SMLib\hip.c" "D:\devel\SMLib\hist.c" "D:\devel\SMLib\itov.c" "D:\devel\SMLib\lavg.c" "D:\devel\SMLib\lhist.c" "D:\devel\SMLib\lhisti.c" "D:\devel\SMLib\linspace.c" "D:\devel\SMLib\lmax.c" "D:\devel\SMLib\lmin.c" "D:\devel\SMLib\lrange.c" "D:\devel\SMLib\lstd.c" "D:\devel\SMLib\prevl.c" "D:\devel\SMLib\SMLib.c" "D:\devel\SMLib\threshold.c" "D:\devel\SMLib\vabs.c" "D:\devel\SMLib\vclip.c" "D:\devel\SMLib\vcog.c" "D:\devel\SMLib\vdbtorms.c" "D:\devel\SMLib\vdelta.c" "D:\devel\SMLib\vfmod.c" "D:\devel\SMLib\vftom.c" "D:\devel\SMLib\vlavg.c" "D:\devel\SMLib\vlmax.c" "D:\devel\SMLib\vlmin.c" "D:\devel\SMLib\vlrange.c" "D:\devel\SMLib\vmax.c" "D:\devel\SMLib\vmin.c" "D:\devel\SMLib\vmtof.c" "D:\devel\SMLib\vnmax.c" "D:\devel\SMLib\vpow.c" "D:\devel\SMLib\vrms.c" "D:\devel\SMLib\vrmstodb.c" "D:\devel\SMLib\vstd.c" "D:\devel\SMLib\vsum.c" "D:\devel\SMLib\vthreshold.c" "D:\devel\SMLib\vvconv.c" "D:\devel\SMLib\vvminus.c" "D:\devel\SMLib\vvplus.c" ] Creating command line "cl.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP6B.tmp" Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP6C.tmp" with contents [ kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib pd.lib /nologo /dll /incremental:no /pdb:"Release/SMLib.pdb" /machine:I386 /out:"Release/SMLib.dll" /implib:"Release/SMLib.lib" .\Release\bp.obj .\Release\decimator.obj .\Release\deltas.obj .\Release\hip.obj .\Release\hist.obj .\Release\itov.obj .\Release\lavg.obj .\Release\lhist.obj .\Release\lhisti.obj .\Release\linspace.obj .\Release\lmax.obj .\Release\lmin.obj .\Release\lrange.obj .\Release\lstd.obj .\Release\prevl.obj .\Release\SMLib.obj .\Release\threshold.obj .\Release\vabs.obj .\Release\vclip.obj .\Release\vcog.obj .\Release\vdbtorms.obj .\Release\vdelta.obj .\Release\vfmod.obj .\Release\vftom.obj .\Release\vlavg.obj .\Release\vlmax.obj .\Release\vlmin.obj .\Release\vlrange.obj .\Release\vmax.obj .\Release\vmin.obj .\Release\vmtof.obj .\Release\vnmax.obj .\Release\vpow.obj .\Release\vrms.obj .\Release\vrmstodb.obj .\Release\vstd.obj .\Release\vsum.obj .\Release\vthreshold.obj .\Release\vvconv.obj .\Release\vvminus.obj .\Release\vvplus.obj ] Creating command line "link.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP6C.tmp"

Output Window

Compiling... bp.c decimator.c deltas.c hip.c hist.c itov.c lavg.c lhist.c lhisti.c linspace.c lmax.c lmin.c lrange.c lstd.c prevl.c SMLib.c threshold.c vabs.c vclip.c vcog.c vdbtorms.c vdelta.c vfmod.c vftom.c vlavg.c vlmax.c vlmin.c vlrange.c vmax.c vmin.c vmtof.c vnmax.c vpow.c vrms.c vrmstodb.c vstd.c vsum.c vthreshold.c vvconv.c vvminus.c vvplus.c Linking... Creating library Release/SMLib.lib and object Release/SMLib.exp

Results

SMLib.dll - 0 error(s), 0 warning(s)
smlib-0.12.2/bp-help.pd0000644000076500007650000000276711656244707013264 0ustar hanshans#N canvas 1 53 428 284 10; #X floatatom 12 151 5 0 0 0 - - -; #X obj 12 128 float; #X obj 12 95 metro 100; #X obj 12 54 loadbang; #X obj 12 78 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 ; #X obj 124 77 hsl 128 15 -127 127 0 0 empty empty empty -2 -6 0 8 -262144 -1 -1 0 1; #X text 349 215 j#|@2002; #X obj 367 193 SMLib-help; #X text 13 7 bp: bandpass filter on float stream; #X floatatom 138 133 0 0 0 0 - - -; #X msg 106 110 clear; #X text 156 109 <-- reinitialize internal state; #X text 170 134 <-- center frequency; #X floatatom 187 155 0 0 0 0 - - -; #X text 219 156 <-- Q; #X obj 22 221 hsl 128 15 -256 256 0 0 empty empty empty -2 -6 0 8 -262144 -1 -1 6350 1; #X floatatom 19 247 5 0 0 0 - - -; #X text 11 25 the non-audio version of bp~; #X text 262 76 <-- swing!; #X obj 19 192 bp 0.07 5; #N canvas 221 263 494 344 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 373 245 pd META; #X connect 1 0 0 0; #X connect 1 0 19 0; #X connect 2 0 1 0; #X connect 3 0 4 0; #X connect 4 0 2 0; #X connect 5 0 1 1; #X connect 9 0 19 1; #X connect 10 0 19 0; #X connect 13 0 19 2; #X connect 15 0 16 0; #X connect 19 0 15 0; smlib-0.12.2/bp.c0000644000076500007650000000574111656244706012147 0ustar hanshans#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); } smlib-0.12.2/decimator-help.pd0000644000076500007650000000162311656244706014617 0ustar hanshans#N canvas 1 53 454 322 10; #X text 342 226 j#|@2002; #X obj 109 230 print; #X obj 109 55 random 10; #X obj 109 36 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X text 129 34 feed data; #X msg 130 124 -10; #X floatatom 132 91 5 0 0 0 - - -; #X obj 109 191 decimator 0.4; #X msg 226 144 clear; #X msg 201 92 factor 4; #N canvas 66 268 494 344 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 393 265 pd META; #X obj 370 201 SMLib-help; #X connect 2 0 6 0; #X connect 2 0 7 0; #X connect 3 0 2 0; #X connect 5 0 7 0; #X connect 7 0 1 0; #X connect 8 0 7 0; #X connect 9 0 7 0; smlib-0.12.2/decimator.c0000644000076500007650000000243611334442555013506 0ustar hanshans#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) { 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); } smlib-0.12.2/defines.h0000644000076500007650000000062111660562364013156 0ustar hanshans#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 smlib-0.12.2/deltas-help.pd0000644000076500007650000000271311656244707014126 0ustar hanshans#N canvas 1 53 489 293 10; #X text 390 239 j#|@2002; #X obj 412 217 SMLib-help; #X floatatom 14 74 5 0 0 0 - - -; #X obj 12 165 print deltas; #X floatatom 68 108 5 0 0 0 - - -; #X floatatom 120 107 5 0 0 0 - - -; #X obj 24 104 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 12 138 deltas 1 10 10; #X obj 14 54 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X text 9 4 deltas: generates vector with differences between last input and past inputs; #X text 9 186 x(i)-x(i-a); #X text 9 200 x(i)-x(i-(a+1)); #X text 9 214 x(i)-x(i-(a+2)); #X text 9 240 x(i)-x(i-(b)); #X text 7 225 ...; #X text 153 137 [deltas a b c]; #X text 120 86 b; #X text 66 87 a; #X text 152 183 requires am_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); } smlib-0.12.2/examples/0000755000076500007650000000000012030354207013172 5ustar hanshanssmlib-0.12.2/examples/beattracker.pd0000644000076500007650000000753311726015227016025 0ustar hanshans#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; smlib-0.12.2/examples/normalizer.pd0000644000076500007650000000460111713366507015717 0ustar hanshans#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; smlib-0.12.2/examples/resonate-beat.pd0000644000076500007650000001403711713366507016272 0ustar hanshans#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; smlib-0.12.2/hip-help.pd0000644000076500007650000000261011656244706013425 0ustar hanshans#N canvas 1 53 430 286 10; #X floatatom 12 141 5 0 0 0 - - -; #X obj 12 118 float; #X obj 12 95 metro 100; #X obj 12 54 loadbang; #X obj 12 78 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 ; #X obj 124 77 hsl 128 15 -127 127 0 0 empty empty empty -2 -6 0 8 -262144 -1 -1 0 1; #X text 338 214 j#|@2002; #X obj 356 192 SMLib-help; #X floatatom 138 133 0 0 0 0 - - -; #X msg 106 110 clear; #X text 156 109 <-- reinitialize internal state; #X obj 21 211 hsl 128 15 -256 256 0 0 empty empty empty -2 -6 0 8 -262144 -1 -1 6350 1; #X floatatom 17 237 5 0 0 0 - - -; #X text 262 76 <-- swing!; #X text 13 7 hip: highpass filter on float stream; #X text 11 25 the non-audio version of hip~; #X obj 19 182 hip 0.05; #X text 170 134 <-- cutoff frequency; #N canvas 344 185 494 344 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 367 237 pd META; #X connect 1 0 0 0; #X connect 1 0 16 0; #X connect 2 0 1 0; #X connect 3 0 4 0; #X connect 4 0 2 0; #X connect 5 0 1 1; #X connect 8 0 16 1; #X connect 9 0 16 0; #X connect 11 0 12 0; #X connect 16 0 11 0; smlib-0.12.2/hip.c0000644000076500007650000000323011656244707012316 0ustar hanshans#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); }smlib-0.12.2/hist-help.pd0000644000076500007650000000311011656244706013610 0ustar hanshans#N canvas 1 53 414 422 10; #X text 328 352 j#|@2002; #X text 348 333 SMLib-help; #X text 14 7 hist: histograms; #X obj 2 354 print; #X obj 11 181 random 10; #X obj 11 162 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X msg 129 177 absolute; #X msg 129 205 relative; #X msg 276 177 clear; #X text 128 156 generate output; #X text 275 159 reinit; #X text 31 160 feed data; #X obj 2 317 hist 0 10 10; #X obj 62 347 vsum; #X floatatom 62 370 5 0 0 0 - - -; #X msg 11 208 1 3 5 7 9; #X text 14 50 - value of first class; #X text 14 77 - number of classes; #X text 14 64 - value of last class; #X text 13 35 arguments:; #X text 14 112 - array of samples in classes; #X text 12 97 output:; #X text 12 133 out-of-range inputs are clipped (cfr lhisti); #X msg 11 233 1.4 3.4 5.4 7.4 9.4; #X msg 87 292 -10; #X msg 11 259 0.6 2.6 4.6 6.6 8.6; #X obj 42 396 itov; #X text 4 399 cfr.; #X obj 79 396 lhist; #X obj 124 396 lhisti; #N canvas 247 140 494 344 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 355 378 pd META; #X connect 4 0 12 0; #X connect 5 0 4 0; #X connect 6 0 12 0; #X connect 7 0 12 0; #X connect 8 0 12 0; #X connect 12 0 3 0; #X connect 12 0 13 0; #X connect 13 0 14 0; #X connect 15 0 12 0; #X connect 23 0 12 0; #X connect 24 0 12 0; #X connect 25 0 12 0; smlib-0.12.2/hist.c0000644000076500007650000000633411656244706012514 0ustar hanshans#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); } smlib-0.12.2/itov-help.pd0000644000076500007650000000322411656244706013630 0ustar hanshans#N canvas 1 53 416 478 10; #X text 327 406 j#|@2002; #X msg 275 239 clear; #X text 277 219 reinit; #X text 11 81 - value of first class; #X text 11 108 - number of classes; #X text 11 95 - value of last class; #X text 10 66 arguments:; #X text 10 128 output:; #X floatatom 93 445 5 0 0 0 - - -; #X floatatom 45 446 5 0 0 0 - - -; #X floatatom 144 445 5 0 0 0 - - -; #X text 11 36 input:; #X text 12 52 - class index; #X msg 134 248 absolute; #X floatatom 94 353 5 0 0 0 - - -; #X msg 16 228 4.6; #X msg 52 228 5.4; #X obj 37 293 hist 0 10 10; #X obj 45 419 itov 0 10 10; #X obj 45 324 vcog; #X msg 86 228 5.6; #X text 7 191 out-of-range input is clipped; #X floatatom 69 394 5 0 0 0 - - -; #X text 11 157 - center value of class i; #X text 11 143 - lower value of class i; #X text 11 171 - upper value of class i; #X obj 343 380 SMLib-help; #N canvas 289 179 494 344 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 352 432 pd META; #X text 14 7 itov: index to value; #X connect 1 0 17 0; #X connect 13 0 17 0; #X connect 15 0 17 0; #X connect 15 0 13 0; #X connect 16 0 17 0; #X connect 16 0 13 0; #X connect 17 0 19 0; #X connect 18 0 9 0; #X connect 18 1 8 0; #X connect 18 2 10 0; #X connect 19 0 14 0; #X connect 19 0 18 0; #X connect 20 0 17 0; #X connect 20 0 13 0; #X connect 22 0 18 0; smlib-0.12.2/itov.c0000644000076500007650000000333511656244706012524 0ustar hanshans#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, (t_method)itov_free, 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); } smlib-0.12.2/lavg-help.pd0000644000076500007650000000200311656244706013572 0ustar hanshans#N canvas 1 53 441 199 10; #X text 351 141 j#|@2002; #X obj 373 119 SMLib-help; #X floatatom 53 75 5 0 0 0 - - -; #X obj 9 58 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1 ; #X text 53 55 x(i); #X text 6 7 lavg: leaky average; #X obj 9 141 lavg 10; #X floatatom 9 171 5 0 0 0 - - -; #X obj 9 101 float; #X text 5 24 argument: half-decay time (in number of activations); #X msg 118 101 clear; #X text 116 79 clear accumulator; #X msg 244 106 decay 5; #X text 243 90 set half-decay time; #N canvas 290 208 494 344 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 average; #X text 12 65 INLET_0 float clear decay; #X text 12 85 OUTLET_0 float; #X restore 385 161 pd META; #X connect 2 0 8 1; #X connect 3 0 8 0; #X connect 6 0 7 0; #X connect 8 0 6 0; #X connect 10 0 6 0; #X connect 12 0 6 0; smlib-0.12.2/lavg.c0000644000076500007650000000225011656244707012470 0ustar hanshans#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); } smlib-0.12.2/lhist-help.pd0000644000076500007650000000301011656244706013763 0ustar hanshans#N canvas 1 53 443 412 10; #X text 353 328 j#|@2002; #X obj 51 362 print; #X obj 11 193 random 10; #X obj 11 174 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X msg 236 193 absolute; #X msg 236 221 relative; #X msg 372 192 clear; #X text 235 172 generate output; #X text 371 173 reinit; #X text 31 172 feed data; #X obj 111 355 vsum; #X floatatom 111 378 5 0 0 0 - - -; #X msg 11 220 1 3 5 7 9; #X text 14 50 - value of first class; #X text 14 77 - number of classes; #X text 14 64 - value of last class; #X text 13 35 arguments:; #X text 14 124 - array of samples in classes; #X text 12 109 output:; #X text 12 145 out-of-range inputs are clipped (cfr lhisti); #X text 14 7 lhist: "leaky" histograms; #X text 13 91 - half-decay time; #X obj 51 325 lhist 0 10 10 5; #X msg 118 194 leak; #X text 118 172 perform leak; #X msg 10 246 -5; #X obj 368 307 SMLib-help; #N canvas 300 200 494 344 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 378 352 pd META; #X connect 2 0 22 0; #X connect 3 0 2 0; #X connect 4 0 22 0; #X connect 5 0 22 0; #X connect 6 0 22 0; #X connect 10 0 11 0; #X connect 12 0 22 0; #X connect 22 0 1 0; #X connect 22 0 10 0; #X connect 23 0 22 0; #X connect 25 0 22 0; smlib-0.12.2/lhist.c0000644000076500007650000000742011656244706012665 0ustar hanshans#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); } smlib-0.12.2/lhisti-help.pd0000644000076500007650000000310111656244706014135 0ustar hanshans#N canvas 1 53 441 405 10; #X text 358 334 j#|@2002; #X obj 51 362 print; #X obj 11 193 random 10; #X obj 11 174 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X msg 236 193 absolute; #X msg 236 221 relative; #X msg 372 192 clear; #X text 235 172 generate output; #X text 371 173 reinit; #X text 31 172 feed data; #X obj 111 355 vsum; #X floatatom 111 378 5 0 0 0 - - -; #X msg 11 220 1 3 5 7 9; #X text 14 50 - value of first class; #X text 14 77 - number of classes; #X text 14 64 - value of last class; #X text 13 35 arguments:; #X text 14 124 - array of samples in classes; #X text 12 109 output:; #X text 12 145 out-of-range inputs are clipped (cfr lhisti); #X text 13 91 - half-decay time; #X obj 51 325 lhist 0 10 10 5; #X msg 118 194 leak; #X text 118 172 perform leak; #X text 13 4 lhisti: "leaky" histograms without clipping the input ; #X msg 11 245 -5; #X obj 367 309 SMLib-help; #N canvas 255 157 494 344 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 377 356 pd META; #X connect 2 0 21 0; #X connect 3 0 2 0; #X connect 4 0 21 0; #X connect 5 0 21 0; #X connect 6 0 21 0; #X connect 10 0 11 0; #X connect 12 0 21 0; #X connect 21 0 1 0; #X connect 21 0 10 0; #X connect 22 0 21 0; #X connect 25 0 21 0; smlib-0.12.2/lhisti.c0000644000076500007650000000741311656244706013040 0ustar hanshans#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); } smlib-0.12.2/linspace-help.pd0000644000076500007650000000206011656244706014442 0ustar hanshans#N canvas 1 53 396 195 10; #X text 302 132 j#|@2002; #X obj 324 112 SMLib-help; #X obj 29 147 print linspace; #X floatatom 136 101 5 0 0 0 - - -; #X floatatom 82 80 5 0 0 0 - - -; #X floatatom 29 58 5 0 0 0 - - -; #X obj 11 38 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X text 29 36 generate; #X text 132 80 set b; #X text 187 101 set n; #X text 79 56 set a and generate; #X obj 29 124 linspace 0 1 4; #X text 9 6 generates a vector with linear spaced floats; #N canvas 226 226 494 344 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 339 154 pd META; #X connect 3 0 11 2; #X connect 4 0 11 1; #X connect 5 0 11 0; #X connect 6 0 11 0; #X connect 11 0 2 0; smlib-0.12.2/linspace.c0000644000076500007650000000260311656244706013336 0ustar hanshans#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); } smlib-0.12.2/lmax-help.pd0000644000076500007650000000200711656244707013607 0ustar hanshans#N canvas 1 53 441 199 10; #X text 345 139 j#|@2002; #X obj 367 117 SMLib-help; #X floatatom 55 73 5 0 0 0 - - -; #X obj 11 56 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X text 55 53 x(i); #X floatatom 11 169 5 0 0 0 - - -; #X obj 11 99 float; #X text 7 22 argument: half-decay time (in number of activations); #X msg 119 95 clear; #X text 118 77 clear accumulator; #X text 8 5 lmax: leaky maximum; #X obj 11 139 lmax 10; #X msg 244 106 decay 5; #X text 243 90 set half-decay time; #N canvas 277 199 494 344 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 381 159 pd META; #X connect 2 0 6 1; #X connect 3 0 6 0; #X connect 6 0 11 0; #X connect 8 0 11 0; #X connect 11 0 5 0; #X connect 12 0 11 0; smlib-0.12.2/lmax.c0000644000076500007650000000234511656244706012504 0ustar hanshans#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); } smlib-0.12.2/lmin-help.pd0000644000076500007650000000201011656244706013576 0ustar hanshans#N canvas 1 53 444 200 10; #X text 350 139 j#|@2002; #X obj 372 117 SMLib-help; #X floatatom 53 72 5 0 0 0 - - -; #X obj 9 55 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1 ; #X text 53 52 x(i); #X floatatom 9 168 5 0 0 0 - - -; #X obj 9 98 float; #X text 5 21 argument: half-decay time (in number of activations); #X text 6 4 lmin: leaky minimum; #X obj 9 138 lmin 10; #X msg 112 92 clear; #X text 111 73 clear accumulator; #X msg 244 106 decay 5; #X text 243 90 set half-decay time; #N canvas 173 210 494 344 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 382 161 pd META; #X connect 2 0 6 1; #X connect 3 0 6 0; #X connect 6 0 9 0; #X connect 9 0 5 0; #X connect 10 0 9 0; #X connect 12 0 9 0; smlib-0.12.2/lmin.c0000644000076500007650000000234511656244706012502 0ustar hanshans#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); } smlib-0.12.2/lrange-help.pd0000644000076500007650000000207211656244706014117 0ustar hanshans#N canvas 1 53 441 199 10; #X text 351 133 j#|@2002; #X obj 373 111 SMLib-help; #X floatatom 54 72 5 0 0 0 - - -; #X obj 10 55 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X text 54 52 x(i); #X floatatom 10 168 5 0 0 0 - - -; #X obj 10 98 float; #X text 6 21 argument: half-decay time (in number of activations); #X msg 119 98 clear; #X text 117 76 clear accumulator; #X text 7 4 lrange: leaky maximum minus leaky minimum; #X obj 10 138 lrange 10; #X msg 244 106 decay 5; #X text 243 90 set half-decay time; #N canvas 224 251 494 344 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 391 156 pd META; #X connect 2 0 6 1; #X connect 3 0 6 0; #X connect 6 0 11 0; #X connect 8 0 11 0; #X connect 11 0 5 0; #X connect 12 0 11 0; smlib-0.12.2/lrange.c0000644000076500007650000000263211656244706013012 0ustar hanshans#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); } smlib-0.12.2/lstd-help.pd0000644000076500007650000000123611656244706013616 0ustar hanshans#N canvas 1 53 441 199 10; #X text 347 135 j#|@2002; #X obj 369 113 SMLib-help; #X floatatom 74 115 5 0 0 0 - - -; #X obj 74 85 lstd; #X obj 77 47 hsl 128 15 0 127 0 0 empty empty empty -2 -8 0 10 -262144 -1 -1 0 1; #N canvas 179 217 494 344 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 385 157 pd META; #X connect 3 0 2 0; #X connect 4 0 3 0; smlib-0.12.2/lstd.c0000644000076500007650000000246011656244706012507 0ustar hanshans#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); } smlib-0.12.2/prevl-help.pd0000644000076500007650000000262211656244706014000 0ustar hanshans#N canvas 1 53 489 300 10; #X text 364 181 j#|@2002; #X obj 386 159 SMLib-help; #X floatatom -12 16 5 0 0 0 - - -; #X floatatom 42 50 5 0 0 0 - - -; #X floatatom 94 49 5 0 0 0 - - -; #X obj -2 46 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj -12 -4 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X text -19 167 ...; #X text 127 79 [deltas a b c]; #X text 94 28 b; #X text 40 29 a; #X text 126 125 requires am_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); } smlib-0.12.2/smlib-meta.pd0000644000076500007650000000067112025365156013750 0ustar hanshans#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 LICENSE GNU GPL; #X text 10 90 DESCRIPTION vector processing \, vector analysis \, vector synthesis \, number stream analysis \, number stream filters; #X text 10 130 VERSION 0.12.2; #X restore 10 10 pd META; smlib-0.12.2/threshold-help.pd0000644000076500007650000000415311656244706014645 0ustar hanshans#N canvas 1 53 708 422 10; #X text 221 309 Arguments:; #X text 310 310 1 trigger threshold; #X floatatom 20 235 5 0 0 0 - - -; #X obj 42 363 print trigger; #X obj 183 363 print rest; #X text 310 341 3 rest threshold; #X msg 172 268 1; #X msg 208 268 0; #X text 249 209 "set" to change the parameters; #X text 245 263 zero or nonszero in inlet to set the state to "high" or "low". There is no debounce period after this.; #X text 208 12 - TRIGGER FROM FLOAT STREAM; #X obj 124 11 threshold; #X text 26 48 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 310 326 2 trigger debounce number; #X text 309 358 4 rest debounce number; #X obj 20 212 float; #X obj 20 189 metro 100; #X obj 20 148 loadbang; #X obj 20 170 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 ; #X obj 132 171 hsl 128 15 0 127 0 0 empty empty empty -2 -6 0 8 -262144 -1 -1 0 1; #X msg 129 208 set 50 0 10 0; #X msg 130 231 set 50 15 10 15; #X text 12 393 see also threshold~; #X obj 164 363 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 20 363 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 20 332 threshold 70 10 30 10; #X text 615 345 j#|@2002; #X obj 633 323 SMLib-help; #N canvas 339 203 494 344 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 650 367 pd META; #X connect 2 0 25 0; #X connect 15 0 2 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 25 0; #X connect 21 0 25 0; #X connect 25 0 3 0; #X connect 25 0 24 0; #X connect 25 1 4 0; #X connect 25 1 23 0; smlib-0.12.2/threshold.c0000644000076500007650000000652411656244706013542 0ustar hanshans/* --------------------- 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); } smlib-0.12.2/unittests/0000755000076500007650000000000012030354210013410 5ustar hanshanssmlib-0.12.2/unittests/bp-unittest.pd0000644000076500007650000000077011710345157016235 0ustar hanshans#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; smlib-0.12.2/unittests/bp.wav0000644000076500007650000000405411660562363014555 0ustar hanshansRIFF$WAVEfmt D¬± dataJÉì¼Ù¢½!‰¾¿V¾¾Œ¾«¨¾,½¾üÞɾ–9ξ:ÄÊ¾×ÆÀ¾ù±¾¹F ¾™¾jOw¾«W¾Š7>¾,¾x@!¾+c¾¸I¾p%¾$.¾ßµ7¾Ž¡@¾º­G¾~þK¾‹M¾zñJ¾T»E¾×ù=¾@X4¾8–)¾Gr¾¥—¾¢ ¾J¾¾ªò½ó¾æ½ƒÝ½†Ö½Â0ѽÚ̽áÙȽò˜Ä½9¿½‘¹½õE²½3³©½ñðŸ½õ0•½ñµ‰½"•{½rc½2ˆK½+C4½¡î½™³½3é¼²ü¾»ž¼ãSw¼ü¼2¼vYÝ»‘Þ(»Û:gBÅ;ÙÒ+< w<¢Åg>Ë? >@>lê>ì»>®Š >åV%>ý *>ƒé.>±3>[x8>Ú?=> B>=ÑF>ž›K>7gP>ð3U>™Z>ôÏ^>¹žc> mh>lê r>öØv>}¦{>¾9€>ýŸ‚>…>çk‡>°Ñ‰>r7Œ>:Ž>‘>i“>Ï•>D8u>‘C>É›<°Šì½,”{¾Ðç·¾Èðä¾&¿¤¿íp¿‡ký¾ ä¾@°Ä¾ŸÕ¢¾•õ¾L´I¾B ¾Éiô½+¨Ï½ ƽ9…Ó½ïVò½@¾4÷$¾ü;¾Z×M¾7…[¾—c¾;Id¾°|_¾{™U¾»áG¾pÅ7¾¸&¾] ¾bؾAÈó½ÅCß½r`нJÇÆ½ó«Á½ò¿½ïTÀ½ˆŒÁ½úm½Ã½c¿½ôÕº½}’³½cù©½Ödž½NR‘½(Qƒ½4äi½#rM½Ñ$2½˜½Ö$½Æ×¼‡a±¼Ì|޼Ãt\¼m:¼J—Æ»Z»6½:€i²;`{<¡g<5š<Ò$Â<<>ë<Ɉ =—=v–4=á\I=ïË]=FÒq=£µ‚=ÃNŒ=F¼•=ôŸ=A¨=6q±=’¤º=„äÃ=»7Í= ¢Ö=$à=½é=ùió=Ó$ý=_t>X>!; >`>^÷>AÎ>ÓŸ >cl%>µ4*>Ôù.>õ¼3>J8>ñA=>ÑB>‘ËF>’“K>í]P>}*U>ìøY>ÅÈ^>€™c>”jh>;m>å r>vÛv>ª{>È;€>¢‚>ï…>m‡>ÝÒ‰>'8Œ>yŽ>è‘>„h“>YΕ>6u>½A>»›<‹ì½<•{¾$è·¾æðä¾&¿÷£¿¾p¿ký¾¦ä¾Ô¯Ä¾EÕ¢¾Sõ¾´I¾- ¾jô½°¨Ï½Æƽ †Ó½ÅWò½¢¾‡÷$¾:;¾×M¾C…[¾Œc¾Id¾„|_¾G™U¾†áG¾?Å7¾î·&¾; ¾Kؾ)Èó½ÄCß½…`нlÇÆ½¬Á½Iò¿½UÀ½®ŒÁ½n½Õ½j¿½ñÕº½q’³½Nù©½»dž½2R‘½ Qƒ½äi½øqM½±$2½ö—½Ò$½&Æ×¼­a±¼}޼=u\¼é:¼.˜Æ»\»½:4i²;V{<¡g<5š<è$Âë<Öˆ =—=‚–4=ë\I=øË]=OÒq=¨µ‚=É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>rÛv>ª{>É;€>¢‚>ñ…>m‡>ÞÒ‰>'8Œ>wŽ>ä‘>h“>VΕ>y6u>¹A>k»›<ì½<•{¾#è·¾äðä¾&¿÷£¿¾p¿ký¾¦ä¾Ô¯Ä¾EÕ¢¾Sõ¾´I¾- ¾jô½°¨Ï½Æƽ †Ó½ÅWò½¢¾‡÷$¾:;¾×M¾C…[¾Œc¾Id¾„|_¾G™U¾†áG¾?Å7¾î·&¾; ¾Kؾ)Èó½ÄCß½…`нlÇÆ½¬Á½Iò¿½UÀ½®ŒÁ½n½Õ½j¿½ñÕº½q’³½Nù©½»dž½2R‘½ Qƒ½äi½øqM½±$2½ö—½Ò$½&Æ×¼­a±¼}޼=u\¼é:¼.˜Æ»\»½:4i²;V{<¡g<5š<è$Âë<Öˆ =—=‚–4=ë\I=øË]=OÒq=¨µ‚=É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>rÛv>ª{>É;€>¢‚>ñ…>m‡>ÞÒ‰>'8Œ>wŽ>ä‘>h“>VΕ>smlib-0.12.2/unittests/decimator-unittest.pd0000644000076500007650000000054111710345157017577 0ustar hanshans#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; smlib-0.12.2/unittests/decimator.wav0000644000076500007650000000405411660562363016123 0ustar hanshansRIFF$WAVEfmt D¬± data€¿x¿p¿h¿`¿X¿P¿H¿@¿8¿0¿(¿ ¿¿¿¿¿ð¾à¾Ð¾À¾°¾ ¾¾€¾`¾@¾ ¾¾À½€½½=€=À=> >@>`>€>> >°>À>Ð>à>ð>???? ?(?0?8?@?H?P?X?`?h?p?x?€¿x¿p¿h¿`¿X¿P¿H¿@¿8¿0¿(¿ ¿¿¿¿¿ð¾à¾Ð¾À¾°¾ ¾¾€¾`¾@¾ ¾¾À½€½½=€=À=> >@>`>€>> >°>À>Ð>à>ð>???? ?(?0?8?@?H?P?X?`?h?p?x?€¿x¿p¿h¿`¿X¿P¿H¿@¿8¿0¿(¿ ¿¿¿¿¿ð¾à¾Ð¾À¾°¾ ¾¾€¾`¾@¾ ¾¾À½€½½=€=À=> >@>`>€>> >°>À>Ð>à>ð>???? ?(?0?8?@?H?P?X?`?h?p?x?€¿x¿p¿h¿`¿X¿P¿H¿@¿8¿0¿(¿ ¿¿¿¿¿ð¾à¾Ð¾À¾°¾ ¾¾€¾`¾@¾ ¾¾À½€½½=€=À=> >@>`>€>> >°>À>Ð>à>ð>???? ?(?0?8?@?H?P?X?`?h?p?x?smlib-0.12.2/unittests/deltas-unittest.pd0000644000076500007650000000155311710345157017110 0ustar hanshans#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; smlib-0.12.2/unittests/deltas.wav0000644000076500007650000000405411660562363015430 0ustar hanshansRIFF$WAVEfmt D¬± data@¿@¿ý@¿òG@¿Õ@¿˜Ç@¿(A¿p†A¿WýA¿½ƒB¿ƒC¿‚¾C¿rD¿‚5E¿&F¿HçF¿°ÕG¿"ÒH¿`ÜI¿&ôJ¿.L¿0KM¿ß‰N¿ìÔO¿,Q¿ÎŽR¿öüS¿vU¿èùV¿ô‡X¿ÞZ¿?Á[¿°k]¿Æ_¿Ú`¿+b¿›gd¿ð8f¿¸h¿{îi¿ÂÑk¿ºm¿ù¦o¿ô—q¿ˆŒs¿9„u¿‰~w¿ùzy¿ y{¿>x}¿x¿¼€¿Ò»¿/»‚¿Þ¹ƒ¿Ÿ·„¿1´…¿W¯†¿Ð¨‡¿` ˆ¿Ç•‰¿ÉˆŠ¿)y‹¿¬š±¾L4µ¾¢ ¸¾ÐÞ»¾î¾¾€ÍÁ¾Œ|ľxúƾ¦Fɾ†`˾ŠG;@ûξ8{оÇѾ|ÞÒ¾0ÁÓ¾ðnÔ¾œçÔ¾ +Õ¾09Õ¾ Õ¾¤µÔ¾$Ô¾l]Ó¾üaÒ¾ì1Ѿ˜ÍϾL5ξxi̾ˆjʾ9ȾjÕž`@þˆzÀ¾„½¾:_º¾J ·¾œ‰³¾ Û¯¾‚¬¾û§¾zË£¾sŸ¾°òš¾¤K–¾‘¾ŽŒ¾æy‡¾âC‚¾¨Úy¾ïn¾ÈÇc¾€gX¾0ÑL¾ A¾Ð 5¾Àæ(¾x•¾¾˜€¾†í½Ðӽ幽 ÌŸ½°Š…½àOV½ÀT!½€bؼ€Ë[¼PÓ¹˜N<ÀËÑ<` =` S=Péƒ=ð,ž=I¸= 7Ò= ðë=ˆ·> V>àÐ>¨$(>pN4> K@>ÀL>X±W>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¦<€ ï;껈D™¼P×½ðë6½àÒk½p?½Pqª½¨xĽàNÞ½xí÷½§¾85¾ž!¾ŒÞ-¾ó9¾ÚE¾ Q¾Ì]¾4Yh¾„hs¾;~¾øf„¾X‰¾T•޾¨w“¾"5˜¾ŽÌœ¾Æ<¡¾´„¥¾@£©¾b—­¾ `±¾ˆü´¾°k¸¾À¬»¾æ¾¾¾\¡Á¾jSľhÔÆ¾¬#ɾ¬@˾Þ*;Æáξôdо´Ñ¾´ÎÒ¾¬´Ó¾ºeÔ¾®áÔ¾j(Õ¾Þ9Õ¾Õ¾è¼Ô¾œ.Ô¾FkÓ¾sÒ¾HFѾ,åϾPξn‡Ì¾¦‹Ê¾>]Ⱦ¾üž¼jþä§À¾ä´½¾v’º¾dA·¾„³¾´°¾à>¬¾ü;¨¾¤¾¹Ÿ¾4;›¾‚––¾,Ì‘¾fÝŒ¾fˇ¾x—‚¾Ä…z¾øo¾Hzd¾xY¾hŠM¾èÃA¾Í5¾¨¨)¾èY¾Ð㾈I¾@ï½Àiս໽ k¡½,‡½@–Y½ ž$½€ùÞ¼þh¼xžº€eA<@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>ä,_>D¶S>¸ H>,-<>” 0>ôç#>\†>äþ >`©ü=Àã=`IÉ=ÀJ¯=8 •=ð u=ðÃ@=ж =€ ­<€<€g »¬’¼@ý¼ £3½Àh½àžŽ½8Ó¨½XݽȶܽYö½ØÞ¾‰¾´F޾H+“¾뗾ℜ¾”÷ ¾B¥¾(c©¾ôY­¾h%±¾˜Ä´¾’6¸¾„z»¾˜¾¾uÁ¾*ľ$®Æ¾‚ɾ¤ ˾ü ;ÈξzNо̠Ѿ¼¾Ò¾ø§Ó¾P\Ô¾ŠÛÔ¾”%Õ¾V:Õ¾ÊÕ¾øÃÔ¾ö8Ô¾èxÓ¾øƒÒ¾pZѾŽüϾ®jξ4¥Ì¾”¬Ê¾HȾà#ƾì”þÕÀ¾ å½¾†Åº¾Pw·¾@û³¾2R°¾}¬¾Ð|¨¾rR¤¾þþŸ¾Šƒ›¾8á–¾2’¾¢,¾smlib-0.12.2/unittests/hip-unittest.pd0000644000076500007650000000077411710345157016420 0ustar hanshans#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; smlib-0.12.2/unittests/hip.wav0000644000076500007650000000405411660562364014735 0ustar hanshansRIFF$WAVEfmt D¬± data??©¿?C ?à?Æ£? ˆ?Ë=?õÇ?E)?Ld?s{ ?ùp"?ýF$?xÿ%?Fœ'?$)?´‰*?|Ý+?ì-?XF.?^/?d0?ÀY1?ð?2?¬3?Üá3?TŸ4?èP5?L÷5?H“6?p%7?h®7?È.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¿€{2¿À9¿n¿â¾à¸»¾ ×—¾ol¾€h-¾€¯ä½ôk½˜ã»&=€"®=@Ä>@È)>IO>@nr> ¯‰>@™> •§>@#µ>`×Á>@¿Í>€çØ>€\ã>)í> Xö>póþ>(‚?°I?€Ô ?@&?°B?-?€è?x?`Þ? ?°9 ?P3"?@ $?PÉ%?i'?ï(? ]*?À³+?Àô,?°!.? ;/?àC0?;1? #2?0ý2?É3?ˆ4?;5?àâ5? €6?€7?7?8?P˜8? 9?€t9?PØ9?ð5:?:?Àß:?Ð,;?ðt;? ¸;?ø;?`3?`,>?@D>?ÀZ>?Ào>?€ƒ>?à•>?@§>?€·>? Æ>?àÔ>?@â>?Àî>?€ú>?€??à??€??€"??+??3??`:??`A??àG??N??ÀS?? Y??@^??c??`g??€k??`o?? s??€v??Ày??À|??€?? ‚?? „??à†??p; ¿°$¿°¿€Þe¿@bK¿2¿àL¿€¿€#⾀ػ¾@õ—¾€¦l¾€œ-¾彫l½ðè»d%=×­=À >@§)>*O>@Qr>€¡‰>€™> ‰§> µ>ÍÁ>`µÍ>`ÞØ>ÀSã>!í>€Pö>Pìþ>Ø~? F?Ñ ?#? @? *?@æ?àu?`Ü?@?ð7 ?°1"?° $?àÇ%?0h'?Pî(?ð[*? ²+?Àó,?° .?À:/?C0?À:1?à"2?pü2?`È3?p‡4?€:5?Pâ5? 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¿@bK¿2¿àL¿€¿€#⾀ػ¾@õ—¾€¦l¾€œ-¾彫l½ðè»d%=×­=À >@§)>*O>@Qr>€¡‰>€™> ‰§> µ>ÍÁ>`µÍ>`ÞØ>ÀSã>!í>€Pö>Pìþ>Ø~? F?Ñ ?#? @? *?@æ?àu?`Ü?@?ð7 ?°1"?° $?àÇ%?0h'?Pî(?ð[*? ²+?Àó,?° .?À:/?C0?À:1?à"2?pü2?`È3?p‡4?€:5?Pâ5? 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?? |??€?? ‚?? „??à†??smlib-0.12.2/unittests/hist-unittest.pd0000644000076500007650000000375211710345157016606 0ustar hanshans#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; smlib-0.12.2/unittests/hist.wav0000644000076500007650000000405411660562363015123 0ustar hanshansRIFF$WAVEfmt D¬± dataÀ>>€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?@smlib-0.12.2/unittests/itov-unittest.pd0000644000076500007650000000147511710345157016620 0ustar hanshans#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; smlib-0.12.2/unittests/itov.wav0000644000076500007650000000405411660562363015135 0ustar hanshansRIFF$WAVEfmt D¬± data€??|?w?p?g?\?O?@?/? ??ð~?&×~?2¼~?BŸ~?V€~?m_~?‰<~?ª~?Ðð}?ýÇ}?1}?lp}?°A}?ü}?RÞ|?³©|?s|?˜:|?|?°Ã{?R…{?E{?È{?¾z?†xz?‚0z?“æy?»šy?úLy?Sýx?Å«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{=p©s=Hl=Xƒd=¨]=pÎU=¸žN=¨‹G=`•@=ð»9=xÿ2=`,=àÝ%=øx=h1=`=àú = =;=°÷<0åë<Ðöà< DÖ<ÐÎË< •Á< ™·<€Ù­<ðV¤<€›

‰<б€< Åp<`¢`< ûP<ÑA<à"3<€ñ$< =<À <€—ú;Àâ;@¡Ê;À´;@šž;@Š;€ m;íG;Ê$;€¢;îÈ:Ž:V0:—9O9ž:·€:º:u÷:d;€ ?;€©c;@"…;€l™;@³®;€öÄ;€5Ü;@pô;Ó<@ë<À€!<@“/<€"><@.M<@¶\<`ºl<@:}<Ї<0Ö<Ϙ<@¢<°x«<0)µ< ¿<Ð@É< §Ó<àJÞ<`*é<Fô<ÿ=xÏE=hÛL=T=8I[=تb=Ð(j=Ãq=Hyy=Ä¥€=М„=¼¡ˆ=t´Œ=ìÔ= •=Ì>™=ˆ=ØÞ¡=C¦=ˆ´ª=P3¯=L¿³=hX¸=þ¼=¸±Á=ÈqÆ=°>Ë=XÐ=°þÔ=¤ñÙ=$ñÞ=ýã=dé=:î=Ôjó=̧ø=Ððý=æ¢>TS>ª >ÜÅ >à‡ >¨O>,>^ð>6É>¦§>¤‹>"u >d#>xX&>6R)>HQ,>smlib-0.12.2/unittests/lavg-unittest.pd0000644000076500007650000000077511710345157016572 0ustar hanshans#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; smlib-0.12.2/unittests/lavg.wav0000644000076500007650000000405411660562363015105 0ustar hanshansRIFF$WAVEfmt D¬± data&‰½|¾d=¾xÎq¾nó¾7Ú¦¾bÀº¾BÈ̾àݾ»ë¾Þßø¾M¿¿^ ¿j¿”¿§¿Ÿ¿"¿UÌ¿…¿¿ž¿=é¿Ã꿜§¿a$¿]e¿‘n¿¹C¿Q迚_¿œ¬¿-Ò¿ðÒ¿]±¿Ào¿> ¿Ø” ¿lÿ¿¸Q¿\¿ºgÿ¾Kù¾Žó¾zlí¾Ý*ç¾[Ëà¾õOÚ¾‰ºÓ¾Õ ;yHƾún¿¾Â¸¾#‚±¾Yqª¾ŠP£¾É œ¾㔾`˜¾†A†¾°¾}¾1ån¾ù÷_¾[øP¾‘çA¾ÂÆ2¾—#¾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ÁÛ=ðÇ%=F©ª¼Š«½Jj¾g3¾ð_¾¢gƒ¾Od•¾z£¥¾øB´¾Ÿ^Á¾h;p×¾°•à¾ä”è¾Ùï¾înõ¾Emú¾ÚŒþ¾Lî¿65¿¨!¿²¹¿ú¿Ç¿¾¿I9¿Þx¿Ä€¿´T¿Rðý¾ÄÜú¾Ît÷¾¾ó¾ã½ï¾ yë¾eôæ¾û3â¾à;ݾÐؾE³Ò¾~);ƒuǾ'šÁ¾𻾭wµ¾P5¯¾Õ¨¾Y¢¾Û¾À•¾ÝO޾ßu‡¾1ˆ€¾Hs¾çíd¾Š«V¾UKH¾HÏ9¾@9+¾úŠ¾Æ ¾0Øý½Ôüß½ºüÁ½YÚ£½û—…½ŒoN½qw½Â–¨¼¬v·»Æk<ÚÈî«>']%>¦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>ÜãÛ=¢&=Œ0ª¼a½&]¾×Z3¾_¾Kbƒ¾T_•¾Ôž¥¾¡>´¾’ZÁ¾¡ ; m×¾f’à¾Ò‘è¾ü~ï¾Blõ¾Æjú¾†Šþ¾6í¿24¿¶ ¿Ð¸¿(¿¿N½¿ 8¿Ax¿1€¿*T¿Pïý¾ÔÛú¾îs÷¾E½ó¾ ½ï¾jxë¾»óæ¾\3â¾L;ݾFؾIJҾ);uǾ¿™Á¾¬™»¾Qwµ¾ú4¯¾ËÔ¨¾ÃX¢¾À›¾•¾ O޾¦u‡¾ü‡€¾ås¾Šíd¾3«V¾KH¾üÎ9¾ù8+¾¸Š¾ÙÅ ¾¾×ý½jüß½WüÁ½üÙ£½¥—…½ënN½Ûv½ª•¨¼˜r·»­m<¼žÈ<²*"=Å*`=&=¼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>ÜãÛ=¢&=Œ0ª¼a½&]¾×Z3¾_¾Kbƒ¾T_•¾Ôž¥¾¡>´¾’ZÁ¾¡ ; m×¾f’à¾Ò‘è¾ü~ï¾Blõ¾Æjú¾†Šþ¾6í¿24¿¶ ¿Ð¸¿(¿¿N½¿ 8¿Ax¿1€¿*T¿Pïý¾ÔÛú¾îs÷¾E½ó¾ ½ï¾jxë¾»óæ¾\3â¾L;ݾFؾIJҾ);uǾ¿™Á¾¬™»¾Qwµ¾ú4¯¾ËÔ¨¾ÃX¢¾À›¾•¾ O޾¦u‡¾ü‡€¾ås¾Šíd¾3«V¾KH¾üÎ9¾ù8+¾¸Š¾ÙÅ ¾¾×ý½jüß½WüÁ½üÙ£½¥—…½ënN½Ûv½ª•¨¼˜r·»­m<¼žÈ<²*"=Å*`=&=¼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; smlib-0.12.2/unittests/lhist.wav0000644000076500007650000000405411660562363015277 0ustar hanshansRIFF$WAVEfmt D¬± dataÀ>>€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?@smlib-0.12.2/unittests/linspace-unittest.pd0000644000076500007650000000062111710345157017425 0ustar hanshans#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; smlib-0.12.2/unittests/linspace.wav0000644000076500007650000000405411660562363015752 0ustar hanshansRIFF$WAVEfmt D¬± data<<ƒÁ<=…B!=ƒA=‡Ãa==D"‘=„B¡=Äb±=ƒÁ=D£Ñ=„Ãá=Äãñ=>" >B">b2>‚B!>¢R)>Âb1>âr9>ƒA>"“I>B£Q>b³Y>‚Ã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?1›M?9ŸO?A£Q?I§S?Q«U?Y¯W?a³Y?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>B£Q>b³Y>‚Ã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?1›M?9ŸO?A£Q?I§S?Q«U?Y¯W?a³Y?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>B£Q>b³Y>‚Ã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?1›M?9ŸO?A£Q?I§S?Q«U?Y¯W?a³Y?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>B£Q>b³Y>‚Ã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?1›M?9ŸO?A£Q?I§S?Q«U?Y¯W?a³Y?i·[?q»]?y¿_?Ãa?‰Çc?‘Ëe?™Ïg?¡Ói?©×k?±Ûm?¹ßo?Áãq?Éçs?Ñëu?Ùïw?áóy?é÷{?ñû}?ùÿ?smlib-0.12.2/unittests/lmax-unittest.pd0000644000076500007650000000077711710345157016604 0ustar hanshans#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; smlib-0.12.2/unittests/lmax.wav0000644000076500007650000000405411660562363015115 0ustar hanshansRIFF$WAVEfmt D¬± data¿ü¾ø¾ô¾ð¾ì¾è¾ä¾à¾Ü¾Ø¾Ô¾Ð¾Ì¾È¾Ä¾À¾¼¾¸¾´¾°¾¬¾¨¾¤¾ ¾œ¾˜¾”¾¾Œ¾ˆ¾„¾€¾x¾p¾h¾`¾X¾P¾H¾@¾8¾0¾(¾ ¾¾¾¾¾ð½à½Ð½À½°½ ½½€½`½@½ ½½À¼€¼¼<€<À<= =@=`=€== =°=À=Ð=à=ð=>>>> >(>0>8>@>H>P>X>`>h>p>x>€>„>ˆ>Œ>>”>˜>œ> >¤>¨>¬>°>´>¸>¼>À>Ä>È>Ì>Ð>Ô>Ø>Ü>à>ä>è>ì>ð>ô>ø>ü>ûÙ>ïº>îh>V‡‚>QnS>â©%>lþö=&a©=„D='‚<œ\¼·ä$½^¤„½g²½èܽ,澂û¾Ôb!¾í8/¾¬˜;¾"›F¾´WP¾4äX¾U`¾½f¾3.l¾Þ¸p¾‡lt¾“Ww¾r‡y¾­{¾öæ{¾6-|¾x¾p¾h¾`¾X¾P¾H¾@¾8¾0¾(¾ ¾¾¾¾¾ð½à½Ð½À½°½ ½½€½`½@½ ½½À¼€¼¼<€<À<= =@=`=€== =°=À=Ð=à=ð=>>>> >(>0>8>@>H>P>X>`>h>p>x>€>„>ˆ>Œ>>”>˜>œ> >¤>¨>¬>°>´>¸>¼>À>Ä>È>Ì>Ð>Ô>Ø>Ü>à>ä>è>ì>ð>ô>ø>ü>ûÙ>ïº>îh>V‡‚>QnS>â©%>lþö=&a©=„D='‚<œ\¼·ä$½^¤„½g²½èܽ,澂û¾Ôb!¾í8/¾¬˜;¾"›F¾´WP¾4äX¾U`¾½f¾3.l¾Þ¸p¾‡lt¾“Ww¾r‡y¾­{¾öæ{¾6-|¾x¾p¾h¾`¾X¾P¾H¾@¾8¾0¾(¾ ¾¾¾¾¾ð½à½Ð½À½°½ ½½€½`½@½ ½½À¼€¼¼<€<À<= =@=`=€== =°=À=Ð=à=ð=>>>> >(>0>8>@>H>P>X>`>h>p>x>€>„>ˆ>Œ>>”>˜>œ> >¤>¨>¬>°>´>¸>¼>À>Ä>È>Ì>Ð>Ô>Ø>Ü>à>ä>è>ì>ð>ô>ø>ü>ûÙ>ïº>îh>V‡‚>QnS>â©%>lþö=&a©=„D='‚<œ\¼·ä$½^¤„½g²½èܽ,澂û¾Ôb!¾í8/¾¬˜;¾"›F¾´WP¾4äX¾U`¾½f¾3.l¾Þ¸p¾‡lt¾“Ww¾r‡y¾­{¾öæ{¾6-|¾x¾p¾h¾`¾X¾P¾H¾@¾8¾0¾(¾ ¾¾¾¾¾ð½à½Ð½À½°½ ½½€½`½@½ ½½À¼€¼¼<€<À<= =@=`=€== =°=À=Ð=à=ð=>>>> >(>0>8>@>H>P>X>`>h>p>x>€>„>ˆ>Œ>>”>˜>œ> >¤>¨>¬>°>´>¸>¼>À>Ä>È>Ì>Ð>Ô>Ø>Ü>à>ä>è>ì>ð>ô>ø>ü>smlib-0.12.2/unittests/lmin-unittest.pd0000644000076500007650000000100211710345157016560 0ustar hanshans#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; smlib-0.12.2/unittests/lmin.wav0000644000076500007650000000405411660562363015113 0ustar hanshansRIFF$WAVEfmt D¬± data¿Ýÿ¾‹˜ÿ¾l3ÿ¾Þ®þ¾ò þ¾±Ký¾oü¾'wû¾Ädú¾Ø8ù¾Aô÷¾Ø—ö¾k$õ¾Äšó¾¤ûñ¾ÆGð¾ß¤ì¾¬¶ê¾¬¶è¾<¥æ¾ò‚ä¾bPâ¾ྥ¼Ý¾…\Û¾:îØ¾@rÖ¾éÓ¾SѾͰξ˜̾áHɾ „ƾ}´Ã¾ŽÚÀ¾›ö½¾ú»¾¸¾µ¾I ²¾$ø®¾ÜÞ«¾¸½¨¾ý”¥¾íd¢¾Ç-Ÿ¾Ê1«˜¾6`•¾’¾ö·Ž¾[‹¾±ø‡¾é„¾ò#¾ðc{¾Pvt¾Wm¾Wf¾Ÿv_¾zeX¾2LQ¾+J¾SC¾CÒ;¾›4¾ ]-¾‡&¾ŒÍ¾g|¾L%¾pȾf¾|üó½Œ"彘>Ö½øPǽÿY¸½ÿY©½GQš½"@‹½´Mx½m Z½÷¹;½ÖY½×ý¼"ßÀ¼¾Ìƒ¼£A ¼¨Ã•º¾Ð;:çbßU >ž(>èü>¯Ò!>æ©)>€‚1>r\9>°7A>.I>âñP>ÁÐX>°`>Ù‘h>þsp>'Wx>¦€>2„>3ˆ>¥ö‹>¿Ýÿ¾‹˜ÿ¾l3ÿ¾Þ®þ¾ò þ¾±Ký¾oü¾'wû¾Ädú¾Ø8ù¾Aô÷¾Ø—ö¾k$õ¾Äšó¾¤ûñ¾ÆGð¾ß¤ì¾¬¶ê¾¬¶è¾<¥æ¾ò‚ä¾bPâ¾ྥ¼Ý¾…\Û¾:îØ¾@rÖ¾éÓ¾SѾͰξ˜̾áHɾ „ƾ}´Ã¾ŽÚÀ¾›ö½¾ú»¾¸¾µ¾I ²¾$ø®¾ÜÞ«¾¸½¨¾ý”¥¾íd¢¾Ç-Ÿ¾Ê1«˜¾6`•¾’¾ö·Ž¾[‹¾±ø‡¾é„¾ò#¾ðc{¾Pvt¾Wm¾Wf¾Ÿv_¾zeX¾2LQ¾+J¾SC¾CÒ;¾›4¾ ]-¾‡&¾ŒÍ¾g|¾L%¾pȾf¾|üó½Œ"彘>Ö½øPǽÿY¸½ÿY©½GQš½"@‹½´Mx½m Z½÷¹;½ÖY½×ý¼"ßÀ¼¾Ìƒ¼£A ¼¨Ã•º¾Ð;:çbßU >ž(>èü>¯Ò!>æ©)>€‚1>r\9>°7A>.I>âñP>ÁÐX>°`>Ù‘h>þsp>'Wx>¦€>2„>3ˆ>¥ö‹>¿Ýÿ¾‹˜ÿ¾l3ÿ¾Þ®þ¾ò þ¾±Ký¾oü¾'wû¾Ädú¾Ø8ù¾Aô÷¾Ø—ö¾k$õ¾Äšó¾¤ûñ¾ÆGð¾ß¤ì¾¬¶ê¾¬¶è¾<¥æ¾ò‚ä¾bPâ¾ྥ¼Ý¾…\Û¾:îØ¾@rÖ¾éÓ¾SѾͰξ˜̾áHɾ „ƾ}´Ã¾ŽÚÀ¾›ö½¾ú»¾¸¾µ¾I ²¾$ø®¾ÜÞ«¾¸½¨¾ý”¥¾íd¢¾Ç-Ÿ¾Ê1«˜¾6`•¾’¾ö·Ž¾[‹¾±ø‡¾é„¾ò#¾ðc{¾Pvt¾Wm¾Wf¾Ÿv_¾zeX¾2LQ¾+J¾SC¾CÒ;¾›4¾ ]-¾‡&¾ŒÍ¾g|¾L%¾pȾf¾|üó½Œ"彘>Ö½øPǽÿY¸½ÿY©½GQš½"@‹½´Mx½m Z½÷¹;½ÖY½×ý¼"ßÀ¼¾Ìƒ¼£A ¼¨Ã•º¾Ð;:çbßU >ž(>èü>¯Ò!>æ©)>€‚1>r\9>°7A>.I>âñP>ÁÐX>°`>Ù‘h>þsp>'Wx>¦€>2„>3ˆ>¥ö‹>¿Ýÿ¾‹˜ÿ¾l3ÿ¾Þ®þ¾ò þ¾±Ký¾oü¾'wû¾Ädú¾Ø8ù¾Aô÷¾Ø—ö¾k$õ¾Äšó¾¤ûñ¾ÆGð¾ß¤ì¾¬¶ê¾¬¶è¾<¥æ¾ò‚ä¾bPâ¾ྥ¼Ý¾…\Û¾:îØ¾@rÖ¾éÓ¾SѾͰξ˜̾áHɾ „ƾ}´Ã¾ŽÚÀ¾›ö½¾ú»¾¸¾µ¾I ²¾$ø®¾ÜÞ«¾¸½¨¾ý”¥¾íd¢¾Ç-Ÿ¾Ê1«˜¾6`•¾’¾ö·Ž¾[‹¾±ø‡¾é„¾ò#¾ðc{¾Pvt¾Wm¾Wf¾Ÿv_¾zeX¾2LQ¾+J¾SC¾CÒ;¾›4¾ ]-¾‡&¾ŒÍ¾g|¾L%¾pȾf¾|üó½Œ"彘>Ö½øPǽÿY¸½ÿY©½GQš½"@‹½´Mx½m Z½÷¹;½ÖY½×ý¼"ßÀ¼¾Ìƒ¼£A ¼¨Ã•º¾Ð;:çbßU >ž(>èü>¯Ò!>æ©)>€‚1>r\9>°7A>.I>âñP>ÁÐX>°`>Ù‘h>þsp>'Wx>¦€>2„>3ˆ>¥ö‹>smlib-0.12.2/unittests/lrange-unittest.pd0000644000076500007650000000103211710345157017074 0ustar hanshans#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; smlib-0.12.2/unittests/lrange.wav0000644000076500007650000000405411660562363015424 0ustar hanshansRIFF$WAVEfmt D¬± data€G÷;`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>CÒK>›L> ]M>‡N>ŒÍN>g|O>L%P>pÈP>fQ>>þQ>F‘R>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?¬]?q–U?äON?ÊHG?ø~@?Xð9?çš3?±|-?Õ“'?Þ!?ôZ?}?xâ?Oê ?|?…z?øÿý>Yõ>‚ýì>áêä>¥Ý>j–Õ>ÞOÎ>ÄHÇ>ò~À>Sð¹>áš³>«|­>Г§>|Þ¡>ïZœ>x—>sâ‘>JêŒ>xˆ>€zƒ>ïÿ}>úXu>zýl>Ùêd>ž]>b–U>ÖON>¼HG>ê~@>Jð9>bV9>lÀ:>"<>ìo=>6¶>>bñ?>Ò!A>äGB>ðcC>PvD>WE>WF>ŸvG>zeH>2LI>+J>SK>CÒK>›L> ]M>‡N>ŒÍN>g|O>L%P>pÈP>fQ>>þQ>F‘R>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?¬]?q–U?äON?ÊHG?ø~@?Xð9?çš3?±|-?Õ“'?Þ!?ôZ?}?xâ?Oê ?|?…z?øÿý>Yõ>‚ýì>áêä>¥Ý>j–Õ>ÞOÎ>ÄHÇ>ò~À>Sð¹>áš³>«|­>Г§>|Þ¡>ïZœ>x—>sâ‘>JêŒ>xˆ>€zƒ>ïÿ}>úXu>zýl>Ùêd>ž]>b–U>ÖON>¼HG>ê~@>Jð9>bV9>lÀ:>"<>ìo=>6¶>>bñ?>Ò!A>äGB>ðcC>PvD>WE>WF>ŸvG>zeH>2LI>+J>SK>CÒK>›L> ]M>‡N>ŒÍN>g|O>L%P>pÈP>fQ>>þQ>F‘R>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?¬]?q–U?äON?ÊHG?ø~@?Xð9?çš3?±|-?Õ“'?Þ!?ôZ?}?xâ?Oê ?|?…z?øÿý>Yõ>‚ýì>áêä>¥Ý>j–Õ>ÞOÎ>ÄHÇ>ò~À>Sð¹>áš³>«|­>Г§>|Þ¡>ïZœ>x—>sâ‘>JêŒ>xˆ>€zƒ>ïÿ}>úXu>zýl>Ùêd>ž]>b–U>ÖON>¼HG>ê~@>Jð9>bV9>lÀ:>"<>ìo=>6¶>>bñ?>Ò!A>äGB>ðcC>PvD>WE>WF>ŸvG>zeH>2LI>+J>SK>CÒK>›L> ]M>‡N>ŒÍN>g|O>L%P>pÈP>fQ>>þQ>F‘R>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_>Œ_>Ù¨_>´Ä_>œß_>šù_>¶`>smlib-0.12.2/unittests/lsdt.wav0000644000076500007650000000405411660562363015122 0ustar hanshansRIFF$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> §œ=€\=pü8>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Ý>ô²>8Äx>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ñå>¬ô¾>°†‹> ý>€Õ<èÔ=Pœh>ðË«>¬Ø>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Ž>€sZ<°Gî= ,t>Ì£°>‚°Û>Dhø>dy?ª;?šFë>ÁÆ>,E•>  4>`ÚG=°è¦=mS>”Ï¢>ŠMÑ>$ò>åš?I¯?\£ò>øÒ>smlib-0.12.2/unittests/lstd-unittest.pd0000644000076500007650000000066611710345157016606 0ustar hanshans#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; smlib-0.12.2/unittests/prevl-unittest.pd0000644000076500007650000000140211710345157016755 0ustar hanshans#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; smlib-0.12.2/unittests/prevl.wav0000644000076500007650000000405411660562363015304 0ustar hanshansRIFF$WAVEfmt D¬± data€>à> €>6à~>«~>¡á|>_ƒ{>>æy>¥ x> ñu>õ™s>úq>¿5n>ø)k>hãg>ßbd>@©`>w·\>‚ŽX>j/T>G›O>?ÓJ>ƒØE>Q¬@>öO;>ÈÄ5>) 0>‰'*>_$>0à>Š€>û>AQ >ê„>d/ù=ªë=+ÃÜ=}8Î=Bz¿=*Œ°=ïq¡=Y/’=7È‚=È€f=„7G=r¼'=s=Û Ð<«Þ<…ð!<ëì;¼»Øè]¼ÔË®¼Šwî¼Òó½"†6½ÒêU½ u½ýнu\™½–Œ¨½–’·½±jƽ3Õ½r‚ã½Ñºñ½Ã¶ÿ½d¹¾¹u ¾²¾§‚¾ýÏ ¾õ&¾…ð,¾°À2¾+d8¾Ù=¾}C¾¤4H¾¿M¾–ÇQ¾ûBV¾ÑˆZ¾˜^¾•ob¾‹f¾ýsi¾Ÿl¾o¾Cr¾‘ºt¾ãôv¾xñx¾Ò¯z¾/|¾&p}¾pq~¾3¾µ¾ûö¾öø¾ôº¾=¾I~¾í}¾3E|¾hÉz¾ìy¾.w¾¬ßt¾ókr¾ »o¾`Ïl¾í§i¾Ff¾¥ªb¾Ö^¾ÅÊZ¾JˆV¾-R¾ŽcM¾—ƒH¾€qC¾.>¾¼8¾e3¾ôM-¾0U'¾˜2!¾´ç¾v¾^ß ¾-%¾3I¾Pšò½•eä½Á÷Õ½pTǽL¸½|©½fNš½2úн€w½ÛÚW½@y8½‰é½.gò¼³¾²¼Óe¼–ÞË»½oÐ:·<{êŒvæ >j’>:>E|>ñ¶#>±È)>ÿ¯/>bk5>kù:>·X@>í‡E>Ã…J>øPO>ZèS>Ã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>cåO>‰ K>ç(F>½ÿ@>S¦;>6>(h0>7†*>¤y$>ôC>´æ>{c>é» >ªñ>Ý ú=å÷ë=ð§Ý=’ Ï=meÀ=/z±=”b¢=b"“=g½ƒ=ûnh=)I=ذ)=6 =#’Ô<¶Ò”<,Ü)<Ö¡';w+¬»gþU¼Êت¼«‡ê¼öý½Ø’4½•úS½V-s½¦‰½]j˜½ûœ§½²¥¶½Á€Å½q*Ô½Ÿâ½Ûð½àÚþ½{M¾ò ¾(§¾t¾:m ¾å”&¾ì’,¾Ïe2¾ 8¾b„=¾JÍB¾åG¾¾ËL¾Ê~Q¾wýU¾§FZ¾EY^¾N4b¾ÌÖe¾Õ?i¾nl¾/bo¾ør¾;•t¾ZÓv¾ÆÓx¾þ•z¾’|¾!^}¾Zc~¾û(¾Ó®¾Áô¾²ú¾§À¾­F¾âŒ~¾v“}¾¦Z|¾Àâz¾$,y¾=7w¾Šu¾—”r¾èo¾qÿl¾¢Ûi¾_}f¾}åb¾â_¾„ [¾dÍV¾’XR¾*¯M¾XÒH¾RÃC¾]ƒ>¾Ç9¾îu3¾8«-¾µ'¾ •!¾œL¾YݾßH¾Ô¾æ¶¾”yó½€Hå½ÞÖ½ÿ=ȽÔk¹½Pkª½2@›½Eºòx½®ÊY½1l:½ß½—Vö¼f±¶¼½m¼Ý·Û»r‘:Ã<)öˆ<´½È<ˆ)=-Ó#=ÝSC=º£b=wÝ€=ÛH=-Ÿ=œ¯®=a£½=½gÌ=ùÚ=†Sé=¹s÷=«>‰{ >­)>Ƴ>3>\U#>¯i)>©S/>Ï5>²¢:>í@>'7E>8J>vO>¡S>ÐX>‰6\>5/`>Öïc>}wg>GÅj>aØm>°p>Ks>*ªu>iËw>·®y>›S{>«¹|>Žà}>úÇ~>¶o>–×>‚ÿ>pç>e>x÷~>Î~>ž}>,²{>Ðz>íHx>ú6v>zçs>[q>3’n>Â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=¥+=× =smlib-0.12.2/unittests/threshold-unittest.pd0000644000076500007650000000143611710345157017630 0ustar hanshans#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; smlib-0.12.2/unittests/threshold.wav0000644000076500007650000000405411660562363016150 0ustar hanshansRIFF$WAVEfmt D¬± data€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?€?smlib-0.12.2/unittests/vabs-unittest.pd0000644000076500007650000000124111710345157016561 0ustar hanshans#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; smlib-0.12.2/unittests/vabs.wav0000644000076500007650000000405411660562363015107 0ustar hanshansRIFF$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?Z¥o?jïn?¿5n?[xm?A·l?uòk?ø)k?Ï]j?üi?ƒºh?hãg?¬g?U*f?eHe?ßbd?Éyc?$b?õœa?@©`?²_?Q·^? ¹]?w·\?\²[?Ò©Z?ÝY?‚ŽX?Ä{W?©eV?4LU?j/T?OS?èëQ?9ÅP?G›O?nN?­=M? L??ÓJ?D™I?$\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?eëR?é T?)U?ûBV?YW?©lX?p|Y?шZ?Ç‘[?P—\?f™]?˜^?+“_?ÒŠ`?÷~a?•ob?«\c?2Fd?),e?‹f?Tíf?‚Èg? h?ýsi?DDj?ák?ÓÙk?Ÿl?¤`m?~n?ŸØn?o?­Ap?“ðp?¶›q?Cr?¦ær?n†s?h"t?‘ºt?èNu?ißu?lv?ãôv?×yw?íúw?#xx?xñx?éfy?tØy?Fz?Ò¯z?¢{?…w{?{Õ{?/|?—…|?»×|?ë%}?&p}?l¶}?»ø}?7~?pq~?Õ§~??Ú~?­?3?•Y? |?‡š?µ?€Ë?þÝ?|ì?ûö?yý?øÿ?wþ?öø?uï?ôá?tÐ?ôº?v¡?ùƒ?~b?=??æ~?±´~?I~?æE~?‹~?8Ç}?í}?­8}?wë|?Nš|?3E|?&ì{?*{??.{?hÉz?¦`z?úóy?fƒy?ìy?Ž–x?Nx?-šw?.w?SŽv?v?su?¬ßt?uHt?m­s?–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?M°X?ûW?JˆV??oU?ÞRT?,3S?-R?æéP?\ÀO?’“N?ŽcM?T0L?êùJ?TÀI?—ƒH?·CG?»F?§ºD?€qC?K%B? Ö@?̃??.>?VÖªë>+ÃÜ>}8Î>Bz¿>*Œ°>ïq¡>Y/’>7È‚>È€f>„7G>r¼'>s>Û Ð=«Þ=…ð!=ëì<¼¼Øè]½ÔË®½Šwî½Òó¾"†6¾ÒêU¾ u¾ýоu\™¾–Œ¨¾–’·¾±jƾ3Õ¾r‚ã¾Ñºñ¾Ã¶ÿ¾d¹¿¹u ¿²¿§‚¿ýÏ ¿õ&¿…ð,¿°À2¿+d8¿Ù=¿@¿@¿@¿@¿@¿@¿@¿@¿@¿@¿@¿@¿@¿@¿@¿@¿@¿@¿@¿@¿@¿@¿@¿@¿@¿@¿@¿@¿@¿@¿@¿@¿@¿@¿@¿@¿@¿@¿@¿@¿@¿@¿@¿@¿@¿@¿.>¿¼8¿e3¿ôM-¿0U'¿˜2!¿´ç¿v¿^ß ¿-%¿3I¿Pšò¾•eä¾Á÷Õ¾pTǾL¸¾|©¾fNš¾2úо€w¾ÛÚW¾@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 >#’Ô=¶Ò”=,Ü)=Ö¡'¿Ç9¿îu3¿8«-¿µ'¿ •!¿œL¿YÝ¿ßH¿Ô¿æ¶¿”yó¾€Hå¾ÞÖ¾ÿ=ȾÔk¹¾Pkª¾2@›¾Eºòx¾®ÊY¾1l:¾ß¾—Vö½f±¶½½m½Ý·Û¼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=—VG<¥Qœ¼ÁN½–妽“—æ½ö¾aŸ2¾% R¾g@q¾-ˆ¾!x—¾7­¦¾¢¸µ¾¡–ľ{CÓ¾…»á¾!ûï¾Àþý¾pá¿¢ ¿y?¿¸¿O ¿‚4&¿(5,¿Â 2¿Ú³7¿/=¿@¿@¿@¿@¿@¿@¿@¿@¿@¿@¿@¿@¿@¿@¿@¿@¿@¿@¿@¿@¿@¿@¿@¿@¿@¿@¿@¿@¿@¿@¿@¿@¿smlib-0.12.2/unittests/vcog-unittest.pd0000644000076500007650000000114711710345157016571 0ustar hanshans#N canvas 407 51 741 577 10; #X obj 52 241 testtools/unit-test-frame; #X obj 52 176 loadbang; #X msg 52 207 vcog 0; #X obj 373 180 smlib/vcog; #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 text 44 39 'vcog computes the center of gravity of a list of floats' ; #X obj 373 212 / 3.3; #X connect 0 2 5 0; #X connect 1 0 2 0; #X connect 2 0 0 0; #X connect 3 0 10 0; #X connect 4 0 3 0; #X connect 5 0 4 0; #X connect 5 1 6 0; #X connect 5 2 7 0; #X connect 5 3 8 0; #X connect 6 0 4 1; #X connect 7 0 4 2; #X connect 8 0 4 3; #X connect 10 0 0 1; smlib-0.12.2/unittests/vcog.wav0000644000076500007650000000405411660562363015112 0ustar hanshansRIFF$WAVEfmt D¬± dataýJ?/ºh?!¥]?û|W?ü‘S?šÛP?bÞN?ýXM?%L?³,K?_J?l²I?RI? H? 2H?üÐG?{G?V.G?†éF?l«F?sF?É?F?×F?¸åE?ü½E??™E?/wE?‚WE?û9E?fE?ŽE?PìD?‚ÕD?ÀD?ëD?™˜D?w†D?EuD?òdD?nUD?¨FD?–8D?(+D?VD?D?WD?ûC?SðC?ýåC?ÜC?ƒÒC?TÉC?~ÀC?ú·C?ůC?Ú§C?6 C?Õ˜C?´‘C?ΊC?"„C?¬}C?kwC?\qC?{kC?ÈeC?@`C?âZC?«UC?šPC?®KC?äFC?;BC?²=C?H9C?ü4C?Ì0C?·,C?½(C?Ý$C?!C?cC?ÈC?DC?ÔC?yC?0 C?ýC?ÚC?ÉC?ÊÿB?ÛüB?ýùB?-÷B?nôB?»ñB?ïB?‚ìB?ùéB?~çB?åB?¬âB?VàB? ÞB?ÊÛB?”ÙB?i×B?HÕB?1ÓB?$ÑB?!ÏB?&ÍB?4ËB?KÉB?jÇB?“ÅB?ÁÃB?ùÁB?9ÀB?€¾B?μB?"»B?}¹B?á·B?J¶B?º´B?/³B?«±B?.°B?¶®B?D­B?׫B?oªB? ©B?±§B?Z¦B?¥B?¸£B?q¢B?,¡B?ìŸB?±žB?zB?HœB?›B?ð™B?ɘB?§—B?‰–B?n•B?W”B?E“B?6’B?(‘B? B?B?ŽB?B?ŒB?'‹B?3ŠB?@‰B?PˆB?e‡B?{†B?•…B?±„B?σB?ò‚B?‚B?;B?f€B?B?¾~B?ï}B?!}B?X|B?{B?ÈzB?zB?ByB?‚xB?ÅwB?wB?PvB?—uB?âtB?.tB?|sB?ÌrB?rB?rqB?ÇpB?pB?woB?ÒnB?-nB?‹mB?ëlB?LlB?°kB?kB?yjB?áiB?IiB?³hB?hB?ŒgB?ûfB?kfB?ÜeB?NeB?ÂdB?7dB?®cB?%cB?žbB?bB?•aB?aB?`B?`B?Ž_B?_B?’^B?^B?›]B? ]B?§\B?/\B?¸[B?B[B?ÍZB?YZB?æYB?sYB?YB?‘XB?#XB?µWB?GWB?ÚVB?pVB?VB?šUB?2UB?ÊTB?bTB?üSB?–SB?0SB?ÍRB?iRB?RB?¥QB?DQB?ãPB?…PB?&PB?ÇOB?kOB?OB?²NB?WNB?üMB?¢MB?JMB?ðLB?™LB?BLB?ìKB?–KB?AKB?ìJB?—JB?EJB?òIB? IB?MIB?üHB?¬HB?\HB? HB?½GB?pGB?"GB?ÕFB?ˆFB?B?¬>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?smlib-0.12.2/unittests/vdbtorms-unittest.pd0000644000076500007650000000120111710345157017462 0ustar hanshans#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; smlib-0.12.2/unittests/vdbtorms.wav0000644000076500007650000000405411660562363016014 0ustar hanshansRIFF$WAVEfmt D¬± datac–+7P}/7õz37Õ77x¼;7h@73_D7iÖH7ŸgM7kR7jÚV77½[7w¼`7ÎØe7æk7lkp7ãu7Šz{7H™€7ñ…ƒ7 ƒ†7¹’‰7¡³Œ7Àæ7,“7K…–7“ñ™7Éq7`¡7ϯ¤7n¨7C¬7ø-°7¡/´7œH¸7sy¼7°ÂÀ7à$Å7• É7d6Î7äæÒ7±²×7jšÜ7²žá7.Àæ7‰ÿë7p]ñ7–Úö7°wü7¼8W 8 86 8DA 8›w8¥À8Ð8ŠŒ8F8x¨!8–U%8)8…ð,8Qß08å4898-7=8º„A8TëE8ŒkJ8ùO81»S8Ó‹X8|x]8Ðb8v¨g8íl8hPr8Ów8Õu}8²œ8A„8ù’‡8>¨Š8uÏ8 ‘8aU”8î´—8(›8c¯ž83K¢8ü¥8T©8œž­8]‘±8›µ8[¼¹8¦õ½8ˆGÂ8²Æ8P7Ë8_ÖÏ8UÔ8ÎeÙ8mWÞ8Óeã8©‘è8™Ûí8TDó8ŒÌø8ùtþ8+9²9s9Ò3 96^9›9³ê9¤M9MÄ9 O9’î"9£&97m*9aM.9D29ëQ69Sw:9Þ´>9 C9”zG9áL9–§P9NfU9¦@Z9>7_9»Jd9Æ{i9 Ën969t9Çy9u9(¢‚9©š…9v¤ˆ9ò¿‹9†íŽ9š-’9›€•9õæ˜9aœ9~ïŸ9–’£9ÚJ§9Å«9×ü®9÷²9s ·93»9×t¿9pÏÃ9bCÈ9?ÑÌ9¡yÑ9=Ö9ZÛ9ñà9Š0å9Îfê9j»ï9/õ9oÂú9#;:¨%:'!:. : L :g}:ÀÀ::à€:…þ:} :>7$:Aó':Å+:ý¬/:·«3:³Á7:yï;:’5@:Œ”D:ù I:mŸM:~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=;M¹A;!F;‹¢J;7>O;·ôS;§ÆX;§´];Z¿b;fçg;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?RÚU?M·Z?˜°_?ØÆd?´úi?ÛLo?û½t?ÊNz?smlib-0.12.2/unittests/vdelta-unittest.pd0000644000076500007650000000137111710345157017111 0ustar hanshans#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; smlib-0.12.2/unittests/vdelta.wav0000644000076500007650000000405411660562363015433 0ustar hanshansRIFF$WAVEfmt D¬± data~]ë¾ËJ<½$ÔÓ>8 ¾ÚÙt¿|áý«]\?é’¾Œç¿ k½Ë6?I0¾ì5¬>¾Ä =Týš¾§Î=Fóo?Òõ¿=ŒôW¿^ø>¢/-?ŒŠ=Þ¿ÄÒO>ì7S¾ˆù¨¼¸>>Pv}½:?f¿•2¸½è8O?ð%оXD¿Íœ½µf0?3k¾ˆ““=@ì;˜Ñ„½p±ÅäV?7ê«=~gA¿©ï€>ð<‚=€aÐ;°mj½ Iœ<8ME¿`×½L’1?Ãl¾|e¿–·½N‰N?ß°‰¾¹J¾¤-¢¼\s6>xDs½¸.?tÆ‹=B?¿®©Q>Ÿ{o?–¿=܈W¿“°>v"¨>ø=8R—¾ôÂÉ=®£¿°Òm½„Æ?^2¾ °t¿ Àý 8\?Ð’¾æŠç¾ë;9½icÐ>ñì ¾`+ï>æU?=£@×¾n€>¾þt?þþÃ=Þ~\¿?ÿ’>y(?Á@h=l¤¿’0.>îE°¾¾ ½V¥ž>‡Ó½fp¿±QÀ½æ[X?E=¾»£+¿ÉO‰½Ây?®÷M¾²[> ¯ˆ¯B? ¿›=”7/¿pŸi>(礽 켨i”=0âżÄõX¿i‘­½–CC?-‚¾ÌÕU¿q«½žs@?M€¾€Ça½Ÿ´»3K=°w‡¼$–F?ƒÞž=Tº2¿ÆMn>h´d?ºö¶=ÕM¿ 9‰> 6B>€^›ÂÚĽÕ\?ˆ”p=ŒS¿fo4>Xt?­šÃ=\¿´’>¦³ã>R)6=|î̾þž>tôò¾*]B½Ï¨Ú>àž¸u¿”Ľ¥›\?o“¾|f¿Çpe½p?–,¾fR´>ìA=(J¢¾âbØ="Ôp?µ©À=ì¾X¿H>b*?Nˆ=X¿vL>Ì(d¾‡¶¼èWM>H刽”·g¿ª_¹½Ÿ‹P?À‹¾ÐZA¿¯š½ï.?”h¾p7¶=øÅ<°þ£½è¨Ú<¿÷Y?Ì_®=Æ+D¿ÚÇ‚>‰ÂT?;5ª=á{?¿ØO> ?=Ú˜;`õ+½ Ge<ÛG¿w⟽ÆÞ3?³Óo¾èc¿HS¶½±M?v¾ˆ¾L¯9¾@Œ”¼Ä'>\Ò^½c¾1?é1Ž=&ø¿ÞJU>ê}n?"˾=…¤V¿Z>‚ñŸ>Ðèÿ<öò¾šî¿=ö¿ŠQs½ÞÝ?(}6¾¼Mt¿cqýß[? •’¾Ö×ß¾3½tuÉ>NN¾ª¸ö>ˆ`E=š Þ¾f>Æ9u?8.Ä=ÿ³\¿«"“>ž¡ ?1œb=¶ïþ¾$õ)>@[¸¾2|½ºë¥>L:ݽR=q¿ÜýÀ½–Y?e¾¾Ÿ(¿Ά½Û§?&5J¾pšl>\H½9@?a›™=ÍÎ,¿if>„ǽàœ¼€³=Hkï¼\õZ¿°*¯½E?`ƒ¾«S¿šU©½M€>?h~¾ðU½ #z»À³ =@š;¼I?6ã =œÿ4¿ÑTq>;c?0¬µ=´aL¿#Aˆ>À$1>·<àm¾€’T=8<3¿`c½ÌO!?W¾â÷m¿è_¾½ä+V?îÇŽ¾.Ô›¾|Sù¼ö>Œ>œþº½ Æ?­ v=re ¿B‡8>9t?.DÃ=²¬[¿"s’>Š÷Û><ù/=bøÅ¾îú>îwú¾ò_H½ïká>öG¾ëOu¿ð?ĽìÇ\?ô/“¾êÙ ¿Ã_½r»û>LÒ'¾h`¼>ˆ³=ø‰©¾J â=¬¡q?#NÁ=çwY¿›ú>{ë&?/‰…=U:¿ÈMH>Tu¾Üļ˜†\>f“½Yi¿á}º½œÍQ?iÞ‹¾Ç¥>¿Ÿ„˜½4•+?ïÆd¾ÀÌØ=˜p-<°ýp=”î[?ò¯=QðE¿Œõƒ>:R?•r¨=è€=¿à«|>0ó<àŒB;`ÞÚ¼ é<éXJ¿»à¡½Ñ6?Ñr¾ÍAb¿qµ½Ÿ¡K?Á‡¾¤–(¾èÞ†¼Èº>`NJ½s¶4?õ‘=4¤"¿òÚX>mm?Ýð½=÷®U¿¥tŽ>º³—>(¹ò<(ˆˆ¾à ¶= v¿á¼x½>ê ?©:¾Ð×s¿ ýnu[?JN’¾ÔؾÞÛ,½XwÂ>椾*2þ>V[K=¿Æä¾€„>$au?¶MÄ=l×\¿H:“>h ?rå\= ‚ø¾¬%>ÊaÀ¾Ôç½Î$­>ÀÛæ½,r¿ŠšÁ½ÛÍY?è3‘¾þQ%¿˜A„½ËÉ?fbF¾To}>x¿ÊƒE=?Ïj—=(X*¿8 c>ê½Ø@;¼ð¨Ò=¤p ½bã\¿èµ°½¥ÌF?nˆ„¾:oQ¿/Œ§½´}Öga?S´=tÝJ¿N>‡>( > €<¤¾0@=-6¿¦½‘½Zõ#?yœZ¾‚Ýl¿~½½Á-U?F“¾smlib-0.12.2/unittests/vfmod-unittest.pd0000644000076500007650000000136211710345157016745 0ustar hanshans#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; smlib-0.12.2/unittests/vfmod.wav0000644000076500007650000000405411660562363015267 0ustar hanshansRIFF$WAVEfmt D¬± data€>ø>à>¸>€>8>à~>x~>,~>Dx}>hà|>˜8|>Ø€{>,¹z>áy>úx>¬x>hûv>Häu>L½t>„†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>lá5>Ý2>ÔÉ/>à§,>ð7&> ê"> >°">T©>”!>|‹>$ç >4 >Ôs>¥>@ý=ˆºõ=Éí=¸»å=à’Ý=NÕ=èîÌ=tÄ= Þ»=H-³= aª=P{¡=xz˜=@_=È)†=p´y=páf=ÐÚS=à @=ð3-=@”=@Â= |ã<`»< A’<!R<€÷ý;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õƒ<ë쾬>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¿¶$;¿œ€<¿Ù=¿‹/?¿Š»€Cé»@ßG¼À,¼À¶¼àÞ¼@J½"½pÈ*½°;>½ð{Q½ðˆd½`bw½ø…½°<޽([—½H_ ½àH©½Ø²½̺½Heý€ã˽ˆFÔ½8ŽÜ½€ºä½0Ëì½(Àô½X™ü½H+¾Üû¾T¾ ¾¬r ¾È¾¤°¾,:¾Pµ¾"¾D€"¾ôÏ%¾)¾„C,¾Lg/¾P|2¾‚5¾øy8¾|b;¾<>¾´A¾LÂC¾ØnF¾L I¾˜šK¾¸N¾ ‰P¾DêR¾ ;U¾¤}W¾L°Y¾ŒÓ[¾\ç]¾´ë_¾Œàa¾àÅc¾¤›e¾Ðag¾\i¾H¿j¾ˆVl¾Þm¾ìUo¾¾p¾\r¾ì^s¾¬—t¾˜Àu¾°Ùv¾ìâw¾HÜx¾ÀÅy¾TŸz¾üh{¾´"|¾|Ì|¾Tf}¾4ð}¾j~¾ Ô~¾.¾øw¾ð±¾ìÛ¾äõ¾àÿ¾Üù¾Øã¾Ô½¾Ð‡¾ÐA¾Ðë~¾Ø…~¾ä~¾ø‰}¾ô|¾@N|¾x˜{¾ÄÒz¾$ýy¾˜y¾,"x¾àw¾´v¾´ât¾Ü­s¾8ir¾Ìq¾˜°o¾¨¾œ<¾È39¾@6¾€=3¾ ,0¾ -¾,Ý)¾´Ÿ&¾œS#¾üø¾Ø¾D¾L’¾üý¾d[¾”ª ¾˜ë¾€¾¸†þ½x´ö½`Æî½ˆ¼æ½—Þ½(VÖ½èùͽh‚ŽØï¼½PB´½øy«½ð–¢½`™™½h½0O‡½À|½ 9i½à8V½@C½ ž/½@½p9½àvè¼`À¼àT—¼`\¼ÀR ¼ V»Ìƒ?¿.>¿VÖ<¿+{;¿:¿¼8¿,X7¿jñ5¿Ñ‡4¿e3¿-¬1¿.:0¿oÅ.¿ôM-¿ÄÓ+¿åV*¿\×(¿smlib-0.12.2/unittests/vftom-unittest.pd0000644000076500007650000000053511710345157016766 0ustar hanshans#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; smlib-0.12.2/unittests/vftom.wav0000644000076500007650000000405411660562363015307 0ustar hanshansRIFF$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?GóA?„'B?[B?jB?ÃB?öB?Ú)C?ö\C?âC? ÂC?0õC?‘'D?ÅYD?Ì‹D?¦½D?RïD?Ò E?'RE?PƒE?M´E?åE?ÆF?BFF?•vF?½¦F?»ÖF?‘G?<6G?¿eG?•G?LÄG?VóG?8"H?òPH?†H?ò­H?8ÜH?W I?P8I?"fI?Ï“I?WÁI?¹î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?3„N?Ú­N?b×N?ÊO?*O?>SO?K|O?8¥O?ÎO?»öO?NP?ÅGP?pP?Z˜P?xÀP?zèP?^Q?(8Q?Ó_Q?b‡Q?Õ®Q?-ÖQ?hýQ?ˆ$R?‹KR?urR?B™R?õ¿R?‹æR? S?j3S?²YS?ÞS?ò¥S?êËS?ÈñS?T?8=T?ÊbT?BˆT?¢­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?HãX?ÕY?K(Y?­JY?úlY?2Y?S±Y?`ÓY?XõY?;Z? 9Z?ÅZZ?j|Z?ûZ?x¿Z?âà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?V¼a?ÊÙa?.÷a?ƒb?Ê1b?Ob?&lb?>‰b?F¦b?@Ãb?*àb?ýb?Ðc?6c?;Sc?Úoc?kŒc?í¨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?smlib-0.12.2/unittests/vlavg-unittest.pd0000644000076500007650000000132111710345157016744 0ustar hanshans#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; smlib-0.12.2/unittests/vlavg.wav0000644000076500007650000000405411660562363015273 0ustar hanshansRIFF$WAVEfmt D¬± data&‰½Þv½|¾Quì½d=¾²â)¾xÎq¾ÝY¾nó¾jô¾7Ú¦¾‰n•¾bÀº¾š§¾BÈ̾)ý¶¾àݾ¤Nž»ë¾‚!Ò¾Þßø¾bݾM¿,°ç¾¿/šð¾^ ¿:bø¾j¿¸ÿ¾”¿dl¿§¿(Õ¿Ÿ¿ п"¿kd¿UÌ¿"™ ¿…¿št ¿¿Íü ¿ž¿N7 ¿=é¿Q) ¿Ãê¿°× ¿œ§¿ôF ¿a$¿V{ ¿]e¿Èx¿‘n¿øB¿¹C¿TÝ¿Qè¿K¿š_¿)¿œ¬¿i¬¿-Ò¿ÕJý¾ðÒ¿4ùø¾]±¿xhô¾Ào¿Úœï¾> ¿Lšê¾Ø” ¿{då¾lÿ¿×þß¾¸Q¿“lÚ¾\¿¬°Ô¾ºgÿ¾ìÍξKù¾íÆÈ¾Žó¾žÂ¾zlí¾¿U¼¾Ý*ç¾ðïµ¾[Ëྩn¯¾õOÚ¾ÁÓ¨¾‰ºÓ¾ï ¢¾Õ ;ÍW›¾yHƾÚy”¾ún¿¾zˆ¾Â¸¾û„†¾#‚±¾%á~¾Yqª¾Ç˜p¾ŠP£¾ø2b¾É œ¾±±S¾㔾ÈE¾`˜¾öc6¾†A†¾Ôš'¾°¾}¾à¼¾1ån¾€Ë ¾ù÷_¾õ½[øP¾1g×½‘çA¾Ó¹½ÂÆ2¾¹š½—#¾zox½NY¾©9;½˜¾¨û¼|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?[?Só5? Z ?îñ9?ŸX$?¡ð=?MW(?jïA?V,?HîE?ëT0?9íI?ØS4?<ìM?ØR8?PëQ?éQÆ ?÷¦°>ÄØã>­„>‚ß·>^8>Ca>0ÁÛ=¸DT>ðÇ%=CÖ>F©ª¼†¢=Š«½Dv¼c*`=ü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(?ZüA?À`,?ZúE?â^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?â©¥>ÝØ>lþv>g²®>&a)>Äã‡>„Ä=$oH>'=)ð>œÜ¼ŸÌ•=·ä¤½< Ÿ<^¤¾Òïñ¼g2¾R˜½è\¾Cë½,怾ôe¾‚û‘¾ =¾Ôb¡¾C_\¾í8¯¾u x¾¬˜»¾zeˆ¾"›Æ¾ðg“¾´Wо‚$¾4䨾±¥¾Uà¾Î!­¾½æ¾å‰³¾3.ì¾û¸¾Þ¸ð¾¬…½¾‡lô¾U9Á¾“W÷¾a$ľr‡ù¾@Tƾ­û¾{ÕǾöæû¾Ä³È¾6-ü¾úȾø¾ÍÌľð¾Í̼¾è¾ÍÌ´¾à¾Í̬¾Ø¾Í̤¾Ð¾ÍÌœ¾È¾ÍÌ”¾À¾ÍÌŒ¾¸¾ÍÌ„¾°¾š™y¾¨¾š™i¾ ¾š™Y¾˜¾š™I¾¾š™9¾ˆ¾š™)¾€¾š™¾p¾š™ ¾`¾33ó½P¾33Ó½@¾33³½0¾33“½ ¾fff½¾ff&½¾ÌÌ̼མ™¼À½ÐÌÌ; ½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?5ŽG=ò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?PáM?‡G8? áQ?ZG5ŽG=ò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?PáM?‡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ãÞ=ÜãÞ=àãÞ=smlib-0.12.2/unittests/vmax-unittest.pd0000644000076500007650000000103311710345157016600 0ustar hanshans#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; smlib-0.12.2/unittests/vmax.wav0000644000076500007650000000405411660562364015130 0ustar hanshansRIFF$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?{?€{?|?€|?}?€}?~?€~??€?€?@€?€€?smlib-0.12.2/unittests/vmin-unittest.pd0000644000076500007650000000103311710345157016576 0ustar hanshans#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; smlib-0.12.2/unittests/vmin.wav0000644000076500007650000000405411660562364015126 0ustar hanshansRIFF$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?{?€{?|?€|?}?€}?~?€~??€?smlib-0.12.2/unittests/vmtof-unittest.pd0000644000076500007650000000067411710345157016772 0ustar hanshans#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; smlib-0.12.2/unittests/vmtof.wav0000644000076500007650000000405411660562363015307 0ustar hanshansRIFF$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?>€?smlib-0.12.2/unittests/vpow-unittest.pd0000644000076500007650000000075511710345157016632 0ustar hanshans#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; smlib-0.12.2/unittests/vpow.wav0000644000076500007650000000405411660562363015147 0ustar hanshansRIFF$WAVEfmt D¬± datað7< ª?€< ?Ø}­<î?ýD×<µÿ?”|þ<`q?rã=ïâ?ÌÄ#=cT?ó5=ºÅ?Ö¼E=÷6?5ÿU=¨?Ú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?DÁB>„0?…[E>!ý0?ÛòG>§i1?V‡J>Ö1?M>rB2?û§O>¶®2?B4R>å3?é½T>ý†3?ýDW>ó3?‹ÉY>î^4? K\>ÆÊ4?GË^>ˆ65?ŒHa>5¢5?{Ãc>Í 6?Py6?²h>½ä6?©&k>P7?¦˜m>Z»7?~p>ˆ&8?¢‘8?éát>¨ü8?ŒKw>˜g9?/³y>uÒ9?Ú|><=:?”|~>ð§:?3o€>;?+Ÿ>};?6΂>ç;?Xüƒ>òQ{&=?i‡>¢=?¬ˆ>µú=?ÍÕ‰>´d>?¼þŠ>ŸÎ>?Ù&Œ>w8??&N>;¢??¦tŽ>ì @?[š>Šu@?I¿>ß@?rã‘>‹HA?Ø“>ï±A?~)”>@B?fK•>}„B?“l–>¨íB?—>ÀVC?Ƭ˜>Å¿C?ÏË™>·(D?'êš>–‘D?Μ>cúD?Ç$>cE?Až>ÅËE?¹\Ÿ>[4F?µw >ÞœF? ’¡>NG?½«¢>­mG?ÌÄ£>ùÕG?;ݤ>3>H? õ¥>[¦H?? §>qI?Ø"¨>uvI?×8©>gÞI?>Nª>GFJ?c«>®J?Jw¬>ÓK?óŠ­>~}K? ž®>åK?‘°¯> LL?‰Â°>´L?ôÓ±>{M?Óä²>Ï‚M?(õ³>êM?óµ>CQN?7¶>c¸N?ô"·>rO?,1¸>p†O?á>¹>\íO?Lº>8TP?ÃX»>»P?òd¼>½!Q?£p½>fˆQ?×{¾>ÿîQ?†¿>‡UR?ÈÀ>þ»R?ˆšÁ>d"S?Ï£Â>ºˆS?ž¬Ã>ïS?õ´Ä>5UT?Ö¼Å>Z»T?BÄÆ>n!U?:ËÇ>r‡U?¿ÑÈ>fíU?Ñ×É>ISV?sÝÊ>¹V?¤âË>àW?eçÌ>”„W?¸ëÍ>7êW?žïÎ>ÊOX?óÏ>NµX?$öÐ>ÂY?ÇøÑ>&€Y?ÿúÒ>zåY?ÎüÓ>¾JZ?5þÔ>ó¯Z?5ÿÕ>[?ÍÿÖ>.z[?Ø>4ß[?ÎÿØ>+D\?7ÿÙ>©\?<þÚ>ê ]?ßüÛ>²r]? ûÜ>l×]?ÿøÝ><^?~öÞ>± ^?œóß><_?\ðà>¹i_?½ìá>'Î_?Àèâ>…2`?fäã>Õ–`?°ßä>û`?Úå>G_a?0Õæ>jÃa?hÏç>~'b?FÉè>„‹b?ÊÂé>zïb?ö»ê>bSc?Ê´ë><·c?G­ì>d?m¥í>Ã~d?<î>pâd?¶”ï>Fe?Û‹ð>¡©e?«‚ñ># f?'yò>—pf?Poó>ýÓf?&eô>U7g?ªZõ>žšg?ÜOö>Ùýg?¼D÷>ah?L9ø>%Äh?Œ-ù>6'i?|!ú>9Ši?û>.íi?nü>Pj?rûü>î²j?(îý>¹k?‘àþ>vxk?­Òÿ>&Ûk??b?Ç=l?Û?[ l?S?âm?Ì?[em?fD?ÆÇm?’¼?#*n?š4?sŒn?}¬?¶în?<$?ëPo?×›?³o?N?-p?¢Š?9wp?Ñ?9Ùp?Þx?+;q?Çï?q?Žf?èþq?1Ý?³`r?³S?pÂr?Ê?!$s?N@ ?Ä…s?i¶ ?Zçs?c, ?ãHt?:¢ ?`ªt?ñ ?Ï u?† ?1mu?ú ?‡Îu?Mx ?Ð/v?€í ? ‘v?’b ?;òv?…× ?]Sw?VL?s´w?Á?|x?›5?xvx? ª?h×x?`?K8y?”’?"™y?©?ìùy?Ÿz?©Zz?vî?Z»z?/b?ÿ{?ÉÕ?—|{?DI?#Ý{?¢¼?£=|?â/?ž|?£?}þ|??Ø^}?îˆ?'¿}?·û?i~?cn? ~?ñà?Êß~?cS?è??¸Å?úŸ?ð7?Ø}­?smlib-0.12.2/unittests/vrms-unittest.pd0000644000076500007650000000103511710345157016616 0ustar hanshans#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; smlib-0.12.2/unittests/vrms.wav0000644000076500007650000000405411660562363015143 0ustar hanshansRIFF$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?M¾5?B56?C¬6?P#7?iš7?Ž8?¿ˆ8?ûÿ8?Cw9?—î9?öe:?aÝ:?×T;?XÌ;?äC?Gš>???î‰??Ñ@?¾y@?µñ@?¸iA?ÄáA?ÚYB?ûÑB?$JC?ZÂC?—:D?ß²D?1+E?£E?òF?`”F?Ø G?Z…G?äýG?xvH?ïH?»gI?kàI?"YJ?äÑJ?®JK?€ÃK?\¸²?ȶ ?a?™?q ?í ? †#?$&?A|(?Íš*?Š,?¼Q.?–÷/?R€1?³ï2?ÌH4?*Ž5?ïÁ6?êå7?¦û8?v:?;?Ãó;?#Ü??a??)@?ûé@?£¤A?\YB?†C?t²C?wWD?Ó÷D?Ê“E?˜+F?v¿F?“OG?#ÜG?OeH?AëH?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?sýT?ÜIU?A•U?¬ßU?)V?£qV?=¹V?óÿV?ÍEW?ÌŠW?øÎW?VX?êTX?º–X?È×X?Y?´WY?›–Y?ÑÔY?[Z?=OZ?z‹Z?Ç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?z£c?%Ëc?Šòc?ªd?…@d?gd?rd?…³d?XÙd?êþd??$e?TIe?,ne?È’e?(·e?LÛe?6ÿe?æ"f?]Ff?œif?¤Œf?v¯f?Òf?tôf?¥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?Ašl?Ì´l?6Ïl?€él?­m?ºm?©7m?zQm?-km?Äm?;žm?–·m?ÓÐm?öém?ûn?än?²4n?dMn?ûen?w~n?Ø–n?¯n?JÇn?\ßn?S÷n?2o?ö&o?¡>o?3Vo?­mo?…o?Vœo?…³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>u‹s>sÉq>˜p>[n>ï®l>t k>¿mi>ýØg>TLf>ðÇd>üKc>¡Øa> n`>d _>׳]>d\>·[>wâY>û¯X>m‡W>õhV>»TU>êJT>§KS>WR>cmQ>­ŽP>»O>ÊòN>à5N>{„M>·ÞL>³DL>ˆ¶K>O4K>¾J>TJ>0öI>’¤I>F_I>Y&I>ÕùH>ÁÙH>#ÆH>¿H>ZÄH>.ÖH>{ôH>9I>`VI>ç™I>ÂéI>âEJ>6®J>«"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>D“z>Õ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?Tö6?smlib-0.12.2/unittests/vsum-unittest.pd0000644000076500007650000000074111710345157016624 0ustar hanshans#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; smlib-0.12.2/unittests/vsum.wav0000644000076500007650000000405411660562363015146 0ustar hanshansRIFF$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?{?€{?|?€|?}?€}?~?€~??€?smlib-0.12.2/unittests/vvconv-unittest.pd0000644000076500007650000000066711710345157017162 0ustar hanshans#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; smlib-0.12.2/unittests/vvconv.wav0000644000076500007650000000405411660562363015475 0ustar hanshansRIFF$WAVEfmt D¬± data€¼Ô6è;¼Ô6h<ƒÁ¼)®<½Ô6è<…B!½D"=ƒA½).=‡Ãa½ù/K=½Ô6h=E"‘½×ž‚=…B¡½D"‘=Æb±½²¥Ÿ=ƒÁ½)®=G£Ñ½Œ¬¼=‡Ãá½ù/Ë=Èãñ½g³Ù=¾Ô6è=$ ¾@ºö=E"¾×ž>e2¾Žà >…B!¾D">¥R)¾ûc>Æb1¾²¥>ær9¾hç&>ƒA¾).>&“I¾Õj5>G£Q¾Œ¬<>g³Y¾CîC>‡Ãa¾ù/K>§Ói¾°qR>Èãq¾g³Y>èóy¾õ`>¾Ô6h> …¾Šxo>$‰¾@ºv>4¾÷û}>E"‘¾×ž‚>U*•¾³?†>e2™¾Žà‰>u:¾i>…B¡¾D"‘>•J¥¾Ô>¥R©¾ûc˜>µZ­¾Öœ>Æb±¾²¥Ÿ>Öjµ¾F£>ær¹¾hç¦>öz½¾Dˆª>ƒÁ¾)®>‹Å¾úɱ>&“ɾÕ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!?Öj5¿F#?Þn7¿û%?ær9¿hç&?îv;¿Ö·(?öz=¿Dˆ*?þ~?¿±X,?ƒA¿).?‡C¿Œù/?‹E¿úÉ1?G¿gš3?&“I¿Õj5?.—K¿C;7?6›M¿° 9?>ŸO¿Ü:?G£Q¿Œ¬?W«U¿hM@?_¯W¿ÕB?g³Y¿CîC?o·[¿°¾E?w»]¿G?¿_¿Œ_I?‡Ãa¿ù/K?Çc¿gM?—Ëe¿ÔÐN?ŸÏg¿B¡P?§Ói¿°qR?¯×k¿BT?·Ûm¿‹V?¿ßo¿øâW?Èãq¿g³Y?Ðçs¿Ôƒ[?Øëu¿BT]?àïw¿°$_?èóy¿õ`?ð÷{¿‹Åb?øû}¿ø•d?€¿fff?€¼Ô6è;¼Ô6h<ƒÁ¼)®<½Ô6è<…B!½D"=ƒA½).=‡Ãa½ù/K=½Ô6h=E"‘½×ž‚=…B¡½D"‘=Æb±½²¥Ÿ=ƒÁ½)®=G£Ñ½Œ¬¼=‡Ãá½ù/Ë=Èãñ½g³Ù=¾Ô6è=$ ¾@ºö=E"¾×ž>e2¾Žà >…B!¾D">¥R)¾ûc>Æb1¾²¥>ær9¾hç&>ƒA¾).>&“I¾Õj5>G£Q¾Œ¬<>g³Y¾CîC>‡Ãa¾ù/K>§Ói¾°qR>Èãq¾g³Y>èóy¾õ`>¾Ô6h> …¾Šxo>$‰¾@ºv>4¾÷û}>E"‘¾×ž‚>U*•¾³?†>e2™¾Žà‰>u:¾i>…B¡¾D"‘>•J¥¾Ô>¥R©¾ûc˜>µZ­¾Öœ>Æb±¾²¥Ÿ>Öjµ¾F£>ær¹¾hç¦>öz½¾Dˆª>ƒÁ¾)®>‹Å¾úɱ>&“ɾÕ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!?Öj5¿F#?Þn7¿û%?ær9¿hç&?îv;¿Ö·(?öz=¿Dˆ*?þ~?¿±X,?ƒA¿).?‡C¿Œù/?‹E¿úÉ1?G¿gš3?&“I¿Õj5?.—K¿C;7?6›M¿° 9?>ŸO¿Ü:?G£Q¿Œ¬?W«U¿hM@?_¯W¿ÕB?g³Y¿CîC?o·[¿°¾E?w»]¿G?¿_¿Œ_I?‡Ãa¿ù/K?Çc¿gM?—Ëe¿ÔÐN?ŸÏg¿B¡P?§Ói¿°qR?¯×k¿BT?·Ûm¿‹V?¿ßo¿øâW?Èãq¿g³Y?Ðçs¿Ôƒ[?Øëu¿BT]?àïw¿°$_?èóy¿õ`?ð÷{¿‹Åb?øû}¿ø•d?€¿fff?smlib-0.12.2/unittests/vvminus-unittest.pd0000644000076500007650000000105511710345157017340 0ustar hanshans#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; smlib-0.12.2/unittests/vvminus.wav0000644000076500007650000000405411660562364015664 0ustar hanshansRIFF$WAVEfmt D¬± data€¿ÍÌL>¿ÍÌP>~¿ÍÌT>}¿ÍÌX>|¿ÍÌ\>{¿ÍÌ`>z¿ÍÌd>y¿ÍÌh>x¿ÍÌl>w¿ÍÌp>v¿ÍÌt>u¿ÍÌx>t¿ÍÌ|>s¿ff€>r¿ff‚>q¿ff„>p¿ff†>o¿ffˆ>n¿ffŠ>m¿ffŒ>l¿ffŽ>k¿ff>j¿ff’>i¿ff”>h¿ff–>g¿ff˜>f¿ffš>e¿ffœ>d¿ffž>c¿ff >b¿ff¢>a¿ff¤>`¿ff¦>_¿ff¨>^¿ffª>]¿ff¬>\¿ff®>[¿ff°>Z¿ff²>Y¿ff´>X¿ff¶>W¿ff¸>V¿ffº>U¿ff¼>T¿ff¾>S¿ffÀ>R¿ffÂ>Q¿ffÄ>P¿ffÆ>O¿ffÈ>N¿ffÊ>M¿ffÌ>L¿ffÎ>K¿ffÐ>J¿ffÒ>I¿ffÔ>H¿ffÖ>G¿ffØ>F¿ffÚ>E¿ffÜ>D¿ffÞ>C¿ffà>B¿ffâ>A¿ffä>@¿ffæ>?¿ffè>>¿ffê>=¿ffì><¿ffî>;¿ffð>:¿ffò>9¿ffô>8¿ffö>7¿ffø>6¿ffú>5¿ffü>4¿ffþ>3¿33?2¿33?1¿33?0¿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.?¿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?x¾33u?t¾33v?p¾33w?l¾33x?h¾33y?d¾33z?`¾33{?\¾33|?X¾33}?T¾33~?P¾33?L¾š€?H¾š™€?D¾š?@¾š™?<¾š‚?8¾š™‚?4¾šƒ?0¾š™ƒ?,¾š„?(¾š™„?$¾š…? ¾š™…?¾š†?¾š™†?¾š‡?¾š™‡? ¾šˆ?¾š™ˆ?¾š‰?¾š™‰?ø½šŠ?𽚙Š?轚‹?ཚ™‹?ؽšŒ?нš™Œ?Ƚš?À½š™?¸½šŽ?°½š™Ž?¨½š? ½š™?˜½š?½š™?ˆ½š‘?€½š™‘?p½š’?`½š™’?P½š“?@½š™“?0½š”? ½š™”?½š•?½š™•?༚–?À¼š™–? ¼š—?€¼š™—?@¼š˜?¼š™˜?€»ÍŒ @smlib-0.12.2/unittests/vvplus-unittest.pd0000644000076500007650000000113311710345157017165 0ustar hanshans#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; smlib-0.12.2/unittests/vvplus.wav0000644000076500007650000000405411660562363015513 0ustar hanshansRIFF$WAVEfmt D¬± dataÍÌŒ¿ÍÌÌ=ÍÌ‹¿ÍÌÜ=ÍÌŠ¿ÍÌì=Í̉¿ÍÌü=Í̈¿ff>Í̇¿ff>Í̆¿ff>ÍÌ…¿ff>ÍÌ„¿ff&>Í̃¿ff.>ÍÌ‚¿ff6>ÍÌ¿ff>>ÍÌ€¿ffF>š™¿ffN>š™}¿ffV>š™{¿ff^>š™y¿fff>š™w¿ffn>š™u¿ffv>š™s¿ff~>š™q¿33ƒ>š™o¿33‡>š™m¿33‹>š™k¿33>š™i¿33“>š™g¿33—>š™e¿33›>š™c¿33Ÿ>š™a¿33£>š™_¿33§>š™]¿33«>š™[¿33¯>š™Y¿33³>š™W¿33·>š™U¿33»>š™S¿33¿>š™Q¿33Ã>š™O¿33Ç>š™M¿33Ë>š™K¿33Ï>š™I¿33Ó>š™G¿33×>š™E¿33Û>š™C¿33ß>š™A¿33ã>š™?¿33ç>š™=¿33ë>š™;¿33ï>š™9¿33ó>š™7¿33÷>š™5¿33û>š™3¿33ÿ>š™1¿š™?š™/¿š™?š™-¿š™?š™+¿š™?š™)¿š™ ?š™'¿š™ ?š™%¿š™ ?š™#¿š™?š™!¿š™?š™¿š™?š™¿š™?š™¿š™?š™¿š™?š™¿š™?š™¿š™?š™¿š™?š™¿š™!?š™¿š™#?š™ ¿š™%?š™ ¿š™'?š™ ¿š™)?š™¿š™+?š™¿š™-?š™¿š™/?š™¿š™1?43ÿ¾š™3?43û¾š™5?43÷¾š™7?43󾚙9?43レ™;?43뾚™=?43羚™??43㾚™A?43ß¾š™C?43Û¾š™E?43×¾š™G?43Ó¾š™I?43Ͼš™K?43˾š™M?43Ǿš™O?43þš™Q?43¿¾š™S?43»¾š™U?43·¾š™W?43³¾š™Y?43¯¾š™[?43«¾š™]?43§¾š™_?43£¾š™a?43Ÿ¾š™c?43›¾š™e?43—¾š™g?43“¾š™i?43¾š™k?43‹¾š™m?43‡¾š™o?43ƒ¾š™q?hf~¾š™s?hfv¾š™u?hfn¾š™w?hff¾š™y?hf^¾š™{?hfV¾š™}?hfN¾š™?hfF¾ÍÌ€?hf>¾ÍÌ?hf6¾ÍÌ‚?hf.¾Í̃?hf&¾ÍÌ„?hf¾ÍÌ…?hf¾Í̆?hf¾Í̇?hf¾Í̈?ÐÌü½Í̉?ÐÌì½ÍÌŠ?ÐÌܽÍÌ‹?ÍÌŒ¿ÍÌÌ=ÍÌ‹¿ÍÌÜ=ÍÌŠ¿ÍÌì=Í̉¿ÍÌü=Í̈¿ff>Í̇¿ff>Í̆¿ff>ÍÌ…¿ff>ÍÌ„¿ff&>Í̃¿ff.>ÍÌ‚¿ff6>ÍÌ¿ff>>ÍÌ€¿ffF>š™¿ffN>š™}¿ffV>š™{¿ff^>š™y¿fff>š™w¿ffn>š™u¿ffv>š™s¿ff~>š™q¿33ƒ>š™o¿33‡>š™m¿33‹>š™k¿33>š™i¿33“>š™g¿33—>š™e¿33›>š™c¿33Ÿ>š™a¿33£>š™_¿33§>š™]¿33«>š™[¿33¯>š™Y¿33³>š™W¿33·>š™U¿33»>š™S¿33¿>š™Q¿33Ã>š™O¿33Ç>š™M¿33Ë>š™K¿33Ï>š™I¿33Ó>š™G¿33×>š™E¿33Û>š™C¿33ß>š™A¿33ã>š™?¿33ç>š™=¿33ë>š™;¿33ï>š™9¿33ó>š™7¿33÷>š™5¿33û>š™3¿33ÿ>š™1¿š™?š™/¿š™?š™-¿š™?š™+¿š™?š™)¿š™ ?š™'¿š™ ?š™%¿š™ ?š™#¿š™?š™!¿š™?š™¿š™?š™¿š™?š™¿š™?š™¿š™?š™¿š™?š™¿š™?š™¿š™?š™¿š™!?š™¿š™#?š™ ¿š™%?š™ ¿š™'?š™ ¿š™)?š™¿š™+?š™¿š™-?š™¿š™/?š™¿š™1?43ÿ¾š™3?43û¾š™5?43÷¾š™7?43󾚙9?43レ™;?43뾚™=?43羚™??43㾚™A?43ß¾š™C?43Û¾š™E?43×¾š™G?43Ó¾š™I?43Ͼš™K?43˾š™M?43Ǿš™O?43þš™Q?43¿¾š™S?43»¾š™U?43·¾š™W?43³¾š™Y?43¯¾š™[?43«¾š™]?43§¾š™_?43£¾š™a?43Ÿ¾š™c?43›¾š™e?43—¾š™g?43“¾š™i?43¾š™k?43‹¾š™m?43‡¾š™o?43ƒ¾š™q?hf~¾š™s?hfv¾š™u?hfn¾š™w?hff¾š™y?hf^¾š™{?hfV¾š™}?hfN¾š™?hfF¾ÍÌ€?hf>¾ÍÌ?hf6¾ÍÌ‚?hf.¾Í̃?hf&¾ÍÌ„?hf¾ÍÌ…?hf¾Í̆?hf¾Í̇?hf¾Í̈?ÐÌü½Í̉?ÐÌì½ÍÌŠ?ÐÌܽÍÌ‹?smlib-0.12.2/vabs-help.pd0000644000076500007650000000115211656244706013600 0ustar hanshans#N canvas 1 53 452 302 10; #X obj 106 129 vabs; #X msg 106 95 1 2 3 -4 -5 -6; #X obj 106 165 print; #N canvas 222 207 494 344 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 389 244 pd META; #X text 351 213 j#|@2002; #X obj 373 193 SMLib-help; #X connect 0 0 2 0; #X connect 1 0 0 0; smlib-0.12.2/vabs.c0000644000076500007650000000162511656244706012476 0ustar hanshans#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); } smlib-0.12.2/vclip-help.pd0000644000076500007650000000173111656244706013765 0ustar hanshans#N canvas 1 53 324 246 10; #X obj 11 141 vclip -1 1; #X obj 11 196 print; #X msg 11 30 -4 -3 -2 -1 0 1 2 3 4; #X floatatom 73 64 5 0 0 0 - - -; #X floatatom 118 103 5 0 0 0 - - -; #X text 10 6 vclip clips each element in a vector; #X text 23 166 arguments: lower bound \, upper bound; #X text 20 52 input; #X text 79 81 lower bound; #X text 121 120 upper bound; #X text 243 183 j#|@2002; #X obj 265 163 SMLib-help; #N canvas 223 236 494 344 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 282 207 pd META; #X connect 0 0 1 0; #X connect 2 0 0 0; #X connect 3 0 0 1; #X connect 4 0 0 2; smlib-0.12.2/vclip.c0000644000076500007650000000221111656244706012650 0ustar hanshans#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); } smlib-0.12.2/vcog-help.pd0000644000076500007650000000167411656244706013614 0ustar hanshans#N canvas 1 53 471 165 10; #X msg 18 40 1 2 3 4; #X floatatom 50 96 5 0 0 0 - - -; #X msg 84 40 3 4 5; #X text 387 99 j#|@2002; #X obj 409 77 SMLib-help; #X obj 52 69 vcog; #X text 16 14 vcog computes the center of gravity of a list of floats ; #X msg 134 40 0 1 0 1; #X msg 199 40 0 0 1 1; #X msg 263 40 8; #X msg 144 74 1 -1; #X text 142 94 zero sum causes no output; #N canvas 208 165 494 344 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 417 124 pd META; #X connect 0 0 5 0; #X connect 2 0 5 0; #X connect 5 0 1 0; #X connect 7 0 5 0; #X connect 8 0 5 0; #X connect 9 0 5 0; #X connect 10 0 5 0; smlib-0.12.2/vcog.c0000644000076500007650000000150211656244706012473 0ustar hanshans#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)); } static void *vcog_new( t_float halfDecayTime) { 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); } smlib-0.12.2/vdbtorms-help.pd0000644000076500007650000000121411656244706014504 0ustar hanshans#N canvas 1 53 292 161 10; #X text 194 88 j#|@2002; #X obj 216 68 SMLib-help; #X msg 15 33 100 97 94; #X text 10 6 db to rms on a vector; #X obj 15 56 vdbtorms; #X obj 15 80 print vdbtorms; #N canvas 177 154 494 344 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 229 113 pd META; #X connect 2 0 4 0; #X connect 4 0 5 0; smlib-0.12.2/vdbtorms.c0000644000076500007650000000215211656244706013377 0ustar hanshans#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); } smlib-0.12.2/vdelta-help.pd0000644000076500007650000000232711656244707014132 0ustar hanshans#N canvas 1 53 433 284 10; #X msg 5 30 1 1 1 1 1 1 1 1 1 1; #X msg 5 52 1 0 1 0 1 0 1 0 1 0; #X msg 5 74 0 1 0 1 0 1 0 1 0 1; #X msg 5 96 0 0 0 0 0 0 0 0 0 0; #X msg 5 118 -1 -1 0 0 -1 -1 0 0 -1 -1; #X msg 5 140 0 0 0 0 0 1 1 1 1 1; #X text 352 205 j#|@2002; #X obj 373 184 SMLib-help; #X text 7 3 vdelta: difference between consecutive vectors; #X obj 5 193 print vdelta; #X msg 221 31 0; #X text 111 162 sending a vector of a different; #X text 111 178 length resets its state; #X obj 5 170 vdelta; #X msg 221 57 0 0 0; #X msg 221 79 1 2 3; #X msg 221 101 3 2 1; #N canvas 248 160 494 344 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 374 228 pd META; #X connect 0 0 13 0; #X connect 1 0 13 0; #X connect 2 0 13 0; #X connect 3 0 13 0; #X connect 4 0 13 0; #X connect 5 0 13 0; #X connect 10 0 13 0; #X connect 13 0 9 0; #X connect 14 0 13 0; #X connect 15 0 13 0; #X connect 16 0 13 0; smlib-0.12.2/vdelta.c0000644000076500007650000000273211656244707013023 0ustar hanshans#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_c_leak; t_float m_leak; 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; 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) { int i; 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); } 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); } smlib-0.12.2/vfmod-help.pd0000644000076500007650000000170411656244706013763 0ustar hanshans#N canvas 1 53 442 175 10; #X text 354 107 j#|@2002; #X obj 376 87 SMLib-help; #X text 10 6 vfmod computes the modulo of each element in a vector ; #X obj 15 127 print; #X floatatom 66 81 5 0 0 0 - - -; #X text 79 103 base; #X text 78 119 base zero becomes one; #X msg 15 33 0 0.5 1 1.5 2 2.5 3 3.5; #X msg 26 58 0 -0.5 -1 -1.5 -2 -2.5 -3 -3.5; #X obj 15 101 vfmod 2; #X text 78 134 default argument is 1; #N canvas 178 183 494 344 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 386 128 pd META; #X connect 4 0 9 1; #X connect 7 0 9 0; #X connect 8 0 9 0; #X connect 9 0 3 0; smlib-0.12.2/vfmod.c0000644000076500007650000000212011656244706012645 0ustar hanshans#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); } smlib-0.12.2/vftom-help.pd0000644000076500007650000000125411656244706014003 0ustar hanshans#N canvas 1 53 302 152 10; #X text 194 88 j#|@2002; #X obj 216 68 SMLib-help; #X text 10 6 frequency to midi on a vector; #X msg 15 33 440 446.164 880; #X obj 15 56 vftom; #X obj 15 80 print vftom; #N canvas 119 152 494 344 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 229 111 pd META; #X connect 3 0 4 0; #X connect 4 0 5 0; smlib-0.12.2/vftom.c0000644000076500007650000000173011656244706012673 0ustar hanshans#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); } smlib-0.12.2/vlavg-help.pd0000644000076500007650000000242411712660044013755 0ustar hanshans#N canvas 29 106 471 316 10; #N canvas 0 22 450 300 (subpatch) 0; #X array array_vlavg 10 float 0; #X coords 0 1 9 -1 200 140 1 0 0; #X restore 239 72 graph; #X msg 8 58 1 1 1 1 1 1 1 1 1 1; #X msg 8 80 1 0 1 0 1 0 1 0 1 0; #X msg 8 102 0 1 0 1 0 1 0 1 0 1; #X msg 8 124 0 0 0 0 0 0 0 0 0 0; #X obj 8 224 vlavg 6; #X msg 8 146 -1 -1 0 0 -1 -1 0 0 -1 -1; #X msg 8 168 0 0 0 0 0 1 1 1 1 1; #X text 376 255 j#|@2002; #X text 7 3 vlavg: vector leaky average; #X text 8 22 the argument is the half-decay expressed in number of activations; #X obj 8 295 s array_vlavg; #X obj 397 234 SMLib-help; #X msg 27 201 decay 20; #N canvas 183 210 494 344 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 404 276 pd META; #X obj 8 271 list trim; #X obj 8 249 list prepend 0; #X connect 1 0 5 0; #X connect 2 0 5 0; #X connect 3 0 5 0; #X connect 4 0 5 0; #X connect 5 0 16 0; #X connect 6 0 5 0; #X connect 7 0 5 0; #X connect 13 0 5 0; #X connect 15 0 11 0; #X connect 16 0 15 0; smlib-0.12.2/vlavg.c0000644000076500007650000000350411656244707012661 0ustar hanshans#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) { int i; 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); } 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); } smlib-0.12.2/vlmax-help.pd0000644000076500007650000000243011712657540013771 0ustar hanshans#N canvas 31 108 466 316 10; #N canvas 0 22 450 300 (subpatch) 0; #X array array_vlmax 10 float 0; #X coords 0 1 9 -1 200 140 1; #X restore 239 72 graph; #X msg 8 58 1 1 1 1 1 1 1 1 1 1; #X msg 8 80 1 0 1 0 1 0 1 0 1 0; #X msg 8 102 0 1 0 1 0 1 0 1 0 1; #X msg 8 124 0 0 0 0 0 0 0 0 0 0; #X msg 8 146 -1 -1 0 0 -1 -1 0 0 -1 -1; #X msg 8 168 0 0 0 0 0 1 1 1 1 1; #X text 376 255 j#|@2002; #X text 8 22 the argument is the half-decay expressed in number of activations; #X obj 397 234 SMLib-help; #X obj 8 224 vlmax 6; #X obj 8 295 s array_vlmax; #X msg 27 201 decay 20; #X text 9 4 vlmax: vector leaky maximum; #N canvas 243 181 494 344 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 vector leaky maximum; #X text 12 5 KEYWORDS control list_op; #X text 12 65 INLET_0 float list decay; #X text 12 85 OUTLET_0 list float; #X restore 406 278 pd META; #X obj 8 249 list prepend 0; #X obj 8 273 list trim; #X connect 1 0 10 0; #X connect 2 0 10 0; #X connect 3 0 10 0; #X connect 4 0 10 0; #X connect 5 0 10 0; #X connect 6 0 10 0; #X connect 10 0 15 0; #X connect 12 0 10 0; #X connect 15 0 16 0; #X connect 16 0 11 0; smlib-0.12.2/vlmax.c0000644000076500007650000000351611656244706012673 0ustar hanshans#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) { int i; 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); } static void vlmax_setHalfDecay(t_vlmax *x, t_floatarg halfDecayTime) { 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); } smlib-0.12.2/vlmin-help.pd0000644000076500007650000000243011712660003013753 0ustar hanshans#N canvas 32 107 466 336 10; #N canvas 0 22 450 300 (subpatch) 0; #X array array_vlmin 10 float 0; #X coords 0 1 9 -1 200 140 1; #X restore 239 72 graph; #X msg 8 58 1 1 1 1 1 1 1 1 1 1; #X msg 8 80 1 0 1 0 1 0 1 0 1 0; #X msg 8 102 0 1 0 1 0 1 0 1 0 1; #X msg 8 124 0 0 0 0 0 0 0 0 0 0; #X msg 8 146 -1 -1 0 0 -1 -1 0 0 -1 -1; #X msg 8 168 0 0 0 0 0 1 1 1 1 1; #X text 376 255 j#|@2002; #X text 8 22 the argument is the half-decay expressed in number of activations; #X obj 397 234 SMLib-help; #X msg 27 201 decay 20; #X text 7 3 vlmin: vector leaky minimum; #X obj 8 224 vlmin 6; #N canvas 219 185 494 344 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 float list decay; #X text 12 85 OUTLET_0 list float; #X text 12 45 DESCRIPTION vector leaky minimum; #X restore 402 279 pd META; #X obj 8 271 list trim; #X obj 8 249 list prepend 0; #X obj 8 295 s array_vlmin; #X connect 1 0 12 0; #X connect 2 0 12 0; #X connect 3 0 12 0; #X connect 4 0 12 0; #X connect 5 0 12 0; #X connect 6 0 12 0; #X connect 10 0 12 0; #X connect 12 0 15 0; #X connect 14 0 16 0; #X connect 15 0 14 0; smlib-0.12.2/vlmin.c0000644000076500007650000000351611656244706012671 0ustar hanshans#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) { int i; 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); } static void vlmin_setHalfDecay(t_vlmin *x, t_floatarg halfDecayTime) { 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); } smlib-0.12.2/vlrange-help.pd0000644000076500007650000000124711656244706014310 0ustar hanshans#N canvas 1 53 400 214 10; #X text 296 140 j#|@2002; #X obj 318 120 SMLib-help; #X obj 15 57 vmtof; #X text 10 6 midi to frequency on a vector; #X msg 15 33 69 70 81; #X obj 15 80 print vmtof; #N canvas 185 223 494 344 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 85 OUTLET_0 list float; #X text 12 45 DESCRIPTION midi to frequency on a vector; #X text 12 65 INLET_0 float list; #X text 12 5 KEYWORDS control list_op conversion MIDI; #X restore 329 170 pd META; #X connect 2 0 5 0; #X connect 4 0 2 0; smlib-0.12.2/vlrange.c0000644000076500007650000000425411656244706013202 0ustar hanshans#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) { int i; 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); } 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_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_setHalfDecay, gensym("decay"), A_DEFFLOAT, NULL); class_addlist(vlrange_class, (t_method)vlrange_perform); } smlib-0.12.2/vmax-help.pd0000644000076500007650000000174211656244706013625 0ustar hanshans#N canvas 1 53 473 182 10; #X floatatom 35 104 5 0 0 0 - - -; #X text 387 99 j#|@2002; #X obj 409 77 SMLib-help; #X msg 133 47 0; #X msg 168 47 0 1 0 1; #X msg 243 48 0 0 1 1; #X text 14 3 vcog computes maximum of a list of floats; #X obj 49 76 vmax; #X floatatom 86 104 5 0 0 0 - - -; #X msg 15 47 1 2 3 1; #X msg 81 47 3 4 1; #X text 13 21 and the location of the first occurance of the maximum ; #N canvas 122 150 494 344 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 411 130 pd META; #X connect 3 0 7 0; #X connect 4 0 7 0; #X connect 5 0 7 0; #X connect 7 0 0 0; #X connect 7 1 8 0; #X connect 9 0 7 0; #X connect 10 0 7 0; smlib-0.12.2/vmax.c0000644000076500007650000000177611656244706012525 0ustar hanshans#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; 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)); } static void *vmax_new( t_float halfDecayTime) { 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); } smlib-0.12.2/vmin-help.pd0000644000076500007650000000175011656244706013622 0ustar hanshans#N canvas 1 53 473 167 10; #X floatatom 35 104 5 0 0 0 - - -; #X text 387 99 j#|@2002; #X obj 409 77 SMLib-help; #X msg 133 47 0; #X msg 168 47 0 1 0 1; #X msg 236 47 0 0 1 1; #X floatatom 86 104 5 0 0 0 - - -; #X msg 15 47 1 2 3 1; #X msg 81 47 3 4 1; #X text 14 3 vcog computes minimum of a list of floats; #X text 13 21 and the location of the first occurance of the minimum ; #X obj 49 76 vmin; #N canvas 186 171 494 344 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 415 124 pd META; #X connect 3 0 11 0; #X connect 4 0 11 0; #X connect 5 0 11 0; #X connect 7 0 11 0; #X connect 8 0 11 0; #X connect 11 0 0 0; #X connect 11 1 6 0; smlib-0.12.2/vmin.c0000644000076500007650000000177511656244706012522 0ustar hanshans#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; 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)); } static void *vmin_new( t_float halfDecayTime) { 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); } smlib-0.12.2/vmtof-help.pd0000644000076500007650000000124511656244706014003 0ustar hanshans#N canvas 1 53 400 214 10; #X text 192 79 j#|@2002; #X obj 214 59 SMLib-help; #X obj 15 57 vmtof; #X text 10 6 midi to frequency on a vector; #X msg 15 33 69 70 81; #X obj 15 80 print vmtof; #N canvas 125 237 494 344 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 225 107 pd META; #X connect 2 0 5 0; #X connect 4 0 2 0; smlib-0.12.2/vmtof.c0000644000076500007650000000203011656244706012665 0ustar hanshans#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); } smlib-0.12.2/vnmax-help.pd0000644000076500007650000000124511656244706014001 0ustar hanshans#N canvas 1 53 400 214 10; #X text 192 79 j#|@2002; #X obj 214 59 SMLib-help; #X obj 15 57 vmtof; #X text 10 6 midi to frequency on a vector; #X msg 15 33 69 70 81; #X obj 15 80 print vmtof; #N canvas 191 187 494 344 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 conversion MIDI; #X text 12 45 DESCRIPTION midi to frequency on a vector; #X restore 230 106 pd META; #X connect 2 0 5 0; #X connect 4 0 2 0; smlib-0.12.2/vnmax.c0000644000076500007650000000205211656244706012667 0ustar hanshans#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; 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)); } static void *vnmax_new( t_float halfDecayTime) { 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); } smlib-0.12.2/vpow-help.pd0000644000076500007650000000156511656244706013650 0ustar hanshans#N canvas 1 53 444 213 10; #X text 364 147 j#|@2002; #X obj 386 127 SMLib-help; #X obj 15 127 print; #X floatatom 66 81 5 0 0 0 - - -; #X text 78 134 default argument is 1; #X text 10 6 vpow computes y(i)=x(i)^a; #X text 79 103 a; #X text 79 117 a zero becomes one; #X obj 15 101 vpow 2; #X msg 15 33 0.01 0.5 1 1.5 2 2.5 3 3.5 0; #X text 27 56 if (x(i)<=0) then y(i)=-1000; #N canvas 187 200 494 344 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 386 171 pd META; #X connect 3 0 8 1; #X connect 8 0 2 0; #X connect 9 0 8 0; smlib-0.12.2/vpow.c0000644000076500007650000000212311656244706012530 0ustar hanshans#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); } smlib-0.12.2/vrms-help.pd0000644000076500007650000000145511656244706013642 0ustar hanshans#N canvas 1 53 392 166 10; #X msg 17 39 1 2 3 4; #X floatatom 50 96 5 0 0 0 - - -; #X msg 84 40 3 4 5; #X text 315 100 j#|@2002; #X obj 337 78 SMLib-help; #X obj 52 69 vrms; #X text 16 14 vrms computes the root-mean-square of a vector; #X msg 134 40 1 1 1 1; #X msg 200 40 1 -1 1 -1; #N canvas 159 173 494 344 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 338 125 pd META; #X connect 0 0 5 0; #X connect 2 0 5 0; #X connect 5 0 1 0; #X connect 7 0 5 0; #X connect 8 0 5 0; smlib-0.12.2/vrms.c0000644000076500007650000000143411656244707012531 0ustar hanshans#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)); } static void *vrms_new( t_float halfDecayTime) { 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); } smlib-0.12.2/vrmstodb-help.pd0000644000076500007650000000125411656244707014511 0ustar hanshans#N canvas 1 53 283 157 10; #X text 194 88 j#|@2002; #X obj 216 68 SMLib-help; #X text 10 6 frequency to midi on a vector; #X obj 15 56 vrmstodb; #X msg 15 33 100 97 94; #X obj 15 80 print vrmstodb; #N canvas 143 169 494 344 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 MIDI conversion; #X text 12 45 DESCRIPTION frequency to midi on a vector; #X restore 216 114 pd META; #X connect 3 0 5 0; #X connect 4 0 3 0; smlib-0.12.2/vrmstodb.c0000644000076500007650000000214511656244706013401 0ustar hanshans#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); } smlib-0.12.2/vstd-help.pd0000644000076500007650000000145611656244706013634 0ustar hanshans#N canvas 1 53 394 160 10; #X msg 17 39 1 2 3 4; #X floatatom 51 95 5 0 0 0 - - -; #X msg 84 40 3 4 5; #X text 315 100 j#|@2002; #X obj 337 78 SMLib-help; #X msg 134 40 1 1 1 1; #X obj 51 70 vstd; #X msg 200 40 1 -1 1 -1 1; #X text 16 14 vstd computes the standard deviation of a vector; #N canvas 175 193 494 344 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 337 125 pd META; #X connect 0 0 6 0; #X connect 2 0 6 0; #X connect 5 0 6 0; #X connect 6 0 1 0; #X connect 7 0 6 0; smlib-0.12.2/vstd.c0000644000076500007650000000154411656244706012523 0ustar hanshans#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)); } static void *vstd_new( t_float halfDecayTime) { 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); } smlib-0.12.2/vsum-help.pd0000644000076500007650000000136011656244706013640 0ustar hanshans#N canvas 1 53 355 163 10; #X text 16 14 vsum computes the sum of a list of floats; #X msg 17 39 1 2 3 4; #X obj 52 69 vsum; #X floatatom 50 96 5 0 0 0 - - -; #X msg 84 40 3 4 5; #X text 275 102 j#|@2002; #X obj 297 80 SMLib-help; #X msg 136 40 0; #N canvas 144 198 494 344 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 296 127 pd META; #X connect 1 0 2 0; #X connect 2 0 3 0; #X connect 4 0 2 0; #X connect 7 0 2 0; smlib-0.12.2/vsum.c0000644000076500007650000000133411656244707012533 0ustar hanshans#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); } smlib-0.12.2/vthreshold-help.pd0000644000076500007650000000124511656244706015032 0ustar hanshans#N canvas 1 53 400 214 10; #X text 192 79 j#|@2002; #X obj 214 59 SMLib-help; #X obj 15 57 vmtof; #X text 10 6 midi to frequency on a vector; #X msg 15 33 69 70 81; #X obj 15 80 print vmtof; #N canvas 145 227 494 344 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 conversion MIDI; #X text 12 45 DESCRIPTION midi to frequency on a vector; #X restore 221 105 pd META; #X connect 2 0 5 0; #X connect 4 0 2 0; smlib-0.12.2/vthreshold.c0000644000076500007650000000552111656244707013725 0ustar hanshans/* --------------------- 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_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_ft1, // gensym("ft1"), A_FLOAT, 0); } smlib-0.12.2/vvconv-help.pd0000644000076500007650000000243611656244706014174 0ustar hanshans#N canvas 1 53 441 306 10; #X msg 132 78 1 2 1; #X msg 132 53 1 0 1; #X text 26 18 vvconv: convolution of 2 vectors; #X text 357 244 j#|@2002; #X msg 30 43 1; #X obj 48 130 vvconv; #X msg 331 80 1 2 1; #X msg 229 68 1 0 0; #X msg 331 55 1 0 1; #X msg 229 45 1; #X obj 247 132 vvconv -1 2 -1; #X msg 230 92 1 0 1 0 0 1; #X msg 31 90 1 0 1 0 0 1; #X text 177 178 arguments: convolution kernel; #X obj 377 225 SMLib-help; #X obj 48 154 print vvconv; #X obj 247 156 print vvconv; #X text 2 202 length of output is the sum of input lengths minus one ; #X msg 30 66 2 0 1; #X msg 132 103 1 0 2; #N canvas 170 224 494 344 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 377 270 pd META; #X connect 0 0 5 1; #X connect 1 0 5 1; #X connect 4 0 5 0; #X connect 5 0 15 0; #X connect 6 0 10 1; #X connect 7 0 10 0; #X connect 8 0 10 1; #X connect 9 0 10 0; #X connect 10 0 16 0; #X connect 11 0 10 0; #X connect 12 0 5 0; #X connect 18 0 5 0; #X connect 19 0 5 1; smlib-0.12.2/vvconv.c0000644000076500007650000000646311656244706013071 0ustar hanshans#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); } smlib-0.12.2/vvminus-help.pd0000644000076500007650000000201111713366315014342 0ustar hanshans#N canvas 1 53 326 251 10; #X msg 25 90 1 2 3; #X msg 82 94 4 5 6; #X msg 168 95 1 2 3; #X msg 228 95 4; #X msg 25 66 1; #X msg 168 71 1; #X text 248 191 j#|@2002; #X text 18 10 vvminus substracts two lists of floats; #X text 18 26 or a float from a list of floats; #X obj 49 124 vvminus; #X obj 189 125 vvminus 0; #X obj 268 170 SMLib-help; #X obj 49 148 print vvminus; #X obj 189 149 print vvminus; #N canvas 102 157 494 344 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 267 216 pd META; #X connect 0 0 9 0; #X connect 1 0 9 1; #X connect 2 0 10 0; #X connect 3 0 10 1; #X connect 4 0 9 0; #X connect 5 0 10 0; #X connect 9 0 12 0; #X connect 10 0 13 0; smlib-0.12.2/vvminus.c0000644000076500007650000000644711334442555013254 0ustar hanshans#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); } smlib-0.12.2/vvplus-help.pd0000644000076500007650000000203211713366277014204 0ustar hanshans#N canvas 1 53 313 256 10; #X obj 40 115 vvplus; #X msg 16 81 1 2 3; #X msg 73 85 4 5 6; #X msg 159 86 1 2 3; #X msg 219 86 4; #X obj 180 116 vvplus 0; #X msg 16 57 1; #X msg 159 62 1; #X text 18 10 vvplus adds two lists of floats; #X text 17 25 or a float to a list of floats; #X msg 73 60 3 2 1; #X obj 252 159 SMLib-help; #X text 230 184 j#|@2002; #X obj 40 139 print vvplus; #X obj 180 140 print vvplus; #N canvas 119 195 494 344 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 254 208 pd META; #X connect 0 0 13 0; #X connect 1 0 0 0; #X connect 2 0 0 1; #X connect 3 0 5 0; #X connect 4 0 5 1; #X connect 5 0 14 0; #X connect 6 0 0 0; #X connect 7 0 5 0; #X connect 10 0 0 1; smlib-0.12.2/vvplus.c0000644000076500007650000000640111334442556013073 0ustar hanshans#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); }