pax_global_header00006660000000000000000000000064143436342720014522gustar00rootroot0000000000000052 comment=d315f865043021ff222d3d8f384f9146d68e22f7 pd-sigpack-0.46.0/000077500000000000000000000000001434363427200136335ustar00rootroot00000000000000pd-sigpack-0.46.0/LICENSE.txt000066400000000000000000000432541434363427200154660ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. pd-sigpack-0.46.0/Makefile000066400000000000000000000023211434363427200152710ustar00rootroot00000000000000# Makefile for Makefile.pdlibbuilder. lib.name := sigpack chop~.class.sources = source/chop~.c decimate~.class.sources = source/decimate~.c diode~.class.sources = source/diode~.c foldback~.class.sources = source/foldback~.c foldover~.class.sources = source/foldover~.c freqdiv~.class.sources = source/freqdiv~.c freqshift~.class.sources = source/freqshift~.c hardlimit~.class.sources = source/hardlimit~.c harmgen~.class.sources = source/harmgen~.c impulse~.class.sources = source/impulse~.c rectify~.class.sources = source/rectify~.c round~.class.sources = source/round~.c saturate~.class.sources = source/saturate~.c shape~.class.sources = source/shape~.c sieve~.class.sources = source/sieve~.c split~.class.sources = source/split~.c transient~.class.sources = source/transient~.c ustep~.class.sources = source/ustep~.c valverect~.class.sources = source/valverect~.c vowel~.class.sources = source/vowel~.c wavewrap~.class.sources = source/wavewrap~.c datafiles = \ $(wildcard help/*-help.pd) \ help/output~.pd \ LICENSE.txt \ README.txt \ sigpack-meta.pd PDLIBBUILDER_DIR=pd-lib-builder/ include $(PDLIBBUILDER_DIR)/Makefile.pdlibbuilder pd-sigpack-0.46.0/README.md000066400000000000000000000043541434363427200151200ustar00rootroot00000000000000sigpack - signal object library for pure-data (c) 2006 by Martin Weiß This git-fork of the Pure-data library sigpack is cloned from https://git.puredata.info/cgit/svn2git/libraries/sigpack.git, which is the svn-to-git from https://sourceforge.net/p/pure-data/svn/HEAD/tree/trunk/externals/sigpack/. The initial changes were adding/recreating some separate directories for source and help files and replace the buildsystem by pd-lib-builder. This to simplify creation of a deken package of the libary. The sigpack library consists of:
chop~
signal chopping modulator
decimate~
signal decimation
diode~
diode rectifier network (from swh-plugins diode_1185)
foldback~
signal mirror
foldover~
foldover distortion (from swh-plugins foldover_1213)
freqdiv~
signal frequency divider (from swh-plugins divider_1186)
freqshift~
bode frequency shifter (from swh-plugins bode-shifter_1431)
hardlimit~
brick hard limiter with residue mixer (from swh-plugins hard_limiter_1413)
harmgen~
harmonic generator (from swh-plugins harmonic_gen_1220)
impulse~
non-bandlimited single-sample impulses (from swh-plugins impulse_1885)
rectify~
flips negative values to positive
round~
simple rounder
saturate~
soft saturation
shape~
reshape input by an exponential function (from swh-plugins shaper_1187)
sieve~
simple sample sifter
split~
signal split function
transient~
transient mangler (from swh-plugins transient_1206)
ustep~
signal unity step function
valverect~
valve rectifier (from swh-plugins valve_rect_1405)
vowel~
simple formant filter
wavewrap~
sinus wavewrapper (from swh-plugins sinus_wavewrapper_1198)
See the original README.txt for more information. For bugs found in this version, please report them to me. Martin is not responsible for bugs introduced by me. Fred Jan Kraan fjkraan@xs4all.nl 2022-11-28 pd-sigpack-0.46.0/README.txt000066400000000000000000000047111434363427200153340ustar00rootroot00000000000000sigpack version 0.04 signal object library for pure-data objects: chop~ decimate~ diode~ foldback~ foldover~ freqdiv~ freqshift~ hardlimit~ harmgen~ impulse~ rectify~ round~ saturate~ shape~ sieve~ split~ transient~ ustep~ valverect~ vowel~ wavewrap~ these are based on code from swh_plugins (http://plugin.org.uk): diode~.c foldover~.c freqdiv~.c freqshift~.c hardlimit~.c harmgen~.c impulse~.c shape~.c transient~.c valverect~.c wavewrap~.c released under the GNU/GPL-license this is software with absolutely no warranty use it at your own risk contact -----------------TODO-------------------- :: update swh_plugins code from latest release: http://plugin.org.uk/releases/0.4.15 -----------------v0.46.0------------------ Completed transition of Makefile.pd-lib-builder location. -----------------v0.45.1------------------ ::changed version format to conform to standard practice. As there are no finctional changes, this counts as bugfix. ::updated the Makefile.pd-lib-builder to 0.6.0. ::updated email address. -----------------v0.0.45------------------ ::normalized version to major.minor.bugfix ::made Makefile more future proof ::added objects.txt for object search in Find Externals... (deken plugin) -----------------v0.044------------------ ::decimate~: fixed gitch at block start ::freqshift~: fixed off-by-one loop causing NaNs. (Partially) updated from upstream ::round~: fixed division by zero issue ::transient~: optimized/updated ::vowel~: moved static array to instance struct to allow multiple instances and prevent NaNs ::*-help.pd: reformatted and improved -----------------v0.043------------------ :: removed type-punning since it doesn't work for 64-bit or C99 -----------------v0.042------------------ ::removed "sp_" prefix from object names -----------------v0.04------------------- ::cleaning up code a bit ::add GNU/GPL license.txt ::new objects: sp_hardlimit~ sp_impulse~ sp_shape~ sp_transient~ sp_valverect~ sp_wavewrap~ -----------------v0.03b------------------ ::change prefix to "sp_", so every extern compiles as single object (for pd-extended) -----------------v0.03------------------- ::add prefix "sp." to avoid nameclash ::new objects: sp_diode~ sp_freqshift~ sp_round~ sp_sieve~ -----------------v0.02------------------- ::new objects: sp_chop~ sp_decimate~ sp_foldover~ sp_freqdiv~ sp_harmgen~ sp_saturate~ sp_vowel~ -----------------v0.01------------------- ::initial release pd-sigpack-0.46.0/ToDo.txt000066400000000000000000000004731434363427200152450ustar00rootroot00000000000000Sigpack 0.0.4+ ToDo - check the objects ported from swh-plugins with latest version from www.plugins.org.uk or http://http.debian.net/debian/pool/main/s/swh-plugins/swh-plugins_0.4.15+1.orig.tar.gz - move all sample rate settings to dsp method - split~: add a mode for hold, next to the current switch to 0. pd-sigpack-0.46.0/help/000077500000000000000000000000001434363427200145635ustar00rootroot00000000000000pd-sigpack-0.46.0/help/all-sigpack-help.pd000066400000000000000000000034651434363427200202350ustar00rootroot00000000000000#N canvas 296 76 818 635 10; #X obj 23 107 sigpack/chop~; #X obj 23 132 sigpack/decimate~; #X obj 23 157 sigpack/diode~; #X obj 23 182 sigpack/foldback~; #X obj 23 207 sigpack/foldover~; #X obj 23 232 sigpack/freqdiv~; #X obj 23 257 sigpack/freqshift~; #X obj 23 282 sigpack/hardlimit~; #X obj 23 307 sigpack/harmgen~; #X obj 23 332 sigpack/impulse~; #X obj 23 357 sigpack/rectify~; #X obj 23 382 sigpack/round~; #X obj 23 407 sigpack/saturate~; #X obj 23 432 sigpack/shape~; #X obj 23 457 sigpack/sieve~; #X obj 23 482 sigpack/split~; #X obj 23 507 sigpack/transient~; #X obj 23 532 sigpack/ustep~; #X obj 23 557 sigpack/valverect~; #X obj 23 582 sigpack/vowel~; #X obj 23 607 sigpack/wavewrap~; #X text 158 107 signal chopping modulator; #X text 159 132 signal decimation; #X text 160 157 diode rectifier network; #X text 159 182 signal mirror; #X text 158 207 foldover distortion; #X text 158 232 signal frequency divider; #X text 161 257 bode frequency shifter; #X text 160 282 brick hard limiter with residue mixer; #X text 159 307 harmonic generator; #X text 160 332 non-bandlimited single-sample impulses; #X text 159 357 flips negative values to positive; #X text 159 382 simple rounder; #X text 159 407 soft saturation; #X text 159 432 reshape input by an exponential function; #X text 159 457 simple sample sifter; #X text 160 482 signal split function; #X text 160 507 transient mangler; #X text 160 532 signal unity step function; #X text 161 557 valve rectifier; #X text 159 582 simple formant filter; #X text 161 607 sinus wavewrapper; #X obj 2 2 cnv 15 552 40 empty empty sIgpAck_0.45.1_signal_object_library 3 12 0 18 -204280 -1 0; #X text 7 47 (c) 2006 by Martin Weiss , f 84; #X text 31 68 this version (0.0.45) maintained by Fred Jan Kraan , f 70; pd-sigpack-0.46.0/help/chop~-help.pd000066400000000000000000000061751434363427200171760ustar00rootroot00000000000000#N canvas 494 83 557 534 10; #X obj 0 0 cnv 15 552 40 empty empty chop~ 3 12 0 18 -204280 -1 0; #X obj 0 353 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0 ; #X obj 0 456 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0 ; #X obj 0 493 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1 0; #X obj 79 465 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 79 367 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 0 527 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289 0; #N canvas 238 349 428 75 Related_objects 0; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 Related Objects; #X restore 206 529 pd Related_objects; #N canvas 587 624 379 261 META 0; #X text 12 25 LICENSE GPL v2; #X text 12 183 MAINTAINER Fred Jan Kraan ; #X text 12 45 DESCRIPTION signal chopping modulator; #X text 12 5 KEYWORDS signal modulator; #X text 12 83 INLET_0 signal; #X text 12 143 OUTLET_0 signal; #X text 12 163 AUTHOR Martin Weiss; #X text 12 204 HELP_PATCH_AUTHORS Martin Weiss 2003 Updated by Fred Jan Kraan 2016-02.; #X text 12 103 INLET_1 signal; #X text 12 123 INLET_2 float; #X text 12 64 VERSION 0.03; #X restore 502 531 pd META; #X text 8 23 multiplicates incoming signal by factor x if modulation signal is positive, f 75; #X obj 506 6 chop~; #X obj 123 290 output~; #X obj 123 203 sigpack/chop~ 0; #X obj 180 127 osc~ 2; #X obj 183 68 hsl 128 15 0 440 0 0 empty empty modulator 7 8 0 10 -262144 -1 -1 0 1; #X floatatom 180 88 5 0 0 0 - - -, f 5; #X obj 344 279 tabwrite~ \$0-chop; #X obj 344 258 metro 100; #X obj 344 237 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1; #X floatatom 241 116 5 0 0 0 - - -, f 5; #X text 107 367 signal; #X text 162 367 - signal to modulate; #X obj 79 392 cnv 17 3 17 empty empty 1 5 9 0 16 -228856 -162280 0 ; #X text 107 392 signal; #X obj 79 417 cnv 17 3 25 empty empty 2 5 9 0 16 -228856 -162280 0 ; #X text 107 417 float; #X text 162 392 - modulator signal; #X obj 122 66 osc~ 440; #X text 162 417 - Amplification factor when modulator is positive. Amplification factor is 1 when modulator is negative.; #X text 107 465 signal; #X text 164 465 - modulated signal; #X text 96 502 default amplification factor; #X obj 344 300 tabwrite~ \$0-chopFreq; #N canvas 683 549 450 300 view 0; #N canvas 0 50 450 250 (subpatch) 0; #X array \$0-chop 100 float 0; #X coords 0 10 99 -10 200 140 1 0 0; #X restore 128 78 graph; #X text 112 77 10; #X text 106 205 -10; #N canvas 0 50 450 250 (subpatch) 0; #X array \$0-chopFreq 100 float 0; #X coords 0 1 100 -1 200 20 1 0 0; #X restore 128 222 graph; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 waveform viewer; #X text 14 266 array updates can cause dropouts when visible; #X restore 344 321 pd view waveform; #X obj 242 92 hsl 128 15 0 10 0 0 empty empty amplification_factor 7 8 0 10 -262144 -1 -1 0 1; #X connect 12 0 11 0; #X connect 12 0 11 1; #X connect 12 0 16 0; #X connect 13 0 12 1; #X connect 13 0 32 0; #X connect 14 0 15 0; #X connect 15 0 13 0; #X connect 17 0 16 0; #X connect 17 0 32 0; #X connect 18 0 17 0; #X connect 19 0 12 2; #X connect 27 0 12 0; #X connect 34 0 19 0; pd-sigpack-0.46.0/help/decimate~-help.pd000066400000000000000000000102311434363427200200040ustar00rootroot00000000000000#N canvas 446 81 557 534 10; #X obj 0 0 cnv 15 552 40 empty empty decimate~ 3 12 0 18 -204280 -1 0; #X obj 0 353 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0 ; #X obj 0 456 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0 ; #X obj 0 493 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1 0; #X obj 79 465 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 79 367 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 0 527 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289 0; #N canvas 236 350 428 75 Related_objects 0; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 Related Objects; #X restore 206 529 pd Related_objects; #N canvas 585 625 379 261 META 0; #X text 12 25 LICENSE GPL v2; #X text 12 183 MAINTAINER Fred Jan Kraan ; #X text 12 45 DESCRIPTION signal chopping modulator; #X text 12 5 KEYWORDS signal modulator; #X text 12 83 INLET_0 signal; #X text 12 143 OUTLET_0 signal; #X text 12 163 AUTHOR Martin Weiss; #X text 12 204 HELP_PATCH_AUTHORS Martin Weiss 2003 Updated by Fred Jan Kraan 2016-02.; #X text 12 103 INLET_1 signal; #X text 12 123 INLET_2 float; #X text 12 64 VERSION 0.03; #X restore 502 531 pd META; #X obj 123 308 output~; #X obj 197 47 hsl 128 15 0 1 0 0 empty empty sample_rate_reduction 3 8 0 10 -262144 -1 -1 3700 1; #X floatatom 193 106 8 0 0 0 - - -, f 8; #X obj 389 259 metro 100; #X obj 389 238 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 1; #X floatatom 342 130 5 0 0 0 - - -, f 5; #X text 107 367 signal; #X obj 79 392 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 79 417 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X text 107 417 float; #X obj 122 105 osc~ 440; #X text 107 465 signal; #X text 96 502 default amplification factor; #N canvas 472 642 450 300 view 0; #N canvas 0 50 450 250 (subpatch) 0; #X array \$0-reduced 100 float 0; #X coords 0 1 99 -1 200 140 1 0 0; #X restore 128 78 graph; #N canvas 0 50 450 250 (subpatch) 0; #X array \$0-clean 100 float 0; #X coords 0 1 100 -1 200 20 1 0 0; #X restore 128 222 graph; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 waveform viewer; #X text 14 266 array updates can cause dropouts when visible; #X text 118 77 1; #X text 112 205 -1; #X restore 389 323 pd view waveform; #X obj 123 221 sigpack/decimate~ 0.5 16; #X obj 342 108 int; #X obj 342 85 + 1; #X obj 482 6 decimate~; #X text 8 23 signal decimation by resolution and sample rate, f 75 ; #X obj 389 280 tabwrite~ \$0-clean; #X obj 389 302 tabwrite~ \$0-reduced; #X obj 193 66 hradio 15 1 0 8 empty empty empty 0 -8 0 10 -262144 -1 -1 4; #N canvas 1 79 450 300 powOf2 0; #N canvas 0 50 450 250 (subpatch) 0; #X array \$0-powOf2 8 float 3; #A 0 1 0.5 0.25 0.125 0.0625 0.03125 0.015625 0.0078125; #X coords 0 1 8 0 200 140 1 0 0; #X restore 225 66 graph; #X obj 75 170 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 94 146 loadbang; #X obj 10 92 tabread \$0-powOf2; #X obj 10 240 outlet; #X obj 10 68 inlet; #X obj 17 121 s \$0-timebase; #X msg 110 274 \; \$1-powOf2 0 256 128 64 32 16 8 4 2; #X obj 94 194 \$0; #X msg 55 218 \; \$1-powOf2 0 1 0.5 0.25 0.125 0.0625 0.03125 0.015625 0.0078125, f 62; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 Inverse power of 2; #X connect 1 0 8 0; #X connect 2 0 8 0; #X connect 3 0 4 0; #X connect 3 0 6 0; #X connect 5 0 3 0; #X connect 8 0 9 0; #X restore 193 85 pd powOf2; #X text 162 367 - signal to decimate; #X text 107 392 float; #X text 162 392 - sample rate reduction 1 = 0% \, 0 = 100%; #X text 162 417 - sample bit reduction 1 = 1 bit \, 32 = 32 bits; #X text 164 465 - decimated signal; #X obj 342 66 hradio 15 1 0 8 empty empty empty 0 -8 0 10 -262144 -1 -1 2; #X obj 344 47 hsl 128 15 1 32 0 0 empty empty sample_bit_reduction 4 8 0 10 -262144 -1 -1 1100 1; #X connect 10 0 11 0; #X connect 11 0 23 1; #X connect 12 0 28 0; #X connect 12 0 29 0; #X connect 13 0 12 0; #X connect 19 0 23 0; #X connect 19 0 28 0; #X connect 23 0 9 0; #X connect 23 0 9 1; #X connect 23 0 29 0; #X connect 24 0 23 2; #X connect 24 0 14 0; #X connect 25 0 24 0; #X connect 30 0 31 0; #X connect 31 0 11 0; #X connect 37 0 25 0; #X connect 38 0 24 0; pd-sigpack-0.46.0/help/diode~-help.pd000066400000000000000000000053641434363427200173300ustar00rootroot00000000000000#N canvas 409 80 557 534 10; #X obj 0 0 cnv 15 552 40 empty empty diode~ 3 12 0 18 -204280 -1 0 ; #X obj 0 353 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0 ; #X obj 0 425 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0 ; #X obj 0 462 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1 0; #X obj 79 434 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 79 367 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 0 496 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289 0; #N canvas 238 349 428 75 Related_objects 0; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 Related Objects; #X restore 206 498 pd Related_objects; #N canvas 567 587 379 261 META 0; #X text 12 25 LICENSE GPL v2; #X text 12 175 MAINTAINER Fred Jan Kraan ; #X text 12 83 INLET_0 signal; #X text 12 123 OUTLET_0 signal; #X text 12 196 HELP_PATCH_AUTHORS Martin Weiss 2003 Updated by Fred Jan Kraan 2016-02.; #X text 12 64 VERSION 0.03; #X text 11 103 INLET_1 float; #X text 12 143 AUTHOR Martin Weiss with code from swh_plugins by steve harris www.plugin.org.uk; #X text 12 45 DESCRIPTION signal rectifying network; #X text 12 5 KEYWORDS signal rectifying; #X restore 502 500 pd META; #X obj 123 290 output~; #X obj 334 254 metro 100; #X obj 334 233 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1; #X text 107 367 signal; #X obj 79 392 cnv 17 3 17 empty empty 1 5 9 0 16 -228856 -162280 0 ; #X text 107 392 signal; #X text 162 392 - modulator signal; #X obj 122 87 osc~ 440; #X text 107 434 signal; #N canvas 681 550 450 300 view 0; #N canvas 0 50 450 250 (subpatch) 0; #X array \$0-rect 100 float 0; #X coords 0 1 99 -1 200 140 1 0 0; #X restore 128 78 graph; #N canvas 0 50 450 250 (subpatch) 0; #X array \$0-clean 100 float 0; #X coords 0 1 100 -1 200 20 1 0 0; #X restore 128 222 graph; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 waveform viewer; #X text 14 266 array updates can cause dropouts when visible; #X text 118 77 1; #X text 112 205 -1; #X restore 334 317 pd view waveform; #X text 8 23 diode rectifier network, f 75; #X text 96 471 mode: 0 = no rectifying \, 1 = half wave rectifying \, 2 = full rectifying, f 71; #X text 164 434 - processed signal; #X text 162 367 - signal to rectify; #X obj 123 190 sigpack/diode~ 0; #X obj 499 6 diode~; #X obj 216 64 vradio 15 1 0 3 empty empty empty 0 -8 0 10 -262144 -1 -1 2; #X obj 334 296 tabwrite~ \$0-rect; #X obj 334 275 tabwrite~ \$0-clean; #X text 233 94 no rectify; #X text 233 78 half wave rectify; #X text 233 63 full wave rectify; #X connect 10 0 26 0; #X connect 10 0 27 0; #X connect 11 0 10 0; #X connect 16 0 23 0; #X connect 16 0 27 0; #X connect 23 0 9 0; #X connect 23 0 9 1; #X connect 23 0 26 0; #X connect 25 0 23 1; pd-sigpack-0.46.0/help/foldback~-help.pd000066400000000000000000000060041434363427200200010ustar00rootroot00000000000000#N canvas 490 85 557 534 10; #X obj 0 0 cnv 15 552 40 empty empty foldback~ 3 12 0 18 -204280 -1 0; #X obj 0 353 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0 ; #X obj 0 444 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0 ; #X obj 0 481 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1 0; #X obj 79 453 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 79 367 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 0 515 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289 0; #N canvas 238 349 428 75 Related_objects 0; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 Related Objects; #X restore 206 517 pd Related_objects; #N canvas 585 625 379 261 META 0; #X text 12 25 LICENSE GPL v2; #X text 12 183 MAINTAINER Fred Jan Kraan ; #X text 12 83 INLET_0 signal; #X text 12 143 OUTLET_0 signal; #X text 12 163 AUTHOR Martin Weiss; #X text 12 123 INLET_2 float; #X text 12 64 VERSION 0.03; #X text 12 5 KEYWORDS signal mirror; #X text 11 44 DESCRIPTION signal mirroring; #X text 12 103 INLET_1 float; #X text 12 204 HELP_PATCH_AUTHORS Martin Weiss 2003 Updated by Fred Jan Kraan 2016-04.; #X restore 502 519 pd META; #X obj 123 290 output~; #X obj 392 229 metro 100; #X obj 392 210 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 1; #X floatatom 270 114 5 0 0 0 - - -, f 5; #X text 107 367 signal; #X obj 79 392 cnv 17 3 17 empty empty 1 5 9 0 16 -228856 -162280 0 ; #X obj 79 417 cnv 17 3 17 empty empty 2 5 9 0 16 -228856 -162280 0 ; #X text 107 417 float; #X obj 122 105 osc~ 440; #X text 107 453 signal; #N canvas 599 583 450 300 view 0; #N canvas 0 50 450 250 (subpatch) 0; #X array \$0-foldback 100 float 0; #X coords 0 2 99 -2 200 140 1 0 0; #X restore 128 78 graph; #N canvas 0 50 450 250 (subpatch) 0; #X array \$0-osc 100 float 0; #X coords 0 1 100 -1 200 20 1 0 0; #X restore 128 222 graph; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 waveform viewer; #X text 14 266 array updates can cause dropouts when visible; #X text 118 205 0; #X text 118 77 2; #X restore 392 292 pd view waveform; #X text 8 23 mirrors signal at specified borders, f 75; #X obj 476 6 foldback~; #X obj 123 203 sigpack/foldback~ 0.5 0.5; #X floatatom 196 114 5 0 0 0 - - -, f 5; #X obj 392 250 tabwrite~ \$0-osc; #X obj 392 271 tabwrite~ \$0-foldback; #X text 107 392 float; #X text 162 367 - signal to process; #X text 164 453 - processed signal; #X text 162 392 - lower mirror level; #X text 162 417 - upper mirror level; #X text 96 490 1: default lower mirror level \, 2: default upper mirror level; #X obj 198 74 hsl 128 15 -1 1 0 0 empty empty lower_mirror_level 10 8 0 10 -262144 -1 -1 2800 1; #X obj 273 94 hsl 128 15 -1 1 0 0 empty empty upper_mirror_level 10 8 0 10 -262144 -1 -1 10400 1; #X connect 10 0 24 0; #X connect 10 0 25 0; #X connect 11 0 10 0; #X connect 12 0 22 2; #X connect 17 0 22 0; #X connect 17 0 24 0; #X connect 22 0 9 0; #X connect 22 0 9 1; #X connect 22 0 25 0; #X connect 23 0 22 1; #X connect 32 0 23 0; #X connect 33 0 12 0; pd-sigpack-0.46.0/help/foldover~-help.pd000066400000000000000000000060551434363427200200620ustar00rootroot00000000000000#N canvas 492 84 557 534 10; #X obj 0 0 cnv 15 552 40 empty empty foldover~ 3 12 0 18 -204280 -1 0; #X obj 0 353 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0 ; #X obj 0 444 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0 ; #X obj 0 481 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1 0; #X obj 79 453 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 79 367 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 0 515 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289 0; #N canvas 238 349 428 75 Related_objects 0; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 Related Objects; #X restore 206 517 pd Related_objects; #N canvas 583 626 379 261 META 0; #X text 12 25 LICENSE GPL v2; #X text 12 198 MAINTAINER Fred Jan Kraan ; #X text 12 83 INLET_0 signal; #X text 12 143 OUTLET_0 signal; #X text 12 123 INLET_2 float; #X text 12 64 VERSION 0.03; #X text 12 5 KEYWORDS signal mirror; #X text 11 44 DESCRIPTION signal mirroring; #X text 12 103 INLET_1 float; #X text 12 219 HELP_PATCH_AUTHORS Martin Weiss 2003 Updated by Fred Jan Kraan 2016-04.; #X text 12 163 AUTHOR Martin Weiss code from swh_plugins by steve harris www.plugin.org.uk; #X restore 502 519 pd META; #X obj 123 290 output~; #X obj 390 236 metro 100; #X obj 390 215 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 1; #X floatatom 270 91 5 0 0 0 - - -, f 5; #X text 107 367 signal; #X obj 79 392 cnv 17 3 17 empty empty 1 5 9 0 16 -228856 -162280 0 ; #X obj 79 417 cnv 17 3 17 empty empty 2 5 9 0 16 -228856 -162280 0 ; #X text 107 417 float; #X obj 122 79 osc~ 440; #X text 107 453 signal; #N canvas 593 586 450 300 view 0; #N canvas 0 50 450 250 (subpatch) 0; #X array \$0-foldover 100 float 0; #X coords 0 -1 99 1 200 140 1 0 0; #X restore 128 78 graph; #X text 112 77 10; #X text 106 205 -10; #N canvas 0 50 450 250 (subpatch) 0; #X array \$0-osc 100 float 0; #X coords 0 1 100 -1 200 20 1 0 0; #X restore 128 222 graph; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 waveform viewer; #X text 14 266 array updates can cause dropouts when visible; #X restore 390 299 pd view waveform; #X text 8 23 mirrors signal at specified borders, f 75; #X obj 476 6 foldback~; #X floatatom 196 91 5 0 0 0 - - -, f 5; #X obj 390 257 tabwrite~ \$0-osc; #X text 107 392 float; #X text 162 367 - signal to process; #X text 164 453 - processed signal; #X obj 123 203 sigpack/foldover~ 0.5 0.5; #X text 162 392 - amplification or drive; #X obj 390 278 tabwrite~ \$0-foldover; #X obj 199 53 hsl 128 15 0 1 0 0 empty empty amplification/drive 5 8 0 10 -262144 -1 -1 12700 1; #X text 162 417 - symetry or push; #X obj 273 72 hsl 128 15 0 1 0 0 empty empty symetry/push 5 8 0 10 -262144 -1 -1 0 1; #X text 96 490 1: default amplification/drive \, 2: default symetry/push ; #X connect 10 0 23 0; #X connect 10 0 29 0; #X connect 11 0 10 0; #X connect 12 0 27 2; #X connect 17 0 23 0; #X connect 17 0 27 0; #X connect 22 0 27 1; #X connect 27 0 9 0; #X connect 27 0 9 1; #X connect 27 0 29 0; #X connect 30 0 22 0; #X connect 32 0 12 0; pd-sigpack-0.46.0/help/freqdiv~-help.pd000066400000000000000000000053441434363427200177020ustar00rootroot00000000000000#N canvas 492 84 557 534 10; #X obj 0 0 cnv 15 552 40 empty empty freqdiv~ 3 12 0 18 -204280 -1 0; #X obj 0 353 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0 ; #X obj 0 425 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0 ; #X obj 0 462 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1 0; #X obj 79 434 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 79 367 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 0 496 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289 0; #N canvas 238 349 428 75 Related_objects 0; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 Related Objects; #X restore 206 498 pd Related_objects; #N canvas 583 626 379 261 META 0; #X text 12 25 LICENSE GPL v2; #X text 12 198 MAINTAINER Fred Jan Kraan ; #X text 12 83 INLET_0 signal; #X text 12 143 OUTLET_0 signal; #X text 12 123 INLET_2 float; #X text 12 64 VERSION 0.03; #X text 12 5 KEYWORDS signal mirror; #X text 11 44 DESCRIPTION signal mirroring; #X text 12 103 INLET_1 float; #X text 12 219 HELP_PATCH_AUTHORS Martin Weiss 2003 Updated by Fred Jan Kraan 2016-04.; #X text 12 163 AUTHOR Martin Weiss code from swh_plugins by steve harris www.plugin.org.uk; #X restore 502 500 pd META; #X obj 123 289 output~; #X obj 366 237 metro 100; #X obj 366 217 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 1; #X text 107 367 signal; #X obj 79 392 cnv 17 3 17 empty empty 1 5 9 0 16 -228856 -162280 0 ; #X text 107 434 signal; #N canvas 593 586 450 300 view 0; #N canvas 0 50 450 250 (subpatch) 0; #X array \$0-freqdiv 100 float 0; #X coords 0 -1 99 1 200 140 1 0 0; #X restore 128 78 graph; #N canvas 0 50 450 250 (subpatch) 0; #X array \$0-osc 100 float 0; #X coords 0 1 100 -1 200 20 1 0 0; #X restore 128 222 graph; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 waveform viewer; #X text 14 266 array updates can cause dropouts when visible; #X text 118 77 1; #X text 112 205 -1; #X restore 366 300 pd view waveform; #X text 8 23 mirrors signal at specified borders, f 75; #X floatatom 228 94 5 0 0 0 - - -, f 5; #X obj 366 258 tabwrite~ \$0-osc; #X text 107 392 float; #X text 162 367 - signal to process; #X text 164 434 - processed signal; #X obj 123 179 sigpack/freqdiv~ 1; #X obj 366 279 tabwrite~ \$0-freqdiv; #X obj 123 81 osc~ 8800; #X text 350 58 8; #X obj 228 73 hradio 15 1 0 9 empty empty empty 0 -8 0 10 -262144 -1 -1 3; #X text 229 58 0; #X obj 476 6 freqdiv~; #X text 162 392 - denominate int: 0-8; #X text 96 471 1: default denoninate value; #X connect 10 0 18 0; #X connect 10 0 23 0; #X connect 11 0 10 0; #X connect 17 0 22 1; #X connect 22 0 9 0; #X connect 22 0 9 1; #X connect 22 0 23 0; #X connect 24 0 18 0; #X connect 24 0 22 0; #X connect 26 0 17 0; pd-sigpack-0.46.0/help/freqshift~-help.pd000066400000000000000000000061521434363427200202330ustar00rootroot00000000000000#N canvas 492 84 557 534 10; #X obj 0 0 cnv 15 552 40 empty empty freqshift~ 3 12 0 18 -204280 -1 0; #X obj 0 353 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0 ; #X obj 0 425 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0 ; #X obj 0 482 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1 0; #X obj 79 434 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 79 367 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 0 516 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289 0; #N canvas 238 349 428 75 Related_objects 0; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 Related Objects; #X restore 206 518 pd Related_objects; #N canvas 583 626 379 261 META 0; #X text 12 25 LICENSE GPL v2; #X text 12 198 MAINTAINER Fred Jan Kraan ; #X text 12 83 INLET_0 signal; #X text 12 143 OUTLET_0 signal; #X text 12 123 INLET_2 float; #X text 12 64 VERSION 0.03; #X text 12 5 KEYWORDS signal mirror; #X text 11 44 DESCRIPTION signal mirroring; #X text 12 103 INLET_1 float; #X text 12 219 HELP_PATCH_AUTHORS Martin Weiss 2003 Updated by Fred Jan Kraan 2016-04.; #X text 12 163 AUTHOR Martin Weiss code from swh_plugins by steve harris www.plugin.org.uk; #X restore 502 520 pd META; #X obj 123 289 output~; #X obj 365 220 metro 100; #X obj 365 199 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 1; #X text 107 367 signal; #X obj 79 392 cnv 17 3 17 empty empty 1 5 9 0 16 -228856 -162280 0 ; #X text 107 434 signal; #N canvas 531 675 450 382 view 0; #N canvas 0 50 450 250 (subpatch) 0; #X array \$0-downshift 100 float 0; #X coords 0 -1 99 1 200 100 1 0 0; #X restore 128 153 graph; #N canvas 0 50 450 250 (subpatch) 0; #X array \$0-osc 100 float 0; #X coords 0 1 100 -1 200 20 1 0 0; #X restore 128 270 graph; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 waveform viewer; #X text 16 310 array updates can cause dropouts when visible; #X text 118 152 1; #X text 112 240 -1; #N canvas 0 50 450 250 (subpatch) 0; #X array \$0-upshift 100 float 0; #X coords 0 -1 99 1 200 100 1 0 0; #X restore 128 36 graph; #X text 118 35 1; #X text 112 123 -1; #X restore 365 303 pd view waveform; #X obj 365 241 tabwrite~ \$0-osc; #X text 107 392 float; #X text 162 367 - signal to process; #X floatatom 252 99 5 0 0 0 - - -, f 5; #X obj 123 81 osc~ 440; #X obj 123 179 sigpack/freqshift~ 100; #X obj 365 282 tabwrite~ \$0-downshift; #X obj 365 261 tabwrite~ \$0-upshift; #X text 96 491 1: default frequency shift value; #X text 162 392 - frequency shift value in Hz; #X obj 476 6 freqshift~; #X text 8 23 frequency shift by ring modulation, f 75; #X obj 255 76 hsl 128 15 0 440 0 0 empty empty shift_frequency 10 8 0 10 -262144 -1 -1 0 1; #X obj 79 456 cnv 17 3 17 empty empty 1 5 9 0 16 -228856 -162280 0 ; #X text 107 456 signal; #X text 164 434 - down-shifted signal; #X text 165 456 - up-shifted signal; #X connect 10 0 16 0; #X connect 10 0 22 0; #X connect 10 0 23 0; #X connect 11 0 10 0; #X connect 19 0 21 1; #X connect 20 0 16 0; #X connect 20 0 21 0; #X connect 21 0 9 0; #X connect 21 0 9 1; #X connect 21 0 22 0; #X connect 21 1 23 0; #X connect 28 0 19 0; pd-sigpack-0.46.0/help/hardlimit~-help.pd000066400000000000000000000065361434363427200202230ustar00rootroot00000000000000#N canvas 444 82 557 534 10; #X obj 0 0 cnv 15 552 40 empty empty hardlimit~ 3 12 0 18 -204280 -1 0; #X obj 0 353 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0 ; #X obj 0 465 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0 ; #X obj 0 502 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1 0; #X obj 79 474 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 79 367 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 0 536 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289 0; #N canvas 236 350 428 75 Related_objects 0; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 Related Objects; #X restore 206 538 pd Related_objects; #N canvas 583 626 379 261 META 0; #X text 12 25 LICENSE GPL v2; #X text 12 200 MAINTAINER Fred Jan Kraan ; #X text 12 83 INLET_0 signal; #X text 12 160 OUTLET_0 signal; #X text 12 180 AUTHOR Martin Weiss; #X text 12 221 HELP_PATCH_AUTHORS Martin Weiss 2003 Updated by Fred Jan Kraan 2016-02.; #X text 12 123 INLET_2 float; #X text 12 64 VERSION 0.03; #X text 12 5 KEYWORDS signal limiter; #X text 12 45 DESCRIPTION brick hard limiter with residue mixer; #X text 12 103 INLET_1 float; #X text 12 142 INLET_3 float; #X restore 502 540 pd META; #X obj 123 308 output~; #X floatatom 172 124 5 0 0 0 - - -, f 5; #X obj 389 259 metro 100; #X obj 389 238 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 1; #X floatatom 221 124 5 0 0 0 - - -, f 5; #X text 107 367 signal; #X obj 79 392 cnv 17 3 17 empty empty 1 5 9 0 16 -228856 -162280 0 ; #X obj 79 417 cnv 17 3 17 empty empty 2 5 9 0 16 -228856 -162280 0 ; #X text 107 417 float; #X obj 122 104 osc~ 440; #X text 107 474 signal; #N canvas 470 643 450 294 view 0; #N canvas 0 50 450 250 (subpatch) 0; #X array \$0-limited 100 float 0; #X coords 0 1 99 -1 200 140 1 0 0; #X restore 128 44 graph; #N canvas 0 50 450 250 (subpatch) 0; #X array \$0-clean 100 float 0; #X coords 0 1 100 -1 200 20 1 0 0; #X restore 128 210 graph; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 waveform viewer; #X text 14 254 array updates can cause dropouts when visible; #X text 118 43 1; #X text 112 170 -1; #X restore 389 323 pd view waveform; #X obj 389 280 tabwrite~ \$0-clean; #X text 107 392 float; #X text 8 23 brick hard limiter with residue mixer, f 75; #X obj 476 6 hardlimit~; #X floatatom 270 124 5 0 0 0 - - -, f 5; #X obj 79 442 cnv 17 3 17 empty empty 3 5 9 0 16 -228856 -162280 0 ; #X text 107 442 float; #X text 162 367 - signal to limit; #X text 162 392 - limit level in dB: -50 - 0; #X text 162 417 - wet/dry mix: 0 - 1; #X text 162 442 - residue mix: 0 - 1; #X text 164 474 - limited signal; #X text 96 511 default values for limit \, wet/dry mix and residue mix; #X obj 389 302 tabwrite~ \$0-limited; #X obj 123 221 sigpack/hardlimit~ -8 1 0; #X obj 175 53 hsl 128 15 -50 0 0 0 empty empty limit_level 10 8 0 10 -262144 -1 -1 10200 1; #X obj 224 74 hsl 128 15 0 1 0 0 empty empty wet/dry_mix 10 8 0 10 -262144 -1 -1 4000 1; #X obj 273 95 hsl 128 15 0 1 0 0 empty empty residue_mix 10 8 0 10 -262144 -1 -1 9100 1; #X connect 10 0 35 1; #X connect 11 0 21 0; #X connect 11 0 34 0; #X connect 12 0 11 0; #X connect 13 0 35 2; #X connect 18 0 21 0; #X connect 18 0 35 0; #X connect 25 0 35 3; #X connect 35 0 9 0; #X connect 35 0 9 1; #X connect 35 0 34 0; #X connect 36 0 10 0; #X connect 37 0 13 0; #X connect 38 0 25 0; pd-sigpack-0.46.0/help/harmgen~-help.pd000066400000000000000000000106371434363427200176640ustar00rootroot00000000000000#N canvas 444 82 557 534 10; #X obj 0 0 cnv 15 552 40 empty empty harmgen~ 3 12 0 18 -204280 -1 0; #X obj 0 353 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0 ; #X obj 0 622 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0 ; #X obj 79 631 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 79 367 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 0 662 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289 0; #N canvas 236 350 428 75 Related_objects 0; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 Related Objects; #X restore 206 664 pd Related_objects; #N canvas 547 679 379 261 META 0; #X text 12 25 LICENSE GPL v2; #X text 12 313 MAINTAINER Fred Jan Kraan ; #X text 12 83 INLET_0 signal; #X text 12 273 OUTLET_0 signal; #X text 12 293 AUTHOR Martin Weiss; #X text 12 334 HELP_PATCH_AUTHORS Martin Weiss 2003 Updated by Fred Jan Kraan 2016-02.; #X text 12 64 VERSION 0.03; #X text 12 103 INLET_1 float; #X text 13 5 KEYWORDS signal harmonic generator additive synthesis ; #X text 12 45 DESCRIPTION harmonic generator for the first ten harmonics ; #X text 12 123 INLET_2 float; #X text 12 142 INLET_3 float; #X text 12 162 INLET_4 float; #X text 12 182 INLET_5 float; #X text 12 201 INLET_6 float; #X text 12 216 INLET_7 float; #X text 12 236 INLET_8 float; #X text 12 255 INLET_9 float; #X restore 502 666 pd META; #X obj 123 308 output~; #X obj 389 259 metro 100; #X obj 389 238 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1; #X text 107 367 signal; #X obj 79 392 cnv 17 3 17 empty empty 1 5 9 0 16 -228856 -162280 0 ; #X obj 79 417 cnv 17 3 17 empty empty 2 5 9 0 16 -228856 -162280 0 ; #X text 107 417 float; #X obj 122 122 osc~ 440; #X text 107 631 signal; #N canvas 470 643 450 294 view 0; #N canvas 0 50 450 250 (subpatch) 0; #X array \$0-limited 100 float 0; #X coords 0 1 99 -1 200 140 1 0 0; #X restore 128 44 graph; #N canvas 0 50 450 250 (subpatch) 0; #X array \$0-clean 100 float 0; #X coords 0 1 100 -1 200 20 1 0 0; #X restore 128 210 graph; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 waveform viewer; #X text 14 254 array updates can cause dropouts when visible; #X text 118 43 1; #X text 112 170 -1; #X restore 389 323 pd view waveform; #X obj 389 280 tabwrite~ \$0-clean; #X text 107 392 float; #X obj 79 442 cnv 17 3 17 empty empty 3 5 9 0 16 -228856 -162280 0 ; #X text 107 442 float; #X obj 389 302 tabwrite~ \$0-limited; #X obj 123 221 sigpack/harmgen~; #X obj 177 122 unpack f f f f f f f f f f; #X msg 156 50 1 0.5 0.25 0.125 0.0625 0.03125 0.015625 0.0078125 0.00390625 0.00195312; #X msg 177 85 1 -0.5 0.25 -0.125 0.0625 -0.03125 0.015625 -0.0078125 0.00390625 -0.00195312; #X msg 23 50 1 0 0 0 0 0 0 0 0 0; #X msg 24 74 0 1 0 0 0 0 0 0 0 0; #X text 162 367 - base frequency; #X text 162 417 - mag2: second harmonic \, range -1 - 1; #X text 162 442 - mag3: third harmonic \, range -1 - 1; #X obj 79 466 cnv 17 3 17 empty empty 4 5 9 0 16 -228856 -162280 0 ; #X obj 79 491 cnv 17 3 17 empty empty 5 5 9 0 16 -228856 -162280 0 ; #X text 107 491 float; #X text 107 466 float; #X obj 79 516 cnv 17 3 17 empty empty 6 5 9 0 16 -228856 -162280 0 ; #X text 107 516 float; #X text 107 542 float; #X text 107 591 float; #X text 107 566 float; #X obj 79 541 cnv 17 3 17 empty empty 7 5 9 0 16 -228856 -162280 0 ; #X obj 79 566 cnv 17 3 17 empty empty 8 5 9 0 16 -228856 -162280 0 ; #X obj 79 593 cnv 17 3 17 empty empty 9 5 9 0 16 -228856 -162280 0 ; #X text 162 467 - mag4: fourth harmonic \, range: -1 - 1; #X text 162 492 - mag5: fifth harmonic \, range -1 - 1; #X text 162 516 - mag6: sixth harmonic \, range -1 - 1; #X text 162 542 - mag7: seventh harmonic \, range -1 - 1; #X text 162 592 - mag9: nineth harmonic \, range -1 - 1; #X text 161 567 - mag8: eighth harmonic \, range: -1 - 1; #X text 162 393 - mag1: fundamental harmonic \, range: -1 - 1; #X text 164 631 - summed signal; #X obj 476 6 harmgen~; #X text 8 23 harmonic generator for additive synthesis, f 75; #X connect 9 0 18 0; #X connect 9 0 22 0; #X connect 10 0 9 0; #X connect 15 0 18 0; #X connect 15 0 23 0; #X connect 23 0 8 0; #X connect 23 0 8 1; #X connect 23 0 22 0; #X connect 24 0 23 1; #X connect 24 1 23 2; #X connect 24 2 23 3; #X connect 24 3 23 4; #X connect 24 4 23 5; #X connect 24 5 23 6; #X connect 24 6 23 7; #X connect 24 7 23 8; #X connect 24 8 23 9; #X connect 24 9 23 10; #X connect 25 0 24 0; #X connect 26 0 24 0; #X connect 27 0 24 0; #X connect 28 0 24 0; pd-sigpack-0.46.0/help/impulse~-help.pd000066400000000000000000000054611434363427200177200ustar00rootroot00000000000000#N canvas 1034 78 571 534 10; #X obj 0 0 cnv 15 552 40 empty empty impulse~ 3 12 0 18 -204280 -1 0; #X obj 0 353 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0 ; #X obj 0 425 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0 ; #X obj 0 462 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1 0; #X obj 79 434 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 79 367 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 0 496 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289 0; #N canvas 238 349 428 75 Related_objects 0; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 Related Objects; #X restore 206 498 pd Related_objects; #N canvas 596 668 379 261 META 0; #X text 12 25 LICENSE GPL v2; #X text 12 179 MAINTAINER Fred Jan Kraan ; #X text 12 83 INLET_0 signal; #X text 12 124 OUTLET_0 signal; #X text 12 64 VERSION 0.03; #X text 12 103 INLET_1 float; #X text 12 200 HELP_PATCH_AUTHORS Martin Weiss 2003 Updated by Fred Jan Kraan 2016-04.; #X text 12 144 AUTHOR Martin Weiss code from swh_plugins by steve harris www.plugin.org.uk; #X text 12 5 KEYWORDS signal impulse; #X text 12 44 DESCRIPTION single sample impulse generator; #X restore 497 500 pd META; #X obj 94 295 output~; #X obj 295 270 metro 100; #X obj 295 249 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1; #X text 107 367 signal; #X obj 79 392 cnv 17 3 17 empty empty 1 5 9 0 16 -228856 -162280 0 ; #X text 107 434 signal; #N canvas 1088 641 450 300 view 1; #N canvas 0 50 450 250 (subpatch) 0; #X array \$0-impulse 100 float 0; #X coords 0 -1 99 1 200 140 1 0 0; #X restore 128 78 graph; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 waveform viewer; #X text 14 266 array updates can cause dropouts when visible; #X text 118 77 1; #X text 112 205 -1; #X restore 278 317 pd view waveform; #X text 107 393 float; #X text 96 471 1: default denoninate value; #X text 8 23 non-bandlimited single-sample impulses, f 75; #X obj 476 6 impulse~; #X obj 95 127 sigpack/impulse~ 440; #X obj 278 296 tabwrite~ \$0-impulse; #X obj 179 317 print~; #X obj 179 294 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X msg 95 70 440; #X msg 129 70 1760; #X text 162 367 - impulse frequency; #X text 164 434 - single sample impulses; #X obj 327 58 vsl 15 128 0 1.5 0 0 empty empty empty 0 -9 0 10 -262144 -1 -1 1400 1; #X floatatom 327 194 5 0 0 0 - - -, f 5; #X obj 232 94 t f b b; #X text 162 393 - phase: 0 is the last sample of the block \, 1 is the first., f 49; #X connect 10 0 21 0; #X connect 11 0 10 0; #X connect 20 0 21 0; #X connect 20 0 9 0; #X connect 20 0 9 1; #X connect 20 0 22 0; #X connect 23 0 22 0; #X connect 24 0 20 0; #X connect 25 0 20 0; #X connect 28 0 29 0; #X connect 28 0 30 0; #X connect 30 0 20 1; #X connect 30 1 22 0; #X connect 30 2 21 0; pd-sigpack-0.46.0/help/output~.pd000066400000000000000000000041341434363427200166500ustar00rootroot00000000000000#N canvas 572 427 434 408 10; #X obj 13 106 hsl 42 23 0.01 1 1 0 \$0-v \$0-v volume 7 13 1 9 -245500 -13381 -1 0 0; #X obj 57 106 tgl 18 0 THIS_IS_HERE_TO_GET_RID_OF_THE_OUTLET \$0-dsp-toggle dsp 2 9 1 9 -262144 -195568 -33289 0 1; #N canvas 1019 468 429 371 dsp 0; #X obj 36 30 inlet; #X obj 117 227 select 0 1; #X msg 150 252 6; #X obj 117 86 route dsp; #X obj 117 59 receive pd; #X msg 36 228 dsp \$1; #X obj 36 253 send pd; #X msg 231 279 set \$1; #X msg 117 279 color \$1 20 12; #X obj 231 310 send \$0-dsp-toggle; #X msg 117 251 0; #X obj 251 129 loadbang; #X obj 231 99 sig~ 1; #X obj 231 191 snapshot~; #X obj 251 158 delay 100; #X obj 117 138 change -1; #X obj 2 2 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 3 Retrieve and set DSP state; #X connect 0 0 5 0; #X connect 0 0 15 0; #X connect 1 0 10 0; #X connect 1 1 2 0; #X connect 2 0 8 0; #X connect 3 0 15 0; #X connect 4 0 3 0; #X connect 5 0 6 0; #X connect 7 0 9 0; #X connect 8 0 9 0; #X connect 10 0 8 0; #X connect 11 0 14 0; #X connect 12 0 13 0; #X connect 13 0 1 0; #X connect 13 0 7 0; #X connect 14 0 13 0; #X connect 15 0 7 0; #X connect 15 0 1 0; #X restore 82 148 pd dsp logic; #X obj 188 31 inlet~; #X obj 74 268 line~; #X obj 174 328 *~; #X obj 194 358 dac~; #X text 200 51 audio in; #X obj 250 31 inlet~; #X obj 236 327 *~; #X obj 188 102 hip~ 3; #X obj 250 102 hip~ 3; #X obj 10 283 send pd; #X msg 10 262 dsp 1; #X obj 74 247 pack 0 50; #X text 141 246 <-- make a ramp to avoid clicks or zipper noise; #X msg 74 212 0; #X obj 74 189 moses 0.011; #X text 294 103 filter out DC; #X obj 4 3 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 10 3 dac~ and DSP switch abstraction; #X text 14 376 Created by Katja Vetter after an idea by Claude Heiland-Allen ; #X connect 0 0 13 0; #X connect 0 0 17 0; #X connect 1 0 2 0; #X connect 3 0 10 0; #X connect 4 0 9 0; #X connect 4 0 5 0; #X connect 5 0 6 0; #X connect 8 0 11 0; #X connect 9 0 6 1; #X connect 10 0 5 1; #X connect 11 0 9 1; #X connect 13 0 12 0; #X connect 14 0 4 0; #X connect 16 0 14 0; #X connect 17 0 16 0; #X connect 17 1 14 0; #X coords 0 0 1 1 65 39 1 10 90; pd-sigpack-0.46.0/help/rectify~-help.pd000066400000000000000000000047761434363427200177170ustar00rootroot00000000000000#N canvas 407 81 557 534 10; #X obj 0 0 cnv 15 552 40 empty empty rectify~ 3 12 0 18 -204280 -1 0; #X obj 0 353 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0 ; #X obj 0 425 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0 ; #X obj 0 462 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1 0; #X obj 79 434 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 79 367 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 0 496 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289 0; #N canvas 238 349 428 75 Related_objects 0; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 Related Objects; #X restore 206 498 pd Related_objects; #N canvas 565 588 379 261 META 0; #X text 12 25 LICENSE GPL v2; #X text 12 175 MAINTAINER Fred Jan Kraan ; #X text 12 83 INLET_0 signal; #X text 12 123 OUTLET_0 signal; #X text 12 196 HELP_PATCH_AUTHORS Martin Weiss 2003 Updated by Fred Jan Kraan 2016-02.; #X text 12 64 VERSION 0.03; #X text 11 103 INLET_1 float; #X text 12 143 AUTHOR Martin Weiss with code from swh_plugins by steve harris www.plugin.org.uk; #X text 12 45 DESCRIPTION signal rectifying network; #X text 12 5 KEYWORDS signal rectifying; #X restore 502 500 pd META; #X obj 111 292 output~; #X obj 322 251 metro 100; #X obj 322 232 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1; #X text 107 367 signal; #X obj 79 392 cnv 17 3 17 empty empty 1 5 9 0 16 -228856 -162280 0 ; #X text 107 392 signal; #X text 162 392 - modulator signal; #X obj 110 99 osc~ 440; #X text 107 434 signal; #N canvas 679 551 450 300 view 0; #N canvas 0 50 450 250 (subpatch) 0; #X array \$0-rect 100 float 0; #X coords 0 1 99 -1 200 140 1 0 0; #X restore 128 78 graph; #N canvas 0 50 450 250 (subpatch) 0; #X array \$0-clean 100 float 0; #X coords 0 1 100 -1 200 20 1 0 0; #X restore 128 222 graph; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 waveform viewer; #X text 14 266 array updates can cause dropouts when visible; #X text 118 77 1; #X text 112 205 -1; #X restore 322 314 pd view waveform; #X text 164 434 - processed signal; #X text 162 367 - signal to rectify; #X obj 322 293 tabwrite~ \$0-rect; #X obj 322 272 tabwrite~ \$0-clean; #X text 8 23 flips negative values to positive, f 75; #X obj 498 7 rectify~; #X obj 111 197 sigpack/rectify~; #X text 96 471 comment, f 71; #X connect 10 0 21 0; #X connect 10 0 22 0; #X connect 11 0 10 0; #X connect 16 0 22 0; #X connect 16 0 25 0; #X connect 25 0 9 0; #X connect 25 0 9 1; #X connect 25 0 21 0; pd-sigpack-0.46.0/help/round~-help.pd000066400000000000000000000052311434363427200173640ustar00rootroot00000000000000#N canvas 405 82 557 534 10; #X obj 0 0 cnv 15 552 40 empty empty round~ 3 12 0 18 -204280 -1 0 ; #X obj 0 353 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0 ; #X obj 0 425 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0 ; #X obj 0 462 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1 0; #X obj 79 434 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 79 367 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 0 496 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289 0; #N canvas 238 349 428 75 Related_objects 0; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 Related Objects; #X restore 206 498 pd Related_objects; #N canvas 567 587 379 261 META 0; #X text 12 25 LICENSE GPL v2; #X text 12 175 MAINTAINER Fred Jan Kraan ; #X text 12 83 INLET_0 signal; #X text 12 123 OUTLET_0 signal; #X text 12 196 HELP_PATCH_AUTHORS Martin Weiss 2003 Updated by Fred Jan Kraan 2016-02.; #X text 12 64 VERSION 0.03; #X text 11 103 INLET_1 float; #X text 12 143 AUTHOR Martin Weiss with code from swh_plugins by steve harris www.plugin.org.uk; #X text 12 45 DESCRIPTION signal rectifying network; #X text 12 5 KEYWORDS signal rectifying; #X restore 502 500 pd META; #X obj 96 288 output~; #X obj 321 247 metro 100; #X obj 321 226 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 1; #X text 107 367 signal; #X obj 79 392 cnv 17 3 17 empty empty 1 5 9 0 16 -228856 -162280 0 ; #X obj 95 77 osc~ 440; #X text 107 434 signal; #N canvas 584 604 450 300 view 0; #N canvas 0 50 450 250 (subpatch) 0; #X array \$0-round 100 float 0; #X coords 0 1 99 -1 200 140 1 0 0; #X restore 128 78 graph; #N canvas 0 50 450 250 (subpatch) 0; #X array \$0-clean 100 float 0; #X coords 0 1 100 -1 200 20 1 0 0; #X restore 128 222 graph; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 waveform viewer; #X text 14 266 array updates can cause dropouts when visible; #X text 118 77 1; #X text 112 205 -1; #X restore 321 310 pd view waveform; #X text 164 434 - processed signal; #X obj 321 268 tabwrite~ \$0-clean; #X obj 499 6 round~; #X text 8 23 simple rounder, f 75; #X obj 96 175 sigpack/round~ 2; #X floatatom 189 80 5 0 0 0 - - -, f 5; #X text 162 392 - course value; #X obj 321 289 tabwrite~ \$0-round; #X text 96 471 default coarse value, f 71; #X text 162 367 - signal to process; #X text 107 392 float; #X obj 192 60 hsl 128 15 0 32 0 0 empty empty coarse 10 8 0 10 -262144 -1 -1 12700 1; #X connect 10 0 18 0; #X connect 10 0 24 0; #X connect 11 0 10 0; #X connect 14 0 18 0; #X connect 14 0 21 0; #X connect 21 0 9 0; #X connect 21 0 9 1; #X connect 21 0 24 0; #X connect 22 0 21 1; #X connect 28 0 22 0; pd-sigpack-0.46.0/help/saturate~-help.pd000066400000000000000000000051521434363427200200670ustar00rootroot00000000000000#N canvas 407 81 557 534 10; #X obj 0 0 cnv 15 552 40 empty empty saturate~ 3 12 0 18 -204280 -1 0; #X obj 0 353 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0 ; #X obj 0 425 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0 ; #X obj 0 462 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1 0; #X obj 79 434 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 79 367 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 0 496 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289 0; #N canvas 238 349 428 75 Related_objects 0; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 Related Objects; #X restore 206 498 pd Related_objects; #N canvas 565 588 379 261 META 0; #X text 12 25 LICENSE GPL v2; #X text 12 166 MAINTAINER Fred Jan Kraan ; #X text 12 83 INLET_0 signal; #X text 12 123 OUTLET_0 signal; #X text 12 187 HELP_PATCH_AUTHORS Martin Weiss 2003 Updated by Fred Jan Kraan 2016-02.; #X text 12 64 VERSION 0.03; #X text 11 103 INLET_1 float; #X text 12 5 KEYWORDS signal saturation; #X text 12 45 DESCRIPTION signal saturation; #X text 12 143 AUTHOR Martin Weiss; #X restore 502 500 pd META; #X obj 96 288 output~; #X obj 350 219 metro 100; #X obj 350 198 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1; #X text 107 367 signal; #X obj 79 392 cnv 17 3 17 empty empty 1 5 9 0 16 -228856 -162280 0 ; #X text 107 392 signal; #X obj 95 74 osc~ 440; #X text 107 434 signal; #N canvas 588 602 450 300 view 0; #N canvas 0 50 450 250 (subpatch) 0; #X array \$0-saturate 100 float 0; #X coords 0 1 99 -1 200 140 1 0 0; #X restore 128 78 graph; #N canvas 0 50 450 250 (subpatch) 0; #X array \$0-clean 100 float 0; #X coords 0 1 100 -1 200 20 1 0 0; #X restore 128 222 graph; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 waveform viewer; #X text 14 266 array updates can cause dropouts when visible; #X text 118 77 1; #X text 112 205 -1; #X restore 350 282 pd view waveform; #X text 164 434 - processed signal; #X obj 350 240 tabwrite~ \$0-clean; #X floatatom 219 96 5 -1 1 0 - - -, f 5; #X text 162 367 - signal to process; #X obj 96 175 sigpack/saturate~ 0.5; #X text 8 23 soft saturation, f 75; #X obj 488 6 saturate~; #X obj 350 261 tabwrite~ \$0-saturate; #X text 96 471 default treshold value, f 71; #X obj 222 75 hsl 128 15 -1 1 0 0 empty empty threshold 10 8 0 10 -262144 -1 -1 0 1; #X text 162 391 - treshold value; #X connect 10 0 19 0; #X connect 10 0 25 0; #X connect 11 0 10 0; #X connect 15 0 19 0; #X connect 15 0 22 0; #X connect 20 0 22 1; #X connect 22 0 9 0; #X connect 22 0 9 1; #X connect 22 0 25 0; #X connect 27 0 20 0; pd-sigpack-0.46.0/help/shape~-help.pd000066400000000000000000000052001434363427200173310ustar00rootroot00000000000000#N canvas 407 81 557 534 10; #X obj 0 0 cnv 15 552 40 empty empty shape~ 3 12 0 18 -204280 -1 0 ; #X obj 0 353 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0 ; #X obj 0 425 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0 ; #X obj 0 462 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1 0; #X obj 79 434 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 79 367 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 0 496 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289 0; #N canvas 238 349 428 75 Related_objects 0; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 Related Objects; #X restore 206 498 pd Related_objects; #N canvas 565 588 379 261 META 0; #X text 12 25 LICENSE GPL v2; #X text 12 166 MAINTAINER Fred Jan Kraan ; #X text 12 83 INLET_0 signal; #X text 12 123 OUTLET_0 signal; #X text 12 187 HELP_PATCH_AUTHORS Martin Weiss 2003 Updated by Fred Jan Kraan 2016-02.; #X text 12 64 VERSION 0.03; #X text 11 103 INLET_1 float; #X text 12 5 KEYWORDS signal saturation; #X text 12 45 DESCRIPTION signal saturation; #X text 12 143 AUTHOR Martin Weiss; #X restore 502 500 pd META; #X obj 96 277 output~; #X obj 331 236 metro 100; #X obj 331 215 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 1; #X text 107 367 signal; #X obj 79 392 cnv 17 3 17 empty empty 1 5 9 0 16 -228856 -162280 0 ; #X text 107 392 signal; #X obj 95 73 osc~ 440; #X text 107 434 signal; #N canvas 584 604 450 300 view 0; #N canvas 0 50 450 250 (subpatch) 0; #X array \$0-shape 100 float 0; #X coords 0 1 99 -1 200 140 1 0 0; #X restore 128 78 graph; #N canvas 0 50 450 250 (subpatch) 0; #X array \$0-clean 100 float 0; #X coords 0 1 100 -1 200 20 1 0 0; #X restore 128 222 graph; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 waveform viewer; #X text 14 266 array updates can cause dropouts when visible; #X text 118 77 1; #X text 112 205 -1; #X restore 331 299 pd view waveform; #X text 164 434 - processed signal; #X obj 331 257 tabwrite~ \$0-clean; #X floatatom 201 90 5 -10 10 0 - - -, f 5; #X text 162 367 - signal to process; #X obj 505 6 shape~; #X text 8 23 reshape input by an exponential function, f 75; #X text 96 471 default shape value, f 71; #X obj 96 175 sigpack/shape~ 0.5; #X obj 331 278 tabwrite~ \$0-shape; #X obj 204 71 hsl 128 15 0 10 0 0 empty empty shape 10 8 0 10 -262144 -1 -1 12700 1; #X text 163 391 - shape value. Range: 0 - 10; #X connect 10 0 19 0; #X connect 10 0 26 0; #X connect 11 0 10 0; #X connect 15 0 19 0; #X connect 15 0 25 0; #X connect 20 0 25 1; #X connect 25 0 9 0; #X connect 25 0 9 1; #X connect 25 0 26 0; #X connect 27 0 20 0; pd-sigpack-0.46.0/help/sieve~-help.pd000066400000000000000000000061141434363427200173510ustar00rootroot00000000000000#N canvas 453 81 557 534 10; #X obj 0 0 cnv 15 552 40 empty empty sieve~ 3 12 0 18 -204280 -1 0 ; #X obj 0 353 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0 ; #X obj 0 445 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0 ; #X obj 0 482 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1 0; #X obj 79 454 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 79 367 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 0 516 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289 0; #N canvas 238 349 428 75 Related_objects 0; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 Related Objects; #X restore 206 518 pd Related_objects; #N canvas 563 589 379 261 META 0; #X text 12 25 LICENSE GPL v2; #X text 12 185 MAINTAINER Fred Jan Kraan ; #X text 12 83 INLET_0 signal; #X text 12 142 OUTLET_0 signal; #X text 12 206 HELP_PATCH_AUTHORS Martin Weiss 2003 Updated by Fred Jan Kraan 2016-02.; #X text 12 64 VERSION 0.03; #X text 11 103 INLET_1 float; #X text 12 162 AUTHOR Martin Weiss; #X text 12 45 DESCRIPTION signal sieve; #X text 12 5 KEYWORDS signal sieve; #X text 11 123 INLET_2 float; #X restore 502 520 pd META; #X obj 96 270 output~; #X obj 344 169 metro 100; #X obj 344 148 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 1; #X text 107 367 signal; #X obj 79 392 cnv 17 3 17 empty empty 1 5 9 0 16 -228856 -162280 0 ; #X obj 95 77 osc~ 440; #X text 107 454 signal; #N canvas 512 714 450 300 view 0; #N canvas 0 50 450 250 (subpatch) 0; #X array \$0-sieve 100 float 0; #X coords 0 1 99 -1 200 140 1 0 0; #X restore 128 78 graph; #N canvas 0 50 450 250 (subpatch) 0; #X array \$0-clean 100 float 2; #X coords 0 1 100 -1 200 140 1 0 0; #X restore 128 78 graph; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 waveform viewer; #X text 14 266 array updates can cause dropouts when visible; #X text 118 77 1; #X text 112 205 -1; #X restore 344 232 pd view waveform; #X text 164 454 - processed signal; #X obj 344 190 tabwrite~ \$0-clean; #X floatatom 213 88 5 -10 10 0 - - -, f 5; #X text 162 367 - signal to process; #X obj 502 6 sieve~; #X text 8 23 simple sample sifter, f 75; #X obj 96 175 sigpack/sieve~ 0 0.9; #X obj 154 79 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1; #X obj 79 418 cnv 17 3 17 empty empty 2 5 9 0 16 -228856 -162280 0 ; #X text 107 392 float; #X text 108 419 float; #X text 163 391 - mode. 0: ... 1: ...; #X obj 344 211 tabwrite~ \$0-sieve; #X obj 216 70 hsl 128 15 -1 1 0 0 empty empty level 10 8 0 10 -262144 -1 -1 6100 1; #X obj 95 137 *~; #X obj 227 109 hsl 128 15 0 1 0 0 empty empty amplitude 10 8 0 10 -262144 -1 -1 8800 1; #X text 163 417 - signal level. Range: -1 - 1; #X text 96 491 1: default mode \, 2: default signal level, f 71; #X floatatom 224 127 5 0 0 0 - - -, f 5; #X connect 10 0 18 0; #X connect 10 0 29 0; #X connect 11 0 10 0; #X connect 14 0 31 0; #X connect 19 0 23 2; #X connect 23 0 9 0; #X connect 23 0 9 1; #X connect 23 0 29 0; #X connect 24 0 23 1; #X connect 30 0 19 0; #X connect 31 0 23 0; #X connect 31 0 18 0; #X connect 32 0 31 1; #X connect 32 0 35 0; pd-sigpack-0.46.0/help/split~-help.pd000066400000000000000000000061521434363427200173730ustar00rootroot00000000000000#N canvas 449 80 557 534 10; #X obj 0 0 cnv 15 552 40 empty empty split~ 3 12 0 18 -204280 -1 0 ; #X obj 0 319 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0 ; #X obj 0 400 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0 ; #X obj 0 462 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1 0; #X obj 79 409 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 79 333 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 0 496 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289 0; #N canvas 238 349 428 75 Related_objects 0; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 Related Objects; #X restore 206 498 pd Related_objects; #N canvas 561 590 379 261 META 0; #X text 12 25 LICENSE GPL v2; #X text 12 166 MAINTAINER Fred Jan Kraan ; #X text 12 83 INLET_0 signal; #X text 12 123 OUTLET_0 signal; #X text 12 187 HELP_PATCH_AUTHORS Martin Weiss 2003 Updated by Fred Jan Kraan 2016-02.; #X text 12 64 VERSION 0.03; #X text 11 103 INLET_1 float; #X text 12 143 AUTHOR Martin Weiss; #X text 12 5 KEYWORDS signal split; #X text 12 45 DESCRIPTION signal split; #X restore 502 500 pd META; #X obj 96 268 output~; #X obj 307 214 metro 100; #X obj 307 193 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 1; #X text 107 333 signal; #X obj 79 358 cnv 17 3 17 empty empty 1 5 9 0 16 -228856 -162280 0 ; #X obj 95 59 osc~ 440; #X text 107 409 signal; #N canvas 518 711 450 334 view 0; #N canvas 0 50 450 250 (subpatch) 0; #X array \$0-split_l 100 float 0; #X coords 0 1 99 -1 200 100 1 0 0; #X restore 128 153 graph; #N canvas 0 50 450 250 (subpatch) 0; #X array \$0-clean 100 float 0; #X coords 0 1 100 -1 200 20 1 0 0; #X restore 128 273 graph; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 waveform viewer; #X text 14 296 array updates can cause dropouts when visible; #X text 118 152 1; #X text 112 241 -1; #N canvas 0 50 450 250 (subpatch) 0; #X array \$0-split_h 100 float 0; #X coords 0 1 99 -1 200 100 1 0 0; #X restore 128 36 graph; #X text 118 34 1; #X text 112 123 -1; #X restore 307 297 pd view waveform; #X obj 307 235 tabwrite~ \$0-clean; #X floatatom 201 80 5 -10 10 0 - - -, f 5; #X text 107 358 float; #X obj 96 167 sigpack/split~ 0.5; #X obj 307 277 tabwrite~ \$0-split_l; #X obj 307 256 tabwrite~ \$0-split_h; #X obj 79 434 cnv 17 3 17 empty empty 1 5 9 0 16 -228856 -162280 0 ; #X text 107 434 signal; #X text 162 333 - signal to switch; #X obj 502 6 split~; #X text 163 357 - if the signal is higher than this level \, it is routed to outlet 0 if it is lower \, it is routed to outlet 1 An inactive outlet is 0; #X text 164 409 - upper part of the signal or 0; #X text 164 434 - lower part of the signal or 0; #X text 8 23 signal split function, f 75; #X text 96 471 default split value, f 71; #X obj 204 61 hsl 128 15 -1 1 0 0 empty empty split_level 8 8 0 10 -262144 -1 -1 0 1; #X connect 10 0 17 0; #X connect 10 0 21 0; #X connect 10 0 22 0; #X connect 11 0 10 0; #X connect 14 0 17 0; #X connect 14 0 20 0; #X connect 18 0 20 1; #X connect 20 0 9 0; #X connect 20 0 9 1; #X connect 20 0 21 0; #X connect 20 1 22 0; #X connect 32 0 18 0; pd-sigpack-0.46.0/help/transient~-help.pd000066400000000000000000000104441434363427200202460ustar00rootroot00000000000000#N canvas 425 85 557 534 10; #X obj 0 0 cnv 15 552 40 empty empty transient~ 3 12 0 18 -204280 -1 0; #X obj 0 353 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0 ; #X obj 0 447 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0 ; #X obj 0 484 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1 0; #X obj 79 456 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 79 367 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 0 518 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289 0; #N canvas 238 349 428 75 Related_objects 0; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 Related Objects; #X restore 206 520 pd Related_objects; #N canvas 563 589 379 261 META 0; #X text 12 25 LICENSE GPL v2; #X text 12 194 MAINTAINER Fred Jan Kraan ; #X text 12 83 INLET_0 signal; #X text 12 141 OUTLET_0 signal; #X text 12 215 HELP_PATCH_AUTHORS Martin Weiss 2003 Updated by Fred Jan Kraan 2016-02.; #X text 12 64 VERSION 0.03; #X text 11 103 INLET_1 float; #X text 12 162 AUTHOR Martin Weiss with code from swh_plugins by steve harris www.plugin.org.uk; #X text 12 5 KEYWORDS signal transient mangler; #X text 12 45 DESCRIPTION signal transient mangler; #X text 11 122 INLET_2 float; #X restore 502 522 pd META; #X obj 123 303 output~; #X obj 383 243 metro 100; #X obj 383 224 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1; #X text 107 367 signal; #X obj 79 392 cnv 17 3 17 empty empty 1 5 9 0 16 -228856 -162280 0 ; #X text 107 456 signal; #N canvas 512 668 450 300 view 0; #N canvas 0 50 450 250 (subpatch) 0; #X array \$0-trans 100 float 0; #X coords 0 1 99 -1 200 140 1 0 0; #X restore 128 78 graph; #N canvas 0 50 450 250 (subpatch) 0; #X array \$0-clean 100 float 0; #X coords 0 1 100 -1 200 20 1 0 0; #X restore 128 222 graph; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 waveform viewer; #X text 14 266 array updates can cause dropouts when visible; #X text 106 78 100; #X text 118 205 0; #X text 6 1 waveform viewer; #X restore 383 306 pd view waveform; #X text 164 456 - processed signal; #X obj 383 264 tabwrite~ \$0-clean; #X text 9 23 transient mangler, f 75; #X obj 123 212 sigpack/transient~ 1 0.1; #X floatatom 322 131 5 0 0 0 - - -, f 5; #X floatatom 251 131 5 0 0 0 - - -, f 5; #X text 96 493 1: default attach value \, 2: default decay value, f 71; #X text 107 392 float; #X text 162 392 - attack value; #X obj 79 417 cnv 17 3 17 empty empty 1 5 9 0 16 -228856 -162280 0 ; #X text 107 417 float; #X text 162 417 - decay value; #X obj 383 285 tabwrite~ \$0-trans; #N canvas 316 709 450 318 testsignal 0; #X obj 44 32 inlet; #X obj 173 37 inlet; #X obj 29 279 outlet~; #X obj 44 152 line~; #X obj 29 241 *~; #X obj 44 103 t b b; #X msg 74 180 0.25; #X obj 44 75 metro 500; #X obj 152 133 *~ 0; #X obj 29 205 osc~ 100; #X msg 44 127 1.1 \, 0 200; #X obj 252 37 inlet; #X obj 210 206 adc~; #X obj 231 237 *~ 0; #X obj 152 75 noise~; #X obj 173 104 * 0.1; #X obj 152 160 lop~ 500; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 5 2 test signal generator; #X connect 0 0 7 0; #X connect 1 0 15 0; #X connect 3 0 4 1; #X connect 4 0 2 0; #X connect 5 0 10 0; #X connect 5 1 6 0; #X connect 6 0 9 1; #X connect 7 0 5 0; #X connect 8 0 16 0; #X connect 9 0 4 0; #X connect 10 0 3 0; #X connect 11 0 13 1; #X connect 12 0 13 0; #X connect 12 1 13 0; #X connect 13 0 2 0; #X connect 14 0 8 0; #X connect 15 0 8 1; #X connect 16 0 2 0; #X restore 122 111 pd testsignal; #X obj 122 43 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1; #X obj 159 61 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1; #X obj 197 81 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1; #X text 141 41 sine resonator 100 Hz; #X text 214 80 adc~; #X text 178 60 lo pass filtered noise; #X obj 254 93 hsl 128 15 -1 1 0 0 empty empty attack 20 8 0 10 -262144 -1 -1 0 1; #X obj 325 112 hsl 128 15 -1 1 0 0 empty empty decay 20 8 0 10 -262144 -1 -1 0 1; #X text 162 367 - signal to mangle; #X obj 476 6 transient~; #X connect 10 0 17 0; #X connect 10 0 28 0; #X connect 11 0 10 0; #X connect 19 0 9 0; #X connect 19 0 9 1; #X connect 19 0 28 0; #X connect 20 0 19 2; #X connect 21 0 19 1; #X connect 29 0 19 0; #X connect 29 0 17 0; #X connect 30 0 29 0; #X connect 31 0 29 1; #X connect 32 0 29 2; #X connect 36 0 21 0; #X connect 37 0 20 0; pd-sigpack-0.46.0/help/ustep~-help.pd000066400000000000000000000060641434363427200174020ustar00rootroot00000000000000#N canvas 407 81 557 534 10; #X obj 0 0 cnv 15 552 40 empty empty ustep~ 3 12 0 18 -204280 -1 0 ; #X obj 0 353 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0 ; #X obj 0 460 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0 ; #X obj 0 497 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1 0; #X obj 79 469 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 79 365 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 0 531 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289 0; #N canvas 238 349 428 75 Related_objects 0; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 Related Objects; #X restore 206 533 pd Related_objects; #N canvas 565 588 379 261 META 0; #X text 12 25 LICENSE GPL v2; #X text 12 190 MAINTAINER Fred Jan Kraan ; #X text 12 83 INLET_0 signal; #X text 12 138 OUTLET_0 signal; #X text 12 211 HELP_PATCH_AUTHORS Martin Weiss 2003 Updated by Fred Jan Kraan 2016-02.; #X text 12 64 VERSION 0.03; #X text 11 103 INLET_1 float; #X text 12 158 AUTHOR Martin Weiss with code from swh_plugins by steve harris www.plugin.org.uk; #X text 12 5 KEYWORDS signal unity step; #X text 12 45 DESCRIPTION signal unity step function; #X text 11 120 INLET_2 float; #X restore 502 535 pd META; #X obj 122 300 output~; #X obj 334 260 metro 100; #X obj 334 239 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1; #X text 107 365 signal; #X obj 79 390 cnv 17 3 40 empty empty 1 5 9 0 16 -228856 -162280 0 ; #X obj 124 73 osc~ 440; #X text 107 469 signal; #N canvas 679 551 450 300 view 0; #N canvas 0 50 450 250 (subpatch) 0; #X array \$0-unity 100 float 0; #X coords 0 1 99 -1 200 140 1 0 0; #X restore 128 78 graph; #N canvas 0 50 450 250 (subpatch) 0; #X array \$0-clean 100 float 0; #X coords 0 1 100 -1 200 20 1 0 0; #X restore 128 222 graph; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 waveform viewer; #X text 14 266 array updates can cause dropouts when visible; #X text 118 77 1; #X text 112 205 -1; #X restore 334 322 pd view waveform; #X text 164 469 - processed signal; #X text 162 365 - signal to rectify; #X obj 334 281 tabwrite~ \$0-clean; #X text 8 23 signal unity step function, f 75; #X obj 499 6 ustep~; #X obj 123 188 sigpack/ustep~ 0; #X floatatom 238 85 5 0 0 0 - - -, f 5; #X obj 200 75 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1; #X obj 334 302 tabwrite~ \$0-unity; #X obj 79 437 cnv 17 3 17 empty empty 2 5 9 0 16 -228856 -162280 0 ; #X text 107 390 float; #X text 107 437 float; #X text 162 390 - 0: signal values above threshold output 1 \, otherwise 0; #X text 162 404 - 1: signal values above threshold output 1 and unchanged otherwise; #X text 162 437 - threshold level; #X text 96 506 1: default mode \, 2: default threshold, f 71; #X obj 241 63 hsl 128 15 -1 1 0 0 empty empty threshold 8 8 0 10 -262144 -1 -1 0 1; #X connect 10 0 19 0; #X connect 10 0 25 0; #X connect 11 0 10 0; #X connect 14 0 19 0; #X connect 14 0 22 0; #X connect 22 0 9 0; #X connect 22 0 9 1; #X connect 22 0 25 0; #X connect 23 0 22 2; #X connect 24 0 22 1; #X connect 33 0 23 0; pd-sigpack-0.46.0/help/valverect~-help.pd000066400000000000000000000060151434363427200202310ustar00rootroot00000000000000#N canvas 405 82 557 534 10; #X obj 0 0 cnv 15 552 40 empty empty valverect~ 3 12 0 18 -204280 -1 0; #X obj 0 353 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0 ; #X obj 0 450 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0 ; #X obj 0 487 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1 0; #X obj 79 459 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 79 365 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 0 521 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289 0; #N canvas 238 349 428 75 Related_objects 0; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 Related Objects; #X restore 206 523 pd Related_objects; #N canvas 563 589 379 261 META 0; #X text 12 25 LICENSE GPL v2; #X text 12 190 MAINTAINER Fred Jan Kraan ; #X text 12 83 INLET_0 signal; #X text 12 138 OUTLET_0 signal; #X text 12 211 HELP_PATCH_AUTHORS Martin Weiss 2003 Updated by Fred Jan Kraan 2016-02.; #X text 12 64 VERSION 0.03; #X text 11 103 INLET_1 float; #X text 12 158 AUTHOR Martin Weiss with code from swh_plugins by steve harris www.plugin.org.uk; #X text 11 120 INLET_2 float; #X text 12 5 KEYWORDS signal valve retifying; #X text 12 45 DESCRIPTION signal valve type retifying function; #X restore 502 525 pd META; #X obj 123 290 output~; #X obj 372 250 metro 100; #X obj 372 229 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1; #X text 107 365 signal; #X obj 79 390 cnv 17 3 17 empty empty 1 5 9 0 16 -228856 -162280 0 ; #X obj 122 62 osc~ 440; #X text 107 459 signal; #N canvas 646 619 450 300 view 0; #N canvas 0 50 450 250 (subpatch) 0; #X array \$0-valverect 100 float 0; #X coords 0 1 99 -1 200 140 1 0 0; #X restore 128 78 graph; #N canvas 0 50 450 250 (subpatch) 0; #X array \$0-clean 100 float 0; #X coords 0 1 100 -1 200 20 1 0 0; #X restore 128 222 graph; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 waveform viewer; #X text 14 266 array updates can cause dropouts when visible; #X text 118 77 1; #X text 112 205 -1; #X restore 372 312 pd view waveform; #X text 164 459 - processed signal; #X text 162 365 - signal to rectify; #X obj 372 271 tabwrite~ \$0-clean; #X floatatom 240 82 5 0 0 0 - - -, f 5; #X obj 198 62 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1; #X obj 79 427 cnv 17 3 17 empty empty 2 5 9 0 16 -228856 -162280 0 ; #X text 107 390 float; #X text 107 427 float; #X obj 475 6 valverect~; #X text 8 23 valve rectifier, f 75; #X obj 123 203 sigpack/valverect~ 0; #X obj 372 292 tabwrite~ \$0-valverect; #X text 162 427 - distortion level; #X text 162 390 - 0: half wave retifying; #X text 163 406 1: full wave retifying; #X text 96 496 1: default retify mode \, 2: default distortion level , f 71; #X obj 243 62 hsl 128 15 -1 1 0 0 empty empty distorsion 8 8 0 10 -262144 -1 -1 0 1; #X connect 10 0 19 0; #X connect 10 0 28 0; #X connect 11 0 10 0; #X connect 14 0 19 0; #X connect 14 0 27 0; #X connect 20 0 27 2; #X connect 21 0 27 1; #X connect 27 0 9 0; #X connect 27 0 9 1; #X connect 27 0 28 0; #X connect 33 0 20 0; pd-sigpack-0.46.0/help/vowel~-help.pd000066400000000000000000000054731434363427200174010ustar00rootroot00000000000000#N canvas 475 81 557 534 10; #X obj 0 0 cnv 15 552 40 empty empty vowel~ 3 12 0 18 -204280 -1 0 ; #X obj 0 357 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0 ; #X obj 0 425 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0 ; #X obj 0 462 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1 0; #X obj 79 434 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 79 369 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 0 496 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289 0; #N canvas 238 349 428 75 Related_objects 0; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 Related Objects; #X restore 206 498 pd Related_objects; #N canvas 561 590 379 261 META 0; #X text 12 25 LICENSE GPL v2; #X text 12 177 MAINTAINER Fred Jan Kraan ; #X text 12 83 INLET_0 signal; #X text 12 125 OUTLET_0 signal; #X text 12 198 HELP_PATCH_AUTHORS Martin Weiss 2003 Updated by Fred Jan Kraan 2016-02.; #X text 12 64 VERSION 0.03; #X text 11 103 INLET_1 float; #X text 12 145 AUTHOR Martin Weiss with code from musicdsp.org posted by alex@smartelectronix.com; #X text 12 5 KEYWORDS signal formant filter; #X text 12 45 DESCRIPTION signal simple formant filter function; #X restore 502 500 pd META; #X obj 103 301 output~; #X obj 316 282 metro 100; #X obj 316 261 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 1; #X text 107 369 signal; #X obj 79 394 cnv 17 3 17 empty empty 1 5 9 0 16 -228856 -162280 0 ; #X text 107 434 signal; #N canvas 506 661 450 300 view 0; #N canvas 0 50 450 250 (subpatch) 0; #X array \$0-vowel 100 float 0; #X coords 0 1 99 -1 200 140 1 0 0; #X restore 128 78 graph; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 waveform viewer; #X text 14 266 array updates can cause dropouts when visible; #X text 118 77 1; #X text 112 205 -1; #X restore 316 324 pd view waveform; #X text 164 434 - processed signal; #X text 162 369 - signal to rectify; #X text 107 394 float; #X text 8 23 simple formant filter, f 75; #X obj 494 6 vowel~; #X obj 103 214 sigpack/vowel~ 0; #X obj 196 56 vradio 15 1 0 5 empty empty empty 0 -8 0 10 -262144 -1 -1 2; #X obj 316 303 tabwrite~ \$0-vowel; #X text 214 56 a; #X text 214 71 e; #X text 214 86 i; #X text 214 101 o; #X text 214 116 u; #X obj 102 116 phasor~ 220; #X obj 102 56 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 ; #X obj 102 74 metro 200; #X obj 102 95 random 440; #X obj 103 254 *~ 0.1; #X text 161 394 - vowel 0: a \, 1: e \, 2: i \, 3: o \, 4: u; #X text 96 471 1: default vowel, f 71; #X floatatom 204 139 5 0 0 0 - - -, f 5; #X connect 10 0 23 0; #X connect 11 0 10 0; #X connect 21 0 33 0; #X connect 22 0 21 1; #X connect 22 0 36 0; #X connect 29 0 21 0; #X connect 30 0 31 0; #X connect 31 0 32 0; #X connect 32 0 29 0; #X connect 33 0 23 0; #X connect 33 0 9 1; #X connect 33 0 9 0; pd-sigpack-0.46.0/help/wavewrap~-help.pd000066400000000000000000000052631434363427200200760ustar00rootroot00000000000000#N canvas 405 82 557 534 10; #X obj 0 0 cnv 15 552 40 empty empty wavewrap~ 3 12 0 18 -204280 -1 0; #X obj 0 357 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0 ; #X obj 0 425 cnv 3 550 3 empty empty outlets 8 12 0 13 -228856 -1 0 ; #X obj 0 462 cnv 3 550 3 empty empty arguments 8 12 0 13 -228856 -1 0; #X obj 79 434 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 79 369 cnv 17 3 17 empty empty 0 5 9 0 16 -228856 -162280 0 ; #X obj 0 496 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289 0; #N canvas 238 349 428 75 Related_objects 0; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 Related Objects; #X restore 206 498 pd Related_objects; #N canvas 559 591 379 261 META 0; #X text 12 25 LICENSE GPL v2; #X text 12 177 MAINTAINER Fred Jan Kraan ; #X text 12 83 INLET_0 signal; #X text 12 125 OUTLET_0 signal; #X text 12 198 HELP_PATCH_AUTHORS Martin Weiss 2003 Updated by Fred Jan Kraan 2016-02.; #X text 12 64 VERSION 0.03; #X text 11 103 INLET_1 float; #X text 12 145 AUTHOR Martin Weiss with code from swh_plugins by steve harris www.plugin.org.uk; #X text 12 5 KEYWORDS signal sinus wrapper; #X text 11 45 DESCRIPTION signal sinus wrapper function; #X restore 502 500 pd META; #X obj 103 284 output~; #X obj 314 252 metro 100; #X obj 314 233 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1; #X text 107 369 signal; #X obj 79 394 cnv 17 3 17 empty empty 1 5 9 0 16 -228856 -162280 0 ; #X text 107 434 signal; #N canvas 514 657 450 300 view 0; #N canvas 0 50 450 250 (subpatch) 0; #X array \$0-wavewrap 100 float 0; #X coords 0 1 99 -1 200 140 1 0 0; #X restore 128 78 graph; #N canvas 0 50 450 250 (subpatch) 0; #X array \$0-clean 100 float 0; #X coords 0 1 100 -1 200 20 1 0 0; #X restore 128 222 graph; #X obj 0 0 cnv 15 425 20 empty empty empty 3 12 0 14 -204280 -1 0; #X text 6 1 waveform viewer; #X text 14 266 array updates can cause dropouts when visible; #X text 118 77 1; #X text 112 205 -1; #X restore 314 314 pd view waveform; #X text 164 434 - processed signal; #X obj 314 273 tabwrite~ \$0-clean; #X text 107 394 float; #X obj 103 72 osc~ 440; #X obj 475 6 wavewrap~; #X obj 103 197 sigpack/wavewrap~ 2; #X text 8 23 sinus wave wrapper, f 75; #X floatatom 273 79 5 0 0 0 - - -, f 5; #X obj 314 294 tabwrite~ \$0-wavewrap; #X text 161 394 - wrap factor; #X text 162 369 - signal to wrap; #X text 96 471 1: default wrap factor, f 71; #X obj 276 59 hsl 128 15 0 10 0 0 empty empty wrap_factor 8 8 0 10 -262144 -1 -1 0 1; #X connect 10 0 17 0; #X connect 10 0 24 0; #X connect 11 0 10 0; #X connect 19 0 17 0; #X connect 19 0 21 0; #X connect 21 0 9 0; #X connect 21 0 9 1; #X connect 21 0 24 0; #X connect 23 0 21 1; #X connect 28 0 23 0; pd-sigpack-0.46.0/objects.txt000066400000000000000000000017431434363427200160320ustar00rootroot00000000000000chop~ multiplicates incoming signal by factor x if modulation decimate~ signal decimation by resolution and sample rate, f 75 diode~ diode rectifier network, f 75; foldback~ mirrors signal at specified borders, f 75; foldover~ mirrors signal at specified borders, f 75; freqdiv~ mirrors signal at specified borders, f 75; freqshift~ frequency shift by ring modulation, f 75; hardlimit~ brick hard limiter with residue mixer, f 75; harmgen~ harmonic generator for additive synthesis, f 75; impulse~ non-bandlimited single-sample impulses, f 75; rectify~ flips negative values to positive, f 75; round~ simple rounder, f 75; saturate~ soft saturation, f 75; shape~ reshape input by an exponential function, f 75; sieve~ simple sample sifter, f 75; split~ signal split function, f 75; ustep~ signal unity step function, f 75; valverect~ valve rectifier, f 75; vowel~ simple formant filter, f 75; wavewrap~ sinus wave wrapper, f 75; pd-sigpack-0.46.0/pd-lib-builder/000077500000000000000000000000001434363427200164265ustar00rootroot00000000000000pd-sigpack-0.46.0/pd-lib-builder/Makefile.pdlibbuilder000066400000000000000000001270261434363427200225360ustar00rootroot00000000000000# Makefile.pdlibbuilder dated 2019-12-21 version = 0.6.0 # Helper makefile for Pure Data external libraries. # Written by Katja Vetter March-June 2015 for the public domain. No warranties. # Inspired by Hans Christoph Steiner's Makefile Template and Stephan Beal's # ShakeNMake. # # Grab the newest version of Makefile.pdlibbuilder from # https://github.com/pure-data/pd-lib-builder/ # # GNU make version >= 3.81 required. # # #=== characteristics =========================================================== # # # - defines build settings based on autodetected OS and architecture # - defines rules to build Pd class- or lib executables from C or C++ sources # - defines rules for libdir installation # - defines convenience targets for developer and user # - evaluates implicit dependencies for non-clean builds # # #=== basic usage =============================================================== # # # In your Makefile, define your Pd lib name and class files, and include # Makefile.pdlibbuilder at the end of the Makefile. Like so: # # ________________________________________________________________________ # # # Makefile for mylib # # lib.name = mylib # # class.sources = myclass1.c myclass2.c # # datafiles = myclass1-help.pd myclass2-help.pd README.txt LICENSE.txt # # include Makefile.pdlibbuilder # ________________________________________________________________________ # # # For files in class.sources it is assumed that class basename == source file # basename. The default target builds all classes as individual executables # with Pd's default extension for the platform. For anything more than the # most basic usage, continue reading. # # #=== list of Makefile.pdlibbuilder API variables =============================== # # # Variables available for definition in your library Makefile: # # - lib.name # - lib.setup.sources # - class.sources # - common.sources # - shared.sources # - .class.sources # - .class.ldflags # - .class.ldlibs # - cflags # - ldflags # - ldlibs # - datafiles # - datadirs # - makefiles # - makefiledirs # - externalsdir # # Optional multiline defines evaluated per operating system: # # - forLinux # - forDarwin # - forWindows # # Variables available for your makefile or make command line: # # - make-lib-executable # - suppress-wunused # # Path variables for make command line or environment: # # - PDDIR # - PDINCLUDEDIR # - PDBINDIR # - PDLIBDIR # # Standard make variables for make command line or environment: # # - CPPFLAGS # - CFLAGS # - LDFLAGS # - CC # - CXX # - INSTALL # - STRIP # - DESTDIR # # Optional user variables for make command line or environment: # # - PLATFORM # # Deprecated path variables: # # - pdincludepath # - pdbinpath # - objectsdir # # #=== descriptions of Makefile.pdlibbuilder API variables ======================= # # # lib.name: # Name of the library directory as it will be installed / distributed. Also the # name of the lib executable in the case where all classes are linked into # a single binary. # # lib.setup.sources: # Source file(s) (C or C++) which must be compiled only when linking all classes # into a single lib binary. # # class.sources: # All sources files (C or C++) for which the condition holds that # class name == source file basename. # # .class.sources: # Source file(s) (C or C++) specific to class . Use this for # multiple-source classes or when class name != source file basename. # # common.sources: # Source file(s) which must be statically linked to each class in the library. # # shared.sources: # Source file(s) (C or C++) to build a shared dynamic link lib, to be linked # with all class executables. # # cflags, ldflags, ldlibs: # Define cflags (preprocessor&compiler), ldflags (linker) and ldlibs (dynamic # link libs) for the whole library. These flags are added to platform-specific # flags defined by Makefile.pdlibbuilder. # # .class.ldflags and .class.ldlibs: # Define ldflags resp. ldlibs specific to class . These flags are # added to platform-specific flags defined by Makefile.pdlibbuilder, and flags # defined in your Makefile for the whole library. Note: cflags can not be # defined per class in the current implementation. # # datafiles and datadirs: # All extra files you want to include in binary distributions of the # library: abstractions and help patches, example patches, meta patch, readme # and license texts, manuals, sound files, etcetera. Use 'datafiles' for all # files that should go into your lib rootdir and 'datadirs' for complete # directories you want to copy from source to distribution. # # forLinux, forDarwin, forWindows: # Shorthand for 'variable definitions for Linux only' etc. Use like: # define forLinux # cflags += -DLINUX # class.sources += linuxthing.c # endef # # makefiles and makefiledirs: # Extra makefiles or directories with makefiles that should be made in sub-make # processes. # # make-lib-executable: # When this variable is defined 'yes' in your makefile or as command argument, # Makefile.pdlibbuilder will try to build all classes into a single library # executable (but it will force exit if lib.setup.sources is undefined). # If your makefile defines 'make-lib-executable=yes' as the library default, # this can still be overridden with 'make-lib-executable=no' as command argument # to build individual class executables (the Makefile.pdlibbuilder default.) # # suppress-wunused: # When this variable is defined ('yes' or any other value), -Wunused-variable, # -Wunused-parameter, -Wunused-value and -Wunused-function are suppressed, # but the other warnings from -Wall are retained. # # PDDIR: # Root directory of 'portable' pd package. When defined, PDINCLUDEDIR and # PDBINDIR will be evaluated as $(PDDIR)/src and $(PDDIR)/bin. # # PDINCLUDEDIR: # Directory where Pd API m_pd.h should be found, and other Pd header files. # Overrides the default search path. # # PDBINDIR: # Directory where pd.dll should be found for linking (Windows only). Overrides # the default search path. # # PDLIBDIR: # Root directory for installation of Pd library directories. Overrides the # default install location. # # DESTDIR: # Prepended path component for staged install. # # PLATFORM: # Target platform for cross compilation in the form of GNU triplet: # cpu-vendor-os. Example: x86_64-w64-mingw32. This specifies the tool chain that # pdlibbuilder will use, if installed and locatable. System and architecture # will then be autodefined accordingly. In most cases no other variables need to # be overridden. # # CPPFLAGS: # Preprocessor flags which are not strictly required for building. # # CFLAGS: # Compiler flags which are not strictly required for building. Compiler flags # defined by Makefile.pdlibbuilder for warning, optimization and architecture # specification are overriden by CFLAGS. # # LDFLAGS: # Linker flags which are not strictly required for building. Linker flags # defined by Makefile.pdlibbuilder for architecture specification are overriden # by LDFLAGS. # # CC and CXX: # C and C++ compiler programs as defined in your build environment. # # INSTALL # Definition of install program. # # STRIP # Name of strip program. Default 'strip' can be overridden in cross compilation # environments. # # objectsdir: # Root directory for installation of Pd library directories, like PDLIBDIR but # not overridable by environment. Supported for compatibility with pd-extended # central makefile, but deprecated otherwise. # # pdincludepath, pdbinpath: # As PDINCLUDEDIR and PDBINDIR but not overridable by environment. Deprecated # as user variables. # # #=== paths ===================================================================== # # # Source files in directories other than current working directory must be # prefixed with their relative path. Do not rely on VPATH or vpath. # Object (.o) files are built in the directory of their source files. # Executables are built in current working directory. # # Default search path for m_pd.h and other API header files is platform # dependent, and overridable by PDINCLUDEDIR: # # Linux: /usr/include/pd # # OSX: /Applications/Pd*.app/Contents/Resources/src # # Windows: %PROGRAMFILES%/Pd/src # %PROGRAMFILES(X86)%/Pd/src (32 bit builds on 64 bit Windows) # # Default search path for binary pd.dll (Windows), overridable by PDBINDIR # # %PROGRAMFILES%/Pd/bin # %PROGRAMFILES(X86)%/Pd/bin (32 bit builds on 64 bit Windows) # # Default location to install pd libraries is platform dependent, and # overridable by PDLIBDIR: # # Linux: /usr/local/lib/pd-externals # OSX: ~/Library/Pd # Windows: %APPDATA%/Pd # # https://puredata.info/docs/faq/how-do-i-install-externals-and-help-files # The rationale for not installing to ~/pd-externals by default on Linux # is that some people share the home dir between 32 and 64 bit installations. # # #=== targets =================================================================== # # # all: build $(executables) plus optional post target # post: target to build after $(executables) # alldebug: build all with -g option turned on for debug symbols # : force clean build of an individual class # .pre: make preprocessor output file in current working directory # .lst: make asm/source output file in current working directory # # install: install executables and data files # clean: remove build products from source tree # # help: print help text # vars: print makefile variables # allvars: print all variables # depend: print generated prerequisites # dumpmachine: print compiler output of option '-dumpmachine' # coffee: dummy target # # Variable $(executables) expands to class executables plus optional shared lib, # or alternatively to single lib executable when make-lib-executable=true. # Targets pre and post can be defined by library makefile. Make sure to include # Makefile.pdlibbuilder first so default target all will not be redefined. # # #=== Pd-extended libdir concept ================================================ # # # For libdir layout as conceived by Hans-Christoph Steiner, see: # # https://puredata.info/docs/developer/Libdir # # Files README.txt, LICENSE.txt and -meta.pd are part of the libdir # convention. Help patches for each class and abstraction are supposed to be # available. Makefile.pdlibbuilder does not force the presence of these files # however. It does not automatically include such files in libdir installations. # Data files you want to include in distributions must be defined explicitly in # your Makefile. # # #=== Makefile.pdlibbuilder syntax conventions ================================== # # # Makefile.pdlibbuilder variable names are lower case. Default make variables, # environment variables, and standard user variables (CC, CXX, CFLAGS, DESTDIR) # are upper case. Use target 'allvars' to print all variables and their values. # # 'Fields' in data variables are separated by dots, like in 'foo.class.sources'. # Words in variables expressing a function or command are separated by dashes, # like in 'make-lib-executable'. # # #=== useful make options ======================================================= # # # Use 'make -d ' to print debug details of the make process. # Use 'make -p ' to print make's database. # # #=== TODO ====================================================================== # # # - decide whether to use -static-libgcc or shared dll in MinGW # - cygwin support # - android support # - figure out how to handle '$' in filenames # - add makefile template targets dpkg-source dist libdir distclean tags? # # #=== end of documentation sections ============================================= # # ################################################################################ ################################################################################ ################################################################################ # GNU make version 3.81 (2006) or higher is required because of the following: # - function 'info' # - variable '.DEFAULT_GOAL' # force exit when make version is < 3.81 ifneq ($(firstword $(sort 3.81 $(MAKE_VERSION))), 3.81) $(error GNU make version 3.81 or higher is required) endif # Relative path to externals root dir in multi-lib source tree like # pd-extended SVN. Default is parent of current working directory. May be # defined differently in including makefile. externalsdir ?= .. # variable you can use to check if Makefile.pdlibbuilder is already included Makefile.pdlibbuilder = true ################################################################################ ### target platform detection ################################################## ################################################################################ #=== target platform =========================================================== # PLATFORM: optional user variable to define target platform for cross # compilation. Redefine build tools accordingly. PLATFORM should match # the exact target prefix of tools present in $PATH, like x86_64-w64-mingw32, # x86_64-apple-darwin12 etc. Tool definitions are exported to ensure submakes # will get the same. ifneq ($(PLATFORM),) ifneq ($(findstring darwin, $(PLATFORM)),) export CC = $(PLATFORM)-cc export CXX = $(PLATFORM)-c++ export CPP = $(PLATFORM)-cc else export CC = $(PLATFORM)-gcc export CXX = $(PLATFORM)-g++ export CPP = $(PLATFORM)-cpp endif STRIP = $(PLATFORM)-strip endif # Let (native or cross-) compiler report target triplet and isolate individual # words therein to facilitate later processing. target.triplet := $(subst -, ,$(shell $(CC) -dumpmachine)) #=== operating system ========================================================== # The following systems are defined: Linux, Darwin, Windows. GNU and # GNU/kFreeBSD are treated as Linux to get the same options. ifneq ($(filter linux gnu% kfreebsd, $(target.triplet)),) system = Linux endif ifneq ($(filter darwin%, $(target.triplet)),) system = Darwin endif ifneq ($(filter mingw% cygwin%, $(target.triplet)),) system = Windows endif # evaluate possible system-specific multiline defines from library makefile $(eval $(for$(system))) # TODO: Cygwin, Android #=== architecture ============================================================== # The following CPU names can be processed by pdlibbuilder: # i*86 Intel 32 bit # x86_64 Intel 64 bit # arm ARM 32 bit # aarch64 ARM 64 bit target.arch := $(firstword $(target.triplet)) ################################################################################ ### variables per platform ##################################################### ################################################################################ #=== flags per architecture ==================================================== # Set architecture-dependent cflags, mainly for Linux. For Mac and Windows, # arch.c.flags are overriden below. To see gcc's default architecture flags: # $ gcc -Q --help=target # ARMv6: Raspberry Pi 1st gen, not detectable from target.arch ifeq ($(shell uname), armv6l) arch.c.flags = -march=armv6 -mfpu=vfp -mfloat-abi=hard # ARMv7: Beagle, Udoo, RPi2 etc. else ifeq ($(target.arch), arm) arch.c.flags = -march=armv7-a -mfpu=vfpv3 -mfloat-abi=hard # ARMv8 64 bit, not tested yet else ifeq ($(target.arch), aarch64) arch.c.flags = -mcpu=cortex-a53 # Intel 32 bit, build with SSE and SSE2 instructions else ifneq ($(filter i%86, $(target.arch)),) arch.c.flags = -march=pentium4 -mfpmath=sse -msse -msse2 # Intel/AMD 64 bit, build with SSE, SSE2 and SSE3 instructions else ifeq ($(target.arch), x86_64) arch.c.flags = -march=core2 -mfpmath=sse -msse -msse2 -msse3 # if none of the above architectures detected else arch.c.flags = endif #=== flags and paths for Linux ================================================= ifeq ($(system), Linux) prefix = /usr/local libdir := $(prefix)/lib pkglibdir = $(libdir)/pd-externals pdincludepath := $(wildcard /usr/include/pd) extension = pd_linux cpp.flags := -DUNIX c.flags := -fPIC c.ldflags := -rdynamic -shared -fPIC -Wl,-rpath,"\$$ORIGIN",--enable-new-dtags c.ldlibs := -lc -lm cxx.flags := -fPIC -fcheck-new cxx.ldflags := -rdynamic -shared -fPIC -Wl,-rpath,"\$$ORIGIN",--enable-new-dtags cxx.ldlibs := -lc -lm -lstdc++ shared.extension = so shared.ldflags = -rdynamic -fPIC -shared -Wl,-soname,$(shared.lib) endif #=== flags and paths for Darwin ================================================ # LLVM-clang doesn't support -fcheck-new, therefore this flag is only used when # compiling with g++. ifeq ($(system), Darwin) pkglibdir = $(HOME)/Library/Pd pdincludepath := $(firstword $(wildcard \ /Applications/Pd*.app/Contents/Resources/src)) extension = pd_darwin cpp.flags := -DUNIX -DMACOSX -I /sw/include c.flags := c.ldflags := -undefined suppress -flat_namespace -bundle c.ldlibs := -lc cxx.ldflags := -undefined suppress -flat_namespace -bundle cxx.ldlibs := -lc shared.extension = dylib shared.ldflags = -dynamiclib -undefined dynamic_lookup \ -install_name @loader_path/$(shared.lib) \ -compatibility_version 1 -current_version 1.0 ifneq ($(filter %g++, $(CXX)),) cxx.flags := -fcheck-new endif ifeq ($(extension), d_fat) arch := i386 x86_64 else arch := $(target.arch) endif ifneq ($(filter -mmacosx-version-min=%, $(cflags)),) version.flag := $(filter -mmacosx-version-min=%, $(cflags)) else version.flag = -mmacosx-version-min=10.6 endif arch.c.flags := $(addprefix -arch , $(arch)) $(version.flag) arch.ld.flags := $(arch.c.flags) endif #=== flags and paths for Windows =============================================== # Standard paths on Windows contain spaces, and GNU make functions treat such # paths as lists, with unintended effects. Therefore we must use shell function # ls instead of make's wildcard when probing for a path, and use double quotes # when specifying a path in a command argument. # Default paths in Mingw / Mingw-w64 environments. 'PROGRAMFILES' is standard # location for builds with native architecture, 'ProgramFiles(x86)' for i686 # builds on x86_64 Windows (detection method by Lucas Cordiviola). Curly braces # required because of parentheses in variable name. ifeq ($(system), Windows) pkglibdir := $(APPDATA)/Pd ifeq ($(target.arch), i686) programfiles := ${ProgramFiles(x86)} else programfiles := $(PROGRAMFILES) endif pdbinpath := $(programfiles)/Pd/bin pdincludepath := $(programfiles)/Pd/src endif # Store default path to pd.dll in PDBINDIR if the latter is not user-defined. # For include path this is done in the platform-independent paths section below, # but for PDBINDIR it is done here so ld flags can be evaluated as immediate # variables. ifeq ($(system), Windows) ifdef PDDIR PDBINDIR := $(PDDIR)/bin endif PDBINDIR ?= $(pdbinpath) endif # TODO: decide whether -mms-bitfields should be specified. ifeq ($(system), Windows) cpp.flags := -DMSW -DNT ifeq ($(target.arch), i686) arch.c.flags := -march=pentium4 -msse -msse2 -mfpmath=sse else ifeq ($(target.arch), x86_64) cpp.flags := -DMSW -DNT -DPD_LONGINTTYPE=__int64 arch.c.flags := -march=core2 -msse -msse2 -msse3 -mfpmath=sse else arch.c.flags = endif extension = dll c.flags := c.ldflags := -static-libgcc -shared \ -Wl,--enable-auto-import "$(PDBINDIR)/pd.dll" c.ldlibs := cxx.flags := -fcheck-new cxx.ldflags := -static-libgcc -static-libstdc++ -shared \ -Wl,--enable-auto-import "$(PDBINDIR)/pd.dll" cxx.ldlibs := shared.extension = dll shared.ldflags := -static-libgcc -shared "$(PDBINDIR)/pd.dll" stripflags = --strip-all endif #=== paths ===================================================================== # Platform-dependent default paths are specified above, but overridable. # Path variables in upper case can be defined as make command argument or in the # environment. Variable 'objectsdir' is supported for compatibility with # the build system that pd-l2ork has inherited from pd-extended. PDINCLUDEDIR ?= $(pdincludepath) PDLIBDIR ?= $(firstword $(objectsdir) $(pkglibdir)) ifdef PDDIR PDINCLUDEDIR := $(wildcard $(PDDIR)/src) endif # base path where all components of the lib will be installed by default installpath := $(DESTDIR)$(PDLIBDIR)/$(lib.name) # check if include path contains spaces (as is often the case on Windows) # if so, store the path so we can later do checks with it pdincludepathwithspaces := $(if $(word 2, $(PDINCLUDEDIR)), $(PDINCLUDEDIR)) #=== accumulated build flags =================================================== # From GNU make docs: 'Users expect to be able to specify CFLAGS freely # themselves.' So we use CFLAGS to define options which are not strictly # required for compilation: optimizations, architecture specifications, and # warnings. CFLAGS can be safely overriden using a make command argument. # Variables cflags, ldflags and ldlibs may be defined in including makefile. optimization.flags = -O3 -ffast-math -funroll-loops -fomit-frame-pointer warn.flags = -Wall -Wextra -Wshadow -Winline -Wstrict-aliasing # suppress -Wunused-variable & Co if you don't want to clutter a build log ifdef suppress-wunused warn.flags += $(addprefix -Wno-unused-, function parameter value variable) endif CFLAGS = $(warn.flags) $(optimization.flags) $(arch.c.flags) # preprocessor flags cpp.flags := -DPD -I "$(PDINCLUDEDIR)" $(cpp.flags) $(CPPFLAGS) # flags for dependency checking (cflags from makefile may define -I options) depcheck.flags := $(cpp.flags) $(cflags) # architecture specifications for linker are overridable by LDFLAGS LDFLAGS := $(arch.ld.flags) # now add the same ld flags to shared dynamic lib shared.ldflags += $(LDFLAGS) # accumulated flags for C compiler / linker c.flags := $(cpp.flags) $(c.flags) $(cflags) $(CFLAGS) c.ldflags := $(c.ldflags) $(ldflags) $(LDFLAGS) c.ldlibs := $(c.ldlibs) $(ldlibs) # accumulated flags for C++ compiler / linker cxx.flags := $(cpp.flags) $(cxx.flags) $(cflags) $(CFLAGS) cxx.ldflags := $(cxx.ldflags) $(ldflags) $(LDFLAGS) cxx.ldlibs := $(cxx.ldlibs) $(ldlibs) ################################################################################ ### variables: library name and version ######################################## ################################################################################ # strip possibles spaces from lib.name, they mess up calculated file names lib.name := $(strip $(lib.name)) # if meta file exists, check library version metafile := $(wildcard $(lib.name)-meta.pd) ifdef metafile lib.version := $(shell sed -n \ 's|^\#X text [0-9][0-9]* [0-9][0-9]* VERSION \(.*\);|\1|p' \ $(metafile)) endif ################################################################################ ### variables: files ########################################################### ################################################################################ #=== sources =================================================================== # (re)define .class.sources using file names in class.sources define add-class-source $(notdir $(basename $v)).class.sources += $v endef $(foreach v, $(class.sources), $(eval $(add-class-source))) # derive class names from .class.sources variables sourcevariables := $(filter %.class.sources, $(.VARIABLES)) classes := $(basename $(basename $(sourcevariables))) # accumulate all source files specified in makefile classes.sources := $(sort $(foreach v, $(sourcevariables), $($v))) all.sources := $(classes.sources) $(lib.setup.sources) \ $(shared.sources) $(common.sources) #=== object files ============================================================== # construct object filenames from all C and C++ source file names classes.objects := $(addsuffix .o, $(basename $(classes.sources))) common.objects := $(addsuffix .o, $(basename $(common.sources))) shared.objects := $(addsuffix .o, $(basename $(shared.sources))) lib.setup.objects := $(addsuffix .o, $(basename $(lib.setup.sources))) all.objects = $(classes.objects) $(common.objects) $(shared.objects) \ $(lib.setup.objects) #=== executables =============================================================== # construct class executable names from class names classes.executables := $(addsuffix .$(extension), $(classes)) # Construct shared lib executable name if shared sources are defined. If # extension and shared extension are not identical, use both to facilitate co- # installation for different platforms, like .m_i386.dll and .m_amd64.dll. ifdef shared.sources ifeq ($(extension), $(shared.extension)) shared.lib = lib$(lib.name).$(shared.extension) else shared.lib = lib$(lib.name).$(extension).$(shared.extension) endif else shared.lib := endif ################################################################################ ### variables: tools ########################################################### ################################################################################ # aliases so we can later define 'compile-$1' and set 'c' or 'cxx' as argument compile-c := $(CC) compile-cxx := $(CXX) ################################################################################ ### checks ##################################################################### ################################################################################ # At this point most variables are defined. Now do some checks and info's # before rules begin. # print Makefile.pdlibbuilder version before possible termination $(info ++++ info: using Makefile.pdlibbuilder version $(version)) # Terminate if target triplet remained empty, to avoid all sorts of confusing # scenarios and spurious bugs. ifeq ($(target.triplet),) $(error Command "$(CC) -dumpmachine" did not return a target triplet, \ needed for a build. \ Is compiler "$(CC)" installed in your PATH? ($(PATH)). \ Does compiler "$(CC)" support option "-dumpmachine"?) endif # 'forward declaration' of default target, needed to do checks all: # To avoid unpredictable results, make sure the default target is not redefined # by including makefile. ifneq ($(.DEFAULT_GOAL), all) $(error Default target must be 'all'.) endif # find out which target(s) will be made ifdef MAKECMDGOALS goals := $(MAKECMDGOALS) else goals := all endif # store path to Pd API m_pd.h if it is found ifdef PDINCLUDEDIR mpdh := $(shell ls "$(PDINCLUDEDIR)/m_pd.h") endif # store path to pd.dll; if not found, ls will give a useful error ifeq ($(system), Windows) pddll := $(shell ls "$(PDBINDIR)/pd.dll") endif # when making target all, check if m_pd.h is found and print info about it ifeq ($(goals), all) $(if $(mpdh), \ $(info ++++ info: using Pd API $(mpdh)), \ $(warning Where is Pd API m_pd.h? Do 'make help' for info.)) endif # print target info $(info ++++ info: making target $(goals) $(if $(lib.name),in lib $(lib.name))) # when installing, print installpath info $(if $(filter install install-lib, $(goals)), $(info ++++ info: \ installpath is '$(installpath)')) #=== define executables ======================================================== # By default we build class executables, and optionally a shared dynamic link # lib. When make-lib-executable=yes we build all classes into a single lib # executable, on the condition that variable lib.setup.sources is defined. ifeq ($(make-lib-executable),yes) $(if $(lib.setup.sources), ,\ $(error Can not build library blob because lib.setup.sources is undefined)) executables := $(lib.name).$(extension) else executables := $(classes.executables) $(shared.lib) endif ################################################################################ ### rules: special targets ##################################################### ################################################################################ # Disable built-in rules. If some target can't be built with the specified # rules, it should not be built at all. MAKEFLAGS += --no-builtin-rules .PRECIOUS: .SUFFIXES: .PHONY: all post build-lib \ $(classes) $(makefiledirs) $(makefiles) \ install install-executables install-datafiles install-datadirs \ force clean vars allvars depend help ################################################################################ ### rules: build targets ####################################################### ################################################################################ # Target all forces the build of targets [$(executables) post] in # deterministic order. Target $(executables) builds class executables plus # optional shared lib or alternatively a single lib executable when # make-lib-executable=true. Target post is optionally defined by # library makefile. all: post post: $(executables) all: $(info ++++info: target all in lib $(lib.name) completed) # build all with -g option turned on for debug symbols alldebug: c.flags += -g alldebug: cxx.flags += -g alldebug: all #=== class executable ========================================================== # recipe for linking objects in class executable # argument $1 = compiler type (c or cxx) # argument $2 = class basename define link-class $(compile-$1) \ $($1.ldflags) $($2.class.ldflags) \ -o $2.$(extension) \ $(addsuffix .o, $(basename $($2.class.sources))) \ $(addsuffix .o, $(basename $(common.sources))) \ $($1.ldlibs) $($2.class.ldlibs) $(shared.lib) endef # general rule for linking object files in class executable %.$(extension): $(shared.lib) $(info ++++ info: linking objects in $@ for lib $(lib.name)) $(if $(filter %.cc %.cpp, $($*.class.sources)), \ $(call link-class,cxx,$*), \ $(call link-class,c,$*)) #=== library blob ============================================================== # build all classes into single executable build-lib: $(lib.name).$(extension) $(info ++++ info: library blob $(lib.name).$(extension) completed) # recipe for linking objects in lib executable # argument $1 = compiler type (c or cxx) define link-lib $(compile-$1) \ $($1.ldflags) $(lib.ldflags) \ -o $(lib.name).$(extension) $(all.objects) \ $($1.ldlibs) $(lib.ldlibs) endef # rule for linking objects in lib executable # declared conditionally to avoid name clashes ifeq ($(make-lib-executable),yes) $(lib.name).$(extension): $(all.objects) $(if $(filter %.cc %.cpp, $(all.sources)), \ $(call link-lib,cxx), \ $(call link-lib,c)) endif #=== shared dynamic lib ======================================================== # recipe for linking objects in shared executable # argument $1 = compiler type (c or cxx) define link-shared $(compile-$1) \ $(shared.ldflags) \ -o $(shared.lib) $(shared.objects) \ $($1.ldlibs) $(shared.ldlibs) endef # rule for linking objects in shared executable # build recipe is in macro 'link-shared' $(shared.lib): $(shared.objects) $(info ++++ info: linking objects in shared lib $@) $(if $(filter %.cc %.cpp, $(shared.sources)), \ $(call link-shared,cxx), \ $(call link-shared,c)) #=== object files ============================================================== # recipe to make .o file from source # argument $1 is compiler type (c or cxx) define make-object-file $(info ++++ info: making $@ in lib $(lib.name)) $(compile-$1) \ $($1.flags) \ -o $@ -c $< endef # Three rules to create .o files. These are double colon 'terminal' rules, # meaning they are the last in a rules chain. %.o:: %.c $(call make-object-file,c) %.o:: %.cc $(call make-object-file,cxx) %.o:: %.cpp $(call make-object-file,cxx) #=== explicit prerequisites for class executables ============================== # For class executables, prerequisite rules are declared in run time. Target # 'depend' prints these rules for debugging purposes. # declare explicit prerequisites rule like 'class: class.extension' # argument $v is class basename define declare-class-target $v: $v.$(extension) endef # declare explicit prerequisites rule like 'class.extension: object1.o object2.o' # argument $v is class basename define declare-class-executable-target $v.$(extension): $(addsuffix .o, $(basename $($v.class.sources))) \ $(addsuffix .o, $(basename $(common.sources))) endef # evaluate explicit prerequisite rules for all classes $(foreach v, $(classes), $(eval $(declare-class-target))) $(foreach v, $(classes), $(eval $(declare-class-executable-target))) #=== implicit prerequisites for class executables ============================== # Evaluating implicit prerequisites (header files) with help from the # preprocessor is 'expensive' so this is done conditionally and selectively. # Note that it is also possible to trigger a build via install targets, in # which case implicit prerequisites are not checked. # When the Pd include path contains spaces it will mess up the implicit # prerequisites rules. disable-dependency-tracking := $(strip $(pdincludepathwithspaces)) ifndef disable-dependency-tracking must-build-everything := $(filter all, $(goals)) must-build-class := $(filter $(classes), $(goals)) must-build-sources := $(foreach v, $(must-build-class), $($v.class.sources)) endif # declare implicit prerequisites rule like 'object.o: header1.h header2.h ...' # argument $1 is input source file(s) # dir is explicitly added because option -MM strips it by default define declare-object-target $(dir $1)$(filter %.o: %.h, $(shell $(CPP) $(depcheck.flags) -MM $1)) $(MAKEFILE_LIST) endef # evaluate implicit prerequisite rules when rebuilding everything ifdef must-build-everything $(if $(wildcard $(all.objects)), \ $(info ++++ info: evaluating implicit prerequisites in lib $(lib.name).....) \ $(foreach v, $(all.sources), $(eval $(call declare-object-target, $v)))) endif # evaluate implicit prerequisite rules when selectively building classes ifdef must-build-class $(foreach v, $(must-build-sources), \ $(eval $(call declare-object-target, $v))) $(foreach v, $(shared.sources), \ $(eval $(call declare-object-target, $v))) endif ################################################################################ ### rules: preprocessor and assembly files ##################################### ################################################################################ # Preprocessor and assembly output files for bug tracing etc. They are not part # of the build processes for executables. By default these files are created in # the current working directory. Dependency tracking is not performed, the build # is forced instead to make sure it's up to date. force: #=== preprocessor file ========================================================= # make preprocessor output file with extension .pre # argument $1 = compiler type (c or cxx) define make-preprocessor-file $(info ++++ info: making preprocessor output file $(notdir $*.pre) \ in current working directory) $(compile-$1) -E $< $(c.flags) $($1.flags) -o $(notdir $*.pre) endef %.pre:: %.c force $(call make-preprocessor-file,c) %.pre:: %.cc force $(call make-preprocessor-file,cxx) %.pre:: %.cpp force $(call make-preprocessor-file,cxx) #=== assembly file ============================================================= # make C / assembly interleaved output file with extension .lst # argument $1 = compiler type (c or cxx) define make-assembly-file $(info ++++ info: making assembly output file $(notdir $*.lst) \ in current working directory) $(compile-$1) \ -c -Wa,-a,-ad -fverbose-asm \ $($1.flags) \ $< > $(notdir $*.lst) endef %.lst:: %.c force $(call make-assembly-file,c) %.lst:: %.cc force $(call make-assembly-file,cxx) %.lst:: %.cpp force $(call make-assembly-file,cxx) ################################################################################ ### rules: installation targets ################################################ ################################################################################ #=== strip ===================================================================== # Stripping of installed binaries will only be done when variable 'stripflags' # is defined non-empty. No default definition is provided except for Windows # where the unstripped binaries are large, especially in the case of Mingw-w64. # Note: while stripping all symbols ('-s' or '--strip-all') is possible for # Linux and Windows, in the case of OSX only non-global symbols can be stripped # (option '-x' or '--discard-all'). # Make definition of strip command overridable so it can be defined in an # environment for cross-compilation. STRIP ?= strip # Commands in 'strip-executables' will be executed conditionally in the rule for # target 'install-executables'. strip-executables = cd "$(installpath)" && \ $(foreach v, $(executables), $(STRIP) $(stripflags) '$v';) #=== install =================================================================== # Install targets depend on successful exit status of target all because nothing # must be installed in case of a build error. # -p = preserve time stamps # -m = set permission mode (as in chmod) # -d = create all components of specified directories INSTALL = install INSTALL_PROGRAM := $(INSTALL) -p -m 644 INSTALL_DATA := $(INSTALL) -p -m 644 INSTALL_DIR := $(INSTALL) -m 755 -d # strip spaces from file names executables := $(strip $(executables)) datafiles := $(strip $(datafiles)) datadirs := $(strip $(datadirs)) # Do not make any install sub-target with empty variable definition because the # install program would exit with an error. install: $(if $(executables), install-executables) install: $(if $(datafiles), install-datafiles) install: $(if $(datadirs), install-datadirs) install-executables: all $(INSTALL_DIR) -v "$(installpath)" $(foreach v, $(executables), \ $(INSTALL_PROGRAM) '$v' "$(installpath)";) $(info ++++ info: executables of lib $(lib.name) installed \ from $(CURDIR) to $(installpath)) $(if $(stripflags), $(strip-executables),) install-datafiles: all $(INSTALL_DIR) -v "$(installpath)" $(foreach v, $(datafiles), \ $(INSTALL_DATA) '$(v)' "$(installpath)";) $(info ++++ info: data files of lib $(lib.name) installed \ from $(CURDIR) to $(installpath)) install-datadirs: all $(foreach v, $(datadirs), $(INSTALL_DIR) "$(installpath)/$v";) $(foreach v, $(datadirs), \ $(INSTALL_DATA) $(wildcard $v/*) "$(installpath)/$v";) $(info ++++ info: data directories of lib $(lib.name) installed \ from $(CURDIR) to $(installpath)) ################################################################################ ### rules: distribution targets ################################################ ################################################################################ # TODO # These targets are implemented in Makefile Template, but I have to figure out # how to do it under the not-so-strict conditions of Makefile.pdlibbuilder. # make source package dist: @echo "target dist not yet implemented" # make Debian source package dpkg-source: @echo "target dpkg-source not yet implemented" $(ORIGDIR): $(DISTDIR): ################################################################################ ### rules: clean targets ####################################################### ################################################################################ # delete build products from build tree clean: rm -f $(all.objects) rm -f $(classes.executables) $(lib.name).$(extension) $(shared.lib) rm -f *.pre *.lst # remove distribution directories and tarballs from build tree distclean: clean @echo "target distclean not yet implemented" ################################################################################ ### rules: submake targets ##################################################### ################################################################################ # Iterate over sub-makefiles or makefiles in other directories. # When 'continue-make=yes' is set, sub-makes will report 'true' to the parent # process regardless of their real exit status. This prevents the parent make # from being aborted by a sub-make error. Useful when you want to quickly find # out which sub-makes from a large set will succeed. ifeq ($(continue-make),yes) continue = || true endif # These targets will trigger sub-make processes for entries in 'makefiledirs' # and 'makefiles'. all alldebug install clean distclean dist dkpg-source: \ $(makefiledirs) $(makefiles) # this expands to identical rules for each entry in 'makefiledirs' $(makefiledirs): $(MAKE) --directory=$@ $(MAKECMDGOALS) $(continue) # this expands to identical rules for each entry in 'makefiles' $(makefiles): $(MAKE) --directory=$(dir $@) --makefile=$(notdir $@) $(MAKECMDGOALS) $(continue) ################################################################################ ### rules: convenience targets ################################################# ################################################################################ #=== show variables ============================================================ # Several 'function' macro's cause errors when expanded within a rule or without # proper arguments. Variables which are set with the define directive are only # shown by name for that reason. functions = \ add-class-source \ declare-class-target \ declare-class-executable-target \ declare-object-target \ link-class \ link-lib \ link-shared \ make-object-file \ make-preprocessor-file \ make-assembly-file # show variables from makefiles vars: $(info ++++ info: showing makefile variables:) $(foreach v,\ $(sort $(filter-out $(functions) functions, $(.VARIABLES))),\ $(if $(filter file, $(origin $v)),\ $(info variable $v = $($v)))) $(foreach v, $(functions), $(info 'function' name: $v)) @echo # show all variables allvars: $(info ++++ info: showing default, automatic and makefile variables:) $(foreach v, \ $(sort $(filter-out $(functions) functions, $(.VARIABLES))), \ $(info variable ($(origin $v)) $v = $($v))) $(foreach v, $(functions), $(info 'function' name: $v)) @echo #=== show dependencies ========================================================= # show generated prerequisites rules depend: $(info ++++ info: generated prerequisite rules) $(foreach v, $(classes), $(info $(declare-class-target))) $(foreach v, $(classes), $(info $(declare-class-executable-target))) $(foreach v, $(all.sources), $(info $(call declare-object-target, $v))) @echo #=== show help text ============================================================ # brief info about targets and paths ifdef mpdh mpdhinfo := $(mpdh) else mpdhinfo := m_pd.h was not found. Is Pd installed? endif help: @echo @echo " Main targets:" @echo " all: build executables (default target)" @echo " install: install all components of the library" @echo " vars: print makefile variables for troubleshooting" @echo " allvars: print all variables for troubleshooting" @echo " help: print this help text" @echo @echo " Pd API m_pd.h:" @echo " $(mpdhinfo)" @echo " You may specify your preferred Pd include directory as argument" @echo " to the make command, like 'PDINCLUDEDIR=path/to/pd/src'." @echo @echo " Path for installation of your libdir(s):" @echo " $(PDLIBDIR)" @echo " Alternatively you may specify your path for installation as argument" @echo " to the make command, like 'PDLIBDIR=path/to/pd-externals'." @echo @echo " Default paths are listed in the doc sections in Makefile.pdlibbuilder." @echo #=== platform test ============================================================= # This target can be used to test if the compiler for specified PLATFORM is # correctly defined and available. dumpmachine: @$(CC) -dumpmachine #=== dummy target ============================================================== coffee: @echo "Makefile.pdlibbuilder: Can not make coffee. Sorry." ################################################################################ ### end of rules sections ###################################################### ################################################################################ # for syntax highlighting in vim and github # vim: set filetype=make: pd-sigpack-0.46.0/sigpack-meta.pd000066400000000000000000000005371434363427200165320ustar00rootroot00000000000000git#N canvas 8 107 200 200 10; #N canvas 18 79 420 300 META 0; #X text 10 30 NAME sigpack; #X text 10 50 AUTHOR postmeister@weiss-archiv.de; #X text 10 69 MAINTAINER fjkraan@electrickery.nl; #X text 10 88 LICENSE GNU GPL 2; #X text 10 108 VERSION 0.46.0; #X text 10 127 REPOSITORY https://github.com/electrickery/pd-sigpack; #X restore 10 10 pd META; pd-sigpack-0.46.0/source/000077500000000000000000000000001434363427200151335ustar00rootroot00000000000000pd-sigpack-0.46.0/source/chop~.c000066400000000000000000000032341434363427200164300ustar00rootroot00000000000000/* sIgpAck * for * pure-data * www.weiss-archiv.de */ #include "m_pd.h" #ifdef _MSC_VER #pragma warning( disable : 4244 ) #pragma warning( disable : 4305 ) #endif // ------------------------ chop~ ----------------------------- // signal chopping modulator static t_class *chop_tilde_class; typedef struct _chop_tilde { t_object x_obj; t_sample x_factor; float x_f; } t_chop_tilde; static void *chop_tilde_new(t_floatarg factor) { t_chop_tilde *x = (t_chop_tilde *)pd_new(chop_tilde_class); x->x_factor = factor; outlet_new(&x->x_obj, gensym("signal")); inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); floatinlet_new(&x->x_obj, &x->x_factor); x->x_f = 0; if(factor) x->x_factor = factor; else x->x_factor = 0; return (x); } static t_int *chop_tilde_perform(t_int *w) { t_chop_tilde *x = (t_chop_tilde *)(w[1]); t_float *in1 = (t_float *)(w[2]); t_float *in2 = (t_float *)(w[3]); t_float *out = (t_float *)(w[4]); int n = (int)(w[5]); float f, m, value; while (n--) { f = *in1++; m = *in2++; if(m > 0.) value = f * x->x_factor; else value = f; *out++ = value; } return (w+6); } static void chop_tilde_dsp(t_chop_tilde *x, t_signal **sp) { dsp_add(chop_tilde_perform, 5, x, sp[0]->s_vec, sp[1]->s_vec, sp[2]->s_vec, sp[0]->s_n); } void chop_tilde_setup(void) { chop_tilde_class = class_new(gensym("chop~"), (t_newmethod)chop_tilde_new, 0, sizeof(t_chop_tilde), 0, A_DEFFLOAT, 0); CLASS_MAINSIGNALIN(chop_tilde_class, t_chop_tilde, x_f); class_addmethod(chop_tilde_class, (t_method)chop_tilde_dsp, gensym("dsp"), 0); } pd-sigpack-0.46.0/source/decimate~.c000066400000000000000000000043411434363427200172520ustar00rootroot00000000000000/* sIgpAck * for * pure-data * www.weiss-archiv.de */ #include "m_pd.h" #ifdef _MSC_VER #pragma warning( disable : 4244 ) #pragma warning( disable : 4305 ) #endif // ------------------------ decimate~ ----------------------------- // signal decimation // code from musicdsp.org posted by tobybear static t_class *decimate_tilde_class; typedef struct _decimate_tilde { t_object x_obj; t_sample x_rate; t_sample x_bits; t_sample x_y; t_float x_count; t_float x_f; } t_decimate_tilde; static void *decimate_tilde_new(t_floatarg rate, t_floatarg bits) { t_decimate_tilde *x = (t_decimate_tilde *)pd_new(decimate_tilde_class); x->x_rate = rate; x->x_bits = bits; outlet_new(&x->x_obj, gensym("signal")); floatinlet_new(&x->x_obj, &x->x_rate); floatinlet_new(&x->x_obj, &x->x_bits); x->x_f = 0.; x->x_count = 0; x->x_y = 0.; if (rate) x->x_rate = rate; else x->x_rate = 0.5; if (bits) x->x_bits = bits; else x->x_bits = 16; return (x); } static t_int *decimate_tilde_perform(t_int *w) { t_decimate_tilde *x = (t_decimate_tilde *)(w[1]); t_float *in = (t_float *)(w[2]); t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); float f; long int m=1<<(int)(x->x_bits-1); t_float y = x->x_y; t_float cnt = x->x_count; while (n--) { f = *in++; cnt += x->x_rate; if (cnt >= 1) { cnt -= 1; y=(long int)(f*m)/(float)m; } *out++ = y; } x->x_count = cnt; x->x_y = y; return (w+5); } static void decimate_tilde_dsp(t_decimate_tilde *x, t_signal **sp) { dsp_add(decimate_tilde_perform, 4, x, sp[0]->s_vec, sp[1]->s_vec, sp[0]->s_n); } void decimate_tilde_setup(void) { decimate_tilde_class = class_new(gensym("decimate~"), (t_newmethod)decimate_tilde_new, 0, sizeof(t_decimate_tilde), 0, A_DEFFLOAT, A_DEFFLOAT, 0); CLASS_MAINSIGNALIN(decimate_tilde_class, t_decimate_tilde, x_f); class_addmethod(decimate_tilde_class, (t_method)decimate_tilde_dsp, gensym("dsp"), 0); int major, minor, bugfix; sys_getversion(&major, &minor, &bugfix); if (major > 0 || minor > 42) logpost(NULL, 4, "this is sigpack/decimate~ 0.0.4"); } pd-sigpack-0.46.0/source/diode~.c000066400000000000000000000041031434363427200165570ustar00rootroot00000000000000/* sIgpAck * for * pure-data * www.weiss-archiv.de */ #include "m_pd.h" #include #ifdef _MSC_VER #pragma warning( disable : 4244 ) #pragma warning( disable : 4305 ) #endif /* ------------------------ diode~ ----------------------------- */ /* Mangles the signal as if it had been passed through a diode rectifier network.*/ /* code from swh_plugins by steve harris www.plugin.org.uk */ static t_class *diode_tilde_class; typedef struct _diode_tilde { t_object x_obj; t_sample x_mode;//0=none,1=halfWave,2=fullWave float x_f; } t_diode_tilde; static void *diode_tilde_new(t_floatarg mode) { t_diode_tilde *x = (t_diode_tilde *)pd_new(diode_tilde_class); x->x_mode = mode; outlet_new(&x->x_obj, gensym("signal")); floatinlet_new(&x->x_obj, &x->x_mode); x->x_f = 0; if(mode) x->x_mode = mode; else x->x_mode = 0; return (x); } static t_int *diode_tilde_perform(t_int *w) { t_diode_tilde *x = (t_diode_tilde *)(w[1]); t_float *in = (t_float *)(w[2]); t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); float f, value; while (n--) { f = *in++; if(x->x_mode >= 0.0f && x->x_mode < 1.0f) { value = ((1.0f - x->x_mode) * f + (x->x_mode * (f > 0.0f ? f : 0.0f))); } else if (x->x_mode >= 1.0f && x->x_mode < 2.0f) { float fac = x->x_mode - 1.0f; value = ((1.0f - fac) * (f > 0 ? f : 0.0)) + (fac * fabs(f)); } else if (x->x_mode >= 2) { float fac = x->x_mode < 3 ? x->x_mode - 2 : 1.0; value = (1.0 - fac) * fabs(f); } else { value = f; } *out++ = value; } return (w+5); } static void diode_tilde_dsp(t_diode_tilde *x, t_signal **sp) { dsp_add(diode_tilde_perform, 4, x, sp[0]->s_vec, sp[1]->s_vec, sp[0]->s_n); } void diode_tilde_setup(void) { diode_tilde_class = class_new(gensym("diode~"), (t_newmethod)diode_tilde_new, 0, sizeof(t_diode_tilde), 0, A_DEFFLOAT, 0); CLASS_MAINSIGNALIN(diode_tilde_class, t_diode_tilde, x_f); class_addmethod(diode_tilde_class, (t_method)diode_tilde_dsp, gensym("dsp"), 0); } pd-sigpack-0.46.0/source/foldback~.c000066400000000000000000000035031434363427200172430ustar00rootroot00000000000000/* sIgpAck * for * pure-data * www.weiss-archiv.de */ #include "m_pd.h" #ifdef _MSC_VER #pragma warning( disable : 4244 ) #pragma warning( disable : 4305 ) #endif /* ------------------------ foldback~ ----------------------------- */ /* signal mirror */ static t_class *foldback_tilde_class; typedef struct _foldback_tilde { t_object x_obj; t_sample x_low; t_sample x_high; float x_f; } t_foldback_tilde; static void *foldback_tilde_new(t_floatarg low, t_floatarg high) { t_foldback_tilde *x = (t_foldback_tilde *)pd_new(foldback_tilde_class); x->x_low = low; x->x_high = high; outlet_new(&x->x_obj, gensym("signal")); floatinlet_new(&x->x_obj, &x->x_low); floatinlet_new(&x->x_obj, &x->x_high); x->x_f = 0; if(low) x->x_low = low; else x->x_low = -1; if(high) x->x_high = high; else x->x_high = 1; return (x); } static t_int *foldback_tilde_perform(t_int *w) { t_foldback_tilde *x = (t_foldback_tilde *)(w[1]); t_float *in = (t_float *)(w[2]); t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); float f, value; while (n--) { f = *in++; if(f < x->x_low) value = (f - ((f - x->x_low) * 2)); else if(f > x->x_high) value = (f - ((f - x->x_high) * 2)); else value = f; *out++ = value; } return (w+5); } static void foldback_tilde_dsp(t_foldback_tilde *x, t_signal **sp) { dsp_add(foldback_tilde_perform, 4, x, sp[0]->s_vec, sp[1]->s_vec, sp[0]->s_n); } void foldback_tilde_setup(void) { foldback_tilde_class = class_new(gensym("foldback~"), (t_newmethod)foldback_tilde_new, 0, sizeof(t_foldback_tilde), 0, A_DEFFLOAT, A_DEFFLOAT, 0); CLASS_MAINSIGNALIN(foldback_tilde_class, t_foldback_tilde, x_f); class_addmethod(foldback_tilde_class, (t_method)foldback_tilde_dsp, gensym("dsp"), 0); } pd-sigpack-0.46.0/source/foldover~.c000066400000000000000000000036161434363427200173230ustar00rootroot00000000000000/* sIgpAck * for * pure-data * www.weiss-archiv.de */ #include "m_pd.h" #ifdef _MSC_VER #pragma warning( disable : 4244 ) #pragma warning( disable : 4305 ) #endif /* ------------------------ foldover~ ----------------------------- */ /* foldover distortion */ /* code from swh_plugins by steve harris www.plugin.org.uk */ static t_class *foldover_tilde_class; typedef struct _foldover_tilde { t_object x_obj; t_sample x_drive_p; t_sample x_push; float x_f; } t_foldover_tilde; static void *foldover_tilde_new(t_floatarg drive_p, t_floatarg push) { t_foldover_tilde *x = (t_foldover_tilde *)pd_new(foldover_tilde_class); x->x_drive_p = drive_p; x->x_push = push; outlet_new(&x->x_obj, gensym("signal")); floatinlet_new(&x->x_obj, &x->x_drive_p); floatinlet_new(&x->x_obj, &x->x_push); x->x_f = 0; if(drive_p) x->x_drive_p = drive_p; else x->x_drive_p = 0; if(push) x->x_push = push; else x->x_push = 0; return (x); } static t_int *foldover_tilde_perform(t_int *w) { t_foldover_tilde *x = (t_foldover_tilde *)(w[1]); t_float *in = (t_float *)(w[2]); t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); float f, value, y; float drive = x->x_drive_p + 1.0f; while (n--) { f = *in++; y = f * drive + x->x_push; value = 1.5f * y - 0.5f * y * y *y; *out++ = value; } return (w+5); } static void foldover_tilde_dsp(t_foldover_tilde *x, t_signal **sp) { dsp_add(foldover_tilde_perform, 4, x, sp[0]->s_vec, sp[1]->s_vec, sp[0]->s_n); } void foldover_tilde_setup(void) { foldover_tilde_class = class_new(gensym("foldover~"), (t_newmethod)foldover_tilde_new, 0, sizeof(t_foldover_tilde), 0, A_DEFFLOAT, A_DEFFLOAT, 0); CLASS_MAINSIGNALIN(foldover_tilde_class, t_foldover_tilde, x_f); class_addmethod(foldover_tilde_class, (t_method)foldover_tilde_dsp, gensym("dsp"), 0); } pd-sigpack-0.46.0/source/freqdiv~.c000066400000000000000000000046731434363427200171470ustar00rootroot00000000000000/* sIgpAck * for * pure-data * www.weiss-archiv.de */ #include "m_pd.h" #include #ifdef _MSC_VER #pragma warning( disable : 4244 ) #pragma warning( disable : 4305 ) #endif /* ------------------------ freqdiv~ ----------------------------- */ /* frequency divider */ /* code from swh_plugins by steve harris www.plugins.org.uk */ static t_class *freqdiv_tilde_class; typedef struct _freqdiv_tilde { t_object x_obj; t_sample x_denominate; t_sample x_amp; float x_count; t_sample x_lamp; t_sample x_last; t_sample x_out; int x_zeroxs; float x_f; } t_freqdiv_tilde; static void *freqdiv_tilde_new(t_floatarg denominate) { t_freqdiv_tilde *x = (t_freqdiv_tilde *)pd_new(freqdiv_tilde_class); x->x_denominate = denominate; outlet_new(&x->x_obj, gensym("signal")); floatinlet_new(&x->x_obj, &x->x_denominate); x->x_f = 0; x->x_amp = 0; x->x_count = 0; x->x_lamp = 0; x->x_last = 0; x->x_out = 0; x->x_zeroxs = 0; if (denominate) x->x_denominate = denominate; else x->x_denominate = 1; return (x); } static t_int *freqdiv_tilde_perform(t_int *w) { t_freqdiv_tilde *x = (t_freqdiv_tilde *)(w[1]); t_float *in = (t_float *)(w[2]); t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); float f; int den = (int)x->x_denominate; while (n--) { f = *in++; x->x_count += 1.0f; if ((f > 0.0f && x->x_last <= 0.0f) || (f < 0.0f && x->x_last >= 0.0)) { x->x_zeroxs++; if (den == 1) { x->x_out = x->x_out > 0.0f ? -1.0f : 1.0f; x->x_lamp = x->x_amp / x->x_count; x->x_zeroxs = 0; x->x_count = 0; x->x_amp = 0; } } x->x_amp += fabs(f); if (den > 1 && (x->x_zeroxs % den) == den-1) { x->x_out = x->x_out > 0.0f ? -1.0f : 1.0f; x->x_lamp = x->x_amp / x->x_count; x->x_zeroxs = 0; x->x_count = 0; x->x_amp = 0; } x->x_last = f; *out++ = x->x_out * x->x_lamp; } return (w+5); } static void freqdiv_tilde_dsp(t_freqdiv_tilde *x, t_signal **sp) { dsp_add(freqdiv_tilde_perform, 4, x, sp[0]->s_vec, sp[1]->s_vec, sp[0]->s_n); } void freqdiv_tilde_setup(void) { freqdiv_tilde_class = class_new(gensym("freqdiv~"), (t_newmethod)freqdiv_tilde_new, 0, sizeof(t_freqdiv_tilde), 0, A_DEFFLOAT, 0); CLASS_MAINSIGNALIN(freqdiv_tilde_class, t_freqdiv_tilde, x_f); class_addmethod(freqdiv_tilde_class, (t_method)freqdiv_tilde_dsp, gensym("dsp"), 0); } pd-sigpack-0.46.0/source/freqshift~.c000066400000000000000000000164431434363427200175000ustar00rootroot00000000000000/* sIgpAck * for * pure-data * www.weiss-archiv.de */ #include "m_pd.h" #include #ifndef M_PI #define M_PI 3.14159265358979323846 #endif #ifdef _MSC_VER #pragma warning( disable : 4244 ) #pragma warning( disable : 4305 ) #endif /* ------------------------ freqshift~ ----------------------------- */ /* frequency shifter */ /* code from swh_plugins by steve harris www.plugins.org.uk */ #define SIN_T_SIZE 64 #define D_SIZE 256 #define NZEROS 200 static t_class *freqshift_tilde_class; typedef struct _freqshift_tilde { t_object x_obj; t_float x_shift;//[0 - 5000] float *x_delay; unsigned int x_dptr; t_float x_fs; t_float x_last_shift; t_float x_phi; float *x_sint; float x_f; } t_freqshift_tilde; static void *freqshift_tilde_new(t_floatarg shift) { unsigned int i; t_freqshift_tilde *x = (t_freqshift_tilde *)pd_new(freqshift_tilde_class); //x->x_shift = shift; outlet_new(&x->x_obj, gensym("signal")); outlet_new(&x->x_obj, gensym("signal")); floatinlet_new(&x->x_obj, &x->x_shift); x->x_fs = sys_getsr(); x->x_delay = (float *)getbytes(D_SIZE * sizeof(float)); x->x_sint = (float *)getbytes(SIN_T_SIZE * sizeof(float)); x->x_dptr = 0; x->x_phi = 0.0f; x->x_last_shift = 0.0f; x->x_f = 0; for (i = 0; i < SIN_T_SIZE; i++) { x->x_sint[i] = sin(2.0f * M_PI * (float)i / (float)SIN_T_SIZE); } if (shift) x->x_shift = shift; else x->x_shift = 0; return (x); } /* The non-zero taps of the Hilbert transformer */ static float xcoeffs[] = { +0.0008103736f, +0.0008457886f, +0.0009017196f, +0.0009793364f, +0.0010798341f, +0.0012044365f, +0.0013544008f, +0.0015310235f, +0.0017356466f, +0.0019696659f, +0.0022345404f, +0.0025318040f, +0.0028630784f, +0.0032300896f, +0.0036346867f, +0.0040788644f, +0.0045647903f, +0.0050948365f, +0.0056716186f, +0.0062980419f, +0.0069773575f, +0.0077132300f, +0.0085098208f, +0.0093718901f, +0.0103049226f, +0.0113152847f, +0.0124104218f, +0.0135991079f, +0.0148917649f, +0.0163008758f, +0.0178415242f, +0.0195321089f, +0.0213953037f, +0.0234593652f, +0.0257599469f, +0.0283426636f, +0.0312667947f, +0.0346107648f, +0.0384804823f, +0.0430224431f, +0.0484451086f, +0.0550553725f, +0.0633242001f, +0.0740128560f, +0.0884368322f, +0.1090816773f, +0.1412745301f, +0.1988673273f, +0.3326528346f, +0.9997730178f, -0.9997730178f, -0.3326528346f, -0.1988673273f, -0.1412745301f, -0.1090816773f, -0.0884368322f, -0.0740128560f, -0.0633242001f, -0.0550553725f, -0.0484451086f, -0.0430224431f, -0.0384804823f, -0.0346107648f, -0.0312667947f, -0.0283426636f, -0.0257599469f, -0.0234593652f, -0.0213953037f, -0.0195321089f, -0.0178415242f, -0.0163008758f, -0.0148917649f, -0.0135991079f, -0.0124104218f, -0.0113152847f, -0.0103049226f, -0.0093718901f, -0.0085098208f, -0.0077132300f, -0.0069773575f, -0.0062980419f, -0.0056716186f, -0.0050948365f, -0.0045647903f, -0.0040788644f, -0.0036346867f, -0.0032300896f, -0.0028630784f, -0.0025318040f, -0.0022345404f, -0.0019696659f, -0.0017356466f, -0.0015310235f, -0.0013544008f, -0.0012044365f, -0.0010798341f, -0.0009793364f, -0.0009017196f, -0.0008457886f, -0.0008103736f, }; static float f_clamp(float x, float a, float b) { const float x1 = fabs(x - a); const float x2 = fabs(x - b); x = x1 + a + b; x -= x2; x *= 0.5; return x; } static int f_round(t_float f) { #if PD_FLOAT_PRECISION == 64 return (int)lround(f); #else return (int)lroundf(f); #endif } // this relies on type-punning, which is not allowed in C99 or 64-bit #if 0 // Round float to int using IEEE int* hack static int f_round(float f) { f += (3<<22); return *((int*)&f) - 0x4b400000; } #endif // Cubic interpolation function static float cube_interp(const float fr, const float inm1, const float in, const float inp1, const float inp2) { return in + 0.5f * fr * (inp1 - inm1 + fr * (4.0f * inp1 + 2.0f * inm1 - 5.0f * in - inp2 + fr * (3.0f * (in - inp1) - inm1 + inp2))); } static t_int *freqshift_tilde_perform(t_int *w) { t_freqshift_tilde *x = (t_freqshift_tilde *)(w[1]); t_float *in = (t_float *)(w[2]); t_float *out1 = (t_float *)(w[3]); t_float *out2 = (t_float *)(w[4]); int n = (int)(w[5]); float f, hilb, rm1, rm2, frac_p; float shift_i = x->x_last_shift; float sample_count = sys_getblksize(); unsigned int i; int int_p; const float shift_c = f_clamp(x->x_shift, 0.0f, 10000.0f); const float shift_inc = (shift_c - x->x_last_shift) / (float)sample_count; const float freq_fix = (float)SIN_T_SIZE / x->x_fs; while (n--) { f = *in++; x->x_delay[x->x_dptr] = f; /* Perform the Hilbert FIR convolution * (probably FFT would be faster) */ hilb = 0.0f; for (i = 0; i < NZEROS/2; i++) { hilb += (xcoeffs[i] * x->x_delay[(x->x_dptr - i*2) & (D_SIZE - 1)]); } /* Calcuate the table positions for the sine modulator */ int_p = f_round(floor(x->x_phi)); /* Calculate ringmod1, the transformed input modulated with a shift Hz * sinewave. This creates a +180 degree sideband at source-shift Hz and * a 0 degree sindeband at source+shift Hz */ frac_p = x->x_phi - int_p; /* the Hilbert has a gain of pi/2, which we have to correct for, thanks * Fons! */ rm1 = hilb * 0.63661978f * cube_interp(frac_p, x->x_sint[int_p], x->x_sint[int_p+1], x->x_sint[int_p+2], x->x_sint[int_p+3]); /* Calcuate the table positions for the cosine modulator */ int_p = (int_p + SIN_T_SIZE / 4) & (SIN_T_SIZE - 1); /* Calculate ringmod2, the delayed input modulated with a shift Hz * cosinewave. This creates a 0 degree sideband at source+shift Hz * and a -180 degree sindeband at source-shift Hz */ rm2 = x->x_delay[(x->x_dptr - 100) & (D_SIZE - 1)] * cube_interp(frac_p, x->x_sint[int_p], x->x_sint[int_p + 1], x->x_sint[int_p + 2], x->x_sint[int_p + 3]); /* Output the sum and differences of the ringmods. The +/-180 degree * sidebands cancel (more of less) and just leave the shifted * components */ *out1++ = (rm2 - rm1) * 0.5f; /*downshifting*/ *out2++ = (rm2 + rm1) * 0.5f; /*upshifting*/ x->x_dptr = (x->x_dptr + 1) & (D_SIZE - 1); x->x_phi += shift_i * freq_fix; while (x->x_phi > SIN_T_SIZE) { x->x_phi -= SIN_T_SIZE; } shift_i += shift_inc; } return (w+6); } static void freqshift_tilde_dsp(t_freqshift_tilde *x, t_signal **sp) { dsp_add(freqshift_tilde_perform, 5, x, sp[0]->s_vec, sp[1]->s_vec, sp[2]->s_vec, sp[0]->s_n); } static void freqshift_tilde_free(t_freqshift_tilde *x) { if(x->x_delay) freebytes(x->x_delay, D_SIZE * sizeof(float)); if(x->x_sint) freebytes(x->x_sint, SIN_T_SIZE + 4 * sizeof(float)); } void freqshift_tilde_setup(void) { freqshift_tilde_class = class_new(gensym("freqshift~"), (t_newmethod)freqshift_tilde_new, (t_method)freqshift_tilde_free, sizeof(t_freqshift_tilde), 0, A_DEFFLOAT, 0); CLASS_MAINSIGNALIN(freqshift_tilde_class, t_freqshift_tilde, x_f); class_addmethod(freqshift_tilde_class, (t_method)freqshift_tilde_dsp, gensym("dsp"), 0); } pd-sigpack-0.46.0/source/hardlimit~.c000066400000000000000000000045451434363427200174620ustar00rootroot00000000000000// sigpack // for // pure-data // by weiss // www.weiss-archiv.de #include "m_pd.h" #include #ifdef _MSC_VER #pragma warning( disable : 4244 ) #pragma warning( disable : 4305 ) #endif // ------------------------ hardlimit~ ----------------------------- // brick hard limiter with residue mixer // code from swh_plugins by steve harris www.plugin.org.uk static t_class *hardlimit_tilde_class; typedef struct _hardlimit_tilde { t_object x_obj; t_sample x_limit_db;//-50.0 - 0.0 t_sample x_wet_gain;//0.0 - 1.0 t_sample x_res_gain;//0.0 - 1.0 float x_f; } t_hardlimit_tilde; static void *hardlimit_tilde_new(t_floatarg limitdb, t_floatarg wetgain, t_floatarg resgain) { t_hardlimit_tilde *x = (t_hardlimit_tilde *)pd_new(hardlimit_tilde_class); x->x_limit_db = limitdb; x->x_wet_gain = wetgain; x->x_res_gain = resgain; outlet_new(&x->x_obj, gensym("signal")); floatinlet_new(&x->x_obj, &x->x_limit_db); floatinlet_new(&x->x_obj, &x->x_wet_gain); floatinlet_new(&x->x_obj, &x->x_res_gain); x->x_f = 0; if (limitdb) x->x_limit_db = limitdb; else x->x_limit_db = 0.0; if (wetgain) x->x_wet_gain = wetgain; else x->x_wet_gain = 0.0; if (resgain) x->x_res_gain = resgain; else x->x_res_gain = 0.0; return (x); } static t_int *hardlimit_tilde_perform(t_int *w) { t_hardlimit_tilde *x = (t_hardlimit_tilde *)(w[1]); t_float *in = (t_float *)(w[2]); t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); float f; float limit_g, sign, data, residue; while (n--) { f = *in++; limit_g = pow(10, x->x_limit_db / 20); sign = f < 0.0 ? -1.0 : 1.0; data = f * sign; residue = data > limit_g ? data - limit_g : 0.0; data -= residue; *out++ = sign * (x->x_wet_gain * data + x->x_res_gain * residue); } return (w+5); } static void hardlimit_tilde_dsp(t_hardlimit_tilde *x, t_signal **sp) { dsp_add(hardlimit_tilde_perform, 4, x, sp[0]->s_vec, sp[1]->s_vec, sp[0]->s_n); } void hardlimit_tilde_setup(void) { hardlimit_tilde_class = class_new(gensym("hardlimit~"), (t_newmethod)hardlimit_tilde_new, 0, sizeof(t_hardlimit_tilde), 0, A_DEFFLOAT, A_DEFFLOAT, A_DEFFLOAT, 0); CLASS_MAINSIGNALIN(hardlimit_tilde_class, t_hardlimit_tilde, x_f); class_addmethod(hardlimit_tilde_class, (t_method)hardlimit_tilde_dsp, gensym("dsp"), 0); } pd-sigpack-0.46.0/source/harmgen~.c000066400000000000000000000106541434363427200171240ustar00rootroot00000000000000/* sIgpAck * for * pure-data * www.weiss-archiv.de */ #include "m_pd.h" #include #ifdef _MSC_VER #pragma warning( disable : 4244 ) #pragma warning( disable : 4305 ) #endif #define HARMONICS 11 // ------------------------ harmgen~ ----------------------------- // harmonic generator // code from swh_plugins by steve harris www.plugins.org.uk static t_class *harmgen_tilde_class; typedef struct _harmgen_tilde { t_object x_obj; t_sample x_mag1; t_sample x_mag2; t_sample x_mag3; t_sample x_mag4; t_sample x_mag5; t_sample x_mag6; t_sample x_mag7; t_sample x_mag8; t_sample x_mag9; t_sample x_mag10; float x_itm; float x_otm; float x_f; } t_harmgen_tilde; static void *harmgen_tilde_new(t_floatarg mag1, t_floatarg mag2, t_floatarg mag3, t_floatarg mag4, t_floatarg mag5, t_floatarg mag6, t_floatarg mag7, t_floatarg mag8, t_floatarg mag9, t_floatarg mag10) { t_harmgen_tilde *x = (t_harmgen_tilde *)pd_new(harmgen_tilde_class); outlet_new(&x->x_obj, gensym("signal")); floatinlet_new(&x->x_obj, &x->x_mag1); floatinlet_new(&x->x_obj, &x->x_mag2); floatinlet_new(&x->x_obj, &x->x_mag3); floatinlet_new(&x->x_obj, &x->x_mag4); floatinlet_new(&x->x_obj, &x->x_mag5); floatinlet_new(&x->x_obj, &x->x_mag6); floatinlet_new(&x->x_obj, &x->x_mag7); floatinlet_new(&x->x_obj, &x->x_mag8); floatinlet_new(&x->x_obj, &x->x_mag9); floatinlet_new(&x->x_obj, &x->x_mag10); x->x_f = 0; if(mag1) x->x_mag1 = mag1; else x->x_mag1 = 1; if(mag2) x->x_mag2 = mag2; else x->x_mag2 = 1; if(mag3) x->x_mag3 = mag3; else x->x_mag3 = 1; if(mag4) x->x_mag4 = mag4; else x->x_mag4 = 1; if(mag5) x->x_mag5 = mag5; else x->x_mag5 = 1; if(mag6) x->x_mag6 = mag6; else x->x_mag6 = 1; if(mag7) x->x_mag7 = mag7; else x->x_mag7 = 1; if(mag8) x->x_mag8 = mag8; else x->x_mag8 = 1; if(mag9) x->x_mag9 = mag9; else x->x_mag9 = 1; if(mag10) x->x_mag10 = mag10; else x->x_mag10 = 1; return (x); } /* Calculate Chebychev coefficents from partial magnitudes, adapted from * example in Num. Rec. */ void chebpc(float c[], float d[]) { int k, j; float sv, dd[HARMONICS]; for (j = 0; j < HARMONICS; j++) { d[j] = dd[j] = 0.0; } d[0] = c[HARMONICS - 1]; for (j = HARMONICS - 2; j >= 1; j--) { for (k = HARMONICS - j; k >= 1; k--) { sv = d[k]; d[k] = 2.0 * d[k - 1] - dd[k]; dd[k] = sv; } sv = d[0]; d[0] = -dd[0] + c[j]; dd[0] = sv; } for (j = HARMONICS - 1; j >= 1; j--) { d[j] = d[j - 1] - dd[j]; } d[0] = -dd[0] + 0.5 * c[0]; } static t_int *harmgen_tilde_perform(t_int *w) { t_harmgen_tilde *x = (t_harmgen_tilde *)(w[1]); t_float *in1 = (t_float *)(w[2]); t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); unsigned long i; float mag_fix, y, f, value; float mag[HARMONICS] = {0.0f, x->x_mag1, x->x_mag2, x->x_mag3, x->x_mag4, x->x_mag5, x->x_mag6, x->x_mag7, x->x_mag8, x->x_mag9, x->x_mag10}; float p[HARMONICS]; // Normalise magnitudes mag_fix = (fabs(x->x_mag1) + fabs(x->x_mag2) + fabs(x->x_mag3) + fabs(x->x_mag4) + fabs(x->x_mag5) + fabs(x->x_mag6) + fabs(x->x_mag7) + fabs(x->x_mag8) + fabs(x->x_mag9) + fabs(x->x_mag10)); if (mag_fix < 1.0f) { mag_fix = 1.0f; } else { mag_fix = 1.0f / mag_fix; } for (i=0; ix_otm = 0.999f * x->x_otm + y - x->x_itm; x->x_itm = y; *out++ = x->x_otm; } return (w+5); } static void harmgen_tilde_dsp(t_harmgen_tilde *x, t_signal **sp) { dsp_add(harmgen_tilde_perform, 4, x, sp[0]->s_vec, sp[1]->s_vec, sp[0]->s_n); } void harmgen_tilde_setup(void) { harmgen_tilde_class = class_new(gensym("harmgen~"), (t_newmethod)harmgen_tilde_new, 0, sizeof(t_harmgen_tilde), 0, A_GIMME, 0); CLASS_MAINSIGNALIN(harmgen_tilde_class, t_harmgen_tilde, x_f); class_addmethod(harmgen_tilde_class, (t_method)harmgen_tilde_dsp, gensym("dsp"), 0); } pd-sigpack-0.46.0/source/impulse~.c000066400000000000000000000043511434363427200171560ustar00rootroot00000000000000// sigpack // for // pure-data // by weiss // www.weiss-archiv.de #include "m_pd.h" #ifdef _MSC_VER #pragma warning( disable : 4244 ) #pragma warning( disable : 4305 ) #endif // ------------------------ impulse~ ----------------------------- // non-bandlimited single-sample impulses // code from swh_plugins by steve harris www.plugin.org.uk // maker: Andy Wingo <wingo at pobox dot com> // copyright: GPL // name: Nonbandlimited single-sample impulses (Frequency: Control) // Based on work by James McCartney in SuperCollider. static t_class *impulse_tilde_class; typedef struct _impulse_tilde { t_object x_obj; t_sample x_phase; t_sample x_sample_rate; float x_f; } t_impulse_tilde; static void *impulse_tilde_new(t_floatarg f) { t_impulse_tilde *x = (t_impulse_tilde *)pd_new(impulse_tilde_class); x->x_f = f; x->x_phase = 0.f; x->x_sample_rate = sys_getsr();//later put this in impulse_tilde_dsp??? outlet_new(&x->x_obj, gensym("signal")); inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_float, gensym("ft1")); return (x); } static t_int *impulse_tilde_perform(t_int *w) { t_impulse_tilde *x = (t_impulse_tilde *)(w[1]); t_float *in = (t_float *)(w[2]); t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); float f, phase_step, value; while (n--) { f = *(in++); phase_step = f / x->x_sample_rate; if (x->x_phase > 1.f) { x->x_phase -= (int)x->x_phase; value = 1.f; } else { value = 0.f; } *out++ = value; x->x_phase += phase_step; } return (w+5); } static void impulse_tilde_ft1(t_impulse_tilde *x, t_float f) { x->x_phase = f - (int)f; } static void impulse_tilde_dsp(t_impulse_tilde *x, t_signal **sp) { dsp_add(impulse_tilde_perform, 4, x, sp[0]->s_vec, sp[1]->s_vec, sp[0]->s_n); } void impulse_tilde_setup(void) { impulse_tilde_class = class_new(gensym("impulse~"), (t_newmethod)impulse_tilde_new, 0, sizeof(t_impulse_tilde), 0, A_DEFFLOAT, 0); CLASS_MAINSIGNALIN(impulse_tilde_class, t_impulse_tilde, x_f); class_addmethod(impulse_tilde_class, (t_method)impulse_tilde_dsp, gensym("dsp"), 0); class_addmethod(impulse_tilde_class, (t_method)impulse_tilde_ft1, gensym("ft1"), A_FLOAT, 0); } pd-sigpack-0.46.0/source/rectify~.c000066400000000000000000000027201434363427200171430ustar00rootroot00000000000000/* sIgpAck * for * pure-data * www.weiss-archiv.de */ #include "m_pd.h" #ifdef _MSC_VER #pragma warning( disable : 4244 ) #pragma warning( disable : 4305 ) #endif /* ------------------------ rectify~ ----------------------------- */ /* flips negative signal values to positive */ static t_class *rectify_tilde_class; typedef struct _rectify_tilde { t_object x_obj; float x_f; } t_rectify_tilde; static void *rectify_tilde_new(void) { t_rectify_tilde *x = (t_rectify_tilde *)pd_new(rectify_tilde_class); outlet_new(&x->x_obj, gensym("signal")); x->x_f = 0; return (x); } static t_int *rectify_tilde_perform(t_int *w) { t_rectify_tilde *x = (t_rectify_tilde *)(w[1]); t_float *in = (t_float *)(w[2]); t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); float f, value; while (n--) { f = *in++; if (f < 0) value = f * -1; else value = f; *out++ = value; } return (w+5); } static void rectify_tilde_dsp(t_rectify_tilde *x, t_signal **sp) { dsp_add(rectify_tilde_perform, 4, x, sp[0]->s_vec, sp[1]->s_vec, sp[0]->s_n); } void rectify_tilde_setup(void) { rectify_tilde_class = class_new(gensym("rectify~"), (t_newmethod)rectify_tilde_new, 0, sizeof(t_rectify_tilde), 0, A_DEFFLOAT, 0); CLASS_MAINSIGNALIN(rectify_tilde_class, t_rectify_tilde, x_f); class_addmethod(rectify_tilde_class, (t_method)rectify_tilde_dsp, gensym("dsp"), 0); } pd-sigpack-0.46.0/source/round~.c000066400000000000000000000031101434363427200166170ustar00rootroot00000000000000/* sIgpAck * for * pure-data * www.weiss-archiv.de */ #include "m_pd.h" #ifdef _MSC_VER #pragma warning( disable : 4244 ) #pragma warning( disable : 4305 ) #endif /* ------------------------ round~ ----------------------------- */ /* simple rounder */ static t_class *round_tilde_class; typedef struct _round_tilde { t_object x_obj; t_sample x_coarse; float x_f; } t_round_tilde; static void *round_tilde_new(t_floatarg coarse) { t_round_tilde *x = (t_round_tilde *)pd_new(round_tilde_class); x->x_coarse = coarse; outlet_new(&x->x_obj, gensym("signal")); floatinlet_new(&x->x_obj, &x->x_coarse); x->x_f = 0; if(coarse) x->x_coarse = coarse; else x->x_coarse = 1; return (x); } static t_int *round_tilde_perform(t_int *w) { t_round_tilde *x = (t_round_tilde *)(w[1]); t_float *in = (t_float *)(w[2]); t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); float f, mult, value; while (n--) { f = *in++; mult = f * x->x_coarse; value = (x->x_coarse) ? (int)mult / x->x_coarse : 0; *out++ = value; } return (w+5); } static void round_tilde_dsp(t_round_tilde *x, t_signal **sp) { dsp_add(round_tilde_perform, 4, x, sp[0]->s_vec, sp[1]->s_vec, sp[0]->s_n); } void round_tilde_setup(void) { round_tilde_class = class_new(gensym("round~"), (t_newmethod)round_tilde_new, 0, sizeof(t_round_tilde), 0, A_DEFFLOAT, 0); CLASS_MAINSIGNALIN(round_tilde_class, t_round_tilde, x_f); class_addmethod(round_tilde_class, (t_method)round_tilde_dsp, gensym("dsp"), 0); } pd-sigpack-0.46.0/source/saturate~.c000066400000000000000000000041361434363427200173310ustar00rootroot00000000000000/* sIgpAck * for * pure-data * www.weiss-archiv.de */ #include "m_pd.h" #include #ifdef _MSC_VER #pragma warning( disable : 4244 ) #pragma warning( disable : 4305 ) #endif /* ------------------------ saturate~ ----------------------------- */ /* signal soft saturation */ /* code from www.musicdsp.org posted by bram de jong */ static t_class *saturate_tilde_class; typedef struct _saturate_tilde { t_object x_obj; t_sample x_thresh; float x_f; } t_saturate_tilde; static void *saturate_tilde_new(t_floatarg thresh) { t_saturate_tilde *x = (t_saturate_tilde *)pd_new(saturate_tilde_class); x->x_thresh = thresh; outlet_new(&x->x_obj, gensym("signal")); floatinlet_new(&x->x_obj, &x->x_thresh); x->x_f = 0; if(thresh) x->x_thresh = thresh; else x->x_thresh = 1.; return (x); } static float sigmoid(float x) { if(fabs(x) < 1) return x * (1.5f - 0.5f * x * x); else return x > 0.f ? 1.f : -1.f; } static t_int *saturate_tilde_perform(t_int *w) { t_saturate_tilde *x = (t_saturate_tilde *)(w[1]); t_float *in = (t_float *)(w[2]); t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); float f, value; float t = x->x_thresh; while (n--) { f = *in++; if(fabs(f) < t) value = f; else { if(f > 0.f) value = t + (1.f - t) * sigmoid((f - t)/((1 - t) * 1.5f)); else value = -(t + (1.f - t) * sigmoid((-f - t)/((1 - t) * 1.5f))); } *out++ = value; } return (w+5); } static void saturate_tilde_dsp(t_saturate_tilde *x, t_signal **sp) { dsp_add(saturate_tilde_perform, 4, x, sp[0]->s_vec, sp[1]->s_vec, sp[0]->s_n); } void saturate_tilde_setup(void) { saturate_tilde_class = class_new(gensym("saturate~"), (t_newmethod)saturate_tilde_new, 0, sizeof(t_saturate_tilde), 0, A_DEFFLOAT, 0); CLASS_MAINSIGNALIN(saturate_tilde_class, t_saturate_tilde, x_f); class_addmethod(saturate_tilde_class, (t_method)saturate_tilde_dsp, gensym("dsp"), 0); class_addmethod(saturate_tilde_class, (t_method)saturate_tilde_dsp, gensym("sigmoid"), A_FLOAT, 0); } pd-sigpack-0.46.0/source/shape~.c000066400000000000000000000037221434363427200166010ustar00rootroot00000000000000// sigpack // for // pure-data // by weiss // www.weiss-archiv.de #include "m_pd.h" #include #ifdef _MSC_VER #pragma warning( disable : 4244 ) #pragma warning( disable : 4305 ) #endif // ------------------------ shape~ ----------------------------- // this external reshapes the wave by an exponential function, inspiration was taken from the Nord module of the same name. // code from swh_plugins by steve harris www.plugin.org.uk static t_class *shape_tilde_class; typedef struct _shape_tilde { t_object x_obj; t_sample x_shapep; float x_f; } t_shape_tilde; static void *shape_tilde_new(t_floatarg waveshape) { t_shape_tilde *x = (t_shape_tilde *)pd_new(shape_tilde_class); x->x_shapep = waveshape; outlet_new(&x->x_obj, gensym("signal")); floatinlet_new(&x->x_obj, &x->x_shapep); x->x_f = 0; if (waveshape) x->x_shapep = waveshape; else x->x_shapep = 0.0f; return (x); } static t_int *shape_tilde_perform(t_int *w) { t_shape_tilde *x = (t_shape_tilde *)(w[1]); t_float *in = (t_float *)(w[2]); t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); float f, value; float shape = 0.0f; if (x->x_shapep < 1.0f && x->x_shapep < -1.0f) { shape = 1.0f; } else if (shape < 0) { shape = -1.0f / shape; } else { shape = x->x_shapep; } while (n--) { f = *in++; if (f < 0.0f) { value = -pow(-f, shape); } else { value = pow(f, shape); } *out++ = value; } return (w+5); } static void shape_tilde_dsp(t_shape_tilde *x, t_signal **sp) { dsp_add(shape_tilde_perform, 4, x, sp[0]->s_vec, sp[1]->s_vec, sp[0]->s_n); } void shape_tilde_setup(void) { shape_tilde_class = class_new(gensym("shape~"), (t_newmethod)shape_tilde_new, 0, sizeof(t_shape_tilde), 0, A_DEFFLOAT, 0); CLASS_MAINSIGNALIN(shape_tilde_class, t_shape_tilde, x_f); class_addmethod(shape_tilde_class, (t_method)shape_tilde_dsp, gensym("dsp"), 0); } pd-sigpack-0.46.0/source/sieve~.c000066400000000000000000000044401434363427200166120ustar00rootroot00000000000000/* sIgpAck * for * pure-data * www.weiss-archiv.de */ #include "m_pd.h" #ifdef _MSC_VER #pragma warning( disable : 4244 ) #pragma warning( disable : 4305 ) #endif /* ------------------------ sieve~ ----------------------------- */ /* sift samples */ static t_class *sieve_tilde_class; typedef struct _sieve_tilde { t_object x_obj; t_sample x_mode; t_sample x_sample; t_sample x_last; t_float x_f; } t_sieve_tilde; static void *sieve_tilde_new(t_floatarg mode, t_floatarg sample) { t_sieve_tilde *x = (t_sieve_tilde *)pd_new(sieve_tilde_class); x->x_mode = mode; x->x_sample = sample; outlet_new(&x->x_obj, gensym("signal")); floatinlet_new(&x->x_obj, &x->x_mode); floatinlet_new(&x->x_obj, &x->x_sample); x->x_last = 0; x->x_f = 0; x->x_mode = 0; if(mode) x->x_mode = mode; if(x->x_mode > 1) x->x_mode = 1; if(x->x_mode < 0) x->x_mode = 0; return (x); } inline static t_float sieve_tilde_round(t_float in) { t_float y, round; int temp; { round = in * 10; temp = round; y = temp * 0.1; } return y; } static t_int *sieve_tilde_perform(t_int *w) { t_sieve_tilde *x = (t_sieve_tilde *)(w[1]); t_float *in = (t_float *)(w[2]); t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); t_float f; int mode = x->x_mode; t_float roundedSample = sieve_tilde_round(x->x_sample); t_float roundF; while (n--) { f = *in++; roundF = sieve_tilde_round((double)f); switch(mode){ case(0): if (roundF != roundedSample) { *out++ = f; x->x_last = f; } else { *out++ = x->x_last; } break; case(1): if (roundF == roundedSample) { *out++ = f; x->x_last = f; } else { *out++ = x->x_last; } } } return (w+5); } static void sieve_tilde_dsp(t_sieve_tilde *x, t_signal **sp) { dsp_add(sieve_tilde_perform, 4, x, sp[0]->s_vec, sp[1]->s_vec, sp[0]->s_n); } void sieve_tilde_setup(void) { sieve_tilde_class = class_new(gensym("sieve~"), (t_newmethod)sieve_tilde_new, 0, sizeof(t_sieve_tilde), 0, A_DEFFLOAT, A_DEFFLOAT, 0); CLASS_MAINSIGNALIN(sieve_tilde_class, t_sieve_tilde, x_f); class_addmethod(sieve_tilde_class, (t_method)sieve_tilde_dsp, gensym("dsp"), 0); } pd-sigpack-0.46.0/source/sigpack.c000066400000000000000000000030701434363427200167200ustar00rootroot00000000000000#ifndef VERSION #define VERSION "0.04" #endif #include typedef struct _sigpack { t_object x_obj; } t_sigpack; static t_class* sigpack_class; void chop_tilde_setup(); void decimate_tilde_setup(); void diode_tilde_setup(); void foldback_tilde_setup(); void foldover_tilde_setup(); void freqdiv_tilde_setup(); void freqshift_tilde_setup(); void hardlimit_tilde_setup(); void harmgen_tilde_setup(); void impulse_tilde_setup(); void rectify_tilde_setup(); void round_tilde_setup(); void saturate_tilde_setup(); void shape_tilde_setup(); void sieve_tilde_setup(); void split_tilde_setup(); void transient_tilde_setup(); void ustep_tilde_setup(); void valverect_tilde_setup(); void vowel_tilde_setup(); void wavewrap_tilde_setup(); static void* sigpack_new(t_symbol* s) { t_sigpack *x = (t_sigpack *)pd_new(sigpack_class); return (x); } void sigpack_setup(void) { sigpack_class = class_new(gensym("sigpack"), (t_newmethod)sigpack_new, 0, sizeof(t_sigpack), 0,0); chop_tilde_setup(); decimate_tilde_setup(); diode_tilde_setup(); foldback_tilde_setup(); foldover_tilde_setup(); freqdiv_tilde_setup(); freqshift_tilde_setup(); hardlimit_tilde_setup(); harmgen_tilde_setup(); impulse_tilde_setup(); rectify_tilde_setup(); round_tilde_setup(); saturate_tilde_setup(); shape_tilde_setup(); sieve_tilde_setup(); split_tilde_setup(); transient_tilde_setup(); ustep_tilde_setup(); valverect_tilde_setup(); vowel_tilde_setup(); wavewrap_tilde_setup(); post("sigpack"" "VERSION " | 12.2007 | www.weiss-archiv.de"); } pd-sigpack-0.46.0/source/split~.c000066400000000000000000000033111434363427200166260ustar00rootroot00000000000000/* sIgpAck * for * pure-data * www.weiss-archiv.de */ #include "m_pd.h" #ifdef _MSC_VER #pragma warning( disable : 4244 ) #pragma warning( disable : 4305 ) #endif /* ------------------------ split~ ----------------------------- */ /* signal splitter */ static t_class *split_tilde_class; typedef struct _split_tilde { t_object x_obj; float x_f; t_sample x_thres; } t_split_tilde; static void *split_tilde_new(t_floatarg thres) { t_split_tilde *x = (t_split_tilde *)pd_new(split_tilde_class); x->x_thres = thres; outlet_new(&x->x_obj, gensym("signal")); outlet_new(&x->x_obj, gensym("signal")); floatinlet_new(&x->x_obj, &x->x_thres); x->x_f = 0; if(thres) x->x_thres = thres; else x->x_thres = 0; return (x); } static t_int *split_tilde_perform(t_int *w) { t_split_tilde *x = (t_split_tilde *)(w[1]); t_float *in = (t_float *)(w[2]); t_float *out1 = (t_float *)(w[3]); t_float *out2 = (t_float *)(w[4]); int n = (int)(w[5]); while (n--) { float f = *in++; if(f < x->x_thres) { *out1++ = f; *out2++ = 0; } else if(f >= x->x_thres) { *out1++ = 0; *out2++ = f; } } return (w+6); } static void split_tilde_dsp(t_split_tilde *x, t_signal **sp) { dsp_add(split_tilde_perform, 5, x, sp[0]->s_vec, sp[1]->s_vec, sp[2]->s_vec, sp[0]->s_n); } void split_tilde_setup(void) { split_tilde_class = class_new(gensym("split~"), (t_newmethod)split_tilde_new, 0, sizeof(t_split_tilde), 0, A_DEFFLOAT, 0); CLASS_MAINSIGNALIN(split_tilde_class, t_split_tilde, x_f); class_addmethod(split_tilde_class, (t_method)split_tilde_dsp, gensym("dsp"), 0); } pd-sigpack-0.46.0/source/transient~.c000066400000000000000000000123151434363427200175060ustar00rootroot00000000000000// sigpack // for // pure-data // by weiss // www.weiss-archiv.de #include "m_pd.h" #include #include #ifdef _MSC_VER #pragma warning( disable : 4244 ) #pragma warning( disable : 4305 ) #endif #define BUFFER_SIZE 10240 #define SSTAB 0.00001f #define ASTAB 0.02f //Truncate-to-zero modulo (ANSI C doesn`t specify) will only work //if -m < v < 2m #define MOD(v,m) (v < 0 ? v+m : (v >= m ? v-m : v)) // ------------------------ transient~ ----------------------------- // transient mangler // code from swh_plugins by steve harris www.plugin.org.uk static t_class *transient_tilde_class; typedef struct _transient_tilde { t_object x_obj; t_sample x_attack;//-1 - 1 t_sample x_sustain;//-1 - 1 t_float *x_buffer; int x_buffer_pos; long x_count; t_float x_fast_buffer_sum; t_float x_fast_track; t_float x_medi_buffer_sum; t_float x_medi_track; int x_sample_rate; t_float x_slow_buffer_sum; t_float x_slow_track; t_float x_f; } t_transient_tilde; static void *transient_tilde_new(t_floatarg attack, t_floatarg sustain) { t_transient_tilde *x = (t_transient_tilde *)pd_new(transient_tilde_class); x->x_attack = attack; x->x_sustain = sustain; outlet_new(&x->x_obj, gensym("signal")); floatinlet_new(&x->x_obj, &x->x_attack); floatinlet_new(&x->x_obj, &x->x_sustain); //memset(x->x_buffer, '/0', BUFFER_SIZE * sizeof(float)); x->x_buffer = getbytes(BUFFER_SIZE * sizeof(float)); x->x_fast_buffer_sum = 0.1; x->x_medi_buffer_sum = 0.1; x->x_slow_buffer_sum = 0.1; x->x_buffer_pos = 0; x->x_fast_track = 0.0; x->x_medi_track = 0.0; x->x_slow_track = 0.0; x->x_count = 0; x->x_sample_rate = sys_getsr(); x->x_f = 0; if (attack) x->x_attack = attack; else x->x_attack = 0.0; if (sustain) x->x_sustain = sustain; else x->x_sustain = 0.0; return (x); } static t_int *transient_tilde_perform(t_int *w) { t_transient_tilde *x = (t_transient_tilde *)(w[1]); t_float *inVal = (t_float *)(w[2]); t_float *outVal = (t_float *)(w[3]); int n = (int)(w[4]); const int fast_sum_size = (2 * x->x_sample_rate) / 1000; const int medi_sum_size = (25 * x->x_sample_rate) / 1000; const int slow_sum_size = (100 * x->x_sample_rate) / 1000; const float fast_track_lag = 1.5f / fast_sum_size; const float medi_track_lag = 1.0f / medi_sum_size; const float slow_track_lag = 1.3f / slow_sum_size; t_float ratio; t_float attack = x->x_attack; t_float sustain = x->x_sustain; t_float *buffer = x->x_buffer; int buffer_pos = x->x_buffer_pos; long count = x->x_count; t_float fast_buffer_sum = x->x_fast_buffer_sum; t_float fast_track = x->x_fast_track; t_float medi_buffer_sum = x->x_medi_buffer_sum; t_float medi_track = x->x_medi_track; t_float slow_buffer_sum = x->x_slow_buffer_sum; t_float slow_track = x->x_slow_track; t_float in; while (n--) { in = *inVal++; buffer[buffer_pos] = fabs(in); fast_buffer_sum += buffer[buffer_pos]; medi_buffer_sum += buffer[buffer_pos]; slow_buffer_sum += buffer[buffer_pos]; fast_buffer_sum -= buffer[MOD(buffer_pos - fast_sum_size, BUFFER_SIZE)]; medi_buffer_sum -= buffer[MOD(buffer_pos - medi_sum_size, BUFFER_SIZE)]; slow_buffer_sum -= buffer[MOD(buffer_pos - slow_sum_size, BUFFER_SIZE)]; if (count++ > slow_sum_size) { fast_track += (fast_buffer_sum/fast_sum_size - fast_track) * fast_track_lag; medi_track += (medi_buffer_sum/medi_sum_size - medi_track) * medi_track_lag; slow_track += (slow_buffer_sum/slow_sum_size - slow_track) * slow_track_lag; } // Attack ratio = (fast_track + ASTAB) / (medi_track + ASTAB); if (ratio * attack > 1.0f) { in *= ratio * attack; } else if (ratio * attack < -1.0f) { in /= ratio * -attack; } // Sustain ratio = (slow_track + SSTAB) / (medi_track + SSTAB); if (ratio * sustain > 1.0f) { in *= ratio * sustain; } else if (ratio * sustain < -1.0f) { in /= ratio * -sustain; } *outVal++ = in; buffer_pos = (buffer_pos + 1) % BUFFER_SIZE; } x->x_buffer_pos = buffer_pos; x->x_count = count; x->x_fast_buffer_sum = fast_buffer_sum; x->x_fast_track = fast_track; x->x_medi_buffer_sum = medi_buffer_sum; x->x_medi_track = medi_track; x->x_slow_buffer_sum = slow_buffer_sum; x->x_slow_track = slow_track; return (w+5); } static void transient_tilde_dsp(t_transient_tilde *x, t_signal **sp) { dsp_add(transient_tilde_perform, 4, x, sp[0]->s_vec, sp[1]->s_vec, sp[0]->s_n); } void transient_tilde_setup(void) { transient_tilde_class = class_new(gensym("transient~"), (t_newmethod)transient_tilde_new, 0, sizeof(t_transient_tilde), 0, A_DEFFLOAT, A_DEFFLOAT, 0); CLASS_MAINSIGNALIN(transient_tilde_class, t_transient_tilde, x_f); class_addmethod(transient_tilde_class, (t_method)transient_tilde_dsp, gensym("dsp"), 0); } pd-sigpack-0.46.0/source/ustep~.c000066400000000000000000000036571434363427200166500ustar00rootroot00000000000000/* sIgpAck * for * pure-data * www.weiss-archiv.de */ #include "m_pd.h" #ifdef _MSC_VER #pragma warning( disable : 4244 ) #pragma warning( disable : 4305 ) #endif /* ------------------------ ustep~ ----------------------------- */ /* signal unity step function */ static t_class *ustep_tilde_class; typedef struct _ustep_tilde { t_object x_obj; t_sample x_mode; t_sample x_thres; float x_f; } t_ustep_tilde; static void *ustep_tilde_new(t_floatarg mode, t_floatarg thres) { t_ustep_tilde *x = (t_ustep_tilde *)pd_new(ustep_tilde_class); x->x_mode = mode; x->x_thres = thres; outlet_new(&x->x_obj, gensym("signal")); floatinlet_new(&x->x_obj, &x->x_mode); floatinlet_new(&x->x_obj, &x->x_thres); x->x_f = 0; if(mode) x->x_mode = mode; else x->x_mode = 0; if(x->x_mode > 1) x->x_mode = 1; if(x->x_mode < 0) x->x_mode = 0; if(thres) x->x_thres = thres; else x->x_thres = 0.5; return (x); } static t_int *ustep_tilde_perform(t_int *w) { t_ustep_tilde *x = (t_ustep_tilde *)(w[1]); t_float *in = (t_float *)(w[2]); t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); float f, value; int mode = x->x_mode; while (n--) { f = *in++; switch(mode){ case(0): if (f >= x->x_thres) value = 1; else value = 0; break; case(1): if (f >= x->x_thres) value = 1; else value = f; } *out++ = value; } return (w+5); } static void ustep_tilde_dsp(t_ustep_tilde *x, t_signal **sp) { dsp_add(ustep_tilde_perform, 4, x, sp[0]->s_vec, sp[1]->s_vec, sp[0]->s_n); } void ustep_tilde_setup(void) { ustep_tilde_class = class_new(gensym("ustep~"), (t_newmethod)ustep_tilde_new, 0, sizeof(t_ustep_tilde), 0, A_DEFFLOAT, A_DEFFLOAT, 0); CLASS_MAINSIGNALIN(ustep_tilde_class, t_ustep_tilde, x_f); class_addmethod(ustep_tilde_class, (t_method)ustep_tilde_dsp, gensym("dsp"), 0); } pd-sigpack-0.46.0/source/valverect~.c000066400000000000000000000105371434363427200174760ustar00rootroot00000000000000// sigpack // for // pure-data // by weiss // www.weiss-archive.de #include "m_pd.h" #include #include #include #ifdef _MSC_VER #pragma warning( disable : 4244 ) #pragma warning( disable : 4305 ) #endif // ------------------------ valverect~ ----------------------------- // valve rectifier // code from swh_plugins by steve harris www.plugin.org.uk // 1.0 / ln(2) #define LN2R 1.442695041f /* Fast exponentiation function, y = e^x */ #define f_exp(x) f_pow2(x * LN2R) static t_class *valverect_tilde_class; typedef struct _valverect_tilde { t_object x_obj; t_sample x_sag;//sag level[0-1] t_sample x_dist_p;//distortion[0-1] unsigned int x_apos; float *x_avg; int x_avg_size; float x_avg_sizer; float x_avgs; float x_lp1tm1; float x_lp2tm1; float x_s_rate; float x_f; } t_valverect_tilde; static void *valverect_tilde_new(t_floatarg sag, t_floatarg dist) { t_valverect_tilde *x = (t_valverect_tilde *)pd_new(valverect_tilde_class); x->x_sag = sag; x->x_dist_p = dist; outlet_new(&x->x_obj, gensym("signal")); floatinlet_new(&x->x_obj, &x->x_sag); floatinlet_new(&x->x_obj, &x->x_dist_p); x->x_s_rate = sys_getsr(); x->x_avg_size = x->x_s_rate / 9;//number of samples in averaging buffer x->x_avg_sizer = 9.0f / x->x_s_rate;//reciprocal of above x->x_avg = (float *)getbytes(x->x_avg_size * sizeof(float));//averaging buffer memset(x->x_avg, 0, x->x_avg_size * sizeof(float)); x->x_avgs = 0.0f;//sum of samples in averaging buffer x->x_apos = 0;//position in averaging buffer x->x_lp1tm1 = 0.0f;//last value in lowpass 1 x->x_lp2tm1 = 0.0f;//last value in lowpass 2 x->x_f = 0; if (sag) x->x_sag = sag; else x->x_sag = 0.0; if (dist) x->x_dist_p = dist; else x->x_dist_p = 0.0; return (x); } /* Andrew Simper's pow(2, x) aproximation from the music-dsp list */ /* 32 bit "pointer cast" union */ typedef union { float f; int32_t i; } ls_pcast32; /* union version */ static inline float f_pow2(float x) { ls_pcast32 *px, tx, lx; float dx; px = (ls_pcast32 *)&x; // store address of float as long pointer tx.f = (x-0.5f) + (3<<22); // temporary value for truncation lx.i = tx.i - 0x4b400000; // integer power of 2 dx = x - (float)lx.i; // float remainder of power of 2 x = 1.0f + dx * (0.6960656421638072f + // cubic apporoximation of 2^x dx * (0.224494337302845f + // for x in the range [0, 1] dx * (0.07944023841053369f))); (*px).i += (lx.i << 23); // add integer power of 2 to exponent return (*px).f; } static t_int *valverect_tilde_perform(t_int *w) { t_valverect_tilde *x = (t_valverect_tilde *)(w[1]); t_float *in = (t_float *)(w[2]); t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); float abs, q, fx; const float dist = x->x_dist_p * 40.0f + 0.1f; float f; while (n--) { f = *in++; abs = fabs(f); if(abs > x->x_lp1tm1) { x->x_lp1tm1 = abs; } else { x->x_lp1tm1 = 0.9999f * x->x_lp1tm1 + 0.0001f * abs; } x->x_avgs -= x->x_avg[x->x_apos]; x->x_avgs += x->x_lp1tm1; x->x_avg[x->x_apos] = x->x_lp1tm1; x->x_apos %= x->x_avg_size; x->x_lp2tm1 = 0.999f * x->x_lp2tm1 + x->x_avgs * x->x_avg_sizer * 0.001f; q = x->x_lp1tm1 * x->x_sag - x->x_lp2tm1 * 1.02f - 1.0f; if(q > -0.01f) { q = -0.01f; } else if(q < -1.0f) { q = -1.0f; } if(f == q) { fx = 1.0f / dist + q / (1.0f - f_exp(dist * q)); } else { fx = (f - q) / (1.0f - f_exp(-dist * (f - q))) + q / (1.0f - f_exp(dist * q)); } *out++ = fx; } return (w+5); } static void valverect_tilde_dsp(t_valverect_tilde *x, t_signal **sp) { dsp_add(valverect_tilde_perform, 4, x, sp[0]->s_vec, sp[1]->s_vec, sp[0]->s_n); } static void valverect_tilde_free(t_valverect_tilde *x) { freebytes(x->x_avg, x->x_avg_size * sizeof(float)); } void valverect_tilde_setup(void) { valverect_tilde_class = class_new(gensym("valverect~"), (t_newmethod)valverect_tilde_new, (t_method)valverect_tilde_free, sizeof(t_valverect_tilde), 0, A_DEFFLOAT, A_DEFFLOAT, 0); CLASS_MAINSIGNALIN(valverect_tilde_class, t_valverect_tilde, x_f); class_addmethod(valverect_tilde_class, (t_method)valverect_tilde_dsp, gensym("dsp"), 0); } pd-sigpack-0.46.0/source/vowel~.c000066400000000000000000000111311434363427200166260ustar00rootroot00000000000000/* sIgpAck * for * pure-data * www.weiss-archiv.de */ #include "m_pd.h" #ifdef _MSC_VER #pragma warning( disable : 4244 ) #pragma warning( disable : 4305 ) #endif #define MEMORY 10 #define MINCOEFF 0.f #define MAXCOEFF 4.f /* ------------------------ vowel~ ----------------------------- */ /* simple formant filter */ /* code from musicdsp.org posted by alex@smartelectronix.com */ /* moved memory array to instance struct, preventing NaN issues */ /* and other problems with multiple instances. */ /* fjkraan, 2016-04-20 */ static t_class *vowel_tilde_class; typedef struct _vowel_tilde { t_object x_obj; t_sample x_vowelnum; double x_memory[MEMORY]; float x_f; } t_vowel_tilde; static void *vowel_tilde_new(t_floatarg vowelnum) { t_vowel_tilde *x = (t_vowel_tilde *)pd_new(vowel_tilde_class); x->x_vowelnum = vowelnum; outlet_new(&x->x_obj, gensym("signal")); floatinlet_new(&x->x_obj, &x->x_vowelnum); x->x_f = 0; int i; for (i = 0; i < MEMORY; i++) { x->x_memory[i] = 0; } if (vowelnum) x->x_vowelnum = vowelnum; if (vowelnum < MINCOEFF) vowelnum = MINCOEFF; if (vowelnum > MAXCOEFF) vowelnum = MAXCOEFF; else x->x_vowelnum = 0; return (x); } const double coeff[5][11]= { { 8.11044e-06, 8.943665402, -36.83889529, 92.01697887, -154.337906, 181.6233289, -151.8651235, 89.09614114, -35.10298511, 8.388101016, -0.923313471 ///A }, { 4.36215e-06, 8.90438318, -36.55179099, 91.05750846, -152.422234, 179.1170248, ///E -149.6496211,87.78352223, -34.60687431, 8.282228154, -0.914150747 }, { 3.33819e-06, 8.893102966, -36.49532826, 90.96543286, -152.4545478, 179.4835618, -150.315433, 88.43409371, -34.98612086, 8.407803364, -0.932568035 ///I }, { 1.13572e-06, 8.994734087, -37.2084849, 93.22900521, -156.6929844, 184.596544, ///O -154.3755513, 90.49663749, -35.58964535, 8.478996281, -0.929252233 }, { 4.09431e-07, 8.997322763, -37.20218544, 93.11385476, -156.2530937, 183.7080141, ///U -153.2631681, 89.59539726, -35.12454591, 8.338655623, -0.910251753 } }; float formant_filter (float in, int vowelnum, t_vowel_tilde *x) { float res; res = (float) (coeff[vowelnum][0] * in + coeff[vowelnum][1] * x->x_memory[0] + coeff[vowelnum][2] * x->x_memory[1] + coeff[vowelnum][3] * x->x_memory[2] + coeff[vowelnum][4] * x->x_memory[3] + coeff[vowelnum][5] * x->x_memory[4] + coeff[vowelnum][6] * x->x_memory[5] + coeff[vowelnum][7] * x->x_memory[6] + coeff[vowelnum][8] * x->x_memory[7] + coeff[vowelnum][9] * x->x_memory[8] + coeff[vowelnum][10] * x->x_memory[9]); x->x_memory[9] = x->x_memory[8]; x->x_memory[8] = x->x_memory[7]; x->x_memory[7] = x->x_memory[6]; x->x_memory[6] = x->x_memory[5]; x->x_memory[5] = x->x_memory[4]; x->x_memory[4] = x->x_memory[3]; x->x_memory[3] = x->x_memory[2]; x->x_memory[2] = x->x_memory[1]; x->x_memory[1] = x->x_memory[0]; x->x_memory[0] = (double)res; return res; } static t_int *vowel_tilde_perform(t_int *w) { t_vowel_tilde *x = (t_vowel_tilde *)(w[1]); t_float *in = (t_float *)(w[2]); t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); float f, value; if (x->x_vowelnum < MINCOEFF) x->x_vowelnum = MINCOEFF; if (x->x_vowelnum > MAXCOEFF) x->x_vowelnum = MAXCOEFF; while (n--) { f = *in++; value = formant_filter(f, (int)x->x_vowelnum, x); *out++ = value; } return (w+5); } static void vowel_tilde_dsp(t_vowel_tilde *x, t_signal **sp) { dsp_add(vowel_tilde_perform, 4, x, sp[0]->s_vec, sp[1]->s_vec, sp[0]->s_n); } static void vowel_state(t_vowel_tilde *x) { logpost(NULL, 4, "--==## vowel~ state ##==--"); logpost(NULL, 4, "x_vowelnum: %f", x->x_vowelnum); int vn = (int)x->x_vowelnum; int i; for (i = 0; i <= 10; i++) { logpost(NULL, 4, "coeff[%d][%d]: %lf", vn, i, coeff[vn][i]); } for (i = 0; i < 10; i++) { logpost(NULL, 4, "memory[%d] = %lf", i, x->x_memory[i]); } } void vowel_tilde_setup(void) { vowel_tilde_class = class_new(gensym("vowel~"), (t_newmethod)vowel_tilde_new, 0, sizeof(t_vowel_tilde), 0, A_DEFFLOAT, 0); CLASS_MAINSIGNALIN(vowel_tilde_class, t_vowel_tilde, x_f); class_addmethod(vowel_tilde_class, (t_method)vowel_tilde_dsp, gensym("dsp"), 0); class_addmethod(vowel_tilde_class, (t_method)formant_filter, gensym("formant_filter"), A_GIMME, A_NULL); class_addmethod(vowel_tilde_class, (t_method)vowel_state, gensym("state"), 0); } pd-sigpack-0.46.0/source/wavewrap~.c000066400000000000000000000035121434363427200173320ustar00rootroot00000000000000// sigpack // for // pure-data // by weiss // www.weiss-archiv.de #include "m_pd.h" #include #ifndef M_PI #define M_PI 3.14159265358979323846 #endif #ifdef _MSC_VER #pragma warning( disable : 4244 ) #pragma warning( disable : 4305 ) #endif // ------------------------ wavewrap~ ----------------------------- // sinus wavewrapper. produces an unusual distortion effect // code from swh_plugins by steve harris www.plugin.org.uk static t_class *wavewrap_tilde_class; typedef struct _wavewrap_tilde { t_object x_obj; t_sample x_wrap; float x_f; } t_wavewrap_tilde; static void *wavewrap_tilde_new(t_floatarg wrap) { t_wavewrap_tilde *x = (t_wavewrap_tilde *)pd_new(wavewrap_tilde_class); x->x_wrap = wrap; outlet_new(&x->x_obj, gensym("signal")); floatinlet_new(&x->x_obj, &x->x_wrap); x->x_f = 0; if (wrap) x->x_wrap = wrap; else x->x_wrap = 0; return (x); } static t_int *wavewrap_tilde_perform(t_int *w) { t_wavewrap_tilde *x = (t_wavewrap_tilde *)(w[1]); t_float *in = (t_float *)(w[2]); t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); float f, value; float coef = x->x_wrap * M_PI; if (coef < 0.05f) { coef = 0.05f; } while (n--) { f = *in++; value = sin(f * coef); *out++ = value; } return (w+5); } static void wavewrap_tilde_dsp(t_wavewrap_tilde *x, t_signal **sp) { dsp_add(wavewrap_tilde_perform, 4, x, sp[0]->s_vec, sp[1]->s_vec, sp[0]->s_n); } void wavewrap_tilde_setup(void) { wavewrap_tilde_class = class_new(gensym("wavewrap~"), (t_newmethod)wavewrap_tilde_new, 0, sizeof(t_wavewrap_tilde), 0, A_DEFFLOAT, 0); CLASS_MAINSIGNALIN(wavewrap_tilde_class, t_wavewrap_tilde, x_f); class_addmethod(wavewrap_tilde_class, (t_method)wavewrap_tilde_dsp, gensym("dsp"), 0); }