aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--LICENSE.txt (renamed from COPYING)620
-rw-r--r--README.txt301
-rw-r--r--SConscript17
-rw-r--r--pd-unauthorized.info16
-rw-r--r--stkdrone~/INSTALL13
-rw-r--r--stkdrone~/Makefile33
-rw-r--r--stkdrone~/README20
-rw-r--r--stkdrone~/drone-freqs46
-rw-r--r--stkdrone~/drone.cc77
-rw-r--r--stkdrone~/drone.h40
-rw-r--r--stkdrone~/stkdrone~-help.pd75
-rw-r--r--stkdrone~/stkdrone~.cc119
-rw-r--r--stksitar~/INSTALL13
-rw-r--r--stksitar~/Makefile37
-rw-r--r--stksitar~/README22
-rw-r--r--stksitar~/mstksitar~.cc39
-rw-r--r--stksitar~/sitar-freqs166
-rw-r--r--stksitar~/sitar.cc100
-rw-r--r--stksitar~/sitar.h43
-rw-r--r--stksitar~/stksitar~-help.pd73
-rw-r--r--stksitar~/stksitar~.cc119
21 files changed, 641 insertions, 1348 deletions
diff --git a/COPYING b/LICENSE.txt
index 2128a66..7f87ef8 100644
--- a/COPYING
+++ b/LICENSE.txt
@@ -1,280 +1,340 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
+
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 675 Mass Ave, Cambridge, MA 02139, USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR PDP.LICENSE, 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
+
+ Appendix: How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) 19yy <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) 19yy name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/README.txt b/README.txt
new file mode 100644
index 0000000..c35e06e
--- /dev/null
+++ b/README.txt
@@ -0,0 +1,301 @@
+
+unauthorized is a library of GUI objects and a handful of objects for
+working with streaming and mp3s. Its home page is here:
+
+http://puredata.info/community/projects/software/unauthorized
+
+unauthorized has split into two versions because of a change of
+licensing. This version, maintained in the pure-data SVN, remains GPLv2
+while the original author Yves Degoyon has split off a version with a
+non-free license.
+
+To get the new non-free version, download it from its new CVS repository:
+
+ export CVSROOT=:pserver:anonymous at giss.tv:/home/cvs
+ cvs co pidip
+ cvs co unauthorized
+
+original sources available from http://ydegoyon.free.fr
+
+Installing
+----------
+
+there is no configure scripts, you need to install :
+
+ * pd headers in /usr/include ( m_pd.h and g_canvas.h )
+ * libmp3lame-dev for the mp3 externals
+ * libspeex-dev for the speex external
+ * sources of stk in /usr/src/stk for stk externals ( optional )
+
+have fun!
+sevy ( ydegoyon@gmail.com )
+Copyright 2002 Yves Degoyon
+
+Included Objects
+-------------
+
+audience~ : 2-dimensional audience simulation ( also called 2 dollars spatialization !!! )
+
+beatify~ : modulate amplitude of a sound
+ the idea was borrowed from musicscript,
+ an excellent sound generation tool.
+ ( http://musicscript.sourceforge.net, author : David Piott )
+
+blinkenlight : a blinken lights films player ( but also a pixel grid )
+ This object displays blinken lights movies, and lets you handle a
+ grid of pixels. It is also a "Telecran" !! There is a movies
+ archive @ http://www.blinkenlights.de/gallery/index.en.html
+
+compressor~ : a compressor of audio signals
+
+cooled : a micro sound editor
+ This object displays a sound, lets you play a part of it and do
+ some cut and paste operations.
+
+disto~ : a kind of effect used in pop music, use it elsewhere
+ the algorithm was taken from Digital Effects (DISTORT3), a guitar
+ effects software for DOS which rocks, written by Alexey Smoli
+ http://st.karelia.ru/~smlalx/
+
+exciter : a bang-events sequencer
+ the need for it sprung out of a talking with Nicolas Lhommet.
+
+filterbank~ : filterbank outputs frequency response for a range of filters
+
+formant~ is a formant synthesis generator external for pd
+
+grid : 2-dimensional control object, ala "kaospad"
+
+mp3amp~ is a MPEG I Layer III (mp3) icecast/shoutcast client for Pure Data
+ mp3amp~ has been compiled for Linux using LAME 3.92.
+ The newest version of LAME can be found at sourceforge.net
+
+ PLEASE NOTE: This software may contain patented alogrithm (at
+ least patented in some countries). It may be not allowed to
+ sell/use products based on this source code in these
+ countries. Check this out first!
+
+ COPYRIGHT of MP3 music: Please note, that the duplicating of
+ copyrighted music without explicit permission violates the rights
+ of the owner.
+
+ Using mp3amp~ external for Pure Data
+
+ Open the help-mp3amp~.pd to understand how it works. Open the
+ help-graphic-mp3amp~.pd if you want to see the status of the
+ incoming stream.
+
+ BUGS :
+ a/ certainly, not all bitrates will work,
+ that's too tedious to test, 128, 256, 320 are ok.
+
+ b/ cannot instantiate more than 10 decoders, if needed change
+ MAX_DECODERS in the code
+
+mp3cast~ is a MPEG I Layer III (mp3) streaming external for pd (by Miller
+Puckette) that connects to a SHOUTcast or IceCast server.
+
+ Using mp3cast~ external for Pure Data
+
+ Open the help-mp3cast~.pd to understand how it works.
+ In this patch, you must send the messages to mp3cast~
+ in the following order :
+
+ 1/ password *****
+ 2/ icecast | mp3cast
+ 3/ connect host port
+ 4/ pd dsp 1
+
+ Parameters sent to mp3cast~ object :
+
+ Sampling Rate (Hz): Possible values are 48000, 44100 and 32000. If
+ Pd runs at a different sampling rate, LAME will resample the
+ signal. Default value for mp3 sampling rate is Pd's sampling rate.
+
+ Bitrate (kbit/s): Possible values are 32, 40, 48, 56, 64, 80, 96,
+ 112, 128, 160, 192, 224, 256 and 320. Default is 224.
+
+ Mode: Possible values are 0 (stereo), 1 (joint stereo, the
+ default), 2 (dual channel) and 3 (mono).
+
+ Password: The default is 'pd', can be changed with a message
+ "passwd yourpassword".
+
+ Server: Use message "connect name_of_your_server.com port" to
+ connect (same as with Pd's netsend). 'port' is the number
+ specified in the server's config file. Attention (for SHOUTcast
+ users): The actual port number used is one higher! Standard would
+ be 8000 resulting in a socket at port 8001!!! Bare this in mind
+ when configuring proxys or using mp3cast~ in connection with
+ netsend / netreceive. For IceCast, the port number used is the
+ same as specified.
+
+ Outlet: The outlet outputs an int, 1 if connected to SHOUTcast
+ server, 0 if not. This could be used to build an automatic
+ reconnect mechanism.
+
+ Other things: mp3cast~ prints the current status (connection,
+ login, LAME status) to the pd window. To see the current settings,
+ send it a message "print" and mp3 settings will be displayed.
+ Note that changing any mp3 settings will require to disconnect and
+ reconnect again! This has to be done manually.
+
+ Known problems: If you turn off audio processing when you are
+ connected with the server, no data will be sent to it. This will
+ make the server disconnect after a certain time ('no data' error
+ in server log). mp3cast~ does not recongnise this and attempts to
+ keep on streaming. To avoid this set 'AutoDumpSourceTime' in the
+ servers config file to a fairly high value preventing the server
+ from closing the socket to fast.
+
+ ALLOWED QUALITY FACTOR :
+
+ -q <arg> <arg> = 0...9. Default -q 5
+ -q 0: Highest quality, very slow
+ -q 9: Poor quality, but fast
+ -h Same as -q 2. Recommended.
+ -f Same as -q 7. Fast, ok quality
+
+ ALLOWED SAMPLERATE/BITRATES
+
+ MPEG-1 layer III sample frequencies (kHz): 32 48 44.1
+ bitrates (kbps): 32 40 48 56 64 80 96 112 128 160 192 224 256 320
+
+ MPEG-2 layer III sample frequencies (kHz): 16 24 22.05
+ bitrates (kbps): 8 16 24 32 40 48 56 64 80 96 112 128 144 160
+
+ MPEG-2.5 layer III sample frequencies (kHz): 8 12 11.025
+ bitrates (kbps): 8 16 24 32 40 48 56 64 80 96 112 128 144 160
+
+mp3live~ is a peer-to-peer mp3 streamer package consisting of three
+ objects : mp3streamout~, mp3fileout~ and mp3streamin~.
+
+ using mp3live~ external for Pure Data
+
+ Open the mp3live~-help.pd to understand how it works.
+
+ A note about MPEG encoding :
+
+ ALLOWED QUALITY FACTOR :
+
+ -q <arg> <arg> = 0...9. Default -q 5
+ -q 0: Highest quality, very slow
+ -q 9: Poor quality, but fast
+ -h Same as -q 2. Recommended.
+ -f Same as -q 7. Fast, ok quality
+
+ ALLOWED BITRATES :
+
+ bitrates (kbps): 32 40 48 56 64 80 96 112 128 160 192 224 256 320
+
+ BUGS :
+
+ 1. You cannot create more than MAX_DECODERS mp3streamin~
+ objects. The actual value is 100.
+
+ 2. Current version of lame ( 3.92 ) produces a lot of errors for
+ quality < 5. Blame it on lame !!!!
+
+ 3. Mono is not supported. Some additional code should be added for
+ mp3streamin~. Blame it on me !!!
+
+ 4. Resampling is not supported. Blame it on me !!!
+
+mp3write~ is a MPEG I Layer III (mp3) file writer.
+
+ using mp3write~ external for Pure Data
+
+ Open the help-mp3write~.pd to understand how it works.
+ In this patch, you must send the messages to mp3write~
+ in the following order :
+
+ 1/ append|truncate if you wish to change file creation options ( default is append )
+ 2/ open /my/file
+ 3/ start
+ 5/ pd dsp 1
+ 4/ stop : the tag is written at this stage
+
+ Parameters sent to mp3write~ object :
+
+ Sampling Rate (Hz): Possible values are 48000, 44100 and 32000. If
+ Pd runs at a different sampling rate, LAME will resample the
+ signal. Default value for mp3 sampling rate is Pd's sampling rate.
+
+ Bitrate (kbit/s): Possible values are 32, 40, 48, 56, 64, 80, 96,
+ 112, 128, 160, 192, 224, 256 and 320. Default is 224.
+
+ Mode: Possible values are 0 (stereo), 1 (joint stereo, the
+ default), 2 (dual channel) and 3 (mono).
+
+ Outlet: The outlet outputs an int, which the number of bytes
+ written in this session. this might be different from file size
+ if you're using append mode.
+
+ Known Problems : All combinations of samplerate, bitrate, quality
+ factor will not be accepted.
+
+ ALLOWED QUALITY FACTOR :
+
+ -q <arg> <arg> = 0...9. Default -q 5
+ -q 0: Highest quality, very slow
+ -q 9: Poor quality, but fast
+ -h Same as -q 2. Recommended.
+ -f Same as -q 7. Fast, ok quality
+
+ ALLOWED SAMPLERATE/BITRATES
+
+ MPEG-1 layer III sample frequencies (kHz): 32 48 44.1
+ bitrates (kbps): 32 40 48 56 64 80 96 112 128 160 192 224 256 320
+
+ MPEG-2 layer III sample frequencies (kHz): 16 24 22.05
+ bitrates (kbps): 8 16 24 32 40 48 56 64 80 96 112 128 144 160
+
+ MPEG-2.5 layer III sample frequencies (kHz): 8 12 11.025
+ bitrates (kbps): 8 16 24 32 40 48 56 64 80 96 112 128 144 160
+
+ Furthermore, it seems that high quality factors will not work with
+ this release of lame ( 3.92 ). The same errors can be obtained
+ with the command line : lame -q 1 file.wav outputs errors and
+ mp3write can't do better.
+
+pianoroll : a graphical sequencer controller
+
+playlist : choose a file in 1 click with space, numeric, characters
+ you can also send a seek message to select a file automatically.
+
+probalizer : outputs integer values according to a drawn probability curve
+
+samplebox~ : an opaque box to record and playback a sound ( with speed variations )
+
+scratcher~ : records a sound and, then, let's you scratch it with your mouse.
+
+scrolllist : displays and scrolls a text in a patch window
+
+sonogram~ : displays, plays back and lets you modify a recorded sonogram.
+
+ The real and imaginery part of an fft~ is stored in a sonogram~
+ and, then, you can apply modifications to it or do mouse-based
+ graphic modifications. The set of modifications provided for now
+ consists of matrix operations but it will be improved soon.
+
+speex~ is a voice quality streamer using Speex library consisting of
+ two objects : speexin~ and speexout~. A big thanx to Jean-Marc
+ Valin, author of Speex who helped me fixing encoding/decoding
+ problems.
+
+ PLEASE NOTE: The speex codec is patent free unlike GSM codecs.
+ that's the main reason why it's been choosen. ( + it allows very
+ low throughputs like 8kbits/s ).
+
+spigot~ : a signal router.
+
+vocoder~ : vocoder filter for PD inspired by xvox ( http://simon.morlat.free.fr )
+i used xvox version 0.2.1, but you don't need to install it,
+everything needed is bundled here.
+
+wahwah~ : a kind of effect used in psychedelic music, use it elsewhere
+
+ the algorithm was taken from Digital Effects, a guitar effects
+ software for DOS which rocks, written by Alexey Smoli (
+ http://st.karelia.ru/~smlalx/ )
+
diff --git a/SConscript b/SConscript
deleted file mode 100644
index 40a1c74..0000000
--- a/SConscript
+++ /dev/null
@@ -1,17 +0,0 @@
-import glob
-import os
-import re
-Import('env prefix')
-
-for tk in glob.glob('*/*.tk'):
- (dir, file) = os.path.split(tk)
- filename = re.sub("\.tk$","",file)
- cmd = "./tk2c.bash < " + dir + "/" + file + " > " + dir + "/" + filename + ".tk2c"
- os.popen(cmd)
-
-for extra in glob.glob('*/*.c'):
- unauthorized = env.SharedLibrary(target = re.sub("\.c$","",os.path.basename(extra)), source = extra)
- env.Alias('install', env.Install(os.path.join(prefix, 'extra'), unauthorized))
- Default(unauthorized)
-
-env.Alias('install', env.Install(os.path.join(prefix, 'doc/unauthorized'), glob.glob('*/*.pd')))
diff --git a/pd-unauthorized.info b/pd-unauthorized.info
deleted file mode 100644
index 101bde4..0000000
--- a/pd-unauthorized.info
+++ /dev/null
@@ -1,16 +0,0 @@
-Title Unauthorized Externals for Pd
-Version MSP standard paths
-Description Yves Degoyon's 'Unauthorized' Externals
-DefaultLocation /usr/local/lib
-DeleteWarning
-
-### Package Flags
-
-NeedsAuthorization YES
-Required NO
-Relocatable YES
-RequiresReboot NO
-UseUserMask YES
-OverwritePermissions NO
-InstallFat NO
-RootVolumeOnly NO
diff --git a/stkdrone~/INSTALL b/stkdrone~/INSTALL
deleted file mode 100644
index 6eaaff0..0000000
--- a/stkdrone~/INSTALL
+++ /dev/null
@@ -1,13 +0,0 @@
-install STK in /usr/local/stk
-or change STK paths in the makefile
-to your STK's location.
-
-untar in /my/pd/dir/externs
-
-cd /my/pd/dir/externs/stkdrone~
-
-make
-
-make install
-
-open help-stkdrone~.pd
diff --git a/stkdrone~/Makefile b/stkdrone~/Makefile
deleted file mode 100644
index e752f01..0000000
--- a/stkdrone~/Makefile
+++ /dev/null
@@ -1,33 +0,0 @@
-NAME=stkdrone~
-CSYM=stkdrone_tilde
-STK_HOME=/usr/local/stk
-
-current: pd_linux
-
-pd_linux: $(NAME).pd_linux
-
-.SUFFIXES: .pd_linux
-
-LINUXCFLAGS = -DPD -O2 -funroll-loops -fomit-frame-pointer \
- -Wall -W -Wshadow -Wstrict-prototypes -Werror \
- -Wno-unused -Wno-parentheses -Wno-switch
-
-LINUXCCFLAGS = -DPD -O2 -funroll-loops -fomit-frame-pointer \
- -Wall -W -Wshadow -Werror \
- -Wno-unused -Wno-parentheses -Wno-switch -g
-
-LINUXINCLUDE = -I../../src -I/usr/local/include
-
-.cc.pd_linux: drone.o
- g++ -O3 -Wall -D__OS_Linux_ -g -I$(STK_HOME)/include -c drone.cc
- g++ $(LINUXCCFLAGS) $(LINUXINCLUDE) -I$(STK_HOME)/include -o $*.o -c $*.cc
- g++ --export-dynamic -shared -o $*.pd_linux *.o $(STK_HOME)/src/libstk.a -lc -lm -lpthread
- strip --strip-unneeded $*.pd_linux
- rm -f *.o ../$*.pd_linux
- ln -s $*/$*.pd_linux ..
-
-clean:
- rm -f *.o *.pd_* so_locations
-
-install:
- cp help-*.pd *-freqs ../../doc/5.reference
diff --git a/stkdrone~/README b/stkdrone~/README
deleted file mode 100644
index 493d12f..0000000
--- a/stkdrone~/README
+++ /dev/null
@@ -1,20 +0,0 @@
-*****************************************************************************
-Version 0.2
-embedding Perry Cook's ragamatic in Pure Data
-copyright 2001 by Perry Cook
-copyleft 2001 by Yves Degoyon
-tarballs and updates available @ http://ydegoyon.free.fr
-
-stkdrone~ : embeds STK drone simulation in Pure Data.
-
-To install stkdrone~, follow the steps from INSTALL
-
-This software is published under GPL terms.
-
-This is software with ABSOLUTELY NO WARRANTY.
-Use it at your OWN RISK. It's possible to damage e.g. hardware or your hearing
-due to a bug or for other reasons.
-We do not warrant that the program is free of infringement of any third-party
-patents.
-
-*****************************************************************************
diff --git a/stkdrone~/drone-freqs b/stkdrone~/drone-freqs
deleted file mode 100644
index 12f1a85..0000000
--- a/stkdrone~/drone-freqs
+++ /dev/null
@@ -1,46 +0,0 @@
-55.0;
-82.5;
-55.0;
-220.0;
-82.5;
-82.5;
-82.5;
-220.0;
-220.0;
-82.5;
-220.0;
-220.0;
-55.0;
-82.5;
-55.0;
-55.0;
-220.0;
-220.0;
-220.0;
-55.0;
-82.5;
-82.5;
-220.0;
-55.0;
-55.0;
-220.0;
-82.5;
-82.5;
-55.0;
-82.5;
-82.5;
-220.0;
-220.0;
-82.5;
-55.0;
-55.0;
-55.0;
-220.0;
-220.0;
-82.5;
-220.0;
-82.5;
-82.5;
-82.5;
-82.5;
-82.5;
diff --git a/stkdrone~/drone.cc b/stkdrone~/drone.cc
deleted file mode 100644
index dcc3137..0000000
--- a/stkdrone~/drone.cc
+++ /dev/null
@@ -1,77 +0,0 @@
- /******************************************/
-/* Karplus-Strong drone string model */
-/* by Perry Cook, 1995-96 */
-/* */
-/* There exist at least two patents, */
-/* assigned to Stanford, bearing the */
-/* names of Karplus and/or Strong. */
-/******************************************/
-
-#include "drone.h"
-
-drone :: drone(StkFloat lowestFreq)
-{
- length = (long) (SRATE / lowestFreq + 1);
- loopGain = (StkFloat) 0.999;
- loopFilt = new OneZero();
- delayLine = new DelayA(0.5*length, length);
- envelope = new ADSR();
- noise = new Noise;
- envelope->setAllTimes(2.0,0.5,0.0,0.5);
- this->clear();
-}
-
-drone :: ~drone()
-{
- delete loopFilt;
- delete delayLine;
- delete envelope;
- delete noise;
-}
-
-void drone :: clear()
-{
- loopFilt->clear();
- delayLine->clear();
-}
-
-void drone :: setFreq(StkFloat frequency)
-{
- StkFloat delay;
- delay = (SRATE / frequency);
- delayLine->setDelay(delay - 0.5);
- loopGain = (StkFloat) 0.997 + (frequency * (StkFloat) 0.000002);
- if (loopGain>1.0) loopGain = (StkFloat) 0.99999;
-}
-
-void drone :: pluck(StkFloat amplitude)
-{
- envelope->keyOn();
-}
-
-void drone :: noteOn(StkFloat freq, StkFloat amp)
-{
- this->setFreq(freq);
- this->pluck(amp);
-#if defined(_debug_)
- printf("drone : NoteOn: Freq=%lf Amp=%lf\n",freq,amp);
-#endif
-}
-
-void drone :: noteOff(StkFloat amp)
-{
- loopGain = (StkFloat) 1.0 - amp;
-#if defined(_debug_)
- printf("drone : NoteOff: Amp=%lf\n",amp);
-#endif
-}
-
-StkFloat drone :: tick()
-{
- /* check this out */
- /* here's the whole inner loop of the instrument!! */
- lastOutput_ = delayLine->tick(loopFilt->tick((delayLine->lastOut() * loopGain))
- + (0.005 * envelope->tick() * noise->tick()));
- return lastOutput_;
-}
-
diff --git a/stkdrone~/drone.h b/stkdrone~/drone.h
deleted file mode 100644
index 9cfe448..0000000
--- a/stkdrone~/drone.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/******************************************/
-/* Karplus-Strong drone string model */
-/* by Perry Cook, 1995-96 */
-/* */
-/* There exist at least two patents, */
-/* assigned to Stanford, bearing the */
-/* names of Karplus and/or Strong. */
-/******************************************/
-
-#if !defined(__drone_h)
-#define __drone_h
-
-#include "Instrmnt.h"
-#include "DelayA.h"
-#include "OneZero.h"
-#include "ADSR.h"
-#include "Noise.h"
-
-class drone : public Instrmnt
-{
-protected:
- DelayA *delayLine;
- ADSR *envelope;
- Noise *noise;
- OneZero *loopFilt;
- long length;
- MY_FLOAT loopGain;
-public:
- drone(MY_FLOAT lowestFreq);
- ~drone();
- void clear();
- virtual void setFreq(MY_FLOAT frequency);
- void pluck(MY_FLOAT amplitude);
- virtual void noteOn(MY_FLOAT freq, MY_FLOAT amp);
- virtual void noteOff(MY_FLOAT amp);
- virtual MY_FLOAT tick();
-};
-
-#endif
-
diff --git a/stkdrone~/stkdrone~-help.pd b/stkdrone~/stkdrone~-help.pd
deleted file mode 100644
index a65624b..0000000
--- a/stkdrone~/stkdrone~-help.pd
+++ /dev/null
@@ -1,75 +0,0 @@
-#N canvas 168 23 784 529 10;
-#X obj 112 311 dac~;
-#X obj 115 248 stkdrone~;
-#X obj 114 278 *~;
-#X floatatom 147 278 5 0 0;
-#X msg 162 172 stop;
-#X floatatom 197 201 5 0 0;
-#X floatatom 238 248 5 5 35;
-#X text 247 335 stkdrone~ : Object to embed stk-based drone synthesis
-;
-#X text 247 360 Comments and bugs @ ydegoyon@free.fr;
-#X msg 113 346 \; pd dsp 1;
-#X msg 179 346 \; pd dsp 0;
-#X msg 24 34 bang;
-#X msg 93 99 play;
-#X msg 113 173 play;
-#X obj 195 248 / 100;
-#X text 276 279 Master level;
-#X obj 23 99 metro 2000;
-#X floatatom 52 75 5 0 0;
-#X obj 134 78 / 1000;
-#X obj 134 98 + 0.05;
-#X floatatom 182 98 5 0 0;
-#X obj 217 278 loadbang;
-#X text 301 258 ( min=0.05 \, max=0.35 \, default = 0.25 );
-#X text 303 248 Strength of plucking;
-#X text 241 195 Frequency;
-#X obj 231 77 qlist;
-#X msg 274 76 read drone-freqs;
-#X msg 231 55 next;
-#X msg 274 55 rewind;
-#X text 247 348 Originally written by Perry Cook for STK/ragamatic
-;
-#X obj 386 76 loadbang;
-#X msg 189 278 40;
-#X obj 24 75 + 0;
-#X text 21 12 Ready for meditation ??;
-#X text 240 398 And now another message from Nancy Reagan : "Drugs
-destroy your brain";
-#X text 239 205 ( min=50Hz \, default=250 Hz );
-#X obj 134 59 random 100;
-#X obj 24 56 random 1000;
-#X floatatom 98 27 5 0 0;
-#X connect 1 0 2 0;
-#X connect 2 0 0 0;
-#X connect 2 0 0 1;
-#X connect 3 0 2 1;
-#X connect 4 0 1 0;
-#X connect 5 0 1 1;
-#X connect 6 0 14 0;
-#X connect 11 0 16 0;
-#X connect 11 0 37 0;
-#X connect 12 0 1 0;
-#X connect 13 0 1 0;
-#X connect 14 0 1 2;
-#X connect 16 0 12 0;
-#X connect 16 0 27 0;
-#X connect 16 0 36 0;
-#X connect 16 0 37 0;
-#X connect 17 0 16 1;
-#X connect 18 0 19 0;
-#X connect 19 0 20 0;
-#X connect 19 0 1 2;
-#X connect 21 0 31 0;
-#X connect 25 0 5 0;
-#X connect 25 1 28 0;
-#X connect 26 0 25 0;
-#X connect 27 0 25 0;
-#X connect 28 0 25 0;
-#X connect 30 0 26 0;
-#X connect 31 0 3 0;
-#X connect 32 0 17 0;
-#X connect 36 0 18 0;
-#X connect 37 0 32 0;
-#X connect 38 0 37 1;
diff --git a/stkdrone~/stkdrone~.cc b/stkdrone~/stkdrone~.cc
deleted file mode 100644
index 75ddafc..0000000
--- a/stkdrone~/stkdrone~.cc
+++ /dev/null
@@ -1,119 +0,0 @@
-/* stkdrone~ -- STK-based drone synthesis
- * requires STK library
- * Copyleft 2001 Yves Degoyon.
- * Permission is granted to use this software for any purpose provided you
- * keep this copyright notice intact.
- *
- * THE AUTHOR AND HIS EXPLOITERS MAKE NO WARRANTY, EXPRESS OR IMPLIED,
- * IN CONNECTION WITH THIS SOFTWARE.
- *
-*/
-
-#include "m_pd.h"
-#include "drone.h"
-
-#define DEFAULT_FREQ 250.0
-#define DEFAULT_PLUCK 0.25
-
-typedef struct _stkdrone
-{
- t_object x_obj;
- drone *x_stkdrone;
- t_int x_on;
- t_float x_freq;
- t_float x_pluck;
-} t_stkdrone;
-
-static t_class *stkdrone_class;
-
-static void *stkdrone_new(void)
-{
- t_stkdrone *x = (t_stkdrone *)pd_new(stkdrone_class);
- x->x_freq = DEFAULT_FREQ;
- x->x_pluck = DEFAULT_PLUCK;
- outlet_new(&x->x_obj, &s_signal);
- inlet_new( &x->x_obj, &x->x_obj.ob_pd, &s_float, gensym("freq") );
- inlet_new( &x->x_obj, &x->x_obj.ob_pd, &s_float, gensym("pluck") );
- if( (x->x_stkdrone = new drone( 50.0 )) == NULL ) {
- post( "stkdrone~: cannot build drone instrument from STK" );
- return NULL;
- } else {
- return (x);
- }
-}
-
-static void stkdrone_freq(t_stkdrone* x, t_float ffreq)
-{
- if ( ffreq < 50.0 )
- {
- post("stkdrone~ : wrong frequency" );
- return;
- }
- x->x_stkdrone->setFreq( (MY_FLOAT) ffreq );
- x->x_freq = ffreq;
-}
-
-static void stkdrone_pluck(t_stkdrone* x, t_float fpluck)
-{
- if ( fpluck < 0.05 || fpluck > 0.35 )
- {
- post("stkdrone~ : wrong pluck argument" );
- return;
- }
- x->x_stkdrone->pluck( (MY_FLOAT) fpluck );
- x->x_pluck = fpluck;
-}
-
-static void stkdrone_play(t_stkdrone* x)
-{
- x->x_on = 1; // activate sound
- x->x_stkdrone->noteOn( x->x_freq, x->x_pluck ); // start sound
-}
-
-static void stkdrone_stop(t_stkdrone* x)
-{
- x->x_on = 0; // deactivate sound
-}
-
-static t_int *stkdrone_perform(t_int *w)
-{
- t_float *out = (t_float *)(w[1]);
- int n = (int)(w[2]);
- t_stkdrone* x = (t_stkdrone*)(w[3]);
-
- while ( n-- )
- {
- if ( x->x_on )
- {
- double dare;
-
- dare = (float)x->x_stkdrone->tick();
- // post( "synthesis : %f", dare );
- *out=dare;
- }
- else
- {
- *(out) = 0.0;
- }
- out++;
- }
-
- return (w+4);
-}
-
-static void stkdrone_dsp(t_stkdrone *x, t_signal **sp)
-{
- dsp_add(stkdrone_perform, 3, sp[0]->s_vec, sp[0]->s_n, x);
-}
-
-extern "C" void stkdrone_tilde_setup(void)
-{
- stkdrone_class = class_new(gensym("stkdrone~"), (t_newmethod)stkdrone_new, 0,
- sizeof(t_stkdrone), 0, A_NULL);
- class_sethelpsymbol(stkdrone_class, gensym("help-stkdrone~.pd") );
- class_addmethod(stkdrone_class, (t_method)stkdrone_dsp, gensym("dsp"), A_NULL);
- class_addmethod(stkdrone_class, (t_method)stkdrone_play, gensym("play") , A_NULL);
- class_addmethod(stkdrone_class, (t_method)stkdrone_stop, gensym("stop") , A_NULL);
- class_addmethod(stkdrone_class, (t_method)stkdrone_freq, gensym("freq") , A_DEFFLOAT, A_NULL);
- class_addmethod(stkdrone_class, (t_method)stkdrone_pluck, gensym("pluck") , A_DEFFLOAT, A_NULL);
-}
diff --git a/stksitar~/INSTALL b/stksitar~/INSTALL
deleted file mode 100644
index 09c76b3..0000000
--- a/stksitar~/INSTALL
+++ /dev/null
@@ -1,13 +0,0 @@
-install STK in /usr/local/stk
-or change STK paths in the makefile
-to your STK's location.
-
-untar in /my/pd/dir/externs
-
-cd /my/pd/dir/externs/stksitar~
-
-make
-
-make install
-
-open help-stksitar~.pd
diff --git a/stksitar~/Makefile b/stksitar~/Makefile
deleted file mode 100644
index ed218f9..0000000
--- a/stksitar~/Makefile
+++ /dev/null
@@ -1,37 +0,0 @@
-NAME=stksitar~
-CSYM=stksitar_tilde
-STK_HOME=/usr/local/stk
-
-current: pd_linux
-
-pd_linux: $(NAME).pd_linux
-
-.SUFFIXES: .pd_linux
-
-LINUXCFLAGS = -DPD -O2 -funroll-loops -fomit-frame-pointer \
- -Wall -W -Wshadow -Wstrict-prototypes -Werror \
- -Wno-unused -Wno-parentheses -Wno-switch
-
-LINUXCCFLAGS = -DPD -O2 -funroll-loops -fomit-frame-pointer \
- -Wall -W -Wshadow -Werror \
- -Wno-unused -Wno-parentheses -Wno-switch -g
-
-LINUXINCLUDE = -I../../src -I/usr/local/include
-
-.cc.pd_linux: sitar.o
- g++ -O3 -Wall -D__OS_Linux_ -g -I$(STK_HOME)/include -c sitar.cc
- g++ $(LINUXCCFLAGS) $(LINUXINCLUDE) -I$(STK_HOME)/include -o $*.o -c $*.cc
- g++ --export-dynamic -shared -o $*.pd_linux *.o $(STK_HOME)/src/libstk.a -lc -lm -lpthread
- strip --strip-unneeded $*.pd_linux
- rm -f *.o ../$*.pd_linux
- ln -s $*/$*.pd_linux ..
-
-test:
- g++ -O3 -Wall -D__OS_Linux_ -g -I$(STK_HOME)/include -c sitar.cc
- g++ -O3 -Wall -D__OS_Linux_ -g -I$(STK_HOME)/include -o mstksitar~ sitar.o $(STK_HOME)/src/stklib.a mstksitar~.cc
-
-clean:
- rm -f *.o *.pd_* so_locations
-
-install:
- cp help-*.pd *-freqs ../../doc/5.reference
diff --git a/stksitar~/README b/stksitar~/README
deleted file mode 100644
index 39766e1..0000000
--- a/stksitar~/README
+++ /dev/null
@@ -1,22 +0,0 @@
-*****************************************************************************
-Version 0.2
-embedding Perry Cook's ragamatic in Pure Data
-copyright 2001 by Perry Cook
-copyleft 2001 by Yves Degoyon
-tarballs and updates available @ http://ydegoyon.free.fr
-
-stksitar~ : embeds STK sitar simulation in Pure Data.
-
-To install stksitar~, follow the steps from INSTALL
-
-This software is published under GPL terms.
-
-This is software with ABSOLUTELY NO WARRANTY.
-Use it at your OWN RISK. It's possible to damage e.g. hardware or your hearing
-due to a bug or for other reasons.
-We do not warrant that the program is free of infringement of any third-party
-patents.
-
-*****************************************************************************
-
-
diff --git a/stksitar~/mstksitar~.cc b/stksitar~/mstksitar~.cc
deleted file mode 100644
index 62edef6..0000000
--- a/stksitar~/mstksitar~.cc
+++ /dev/null
@@ -1,39 +0,0 @@
-/* stksitar~ -- apply a stksitar effect
- * requires libDSP library
- * Copyleft 2001 Yves Degoyon.
- * Permission is granted to use this software for any purpose provided you
- * keep this copyright notice intact.
- *
- * THE AUTHOR AND HIS EXPLOITERS MAKE NO WARRANTY, EXPRESS OR IMPLIED,
- * IN CONNECTION WITH THIS SOFTWARE.
- *
-*/
-
-#include "sitar.h"
-#include "unistd.h"
-#include "RtWvOut.h"
-
-sitar *x_stksitar = NULL;
-
-int main( int argc, char** argv )
-{
-
- // int count=0;
-
- x_stksitar = new sitar( 50.0 );
- if ( x_stksitar == NULL )
- {
- printf( "mstksitar~: cannot build sitar instrument from STK" );
- exit(-1);
- }
-
- x_stksitar->noteOn( 400.0, 0.25 ); // start sound
- while (1)
- {
- double dare;
-
- dare = (float) x_stksitar->tick();
- printf( "%f\n", dare );
- fwrite( (void*)&dare, sizeof(float), 1, stderr );
- }
-}
diff --git a/stksitar~/sitar-freqs b/stksitar~/sitar-freqs
deleted file mode 100644
index d8c6fd8..0000000
--- a/stksitar~/sitar-freqs
+++ /dev/null
@@ -1,166 +0,0 @@
-329.630000;
-349.230000;
-415.300000;
-440.000000;
-329.630000;
-329.630000;
-293.660000;
-293.660000;
-329.630000;
-261.630000;
-261.630000;
-261.630000;
-293.660000;
-329.630000;
-329.630000;
-293.660000;
-261.630000;
-293.660000;
-329.630000;
-349.230000;
-329.630000;
-293.660000;
-329.630000;
-329.630000;
-349.230000;
-349.230000;
-415.300000;
-415.300000;
-349.230000;
-329.630000;
-349.230000;
-415.300000;
-440.000000;
-440.000000;
-493.880000;
-349.230000;
-261.630000;
-293.660000;
-329.630000;
-349.230000;
-329.630000;
-329.630000;
-329.630000;
-329.630000;
-293.660000;
-261.630000;
-293.660000;
-261.630000;
-293.660000;
-261.630000;
-293.660000;
-329.630000;
-349.230000;
-415.300000;
-349.230000;
-415.300000;
-415.300000;
-440.000000;
-493.880000;
-440.000000;
-349.230000;
-415.300000;
-440.000000;
-440.000000;
-415.300000;
-415.300000;
-440.000000;
-293.660000;
-329.630000;
-329.630000;
-349.230000;
-415.300000;
-440.000000;
-415.300000;
-440.000000;
-440.000000;
-493.880000;
-493.880000;
-440.000000;
-493.880000;
-523.250000;
-493.880000;
-523.250000;
-659.260000;
-659.260000;
-698.460000;
-880.000000;
-880.000000;
-880.000000;
-880.000000;
-659.260000;
-698.460000;
-659.260000;
-698.460000;
-659.260000;
-659.260000;
-659.260000;
-523.250000;
-659.260000;
-698.460000;
-880.000000;
-440.000000;
-493.880000;
-415.300000;
-440.000000;
-415.300000;
-440.000000;
-493.880000;
-329.630000;
-329.630000;
-349.230000;
-415.300000;
-349.230000;
-415.300000;
-415.300000;
-440.000000;
-349.230000;
-293.660000;
-293.660000;
-329.630000;
-293.660000;
-261.630000;
-261.630000;
-261.630000;
-261.630000;
-293.660000;
-261.630000;
-261.630000;
-293.660000;
-329.630000;
-349.230000;
-329.630000;
-293.660000;
-293.660000;
-293.660000;
-329.630000;
-329.630000;
-329.630000;
-349.230000;
-415.300000;
-440.000000;
-415.300000;
-415.300000;
-440.000000;
-493.880000;
-523.250000;
-493.880000;
-523.250000;
-493.880000;
-440.000000;
-493.880000;
-415.300000;
-440.000000;
-493.880000;
-523.250000;
-523.250000;
-523.250000;
-523.250000;
-659.260000;
-698.460000;
-880.000000;
-880.000000;
-880.000000;
-880.000000;
-880.000000;
-880.000000;
diff --git a/stksitar~/sitar.cc b/stksitar~/sitar.cc
deleted file mode 100644
index 291c5f2..0000000
--- a/stksitar~/sitar.cc
+++ /dev/null
@@ -1,100 +0,0 @@
- /******************************************/
-/* Karplus-Strong sitar string model */
-/* by Perry Cook, 1995-96 */
-/* */
-/* There exist at least two patents, */
-/* assigned to Stanford, bearing the */
-/* names of Karplus and/or Strong. */
-/******************************************/
-
-#include "sitar.h"
-
-sitar :: sitar(StkFloat lowestFreq)
-{
- length = (long) (SRATE / lowestFreq + 1);
- loopGain = (StkFloat) 0.999;
- loopFilt = new OneZero();
- loopFilt->setZero(0.01);
- delayLine = new DelayA(0.5 * length, length);
- delay = length/2;
- delayTarg = delay;
- envelope = new ADSR();
- noise = new Noise;
- envelope->setAllTimes(0.001,0.04,0.0,0.5);
- this->clear();
-}
-
-sitar :: ~sitar()
-{
- delete loopFilt;
- delete delayLine;
- delete envelope;
- delete noise;
-}
-
-void sitar :: clear()
-{
- loopFilt->clear();
- delayLine->clear();
-}
-
-void sitar :: setFreq(StkFloat frequency)
-{
- delayTarg = (SRATE / frequency);
- delay = delayTarg * (1.0 + (0.05 * noise->tick()));
- delayLine->setDelay(delay);
- loopGain = (StkFloat) 0.995 + (frequency * (StkFloat) 0.000001);
- if (loopGain>1.0) loopGain = (StkFloat) 0.9995;
-}
-
-void sitar :: pluck(StkFloat amplitude)
-{
- envelope->keyOn();
-}
-
-void sitar :: noteOn(StkFloat freq, StkFloat amp)
-{
- this->setFreq(freq);
- this->pluck(amp);
- amPluck = 0.05 * amp;
-#if defined(_debug_)
- printf("sitar : NoteOn: Freq=%lf Amp=%lf\n",freq,amp);
-#endif
-}
-
-void sitar :: noteOff(StkFloat amp)
-{
- loopGain = (StkFloat) 1.0 - amp;
-#if defined(_debug_)
- printf("sitar : NoteOff: Amp=%lf\n",amp);
-#endif
-}
-
-StkFloat sitar :: tick()
-{
- StkFloat temp;
-
- temp = delayLine->lastOut();
- if (fabs(temp) > 1.0) {
- loopGain = 0.1;
- this->noteOff(0.9);
- delay = delayTarg;
- delayLine->setDelay(delay);
- }
-
- temp *= loopGain;
-
- if (fabs(delayTarg - delay) > 0.001) {
- if (delayTarg < delay)
- delay *= 0.99999;
- else
- delay *= 1.00001;
- delayLine->setDelay(delay);
- }
-
- lastOutput_ = delayLine->tick(loopFilt->tick(temp)
- + (amPluck * envelope->tick() * noise->tick()));
-
- return lastOutput_;
-}
-
diff --git a/stksitar~/sitar.h b/stksitar~/sitar.h
deleted file mode 100644
index 1144c86..0000000
--- a/stksitar~/sitar.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/******************************************/
-/* Karplus-Strong Sitar1 string model */
-/* by Perry Cook, 1995-96 */
-/* */
-/* There exist at least two patents, */
-/* assigned to Stanford, bearing the */
-/* names of Karplus and/or Strong. */
-/******************************************/
-
-#if !defined(__sitar_h)
-#define __sitar_h
-
-#include "Instrmnt.h"
-#include "DelayA.h"
-#include "OneZero.h"
-#include "Noise.h"
-#include "ADSR.h"
-
-class sitar : public Instrmnt
-{
-protected:
- DelayA *delayLine;
- OneZero *loopFilt;
- ADSR *envelope;
- Noise *noise;
- long length;
- StkFloat loopGain;
- StkFloat amPluck;
- StkFloat delay;
- StkFloat delayTarg;
-public:
- sitar(StkFloat lowestFreq);
- ~sitar();
- void clear();
- virtual void setFreq(StkFloat frequency);
- void pluck(StkFloat amplitude);
- virtual void noteOn(StkFloat freq, StkFloat amp);
- virtual void noteOff(StkFloat amp);
- virtual StkFloat tick();
-};
-
-#endif
-
diff --git a/stksitar~/stksitar~-help.pd b/stksitar~/stksitar~-help.pd
deleted file mode 100644
index 986edd0..0000000
--- a/stksitar~/stksitar~-help.pd
+++ /dev/null
@@ -1,73 +0,0 @@
-#N canvas 33 1 784 529 10;
-#X obj 112 311 dac~;
-#X obj 115 248 stksitar~;
-#X obj 114 278 *~;
-#X floatatom 147 278 5 0 0;
-#X msg 162 172 stop;
-#X floatatom 196 200 5 52 100000;
-#X floatatom 238 248 5 5 35;
-#X text 247 335 stksitar~ : Object to embed stk-based sitar synthesis
-;
-#X text 247 360 Comments and bugs @ ydegoyon@free.fr;
-#X msg 113 346 \; pd dsp 1;
-#X msg 179 346 \; pd dsp 0;
-#X msg 24 34 bang;
-#X msg 93 99 play;
-#X msg 113 173 play;
-#X obj 195 248 / 100;
-#X text 276 279 Master level;
-#X obj 23 99 metro 2000;
-#X floatatom 52 75 5 0 0;
-#X obj 134 78 / 1000;
-#X obj 134 98 + 0.05;
-#X floatatom 182 98 5 0 0;
-#X obj 217 278 loadbang;
-#X text 301 258 ( min=0.05 \, max=0.35 \, default = 0.25 );
-#X text 303 248 Strength of plucking;
-#X text 239 205 ( min=52Hz \, default=250 Hz );
-#X text 241 195 Frequency;
-#X obj 231 77 qlist;
-#X msg 274 76 read sitar-freqs;
-#X msg 231 55 next;
-#X msg 274 55 rewind;
-#X text 247 348 Originally written by Perry Cook for STK/ragamatic
-;
-#X obj 386 76 loadbang;
-#X msg 189 278 40;
-#X obj 24 75 + 0;
-#X text 21 12 Ready for meditation ??;
-#X text 240 398 And now another message from Nancy Reagan : "Drugs
-destroy your brain";
-#X obj 134 59 random 200;
-#X obj 24 57 random 1000;
-#X connect 1 0 2 0;
-#X connect 2 0 0 0;
-#X connect 2 0 0 1;
-#X connect 3 0 2 1;
-#X connect 4 0 1 0;
-#X connect 5 0 1 1;
-#X connect 6 0 14 0;
-#X connect 11 0 16 0;
-#X connect 11 0 37 0;
-#X connect 12 0 1 0;
-#X connect 13 0 1 0;
-#X connect 14 0 1 2;
-#X connect 16 0 12 0;
-#X connect 16 0 28 0;
-#X connect 16 0 36 0;
-#X connect 16 0 37 0;
-#X connect 17 0 16 1;
-#X connect 18 0 19 0;
-#X connect 19 0 20 0;
-#X connect 19 0 1 2;
-#X connect 21 0 32 0;
-#X connect 26 0 5 0;
-#X connect 26 1 29 0;
-#X connect 27 0 26 0;
-#X connect 28 0 26 0;
-#X connect 29 0 26 0;
-#X connect 31 0 27 0;
-#X connect 32 0 3 0;
-#X connect 33 0 17 0;
-#X connect 36 0 18 0;
-#X connect 37 0 33 0;
diff --git a/stksitar~/stksitar~.cc b/stksitar~/stksitar~.cc
deleted file mode 100644
index bfa7a54..0000000
--- a/stksitar~/stksitar~.cc
+++ /dev/null
@@ -1,119 +0,0 @@
-/* stksitar~ -- STK-based sitar synthesis
- * requires STK library
- * Copyleft 2001 Yves Degoyon.
- * Permission is granted to use this software for any purpose provided you
- * keep this copyright notice intact.
- *
- * THE AUTHOR AND HIS EXPLOITERS MAKE NO WARRANTY, EXPRESS OR IMPLIED,
- * IN CONNECTION WITH THIS SOFTWARE.
- *
-*/
-
-#include "m_pd.h"
-#include "sitar.h"
-
-#define DEFAULT_FREQ 250.0
-#define DEFAULT_PLUCK 0.25
-
-typedef struct _stksitar
-{
- t_object x_obj;
- sitar *x_stksitar;
- t_int x_on;
- t_float x_freq;
- t_float x_pluck;
-} t_stksitar;
-
-static t_class *stksitar_class;
-
-static void *stksitar_new(void)
-{
- t_stksitar *x = (t_stksitar *)pd_new(stksitar_class);
- x->x_freq = DEFAULT_FREQ;
- x->x_pluck = DEFAULT_PLUCK;
- outlet_new(&x->x_obj, &s_signal);
- inlet_new( &x->x_obj, &x->x_obj.ob_pd, &s_float, gensym("freq") );
- inlet_new( &x->x_obj, &x->x_obj.ob_pd, &s_float, gensym("pluck") );
- if( (x->x_stksitar = new sitar( 50.0 )) == NULL ) {
- post( "stksitar~: cannot build sitar instrument from STK" );
- return NULL;
- } else {
- return (x);
- }
-}
-
-static void stksitar_freq(t_stksitar* x, t_float ffreq)
-{
- if ( ffreq < 50.0 )
- {
- post("stksitar~ : wrong frequency" );
- return;
- }
- x->x_stksitar->setFreq( (StkFloat) ffreq );
- x->x_freq = ffreq;
-}
-
-static void stksitar_pluck(t_stksitar* x, t_float fpluck)
-{
- if ( fpluck < 0.05 || fpluck > 0.35 )
- {
- post("stksitar~ : wrong pluck argument" );
- return;
- }
- x->x_stksitar->pluck( (StkFloat) fpluck );
- x->x_pluck = fpluck;
-}
-
-static void stksitar_play(t_stksitar* x)
-{
- x->x_on = 1; // activate sound
- x->x_stksitar->noteOn( x->x_freq, x->x_pluck ); // start sound
-}
-
-static void stksitar_stop(t_stksitar* x)
-{
- x->x_on = 0; // deactivate sound
-}
-
-static t_int *stksitar_perform(t_int *w)
-{
- t_float *out = (t_float *)(w[1]);
- int n = (int)(w[2]);
- t_stksitar* x = (t_stksitar*)(w[3]);
-
- while ( n-- )
- {
- if ( x->x_on )
- {
- double dare;
-
- dare = (float)x->x_stksitar->tick();
- // post( "synthesis : %f", dare );
- *out=dare;
- }
- else
- {
- *(out) = 0.0;
- }
- out++;
- }
-
- return (w+4);
-}
-
-static void stksitar_dsp(t_stksitar *x, t_signal **sp)
-{
- dsp_add(stksitar_perform, 3, sp[0]->s_vec, sp[0]->s_n, x);
-}
-
-extern "C" void stksitar_tilde_setup(void)
-{
- stksitar_class = class_new(gensym("stksitar~"), (t_newmethod)stksitar_new, 0,
- sizeof(t_stksitar), 0, A_NULL);
- class_sethelpsymbol(stksitar_class, gensym("help-stksitar~.pd"));
- class_addmethod(stksitar_class, (t_method)stksitar_dsp, gensym("dsp"), A_NULL);
- class_addmethod(stksitar_class, (t_method)stksitar_play, gensym("play") , A_NULL);
- class_addmethod(stksitar_class, (t_method)stksitar_stop, gensym("stop") , A_NULL);
- class_addmethod(stksitar_class, (t_method)stksitar_freq, gensym("freq") , A_DEFFLOAT, A_NULL);
- class_addmethod(stksitar_class, (t_method)stksitar_pluck, gensym("pluck") , A_DEFFLOAT, A_NULL);
-}