From 0ed7a8b68dd73e2b0473b8127aeca99f3bac9061 Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Wed, 1 Apr 2009 21:13:09 +0000 Subject: cleaned up grill externals - replaced with svn:externals to svn.grrrr.org/ext/trunk/ svn path=/trunk/; revision=10951 --- externals/grill/vst/build/config-mac.def | 6 - externals/grill/vst/build/config-win.def | 3 - externals/grill/vst/build/gnumake-mac-gcc.inc | 3 - externals/grill/vst/build/nmake-win-msvc.inc | 2 - externals/grill/vst/gpl.txt | 346 --------- externals/grill/vst/license.txt | 74 -- externals/grill/vst/package.txt | 10 - externals/grill/vst/pd/vst~-help.pd | 449 ------------ externals/grill/vst/readme.txt | 78 -- externals/grill/vst/src/editor.cpp | 27 - externals/grill/vst/src/editor.h | 26 - externals/grill/vst/src/editormac.hpp | 58 -- externals/grill/vst/src/editorwin.hpp | 361 ---------- externals/grill/vst/src/main.cpp | 980 -------------------------- externals/grill/vst/src/main.h | 28 - externals/grill/vst/src/vst.rc | 135 ---- externals/grill/vst/src/vstedit.cpp | 82 --- externals/grill/vst/src/vsthost.cpp | 461 ------------ externals/grill/vst/src/vsthost.h | 357 ---------- externals/grill/vst/src/vstmaster.cpp | 282 -------- externals/grill/vst/src/vstmidi.cpp | 52 -- externals/grill/vst/src/vstparam.cpp | 106 --- externals/grill/vst/vst.vcproj | 348 --------- externals/grill/vst/vst.xcode/project.pbxproj | 422 ----------- 24 files changed, 4696 deletions(-) delete mode 100644 externals/grill/vst/build/config-mac.def delete mode 100644 externals/grill/vst/build/config-win.def delete mode 100644 externals/grill/vst/build/gnumake-mac-gcc.inc delete mode 100644 externals/grill/vst/build/nmake-win-msvc.inc delete mode 100644 externals/grill/vst/gpl.txt delete mode 100644 externals/grill/vst/license.txt delete mode 100644 externals/grill/vst/package.txt delete mode 100644 externals/grill/vst/pd/vst~-help.pd delete mode 100644 externals/grill/vst/readme.txt delete mode 100644 externals/grill/vst/src/editor.cpp delete mode 100644 externals/grill/vst/src/editor.h delete mode 100644 externals/grill/vst/src/editormac.hpp delete mode 100644 externals/grill/vst/src/editorwin.hpp delete mode 100644 externals/grill/vst/src/main.cpp delete mode 100644 externals/grill/vst/src/main.h delete mode 100644 externals/grill/vst/src/vst.rc delete mode 100644 externals/grill/vst/src/vstedit.cpp delete mode 100644 externals/grill/vst/src/vsthost.cpp delete mode 100644 externals/grill/vst/src/vsthost.h delete mode 100644 externals/grill/vst/src/vstmaster.cpp delete mode 100644 externals/grill/vst/src/vstmidi.cpp delete mode 100644 externals/grill/vst/src/vstparam.cpp delete mode 100644 externals/grill/vst/vst.vcproj delete mode 100644 externals/grill/vst/vst.xcode/project.pbxproj (limited to 'externals/grill/vst') diff --git a/externals/grill/vst/build/config-mac.def b/externals/grill/vst/build/config-mac.def deleted file mode 100644 index d08c7122..00000000 --- a/externals/grill/vst/build/config-mac.def +++ /dev/null @@ -1,6 +0,0 @@ - - - -# where is the VST SDK? -# (at least version 2.3) -VSTSDKPATH=/Volumes/Daten/Prog/packs/vstsdk2.3 diff --git a/externals/grill/vst/build/config-win.def b/externals/grill/vst/build/config-win.def deleted file mode 100644 index caa96c20..00000000 --- a/externals/grill/vst/build/config-win.def +++ /dev/null @@ -1,3 +0,0 @@ -# where is the VST SDK? -# (at least version 2.3) -VSTSDKPATH=c:\data\prog\audio\vstsdk2.3 diff --git a/externals/grill/vst/build/gnumake-mac-gcc.inc b/externals/grill/vst/build/gnumake-mac-gcc.inc deleted file mode 100644 index 6ecd3681..00000000 --- a/externals/grill/vst/build/gnumake-mac-gcc.inc +++ /dev/null @@ -1,3 +0,0 @@ -INCPATH=-I$(VSTSDKPATH)/source/common - - diff --git a/externals/grill/vst/build/nmake-win-msvc.inc b/externals/grill/vst/build/nmake-win-msvc.inc deleted file mode 100644 index 7503c914..00000000 --- a/externals/grill/vst/build/nmake-win-msvc.inc +++ /dev/null @@ -1,2 +0,0 @@ -INCPATH=/I$(VSTSDKPATH)\source\common -LIBS=user32.lib ole32.lib diff --git a/externals/grill/vst/gpl.txt b/externals/grill/vst/gpl.txt deleted file mode 100644 index 5ea29a7d..00000000 --- a/externals/grill/vst/gpl.txt +++ /dev/null @@ -1,346 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) 19yy - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) 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. - - , 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/externals/grill/vst/license.txt b/externals/grill/vst/license.txt deleted file mode 100644 index 4535110c..00000000 --- a/externals/grill/vst/license.txt +++ /dev/null @@ -1,74 +0,0 @@ -vst~ - VST plugin object for PD -based on the work of Jarno Seppänen and Mark Williamson -Copyright (C) 2003-2005 Thomas Grill - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -In the official vst~ distribution, the GNU General Public License is -in the file gpl.txt - ---------------------------------------------------------- - - OTHER COPYRIGHT NOTICES - ---------------------------------------------------------- -This package uses the flext C++ layer - See its license text below: - - ---- plugin~ by Jarno Seppänen -------------------------- - -This is a Pd [1] tilde object for hosting LADSPA [2] and VST [3] audio -plug-ins on Linux and Windows systems, respectively. The LADSPA -plug-in interface is supported completely on Linux, while the VST 1.0 -audio processing plug-in interface (without plug-in graphics) is -supported on Windows. - -This text corresponds to release 0.2 of plugin~ as of 4th April, 2001. -This release of plugin~ has been tested with Pd 0.32P1. - -plugin~ is distributed under the GNU General Public License. For more -information, please read the accompanying file "COPYING". - - ---- vst by mark@junklight.com -------------------------- - -reference: http://iem.kug.ac.at/~jams/ -this plugin uses a tiny amount of code from the plugin~ -object mentioned above. It also tries to replicate the -syntax - - ---- flext ---------------------------------------------- -flext - C++ layer for Max/MSP and pd (pure data) externals -Copyright (C) 2001-2005 Thomas Grill - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -In the official flext distribution, the GNU General Public License is -in the file gpl.txt - - diff --git a/externals/grill/vst/package.txt b/externals/grill/vst/package.txt deleted file mode 100644 index 59e4c4c6..00000000 --- a/externals/grill/vst/package.txt +++ /dev/null @@ -1,10 +0,0 @@ -NAME=vst~ - -BUILDTYPE=multi - -BUILDDIR=build -SRCDIR=src - -SRCS=main.cpp vsthost.cpp vstmaster.cpp vstedit.cpp vstparam.cpp vstmidi.cpp editor.cpp - -HDRS=main.h vsthost.h editor.h editorwin.hpp editormac.hpp diff --git a/externals/grill/vst/pd/vst~-help.pd b/externals/grill/vst/pd/vst~-help.pd deleted file mode 100644 index 99427cc8..00000000 --- a/externals/grill/vst/pd/vst~-help.pd +++ /dev/null @@ -1,449 +0,0 @@ -#N canvas 645 477 862 563 12; -#X obj 26 94 noise~; -#X obj 240 189 print A; -#X obj 27 393 tgl 15 0 empty empty empty 0 -6 0 8 -261689 -1 -1 0 1 -; -#X msg 27 435 edit \$1; -#X msg 97 435 getedit; -#N canvas 367 122 570 368 info 0; -#X msg 92 160 getversion; -#X msg 92 105 getname; -#X msg 93 183 getvendor; -#X msg 92 218 getsynth; -#X msg 92 248 getins; -#X msg 153 250 getouts; -#X msg 93 134 getdll; -#X obj 24 290 s \$0-vst; -#X msg 98 323 print; -#X text 169 220 is synth?; -#X text 177 183 get vendor string; -#X text 179 161 get version; -#X text 152 134 get shared lib name; -#X text 157 109 get internal (official) plug name; -#X text 217 251 number of plug inlets and outlets; -#X msg 93 41 getattributes; -#X msg 266 219 geteditor; -#X text 346 219 has editor?; -#X msg 22 41 help; -#X text 213 38 list all attributes; -#X msg 93 64 getmethods; -#X text 213 65 list all methods; -#X connect 0 0 7 0; -#X connect 1 0 7 0; -#X connect 2 0 7 0; -#X connect 3 0 7 0; -#X connect 4 0 7 0; -#X connect 5 0 7 0; -#X connect 6 0 7 0; -#X connect 8 0 7 0; -#X connect 15 0 7 0; -#X connect 16 0 7 0; -#X connect 18 0 7 0; -#X connect 20 0 7 0; -#X restore 521 97 pd info; -#X obj 96 94 r \$0-vst; -#X obj 27 462 s \$0-vst; -#X text 52 392 display edit window; -#X msg 104 309 getplug; -#X obj 26 337 s \$0-vst; -#X text 64 263 set/get plugin; -#X text 587 97 further information; -#X obj 23 15 cnv 15 800 58 empty empty vst~ 10 32 0 24 -260818 -1 0 -; -#X text 237 170 attribute outlet; -#X text 190 134 inlets outlets [plugname]; -#N canvas 351 2 630 585 win 0; -#X obj 23 202 s \$0-vst; -#X msg 122 83 getx; -#X msg 181 85 gety; -#X obj 122 37 nbx 5 14 -1e+037 1e+037 0 0 empty empty empty 0 -6 0 -10 -225271 -1 -1 0 256; -#X msg 123 55 x \$1; -#X obj 192 37 nbx 5 14 -1e+037 1e+037 0 0 empty empty empty 0 -6 0 -10 -225271 -1 -1 0 256; -#X msg 193 53 y \$1; -#X text 264 74 (position of the actual VST interface); -#X obj 117 208 tgl 15 0 empty empty empty 0 -6 0 8 -225271 -1 -1 0 -1; -#X msg 116 227 caption \$1; -#X msg 211 227 getcaption; -#X text 119 251 set/get window caption and borders; -#X text 118 316 set/get window title; -#X msg 218 292 gettitle; -#X msg 115 292 title KARL; -#X obj 120 124 nbx 5 14 -1e+037 1e+037 0 0 empty empty empty 0 -6 0 -10 -225271 -1 -1 0 256; -#X obj 190 124 nbx 5 14 -1e+037 1e+037 0 0 empty empty empty 0 -6 0 -10 -225271 -1 -1 0 256; -#X msg 121 142 w \$1; -#X msg 120 170 getw; -#X msg 191 140 h \$1; -#X msg 175 170 geth; -#X text 265 144 set and get editor window size; -#X text 267 59 set and get editor position; -#X obj 122 458 bng 15 250 50 0 empty empty empty 0 -6 0 8 -225271 -1 --1; -#X text 280 457 send editor window to front; -#X msg 223 457 front; -#X obj 145 457 delay 100; -#X obj 123 500 tgl 15 0 empty empty empty 0 -6 0 8 -225271 -1 -1 0 -1; -#X msg 145 497 handle \$1; -#X text 230 498 set/unset handle for window (taskbar button); -#X obj 118 374 tgl 15 0 empty empty empty 0 -6 0 8 -225271 -1 -1 0 -1; -#X msg 117 396 vis \$1; -#X msg 186 396 getvis; -#X text 141 372 make edit window (in)visible; -#X connect 1 0 0 0; -#X connect 2 0 0 0; -#X connect 3 0 4 0; -#X connect 4 0 0 0; -#X connect 5 0 6 0; -#X connect 6 0 0 0; -#X connect 8 0 9 0; -#X connect 9 0 0 0; -#X connect 10 0 0 0; -#X connect 13 0 0 0; -#X connect 14 0 0 0; -#X connect 15 0 17 0; -#X connect 16 0 19 0; -#X connect 17 0 0 0; -#X connect 18 0 0 0; -#X connect 19 0 0 0; -#X connect 20 0 0 0; -#X connect 23 0 26 0; -#X connect 25 0 0 0; -#X connect 26 0 25 0; -#X connect 27 0 28 0; -#X connect 28 0 0 0; -#X connect 30 0 31 0; -#X connect 31 0 0 0; -#X connect 32 0 0 0; -#X restore 520 227 pd win; -#X text 586 227 manipulating the edit window; -#X msg 26 310 plug \$1; -#X obj 26 254 bng 25 250 50 0 empty empty empty 0 -6 0 8 -261689 -1 --1; -#X obj 26 285 openpanel; -#N canvas 294 23 534 663 midi 0; -#X obj 16 256 s \$0-vst; -#X msg 198 201 ctlchg 3 123; -#X text 204 70 note on; -#X text 375 71 note off; -#X text 308 200 control change; -#X text 272 287 pitch bend; -#X text 279 228 program change; -#X msg 197 229 progchg 2; -#X msg 285 72 noteoff 10; -#X text 275 336 after touch; -#X obj 198 267 nbx 5 14 -1e+037 1e+037 0 0 empty empty empty 0 -6 0 -10 -225271 -1 -1 0 256; -#X obj 198 318 nbx 5 14 -1e+037 1e+037 0 0 empty empty empty 0 -6 0 -10 -225271 -1 -1 0 256; -#X msg 197 287 pbend \$1; -#X msg 196 337 atouch \$1; -#X obj 109 136 nbx 5 14 -1e+037 1e+037 0 0 empty empty empty 0 -6 0 -10 -225271 -1 -1 0 256; -#X msg 108 71 note 10 100; -#X msg 108 152 note \$1 100; -#X msg 284 126 noteoff \$1; -#X obj 285 109 nbx 5 14 -1e+037 1e+037 0 0 empty empty empty 0 -6 0 -10 -225271 -1 -1 0 256; -#X text 25 520 MIDI messages have the following format:; -#X text 23 544 [event midi subtype chn b2 b3 delta note-length note-offset -detune off-velocity(; -#X obj 90 371 tgl 15 0 empty empty empty 0 -6 0 8 -225271 -1 -1 0 1 -; -#X msg 90 390 events \$1; -#X msg 90 415 getevents; -#X text 177 393 enable event processing; -#X text 25 463 if enabled vst~ will output events generated by the -plugin as [event ...( messages through the dump outlet; -#X msg 108 93 note 10 0; -#X text 188 93 "note off"; -#X obj 107 12 nbx 5 14 0 15 0 0 empty empty empty 0 -6 0 10 -225271 --1 -1 0 256; -#X msg 106 28 channel \$1; -#X msg 207 28 getchannel; -#X text 305 20 set/get MIDI channel; -#X text 25 585 subtypes are note \, noteoff \, atouch \, patouch \, -ctlchg \, progchg \, pbend; -#X connect 1 0 0 0; -#X connect 7 0 0 0; -#X connect 8 0 0 0; -#X connect 10 0 12 0; -#X connect 11 0 13 0; -#X connect 12 0 0 0; -#X connect 13 0 0 0; -#X connect 14 0 16 0; -#X connect 15 0 0 0; -#X connect 16 0 0 0; -#X connect 17 0 0 0; -#X connect 18 0 17 0; -#X connect 21 0 22 0; -#X connect 22 0 0 0; -#X connect 23 0 0 0; -#X connect 26 0 0 0; -#X connect 28 0 29 0; -#X connect 29 0 0 0; -#X connect 30 0 0 0; -#X restore 521 195 pd midi; -#X text 134 33 based on the work of Jarno Seppanen and Mark Williamson -; -#X obj 742 424 loadbang; -#X obj 520 449 tgl 15 0 empty empty empty 0 -6 0 8 -225271 -1 -1 0 -1; -#X obj 520 498 s \$0-vst; -#X msg 520 471 bypass \$1; -#X msg 602 471 getbypass; -#X text 545 448 bypass plugin; -#X obj 520 357 tgl 15 0 empty empty empty 0 -6 0 8 -225271 -1 -1 0 -1; -#X obj 520 405 s \$0-vst; -#X text 545 356 mute output; -#X msg 520 378 mute \$1; -#X msg 602 378 getmute; -#N canvas 200 110 497 448 parameters 0; -#X obj 114 125 hsl 128 15 0 1 0 0 empty empty empty -2 -6 0 8 -225271 --1 -1 0 1; -#X msg 111 142 param 2 \$1; -#X obj 21 195 s \$0-vst; -#X msg 113 26 getparams; -#X text 191 26 get number of parameters; -#X msg 213 143 getparam 2; -#X msg 107 202 param gain 0; -#X text 203 84 get parameter name; -#X text 120 277 get value in textual representation; -#X text 136 164 set/get parameter (0-based); -#X msg 107 255 getptext \$1; -#X obj 107 238 nbx 5 14 0 10000 0 0 empty empty empty 0 -6 0 10 -225271 --1 -1 0 256; -#X obj 111 68 nbx 5 14 0 10000 0 0 empty empty empty 0 -6 0 10 -225271 --1 -1 0 256; -#X msg 111 86 getpname \$1; -#X msg 212 255 getptext gain; -#X msg 214 202 getparam gain; -#X text 116 293 (may be ambigous!); -#X obj 106 335 tgl 15 0 empty empty empty 0 -6 0 8 -225271 -1 -1 0 -1; -#X msg 108 356 feedback \$1; -#X msg 213 356 getfeedback; -#X text 108 378 get parameter feedback through dump outlet; -#X connect 0 0 1 0; -#X connect 1 0 2 0; -#X connect 3 0 2 0; -#X connect 5 0 2 0; -#X connect 6 0 2 0; -#X connect 10 0 2 0; -#X connect 11 0 10 0; -#X connect 12 0 13 0; -#X connect 13 0 2 0; -#X connect 14 0 2 0; -#X connect 15 0 2 0; -#X connect 17 0 18 0; -#X connect 18 0 2 0; -#X connect 19 0 2 0; -#X restore 520 130 pd parameters; -#N canvas 0 0 466 316 programs 0; -#X obj 39 245 s \$0-vst; -#X msg 162 106 getprogram; -#X text 134 34 get number of programs; -#X msg 39 37 getprograms; -#X text 93 125 set/get program (0-based); -#X msg 39 62 getprogcats; -#X text 134 59 get number of program categories; -#X msg 59 106 program \$1; -#X obj 60 90 nbx 5 14 0 10000 0 0 empty empty empty 0 -6 0 10 -225271 --1 -1 0 256; -#X obj 64 144 nbx 5 14 0 10000 0 0 empty empty empty 0 -6 0 10 -225271 --1 -1 0 256; -#X msg 62 161 getprogname \$1; -#X text 182 158 get program name; -#X obj 63 195 nbx 5 14 0 10000 0 0 empty empty empty 0 -6 0 10 -225271 --1 -1 0 256; -#X text 199 210 get program name; -#X msg 61 212 getprogname 2 \$1; -#X text 201 224 (with category); -#X text 198 172 (no category); -#X connect 1 0 0 0; -#X connect 3 0 0 0; -#X connect 5 0 0 0; -#X connect 7 0 0 0; -#X connect 8 0 7 0; -#X connect 9 0 10 0; -#X connect 10 0 0 0; -#X connect 12 0 14 0; -#X connect 14 0 0 0; -#X restore 521 162 pd programs; -#X text 637 131 VST parameters; -#X text 638 162 VST programs; -#X text 134 53 http://grrrr.org; -#X text 589 196 midi messages for VST synths; -#X msg 269 316 subplug AudioTrack; -#X obj 249 441 s \$0-vst; -#X msg 269 401 getsubplug; -#X obj 26 135 vst~ 2 2 @pnames 100; -#X msg 249 283 getpluglist; -#X text 585 254 sequencer stuff; -#X text 133 14 VST plugins for PD \, (C)2003-2005 Thomas Grill; -#X msg 269 341 subplug X-Noise; -#N canvas 0 0 466 316 out 0; -#X obj 79 164 *~; -#X obj 79 194 dac~ 1 2 3 4; -#X obj 109 164 *~; -#X obj 139 164 *~; -#X obj 169 164 *~; -#X obj 266 26 inlet; -#X obj 49 26 inlet~; -#X obj 102 26 inlet~; -#X obj 154 26 inlet~; -#X obj 206 26 inlet~; -#X obj 265 108 line~; -#X msg 266 82 \$1 1 20; -#X connect 0 0 1 0; -#X connect 2 0 1 1; -#X connect 3 0 1 2; -#X connect 4 0 1 3; -#X connect 5 0 11 0; -#X connect 6 0 0 0; -#X connect 7 0 2 0; -#X connect 8 0 3 0; -#X connect 9 0 4 0; -#X connect 10 0 4 1; -#X connect 10 0 3 1; -#X connect 10 0 2 1; -#X connect 10 0 0 1; -#X connect 11 0 10 0; -#X restore 26 192 pd out; -#X obj 72 175 hsl 128 15 0.001 1 1 1 empty empty gain -2 -6 0 8 -261689 --1 -1 6400 1; -#N canvas 105 36 498 655 seq 0; -#X obj 17 225 s \$0-vst; -#X msg 112 78 samplepos \$1; -#X obj 111 60 nbx 5 14 0 1e+037 0 0 empty empty empty 0 -6 0 10 -225271 --1 -1 0 256; -#X msg 224 77 getsamplepos; -#X obj 111 108 nbx 5 14 0 1e+037 0 0 empty empty empty 0 -6 0 10 -225271 --1 -1 0 256; -#X msg 112 126 ppqpos \$1; -#X msg 199 127 getppqpos; -#X obj 111 153 nbx 5 14 5 400 0 1 empty empty empty 0 -6 0 10 -225271 --1 -1 120 256; -#X msg 112 171 tempo \$1; -#X msg 199 172 gettempo; -#X msg 113 28 playing \$1; -#X msg 203 28 getplaying; -#X obj 112 -1 tgl 25 0 empty empty empty 0 -6 0 8 -225271 -1 -1 0 1 -; -#X obj 109 218 tgl 25 0 empty empty empty 0 -6 0 8 -225271 -1 -1 0 -1; -#X msg 110 247 looping \$1; -#X msg 200 247 getlooping; -#X obj 111 275 nbx 5 14 0 1e+037 0 0 empty empty empty 0 -6 0 10 -225271 --1 -1 0 256; -#X msg 112 293 loopstart \$1; -#X msg 222 293 getloopstart; -#X obj 111 319 nbx 5 14 0 1e+037 0 0 empty empty empty 0 -6 0 10 -225271 --1 -1 0 256; -#X msg 112 337 loopend \$1; -#X msg 222 337 getloopend; -#X obj 111 363 nbx 5 14 0 1e+037 0 0 empty empty empty 0 -6 0 10 -225271 --1 -1 0 256; -#X msg 112 379 looplength \$1; -#X msg 227 379 getlooplength; -#X obj 115 521 nbx 5 14 0 1e+037 0 0 empty empty empty 0 -6 0 10 -225271 --1 -1 0 256; -#X msg 116 537 smpteoffset \$1; -#X msg 238 537 getsmpteoffset; -#X msg 116 579 smpterate \$1; -#X msg 230 579 getsmpterate; -#X obj 116 562 hradio 15 1 0 6 empty empty empty 0 -6 0 8 -225271 -1 --1 0; -#X text 230 561 24/25/24/30/29.97df/30df; -#X obj 112 415 nbx 5 14 1 128 0 1 empty empty empty 0 -6 0 10 -225271 --1 -1 4 256; -#X msg 113 433 timenom \$1; -#X msg 205 434 gettimenom; -#X obj 113 455 nbx 5 14 1 128 0 1 empty empty empty 0 -6 0 10 -225271 --1 -1 4 256; -#X msg 114 473 timeden \$1; -#X msg 206 474 gettimeden; -#X text 300 423 time signature; -#X text 302 438 nominator; -#X text 302 476 denominator; -#X text 284 161 tempo in quarters per minute; -#X connect 1 0 0 0; -#X connect 2 0 1 0; -#X connect 3 0 0 0; -#X connect 4 0 5 0; -#X connect 5 0 0 0; -#X connect 6 0 0 0; -#X connect 7 0 8 0; -#X connect 8 0 0 0; -#X connect 9 0 0 0; -#X connect 10 0 0 0; -#X connect 11 0 0 0; -#X connect 12 0 10 0; -#X connect 13 0 14 0; -#X connect 14 0 0 0; -#X connect 15 0 0 0; -#X connect 16 0 17 0; -#X connect 17 0 0 0; -#X connect 18 0 0 0; -#X connect 19 0 20 0; -#X connect 20 0 0 0; -#X connect 21 0 0 0; -#X connect 22 0 23 0; -#X connect 23 0 0 0; -#X connect 24 0 0 0; -#X connect 25 0 26 0; -#X connect 26 0 0 0; -#X connect 27 0 0 0; -#X connect 28 0 0 0; -#X connect 29 0 0 0; -#X connect 30 0 28 0; -#X connect 32 0 33 0; -#X connect 33 0 0 0; -#X connect 34 0 0 0; -#X connect 35 0 36 0; -#X connect 36 0 0 0; -#X connect 37 0 0 0; -#X restore 520 256 pd seq; -#X text 23 508 on the vst~ object box; -#X obj 27 413 pipe 100; -#X text 249 244 functions for plugin shells; -#X text 247 260 (like Waves); -#X msg 269 366 subplug; -#X obj 742 462 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 -1; -#X text 24 491 you can also shift-click; -#X msg 742 483 \; pd dsp \$1; -#X connect 0 0 43 0; -#X connect 0 0 43 1; -#X connect 2 0 52 0; -#X connect 3 0 7 0; -#X connect 4 0 7 0; -#X connect 6 0 43 0; -#X connect 9 0 10 0; -#X connect 18 0 10 0; -#X connect 19 0 20 0; -#X connect 20 0 18 0; -#X connect 23 0 56 0; -#X connect 24 0 26 0; -#X connect 26 0 25 0; -#X connect 27 0 25 0; -#X connect 29 0 32 0; -#X connect 32 0 30 0; -#X connect 33 0 30 0; -#X connect 40 0 41 0; -#X connect 42 0 41 0; -#X connect 43 0 48 0; -#X connect 43 1 48 1; -#X connect 43 2 1 0; -#X connect 44 0 41 0; -#X connect 47 0 41 0; -#X connect 49 0 48 4; -#X connect 52 0 3 0; -#X connect 55 0 41 0; -#X connect 56 0 58 0; diff --git a/externals/grill/vst/readme.txt b/externals/grill/vst/readme.txt deleted file mode 100644 index 03914813..00000000 --- a/externals/grill/vst/readme.txt +++ /dev/null @@ -1,78 +0,0 @@ -vst~ - VST plugin external for PD -based on the work of Jarno Seppänen and Mark Williamson - -Copyright (c)2003-05 Thomas Grill (gr@grrrr.org) -For information on usage and redistribution, and for a DISCLAIMER OF ALL -WARRANTIES, see the file, "license.txt," in this distribution. - -Donations for further development of the package are highly appreciated. -Visit https://www.paypal.com/xclick/business=gr%40grrrr.org&item_name=vst&no_note=1&tax=0¤cy_code=EUR - ----------------------------------------------------------------------------- - -BUILDING from source --------------------- - -You will need the flext C++ layer for PD and Max/MSP externals to compile this. -See http://grrrr.org/ext/flext -Download, install and compile the package. -Afterwards you can proceed with building this external. - - -pd/Max - Windows - Microsoft Visual C, Borland C++, MinGW: ----------------------------------------------------------- -Start a command shell with your eventual build environment -(e.g. run vcvars32.bat for Microsoft Visual Studio) - -then run - ..\flext\build.bat -(you would have to substitute ..\flext with the respective path to the flext package) - - -pd/Max - OSX/Linux - GCC: -------------------------- -From a shell run -bash ../flext/build.sh -(you would have to substitute ../flext with the respective path to the flext package) - - ----------------------------------------------------------------------------- - -Version history: - -0.1.0: -- fixed crash when there's no "VST_PATH" environment string found -- included pd path into VST search path -- made thread of editor window low priority -- introduced A LOT of attributes to get info about the plugin -- make editor window closable by patch -- plugin can be changed with plug attribute -- fixed crash on destroying vst~ with open editor window -- stripped all MFC code -- fixed DSP initialization, zero dangling audio vectors -- pre12: added "bypass" and "mute" attributes -- pre13: with flext 0.4.7 no more interruptions on window close -- pre14: allow window titles with spaces and update it on window startup -- pre18: open plug interface on Alt-Click -- pre18: experimental plug shell support -- pre19: better shell support -- pre19: restructured code and added time info -- pre19: support for event processing (like MIDI in) -- pre21: consistent MIDI handling, correct handling of parameters with spaces -- pre22: cleaner GUI code, all kinds of window handling -- pre22: catch exceptions like crashing plugs -- pre23: security measures for open edit window -- pre24: workarounds for Waves5 strangenesses - -0.0.0: -- version of mark@junklight.com - ---------------------------------------------------------------------------- - -BUGS: -- mouse interaction in editor can cause audio dropouts - -TODO: -- include necessary Steinberg license stuff -- do plugin loading, name scanning in the background -- translate special characters in strings (like ° as param_label) into system-digestible form diff --git a/externals/grill/vst/src/editor.cpp b/externals/grill/vst/src/editor.cpp deleted file mode 100644 index be412b00..00000000 --- a/externals/grill/vst/src/editor.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/* -vst~ - VST plugin object for PD -based on the work of Jarno Seppänen and Mark Williamson - -Copyright (c)2003-2004 Thomas Grill (xovo@gmx.net) -For information on usage and redistribution, and for a DISCLAIMER OF ALL -WARRANTIES, see the file, "license.txt," in this distribution. -*/ - -#include "editor.h" -#include "vsthost.h" -#include - -#if FLEXT_OS == FLEXT_OS_WIN -// only Windows code is situated in this file - -#include "editorwin.hpp" - -#elif FLEXT_OS == FLEXT_OS_MAC - -#include "editormac.hpp" - -#else - -#error Platform not supported - -#endif diff --git a/externals/grill/vst/src/editor.h b/externals/grill/vst/src/editor.h deleted file mode 100644 index 7c5831e7..00000000 --- a/externals/grill/vst/src/editor.h +++ /dev/null @@ -1,26 +0,0 @@ -/* -vst~ - VST plugin object for PD -based on the work of Jarno Seppänen and Mark Williamson - -Copyright (c)2003-2005 Thomas Grill (gr@grrrr.org) -For information on usage and redistribution, and for a DISCLAIMER OF ALL -WARRANTIES, see the file, "license.txt," in this distribution. -*/ - -#ifndef __EDITOR_H -#define __EDITOR_H - -class VSTPlugin; - -void SetupEditor(); -void StartEditor(VSTPlugin *p); -void StopEditor(VSTPlugin *p); -void ShowEditor(VSTPlugin *p,bool show); -void MoveEditor(VSTPlugin *p,int x,int y); -void SizeEditor(VSTPlugin *p,int x,int y); -void TitleEditor(VSTPlugin *p,const char *t); -void CaptionEditor(VSTPlugin *p,bool c); -void HandleEditor(VSTPlugin *p,bool h); -void FrontEditor(VSTPlugin *p); - -#endif // __EDITOR_H diff --git a/externals/grill/vst/src/editormac.hpp b/externals/grill/vst/src/editormac.hpp deleted file mode 100644 index b519aa06..00000000 --- a/externals/grill/vst/src/editormac.hpp +++ /dev/null @@ -1,58 +0,0 @@ -/* -vst~ - VST plugin object for PD -based on the work of Jarno Seppänen and Mark Williamson - -Copyright (c)2003-2004 Thomas Grill (xovo@gmx.net) -For information on usage and redistribution, and for a DISCLAIMER OF ALL -WARRANTIES, see the file, "license.txt," in this distribution. -*/ - -#include "Editor.h" -#include "VstHost.h" -#include - - -#if FLEXT_OS == FLEXT_OS_MAC -// only Mac OSX code is situated in this file - -void SetupEditor() -{ -} - -void StartEditor(VSTPlugin *p) -{ -} - -void StopEditor(VSTPlugin *p) -{ -} - -void ShowEditor(VSTPlugin *p,bool show) -{ -} - -void MoveEditor(VSTPlugin *p,int x,int y) -{ -} - -void SizeEditor(VSTPlugin *p,int x,int y) -{ -} - -void CaptionEditor(VSTPlugin *plug,bool c) -{ -} - -void TitleEditor(VSTPlugin *p,const char *t) -{ -} - -void HandleEditor(VSTPlugin *p,bool h) -{ -} - -void FrontEditor(VSTPlugin *p) -{ -} - -#endif // FLEXT_OS_MAC diff --git a/externals/grill/vst/src/editorwin.hpp b/externals/grill/vst/src/editorwin.hpp deleted file mode 100644 index 558301bc..00000000 --- a/externals/grill/vst/src/editorwin.hpp +++ /dev/null @@ -1,361 +0,0 @@ -/* -vst~ - VST plugin object for PD -based on the work of Jarno Seppänen and Mark Williamson - -Copyright (c)2003-2005 Thomas Grill (gr@grrrr.org) -For information on usage and redistribution, and for a DISCLAIMER OF ALL -WARRANTIES, see the file, "license.txt," in this distribution. -*/ - -#if FLEXT_OS != FLEXT_OS_WIN -// only Windows code is situated in this file -#error Wrong implementation -#endif - -#include -#include - -class ThrCmp -{ -public: - inline bool operator()(const flext::thrid_t &a,const flext::thrid_t &b) const - { - if(sizeof(a) == sizeof(size_t)) - return *(size_t *)&a < *(size_t *)&b; - else - return memcmp(&a,&b,sizeof(a)) < 0; - } -}; - -typedef std::map WndMap; -static WndMap wndmap; -static flext::ThrMutex mapmutex; - -#define TIMER_INTERVAL 25 -#define WCLNAME "vst~-class" - - -static LRESULT CALLBACK wndproc(HWND hwnd,UINT msg,WPARAM wp,LPARAM lp) -{ - mapmutex.Lock(); - VSTPlugin *plug = wndmap[flext::GetThreadId()]; - mapmutex.Unlock(); - FLEXT_ASSERT(plug != NULL); - - LRESULT res = 0; - - switch(msg) { - case WM_CREATE: - // Initialize the window. - plug->StartEditing(hwnd); - break; - - case WM_CLOSE: -#ifdef FLEXT_LOGGING - flext::post("WM_CLOSE"); -#endif - plug->StopEditing(); - - DestroyWindow(hwnd); - break; - case WM_DESTROY: -#ifdef FLEXT_LOGGING - flext::post("WM_DESTROY"); -#endif - // stop editor thread - PostQuitMessage(0); - break; - - case WM_TIMER: // fall through - case WM_ENTERIDLE: - plug->EditorIdle(); - break; -#if 0 - case WM_WINDOWPOSCHANGED: { - // ignore after WM_CLOSE so that x,y positions are preserved - if(!plug->IsEdited()) break; - - WINDOWPOS *w = (WINDOWPOS *)lp; - - WINDOWINFO winfo; - winfo.cbSize = sizeof(winfo); - GetWindowInfo(hwnd,&winfo); - int cpx = winfo.rcWindow.left-winfo.rcClient.left; - int cpy = winfo.rcWindow.top-winfo.rcClient.top; - int csx = winfo.rcWindow.right-winfo.rcClient.right-cpx; - int csy = winfo.rcWindow.bottom-winfo.rcClient.bottom-cpy; - // send normalized coordinates to plugin - plug->SetPos(w->x+cpx,w->y+cpy,false); - plug->SetSize(w->cx+csx,w->cy+csy,false); - return 0; - } -#else - case WM_MOVE: { - // ignore after WM_CLOSE so that x,y positions are preserved - if(!plug->IsEdited()) break; - - WORD wx = LOWORD(lp),wy = HIWORD(lp); - short x = reinterpret_cast(wx),y = reinterpret_cast(wy); - // x and y are the coordinates of the client rect (= actual VST interface) - - WINDOWINFO winfo; - winfo.cbSize = sizeof(winfo); - GetWindowInfo(hwnd,&winfo); - int px = winfo.rcWindow.left-winfo.rcClient.left; - int py = winfo.rcWindow.top-winfo.rcClient.top; - // send normalized coordinates to plugin - plug->SetPos(x+px,y+py,false); - break; - } - - case WM_SIZE: { - if(!plug->IsEdited()) break; - - WORD wx = LOWORD(lp),wy = HIWORD(lp); - short x = reinterpret_cast(wx),y = reinterpret_cast(wy); - // x and y are the coordinates of the client rect (= actual VST interface) - - WINDOWINFO winfo; - winfo.cbSize = sizeof(winfo); - GetWindowInfo(hwnd,&winfo); - int px = winfo.rcWindow.left-winfo.rcClient.left; - int py = winfo.rcWindow.top-winfo.rcClient.top; - int sx = winfo.rcWindow.right-winfo.rcClient.right-px; - int sy = winfo.rcWindow.bottom-winfo.rcClient.bottom-py; - // send normalized coordinates to plugin - plug->SetSize(x+sx,y+sy,false); - break; - } -#endif - -#if 0 // NOT needed for Windows - case WM_PAINT: { - // Paint the window's client area. - RECT rect; - GetUpdateRect(hwnd,&rect,FALSE); - ERect erect; - erect.left = rect.left; - erect.top = rect.top; - erect.right = rect.right; - erect.bottom = rect.bottom; - plug->Paint(erect); - break; - } -#endif - case WM_SHOWWINDOW: - plug->Visible(wp != FALSE,false); - break; - - default: - #ifdef FLEXT_LOGGING -// flext::post("WND MSG %i, WP=%i, lp=%i",msg,wp,lp); - #endif - - res = DefWindowProc(hwnd,msg,wp,lp); - } - return res; -} - -static void windowsize(HWND wnd,int x,int y,int w,int h) -{ - // pre correction - WINDOWINFO winfo; - winfo.cbSize = sizeof(winfo); - GetWindowInfo(wnd,&winfo); - int sx1 = (winfo.rcWindow.right-winfo.rcClient.right)-(winfo.rcWindow.left-winfo.rcClient.left); - int sy1 = (winfo.rcWindow.bottom-winfo.rcClient.bottom)-(winfo.rcWindow.top-winfo.rcClient.top); - - // First reflect new state in flags - SetWindowPos(wnd,NULL,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE|SWP_NOZORDER|SWP_FRAMECHANGED); - - // post correction - GetWindowInfo(wnd,&winfo); - int sx2 = (winfo.rcWindow.right-winfo.rcClient.right)-(winfo.rcWindow.left-winfo.rcClient.left); - int sy2 = (winfo.rcWindow.bottom-winfo.rcClient.bottom)-(winfo.rcWindow.top-winfo.rcClient.top); - - // set pos, size and flags - SetWindowPos(wnd,NULL,x,y,w+sx2-sx1,h+sy2-sy1,SWP_NOZORDER); -} - -static void threadfun(flext::thr_params *p) -{ - flext::RelPriority(-2); - - VSTPlugin *plug = (VSTPlugin *)p; - HINSTANCE hinstance = (HINSTANCE)GetModuleHandle(NULL); - flext::thrid_t thrid = flext::GetThreadId(); - - mapmutex.Lock(); - wndmap[thrid] = plug; - mapmutex.Unlock(); - - char tmp[256]; - sprintf(tmp,"vst~ - %s",plug->GetName()); - - // Get size from plugin - ERect r; - plug->GetEditorRect(r); - - HWND wnd = CreateWindowEx( - plug->GetHandle()?WS_EX_APPWINDOW:WS_EX_TOOLWINDOW, - WCLNAME,tmp, - WS_POPUP|WS_SYSMENU|WS_MINIMIZEBOX, // no border for the beginning to set proper coordinates - plug->GetX(),plug->GetY(),r.right-r.left,r.bottom-r.top, - NULL,NULL, - hinstance,NULL - ); - - if(!wnd) - FLEXT_LOG1("wnd == NULL: %i",GetLastError()); - else { - // idle timer - SetTimer(wnd,0,TIMER_INTERVAL,NULL); - - // set caption style - CaptionEditor(plug,plug->GetCaption()); - - if(plug->IsVisible()) { - SetForegroundWindow(wnd); - ShowWindow(wnd,1); - - // notify plugin - // plug->Dispatch(effEditTop,0,0,0,0); - } - else - ShowWindow(wnd,0); - - try - { - - // Message loop - MSG msg; - BOOL bRet; - while( (bRet = GetMessage( &msg, NULL, 0, 0 )) != 0) { - if(bRet == -1) { - // handle the error and possibly exit - FLEXT_LOG1("GetMessage error: %i",GetLastError()); - } - else { - TranslateMessage(&msg); -// double tm1 = flext::GetOSTime(); - DispatchMessage(&msg); -// double tm2 = flext::GetOSTime(); -// if(tm2-tm1 > 0.01) FLEXT_LOG1("halt %lf",(tm2-tm1)*1000); - } - } - - } - - catch(exception &e) { - flext::post("vst~ - exception caught, exiting: %s",e.what()); - } - catch(...) { - flext::post("vst~ - exception caught, exiting"); - } - - if(plug) plug->EditingEnded(); - } - - mapmutex.Lock(); - wndmap.erase(thrid); - mapmutex.Unlock(); -} - -void SetupEditor() -{ - HINSTANCE hinstance = (HINSTANCE)GetModuleHandle(NULL); - - // Fill in the window class structure with parameters that describe the main window. - WNDCLASS wcx; - wcx.style = CS_DBLCLKS; // | CS_HREDRAW | CS_VREDRAW; // redraw if size changes - wcx.lpfnWndProc = wndproc; // points to window procedure - wcx.cbClsExtra = 0; // no extra class memory - wcx.cbWndExtra = 0; // no extra window memory - wcx.hInstance = hinstance; // handle to instance - wcx.hIcon = NULL; //LoadIcon(NULL, IDI_APPLICATION); // predefined app. icon - wcx.hCursor = LoadCursor(NULL, IDC_ARROW); // predefined arrow - wcx.hbrBackground = NULL; //GetStockObject(WHITE_BRUSH); // white background brush - wcx.lpszMenuName = NULL; // name of menu resource - wcx.lpszClassName = WCLNAME; // name of window class - - ATOM at = RegisterClass(&wcx); - FLEXT_ASSERT(at); -} - -void StartEditor(VSTPlugin *p) -{ -#ifdef FLEXT_LOGGING - flext::post("Start editor 1"); -#endif - flext::LaunchThread(threadfun,reinterpret_cast(p)); -#ifdef FLEXT_LOGGING - flext::post("Start editor 2"); -#endif -} - -void StopEditor(VSTPlugin *p) -{ -#ifdef FLEXT_LOGGING - flext::post("Stop editor 1"); -#endif - PostMessage(p->EditorHandle(),WM_CLOSE,0,0); -// flext::StopThread(threadfun,reinterpret_cast(p)); -#ifdef FLEXT_LOGGING - flext::post("Stop editor 2"); -#endif -} - -void ShowEditor(VSTPlugin *p,bool show) -{ - ShowWindow(p->EditorHandle(),show); -} - -void MoveEditor(VSTPlugin *p,int x,int y) -{ - HWND wnd = p->EditorHandle(); - SetWindowPos(wnd,NULL,x,y,0,0,SWP_NOSIZE|SWP_NOZORDER); -} - -void SizeEditor(VSTPlugin *p,int x,int y) -{ - HWND wnd = p->EditorHandle(); - SetWindowPos(wnd,NULL,0,0,x,y,SWP_NOMOVE|SWP_NOZORDER); -} - -void FrontEditor(VSTPlugin *p) -{ - SetForegroundWindow(p->EditorHandle()); -} - -void CaptionEditor(VSTPlugin *plug,bool c) -{ - HWND wnd = plug->EditorHandle(); - LONG ns,style = GetWindowLong(wnd,GWL_STYLE); - if(c) ns = style|WS_BORDER|WS_CAPTION; - else ns = style&~(WS_BORDER|WS_CAPTION); - if(ns != style) { - SetWindowLong(wnd,GWL_STYLE,ns); - windowsize(wnd,plug->GetX(),plug->GetY(),plug->GetW(),plug->GetH()); - } -} - -void HandleEditor(VSTPlugin *plug,bool h) -{ - HWND wnd = plug->EditorHandle(); - bool v = plug->IsVisible(); - if(v) ShowWindow(wnd,FALSE); - SetWindowLong(wnd,GWL_EXSTYLE,h?WS_EX_APPWINDOW:WS_EX_TOOLWINDOW); - if(v) ShowWindow(wnd,TRUE); -} - -void TitleEditor(VSTPlugin *p,const char *t) -{ - SetWindowText(p->EditorHandle(),t); -} - -/* -bool IsEditorShown(const VSTPlugin *p) -{ - return IsWindowVisible(p->EditorHandle()) != FALSE; -} -*/ \ No newline at end of file diff --git a/externals/grill/vst/src/main.cpp b/externals/grill/vst/src/main.cpp deleted file mode 100644 index d0e5a6c0..00000000 --- a/externals/grill/vst/src/main.cpp +++ /dev/null @@ -1,980 +0,0 @@ -/* -vst~ - VST plugin object for PD -based on the work of Jarno Seppänen and Mark Williamson - -Copyright (c)2003-2005 Thomas Grill (gr@grrrr.org) -For information on usage and redistribution, and for a DISCLAIMER OF ALL -WARRANTIES, see the file, "license.txt," in this distribution. -*/ - -// needed for CoInitializeEx -#define _WIN32_DCOM - -#include "main.h" - -#include "editor.h" -#include "vsthost.h" - -#include -#include -#include - -#if FLEXT_OS == FLEXT_OS_WIN -#include -#include -#include -#endif - - -#define VST_VERSION "0.1.0pre26" - - -class vst - : public flext_dsp - , public Responder -{ - FLEXT_HEADER_S(vst,flext_dsp,Setup) - -public: - vst(int argc,const t_atom *argv); - ~vst(); - -protected: - virtual bool CbDsp(); - virtual void CbSignal(); - - virtual void CbClick() { ms_edit(true); } - - bool ms_plug(int argc,const t_atom *argv); - bool ms_plug(const AtomList &args) { return ms_plug(args.Count(),args.Atoms()); } - void mg_plug(AtomList &sym) const { sym(1); SetString(sym[0],plugname.c_str()); } - - void ms_subplug(int argc,const t_atom *argv); - void ms_subplug(const AtomList &args) { ms_subplug(args.Count(),args.Atoms()); } - void mg_subplug(AtomList &sym) const { sym(1); SetString(sym[0],subplug.c_str()); } - - void m_pluglist() { if(plug) plug->ListPlugs(sym_pluglist); } - - void mg_editor(bool &ed) { ed = plug && plug->HasEditor(); } - - void ms_edit(bool on) { if(plug) plug->Edit(on); } - void mg_edit(bool &ed) { ed = plug && plug->IsEdited(); } - void ms_vis(bool vis) { if(plug) plug->Visible(vis); } - void mg_vis(bool &vis) { vis = plug && plug->IsVisible(); } - - void mg_winx(int &x) const { x = plug?plug->GetX():0; } - void mg_winy(int &y) const { y = plug?plug->GetY():0; } - void mg_winw(int &x) const { x = plug?plug->GetW():0; } - void mg_winh(int &y) const { y = plug?plug->GetH():0; } - void ms_winx(int x) { if(plug) plug->SetX(x); } - void ms_winy(int y) { if(plug) plug->SetY(y); } - void ms_winw(int x) { if(plug) plug->SetW(x); } - void ms_winh(int y) { if(plug) plug->SetH(y); } - void ms_wincaption(bool c) { if(plug) plug->SetCaption(c); } - void mg_wincaption(bool &c) const { c = plug && plug->GetCaption(); } - void ms_winhandle(bool c) { if(plug) plug->SetHandle(c); } - void mg_winhandle(bool &c) const { c = plug && plug->GetHandle(); } - void ms_wintitle(const AtomList &t); - void mg_wintitle(AtomList &t) const { if(plug) { t(1); SetString(t[0],plug->GetTitle()); } } - void m_winfront() const { if(plug) plug->ToFront(); } - - void mg_chnsin(int &c) const { c = plug?plug->GetNumInputs():0; } - void mg_chnsout(int &c) const { c = plug?plug->GetNumOutputs():0; } - void mg_params(int &p) const { p = plug?plug->GetNumParams():0; } - void mg_programs(int &p) const { p = plug?plug->GetNumPrograms():0; } - void mg_progcats(int &p) const { p = plug?plug->GetNumCategories():0; } - void mg_plugname(const t_symbol *&s) const { s = plug?MakeSymbol(plug->GetName()):sym__; } - void mg_plugvendor(const t_symbol *&s) const { s = plug?MakeSymbol(plug->GetVendorName()):sym__; } - void mg_plugdll(const t_symbol *&s) const { s = plug?MakeSymbol(plug->GetDllName()):sym__; } - void mg_plugversion(int &v) const { v = plug?plug->GetVersion():0; } - void mg_issynth(bool &s) const { s = plug && plug->IsSynth(); } - - void m_print(int ac,const t_atom *av); - - void ms_program(int p) { if(plug && p >= 0) plug->SetCurrentProgram(p); } - void mg_program(int &p) const { p = plug?plug->GetCurrentProgram():0; } - void mg_progname(int argc,const t_atom *argv) const; - - void m_pname(int pnum); - void ms_paramnames(int cnt) { paramnames = cnt; if(plug) plug->ScanParams(cnt); } - - void ms_param(int pnum,float val); - void ms_params(int argc,const t_atom *argv); - void mg_param(int pnum); - void mg_params(int argc,const t_atom *argv); - void m_ptext(int pnum); - void m_ptexts(int argc,const t_atom *argv); - - void mg_channel(int &chn) const { chn = plug?plug->GetChannel():0; } - void ms_channel(int chn) { if(plug) plug->SetChannel(chn); } - - void m_note(int note,int vel); - void m_noteoff(int note) { m_note(note,0); } - void m_programchange(int ctrl_value) { if(plug) plug->AddProgramChange(ctrl_value); } - void m_ctrlchange(int control,int ctrl_value) { if(plug) plug->AddControlChange(control,ctrl_value); } - void m_aftertouch(int ctrl_value) { if(plug) plug->AddAftertouch(ctrl_value); } - void m_polyaftertouch(int note,int ctrl_value) { if(plug) plug->AddPolyAftertouch(note,ctrl_value); } - void m_pitchbend(int ctrl_value) { if(plug) plug->AddPitchBend(ctrl_value); } - - void mg_dumpevents(bool &ev) const { ev = plug?plug->GetEvents():false; } - void ms_dumpevents(bool ev) { if(plug) plug->SetEvents(ev); } - - void mg_playing(bool &p) { p = plug && plug->GetPlaying(); } - void ms_playing(bool p) { if(plug) plug->SetPlaying(p); } - void mg_looping(bool &p) { p = plug && plug->GetLooping(); } - void ms_looping(bool p) { if(plug) plug->SetLooping(p); } - void mg_feedback(bool &p) { p = plug && plug->GetFeedback(); } - void ms_feedback(bool p) { if(plug) plug->SetFeedback(p); } - void mg_samplepos(float &p) { p = plug?(float)plug->GetSamplePos():0; } - void ms_samplepos(float p) { if(plug) plug->SetSamplePos(p); } - void mg_ppqpos(float &p) { p = plug?(float)plug->GetPPQPos():0; } - void ms_ppqpos(float p) { if(plug) plug->SetPPQPos(p); } - void mg_tempo(float &p) { p = plug?(float)plug->GetTempo():0; } - void ms_tempo(float p) { if(plug) plug->SetTempo(p); } - void mg_barstart(float &p) { p = plug?(float)plug->GetBarStart():0; } - void ms_barstart(float p) { if(plug) plug->SetBarStart(p); } - void mg_cyclestart(float &p) { p = plug?(float)plug->GetCycleStart():0; } - void ms_cyclestart(float p) { if(plug) plug->SetCycleStart(p); } - void mg_cycleend(float &p) { p = plug?(float)plug->GetCycleEnd():0; } - void ms_cycleend(float p) { if(plug) plug->SetCycleEnd(p); } - void mg_cyclelength(float &p) { p = plug?(float)(plug->GetCycleEnd()-plug->GetCycleStart()):0; } - void ms_cyclelength(float p) { if(p) plug->SetCycleEnd(plug->GetCycleStart()+p); } - void mg_timesignom(int &p) { p = plug?plug->GetTimesigNom():0; } - void ms_timesignom(int p) { if(plug) plug->SetTimesigNom(p); } - void mg_timesigden(int &p) { p = plug?plug->GetTimesigDen():0; } - void ms_timesigden(int p) { if(plug) plug->SetTimesigDen(p); } - void mg_smpteoffset(int &p) { p = plug?plug->GetSmpteOffset():0; } - void ms_smpteoffset(int p) { if(plug) plug->SetSmpteOffset(p); } - void mg_smpterate(int &p) { p = plug?plug->GetSmpteRate():0; } - void ms_smpterate(int p) { if(plug) plug->SetSmpteRate(p); } - -private: - void display_parameter(int param,bool showparams); - - VSTPlugin *plug; - std::string plugname,subplug; - bool visible,bypass,mute; - int paramnames; - - int blsz; - bool (VSTPlugin::*vstfun)(t_sample **insigs,t_sample **outsigs,long n); - bool sigmatch; - t_sample **vstin,**vstout,**tmpin,**tmpout; - - void InitPlug(); - void ClearPlug(); - bool LoadPlug(); - void InitPlugDSP(); - void InitBuf(); - void ClearBuf(); - - static void Setup(t_classid); - - virtual void Respond(const t_symbol *sym,int argc = 0,const t_atom *argv = NULL); - - FLEXT_CALLBACK_V(m_print) - - FLEXT_CALLVAR_V(mg_plug,ms_plug) - FLEXT_CALLVAR_V(mg_subplug,ms_subplug) - FLEXT_CALLBACK(m_pluglist) - - FLEXT_CALLVAR_B(mg_edit,ms_edit) - FLEXT_CALLGET_B(mg_editor) - FLEXT_CALLVAR_B(mg_vis,ms_vis) - FLEXT_ATTRVAR_B(bypass) - FLEXT_ATTRVAR_B(mute) - - FLEXT_CALLVAR_I(mg_channel,ms_channel) - FLEXT_CALLBACK_II(m_note) - FLEXT_CALLBACK_I(m_noteoff) - FLEXT_CALLBACK_II(m_ctrlchange) - FLEXT_CALLBACK_I(m_aftertouch) - FLEXT_CALLBACK_II(m_polyaftertouch) - FLEXT_CALLBACK_I(m_pitchbend) - - FLEXT_CALLVAR_B(mg_dumpevents,ms_dumpevents) - - FLEXT_CALLBACK_I(m_programchange) - FLEXT_CALLVAR_I(mg_program,ms_program) - FLEXT_CALLBACK_V(mg_progname) - - FLEXT_CALLBACK_I(m_pname) - FLEXT_ATTRGET_I(paramnames) - FLEXT_CALLSET_I(ms_paramnames) - FLEXT_CALLBACK_2(ms_param,int,float) - FLEXT_CALLBACK_V(ms_params) - FLEXT_CALLBACK_I(mg_param) - FLEXT_CALLBACK_V(mg_params) - FLEXT_CALLBACK_I(m_ptext) - FLEXT_CALLBACK_V(m_ptexts) - - FLEXT_CALLVAR_I(mg_winx,ms_winx) - FLEXT_CALLVAR_I(mg_winy,ms_winy) - FLEXT_CALLVAR_I(mg_winw,ms_winw) - FLEXT_CALLVAR_I(mg_winh,ms_winh) - FLEXT_CALLVAR_B(mg_wincaption,ms_wincaption) - FLEXT_CALLVAR_B(mg_winhandle,ms_winhandle) - FLEXT_CALLVAR_V(mg_wintitle,ms_wintitle) - FLEXT_CALLBACK(m_winfront) - - FLEXT_CALLGET_I(mg_chnsin) - FLEXT_CALLGET_I(mg_chnsout) - FLEXT_CALLGET_I(mg_params) - FLEXT_CALLGET_I(mg_programs) - FLEXT_CALLGET_I(mg_progcats) - FLEXT_CALLGET_S(mg_plugname) - FLEXT_CALLGET_S(mg_plugvendor) - FLEXT_CALLGET_S(mg_plugdll) - FLEXT_CALLGET_I(mg_plugversion) - FLEXT_CALLGET_B(mg_issynth) - - FLEXT_CALLVAR_B(mg_playing,ms_playing) - FLEXT_CALLVAR_B(mg_looping,ms_looping) - FLEXT_CALLVAR_B(mg_feedback,ms_feedback) - FLEXT_CALLVAR_F(mg_samplepos,ms_samplepos) - FLEXT_CALLVAR_F(mg_ppqpos,ms_ppqpos) - FLEXT_CALLVAR_F(mg_tempo,ms_tempo) - FLEXT_CALLVAR_F(mg_barstart,ms_barstart) - FLEXT_CALLVAR_F(mg_cyclestart,ms_cyclestart) - FLEXT_CALLVAR_F(mg_cycleend,ms_cycleend) - FLEXT_CALLVAR_F(mg_cyclelength,ms_cyclelength) - FLEXT_CALLVAR_I(mg_timesignom,ms_timesignom) - FLEXT_CALLVAR_I(mg_timesigden,ms_timesigden) - FLEXT_CALLVAR_I(mg_smpteoffset,ms_smpteoffset) - FLEXT_CALLVAR_I(mg_smpterate,ms_smpterate) - - static const t_symbol *sym_progname,*sym_pname,*sym_param,*sym_ptext,*sym_pluglist; -}; - -FLEXT_NEW_DSP_V("vst~",vst); - - -const t_symbol *vst::sym_progname,*vst::sym_pname,*vst::sym_param,*vst::sym_ptext,*vst::sym_pluglist; - -void vst::Setup(t_classid c) -{ - post(""); - post("vst~ %s - VST plugin object, (C)2003-05 Thomas Grill",VST_VERSION); - post("based on the work of Jarno Seppänen and Mark Williamson"); - post(""); - - FLEXT_CADDATTR_VAR(c,"plug",mg_plug,ms_plug); - FLEXT_CADDATTR_VAR(c,"subplug",mg_subplug,ms_subplug); - FLEXT_CADDMETHOD_(c,0,"getpluglist",m_pluglist); - FLEXT_CADDATTR_VAR(c,"edit",mg_edit,ms_edit); - FLEXT_CADDATTR_GET(c,"editor",mg_editor); - FLEXT_CADDATTR_VAR(c,"vis",mg_vis,ms_vis); - FLEXT_CADDATTR_VAR1(c,"bypass",bypass); - FLEXT_CADDATTR_VAR1(c,"mute",mute); - FLEXT_CADDMETHOD_(c,0,"print",m_print); - - FLEXT_CADDATTR_VAR(c,"channel",mg_channel,ms_channel); - FLEXT_CADDMETHOD_I(c,0,"noteoff",m_noteoff); - FLEXT_CADDMETHOD_II(c,0,"note",m_note); - FLEXT_CADDMETHOD_II(c,0,"patouch",m_polyaftertouch); - FLEXT_CADDMETHOD_II(c,0,"ctlchg",m_ctrlchange); - FLEXT_CADDMETHOD_(c,0,"atouch",m_aftertouch); - FLEXT_CADDMETHOD_(c,0,"pbend",m_pitchbend); - - FLEXT_CADDATTR_VAR(c,"events",mg_dumpevents,ms_dumpevents); - - FLEXT_CADDMETHOD_(c,0,"progchg",m_programchange); - FLEXT_CADDATTR_VAR(c,"program",mg_program,ms_program); - FLEXT_CADDMETHOD_(c,0,"getprogname",mg_progname); - - FLEXT_CADDMETHOD_I(c,0,"getpname",m_pname); - FLEXT_CADDATTR_VAR(c,"pnames",paramnames,ms_paramnames); - FLEXT_CADDMETHOD_2(c,0,"param",ms_param,int,float); - FLEXT_CADDMETHOD_(c,0,"param",ms_params); - FLEXT_CADDMETHOD_(c,0,"getparam",mg_param); - FLEXT_CADDMETHOD_(c,0,"getparam",mg_params); - FLEXT_CADDMETHOD_(c,0,"getptext",m_ptext); - FLEXT_CADDMETHOD_(c,0,"getptext",m_ptexts); - - FLEXT_CADDATTR_VAR(c,"x",mg_winx,ms_winx); - FLEXT_CADDATTR_VAR(c,"y",mg_winy,ms_winy); - FLEXT_CADDATTR_VAR(c,"w",mg_winw,ms_winw); - FLEXT_CADDATTR_VAR(c,"h",mg_winh,ms_winh); - FLEXT_CADDATTR_VAR(c,"title",mg_wintitle,ms_wintitle); - FLEXT_CADDATTR_VAR(c,"caption",mg_wincaption,ms_wincaption); - FLEXT_CADDATTR_VAR(c,"handle",mg_winhandle,ms_winhandle); - FLEXT_CADDMETHOD_(c,0,"front",m_winfront); - - FLEXT_CADDATTR_GET(c,"ins",mg_chnsin); - FLEXT_CADDATTR_GET(c,"outs",mg_chnsout); - FLEXT_CADDATTR_GET(c,"params",mg_params); - FLEXT_CADDATTR_GET(c,"programs",mg_programs); - FLEXT_CADDATTR_GET(c,"progcats",mg_progcats); - FLEXT_CADDATTR_GET(c,"name",mg_plugname); - FLEXT_CADDATTR_GET(c,"vendor",mg_plugvendor); - FLEXT_CADDATTR_GET(c,"dll",mg_plugdll); - FLEXT_CADDATTR_GET(c,"version",mg_plugversion); - FLEXT_CADDATTR_GET(c,"synth",mg_issynth); - - FLEXT_CADDATTR_VAR(c,"playing",mg_playing,ms_playing); - FLEXT_CADDATTR_VAR(c,"looping",mg_looping,ms_looping); - FLEXT_CADDATTR_VAR(c,"feedback",mg_feedback,ms_feedback); - FLEXT_CADDATTR_VAR(c,"samplepos",mg_samplepos,ms_samplepos); - FLEXT_CADDATTR_VAR(c,"ppqpos",mg_ppqpos,ms_ppqpos); - FLEXT_CADDATTR_VAR(c,"tempo",mg_tempo,ms_tempo); - FLEXT_CADDATTR_VAR(c,"barstart",mg_barstart,ms_barstart); - FLEXT_CADDATTR_VAR(c,"loopstart",mg_cyclestart,ms_cyclestart); - FLEXT_CADDATTR_VAR(c,"loopend",mg_cycleend,ms_cycleend); - FLEXT_CADDATTR_VAR(c,"looplength",mg_cyclelength,ms_cyclelength); - FLEXT_CADDATTR_VAR(c,"timenom",mg_timesignom,ms_timesignom); - FLEXT_CADDATTR_VAR(c,"timeden",mg_timesigden,ms_timesigden); - FLEXT_CADDATTR_VAR(c,"smpteoffset",mg_smpteoffset,ms_smpteoffset); - FLEXT_CADDATTR_VAR(c,"smpterate",mg_smpterate,ms_smpterate); - - sym_progname = MakeSymbol("progname"); - sym_pname = MakeSymbol("pname"); - sym_param = MakeSymbol("param"); - sym_ptext = MakeSymbol("ptext"); - sym_pluglist = MakeSymbol("pluglist"); - - VSTPlugin::Setup(); - SetupEditor(); -} - -static int corefs = 0; - -vst::vst(int argc,const t_atom *argv): - plug(NULL),visible(false), - blsz(0), - vstfun(NULL),vstin(NULL),vstout(NULL),tmpin(NULL),tmpout(NULL), - bypass(false),mute(false),paramnames(0) -{ -#if FLEXT_OS == FLEXT_OS_WIN - // this is necessary for Waveshell - if(!corefs++) CoInitializeEx(NULL,COINIT_MULTITHREADED+COINIT_SPEED_OVER_MEMORY); -#endif - - int ins = 1,outs = 1; - if(argc >= 1 && CanbeInt(argv[0])) { ins = GetAInt(argv[0]); argc--,argv++; } - if(argc >= 1 && CanbeInt(argv[0])) { outs = GetAInt(argv[0]); argc--,argv++; } - - AddInSignal(ins); - AddOutSignal(outs); - - if(argc >= 1 && !ms_plug(argc,argv)) InitProblem(); -} - -vst::~vst() -{ - ClearPlug(); -#if FLEXT_OS == FLEXT_OS_WIN - if(!--corefs) CoUninitialize(); -#endif -} - -void vst::ClearPlug() -{ - if(plug) { - ClearBuf(); // needs valid plug - VSTPlugin::Delete(plug); - plug = NULL; - } -} - -void vst::InitPlug() -{ - FLEXT_ASSERT(plug); - - vstfun = plug->IsReplacing()?&VSTPlugin::processReplacing:&VSTPlugin::process; - sigmatch = plug->GetNumInputs() == CntInSig() && plug->GetNumOutputs() == CntOutSig(); - InitPlugDSP(); - - InitBuf(); - - plug->ScanParams(paramnames); -} - -void vst::InitPlugDSP() -{ - FLEXT_ASSERT(plug); - // this might be invalid if DSP is switched off, - // but the plug will get updated settings with m_dsp later - plug->DspInit(Samplerate(),Blocksize()); -} - -void vst::ClearBuf() -{ - if(!plug) return; - - if(vstin) { - for(int i = 0; i < plug->GetNumInputs(); ++i) FreeAligned(vstin[i]); - delete[] vstin; vstin = NULL; - delete[] tmpin; tmpin = NULL; - } - if(vstout) { - for(int i = 0; i < plug->GetNumOutputs(); ++i) FreeAligned(vstout[i]); - delete[] vstout; vstout = NULL; - delete[] tmpout; tmpout = NULL; - } -} - -void vst::InitBuf() -{ - FLEXT_ASSERT(!vstin && !tmpin && !vstout && !tmpout); - const int inputs = plug->GetNumInputs(),outputs = plug->GetNumOutputs(); - - int i; - - vstin = new t_sample *[inputs]; - tmpin = new t_sample *[inputs]; - for(i = 0; i < inputs; ++i) vstin[i] = (t_sample *)NewAligned(Blocksize()*sizeof(t_sample)); - - vstout = new t_sample *[outputs]; - tmpout = new t_sample *[outputs]; - for(i = 0; i < outputs; ++i) vstout[i] = (t_sample *)NewAligned(Blocksize()*sizeof(t_sample)); -} - -static std::string findFilePath(const std::string &path,const std::string &dllname) -{ -#if FLEXT_OS == FLEXT_OS_WIN - _chdir( path.c_str() ); - WIN32_FIND_DATA data; - HANDLE fh = FindFirstFile(dllname.c_str(),&data); - if(fh != INVALID_HANDLE_VALUE) { - FindClose(fh); - return path; - } -#endif -/* - CFileFind finder; - if(finder.FindFile( dllname )) - return path; - else { - finder.FindFile(); - while(finder.FindNextFile()) { - if(finder.IsDirectory()) { - if(!finder.IsDots()) { - CString *npath = new CString( finder.GetFilePath()); - const C *ret = findFilePath( *npath , dllname ); - if(ret) { - CString *retstr = new CString(ret); - return *retstr; - } - } - } - } - } -*/ - - return std::string(); -} - -// \todo this should be in the background, because it can take some time -// ideally vst would get a response from VSTPlugin when readily loaded and -// vst would dump out a respective signal to the patcher -bool vst::LoadPlug() -{ - if(plug) ClearPlug(); - - VSTPlugin *p = VSTPlugin::New(this); - - // try loading the dll from the raw filename - bool ok = p->Instance(plugname.c_str(),subplug.c_str()); - if(ok) - FLEXT_LOG("raw filename loaded fine"); - else { -#if FLEXT_SYS == FLEXT_SYS_PD - // try finding it on the PD path - char *name,dir[1024]; - int fd = open_via_path("",plugname.c_str(),".dll",dir,&name,sizeof(dir)-1,0); - if(fd > 0) close(fd); - else name = NULL; - - if(name) { - FLEXT_LOG("found VST dll on the PD path"); - // if dir is current working directory... name points to dir - if(dir == name) strcpy(dir,"."); - - std::string dllname(dir); - dllname += "\\"; - dllname += name; - - ok = p->Instance(dllname.c_str()); - } -#endif - } - - if(!ok) { - // try finding it on the VST path - char *vst_path = getenv("VST_PATH"); - - std::string dllname(plugname); - if(dllname.find(".dll") == -1) dllname += ".dll"; - - if(vst_path) { - FLEXT_LOG("found VST_PATH env variable"); - char* tok_path = new char[strlen( vst_path)+1]; - strcpy( tok_path , vst_path); - char *tok = strtok( tok_path , ";" ); - while( tok != NULL ) { - std::string abpath( tok ); - if( abpath[abpath.length()-1] != '\\' ) abpath += "\\"; - - FLEXT_LOG1("trying VST_PATH %s",(const char *)abpath.c_str()); - - std::string realpath = findFilePath( abpath , dllname ); - //post( "findFilePath( %s , %s ) = %s\n" , abpath , dllname , realpath ); - if ( realpath.length() ) { - realpath += plugname; - FLEXT_LOG1("trying %s",(const char *)realpath.c_str()); - - ok = p->Instance(realpath.c_str()); - if(ok) { - FLEXT_LOG("plugin loaded via VST_PATH"); - break; - } - } - - tok = strtok( NULL , ";" ); -// if(!tok) post("%s - couldn't find plugin",thisName()); - } - - delete[] tok_path; - } - } - - if(!ok) { - post("%s - unable to load plugin '%s'",thisName(),plugname.c_str()); - VSTPlugin::Delete(p); - } - else { - plug = p; - InitPlug(); - } - - return ok; -} - -static char *stripesc(char *buf) -{ -#if FLEXT_SYS == FLEXT_SYS_PD - // strip char escapes (only in newer/devel PD version) - char *cs = buf,*cd = cs; - while(*cs) { - if(*cs != '\\') *(cd++) = *cs; - ++cs; - } - *cd = 0; -#endif - return buf; -} - -bool vst::ms_plug(int argc,const t_atom *argv) -{ - ClearPlug(); - - plugname.clear(); - char buf[255]; - for(int i = 0; i < argc; i++) { - if(i > 0) plugname += ' '; - GetAString(argv[i],buf,sizeof buf); -#if FLEXT_OS == FLEXT_OS_WIN - strlwr(buf); -#endif - plugname += stripesc(buf); - } - - if(!plugname.length()) - return false; - else - return LoadPlug(); -} - -void vst::ms_subplug(int argc,const t_atom *argv) -{ - subplug.clear(); - char buf[255]; - for(int i = 0; i < argc; i++) { - if(i > 0) subplug += ' '; - GetAString(argv[i],buf,sizeof buf); - subplug += stripesc(buf); - } - - LoadPlug(); -} - -bool vst::CbDsp() -{ - if(plug) { - FLEXT_ASSERT(vstfun); - - InitPlugDSP(); - - if(blsz != Blocksize()) { - blsz = Blocksize(); - ClearBuf(); - InitBuf(); - } - } - return true; -} - -void vst::CbSignal() -{ - if(!plug || !plug->UniqueID() || mute) - flext_dsp::CbSignal(); - else if(bypass) { - const int n = Blocksize(); - t_sample *const *insigs = InSig(); - t_sample *const *outsigs = OutSig(); - - // copy as many channels as possible and zero dangling ones - - int i,mx = CntInSig(); - if(mx > CntOutSig()) mx = CntOutSig(); - if(mx == 1) { - CopySamples(outsigs[0],insigs[0],n); - i = 1; - } - else if(mx == 2) { - t_sample *o1 = outsigs[0],*o2 = outsigs[1]; - const t_sample *i1 = insigs[0],*i2 = insigs[1]; - for(int s = 0; s < n; ++s) { - const t_sample f = *(i1++); - *(o2++) = *(i2++); - *(o1++) = f; - } - i = 2; - } - else - for(i = 0; i < mx; ++i) { - // must copy via temporary buffer as ordering of output signals can collide with input signals - CopySamples(tmpin[i],insigs[i],n); - CopySamples(outsigs[i],tmpin[i],n); - } - - for(; i < CntOutSig(); ++i) - ZeroSamples(outsigs[i],n); - } - else if(sigmatch) { - if(!(plug->*vstfun)(const_cast(InSig()),const_cast(OutSig()),Blocksize())) { - for(int i = 0; i < CntOutSig(); ++i) - ZeroSamples(OutSig()[i],Blocksize()); - } - } - else { - const int inputs = plug->GetNumInputs(),outputs = plug->GetNumOutputs(); - const int cntin = CntInSig(),cntout = CntOutSig(); - const int n = Blocksize(); - t_sample *const *insigs = InSig(); - t_sample *const *outsigs = OutSig(); - t_sample **inv,**outv; - - if(inputs <= cntin) - inv = const_cast(insigs); - else { // more plug inputs than inlets - int i; - for(i = 0; i < cntin; ++i) tmpin[i] = const_cast(insigs[i]); - - // set dangling inputs to zero - // according to mode... (e.g. set zero) - for(; i < inputs; ++i) ZeroSamples(tmpin[i] = vstin[i],n); - - inv = tmpin; - } - - const bool more = outputs <= cntout; - if(more) // more outlets than plug outputs - outv = const_cast(outsigs); - else { - int i; - for(i = 0; i < cntout; ++i) tmpout[i] = outsigs[i]; - for(; i < outputs; ++i) tmpout[i] = vstout[i]; - - outv = tmpout; - } - - // call plugin DSP function - if(!(plug->*vstfun)(inv,outv,n)) { - for(int i = 0; i < outputs; ++i) - ZeroSamples(outsigs[i],n); - } - - if(more) { - // according to mode set dangling output vectors - - // currently simply clear them.... - for(int i = outputs; i < cntout; ++i) - ZeroSamples(outsigs[i],n); - } - } -} - -void vst::mg_progname(int argc,const t_atom *argv) const -{ - if(plug) { - int cat,pnum; - if(argc == 1 && CanbeInt(argv[0])) { - cat = -1,pnum = GetAInt(argv[0]); - } - else if(argc == 2 && CanbeInt(argv[0]) && CanbeInt(argv[1])) { - cat = GetAInt(argv[0]),pnum = GetAInt(argv[1]); - } - else pnum = -1; - - if(pnum >= 0) { - char str[256]; - plug->GetProgramName(cat,pnum,str); - - t_atom at[3]; - SetInt(at[0],cat); - SetInt(at[1],pnum); - SetString(at[2],str); - ToOutAnything(GetOutAttr(),sym_progname,3,at); - } - else - post("%s - Syntax: %s [category] program",thisName(),GetString(thisTag())); - } -} - -void vst::ms_wintitle(const AtomList &t) -{ - if(plug) { - char txt[256]; - t.Print(txt,sizeof txt); - plug->SetTitle(txt); - } -} - - /** - * display the parameters names and values and some other bits and pieces that - * may be of use - */ - -void vst::m_print(int ac,const t_atom *av) -{ - if(!plug) return; - - int i; - bool params = false; - bool header = true; - bool programs = false; - bool parameters = true; - int specific = -1; - if( ac > 0 ) { - for( i = 0 ; i < ac ; i++) { - if(IsString(av[i])) { - const char *buf = GetString(av[i]); - if ( strcmp( buf , "-params" ) == 0 ) { - params = true; - } - else if ( strcmp( buf , "-noheader" ) == 0 ) { - header = false; - } - else if ( strcmp( buf , "-programs" ) == 0 ) { - programs = true; - parameters = false; - } - else if ( strcmp( buf , "-parameters" ) == 0 ) { - parameters = false; - } - else if ( strcmp( buf , "-help" ) == 0 ) { - post("print options:"); - post("-help \t\tprint this"); - post("-programs \tshow the programs"); - post("-parameters \tshow the parameters"); - post("-params \tshow the parameter display values"); - post("-noheader \tdo not display the header"); - return; - } - } - else if(CanbeInt(av[i])) { - int p = GetAInt(av[i]); - if (( p > 0 ) && ( p <= plug->GetNumParams())) { - specific = p - 1; - } - } - } - } - - if ( header ) { - post("VST~ plugin: %s ", plug->GetName() ); - post("made by: %s ", plug->GetVendorName() ); - post("parameters %d\naudio: %d in(s)/%d out(s) \nLoaded from library \"%s\".\n", - plug->GetNumParams(), - CntInSig(), - CntOutSig(), - plug->GetDllName()); - - post("Flags"); - if ( plug->HasEditor() ) post("Has editor"); - if ( plug->IsReplacing() ) post("Can do replacing"); - } - - if ( parameters ) { - if ( specific == -1) { - for (i = 0; i < plug->GetNumParams(); i++) - display_parameter( i , params ); - } - else - display_parameter( specific , params); - } - - if( programs ) { - for( int j = 0; j < plug->GetNumCategories() ; j++ ) { - for( i = 0 ; i < plug->GetNumParams() ; i++ ) { - char buf[64]; - plug->GetProgramName( j , i , buf ); - post("Program %d: %s ", i , buf ); - } - } - } -} - - -void vst::display_parameter(int param,bool showparams) -{ - int j = param; - /* the Steinberg(tm) way... */ - char name[109]; - char display[164]; - float val; - -// if(j == 0) post ("Control input/output(s):"); - - memset (name, 0, sizeof(name)); - memset( display, 0 ,sizeof(display)); - plug->GetParamName( j , name ); - - if(*name) { - if (showparams) { -// plug->DescribeValue( j , display ); - plug->GetParamValue(j,display); - val = plug->GetParamValue( j ); - post ("parameter[#%d], \"%s\" value=%f (%s) ", j, name, val,display); - } - else { - val = plug->GetParamValue( j ); - post ("parameter[#%d], \"%s\" value=%f ", j, name, val); - } - } -} - -void vst::m_pname(int pnum) -{ - if(!plug || pnum < 0 || pnum >= plug->GetNumParams()) return; - - char name[256]; // how many chars needed? - plug->GetParamName(pnum,name); - - t_atom at[2]; - SetInt(at[0],pnum); - SetString(at[1],name); - ToOutAnything(GetOutAttr(),sym_pname,2,at); -} - -// set the value of a parameter -void vst::ms_param(int pnum,float val) -{ - if(!plug || pnum < 0 || pnum >= plug->GetNumParams()) return; - -// float xval = plug->GetParamValue( pnum ); -// if(xval <= 1.0f) // What's that???? - if(true) - { - plug->SetParamFloat( pnum, val ); -// if(echoparam) display_parameter(pnum , true ); - } - else - FLEXT_ASSERT(false); -} - -void vst::ms_params(int argc,const t_atom *argv) -{ - if(plug) { - char str[255]; *str = 0; - if(argc && CanbeFloat(argv[argc-1])) - PrintList(argc-1,argv,str,sizeof str); - - if(*str) { - int ix = plug->GetParamIx(str); - if(ix >= 0) - ms_param(ix,GetAFloat(argv[argc-1])); - else - post("%s %s - Parameter not found",thisName(),GetString(thisTag()),str); - } - else - post("%s - Syntax: %s name value",thisName(),GetString(thisTag())); - } -} - -void vst::mg_param(int pnum) -{ - if(!plug || pnum < 0 || pnum >= plug->GetNumParams()) return; - - t_atom at[2]; - SetInt(at[0],pnum); - SetFloat(at[1],plug->GetParamValue(pnum)); - ToOutAnything(GetOutAttr(),sym_param,2,at); -} - -void vst::mg_params(int argc,const t_atom *argv) -{ - if(plug) { - char str[255]; - PrintList(argc,argv,str,sizeof str); - - if(*str) { - int ix = plug->GetParamIx(str); - if(ix >= 0) - mg_param(ix); - else - post("%s %s - Parameter not found",thisName(),GetString(thisTag()),str); - } - else - post("%s - Syntax: %s name value",thisName(),GetString(thisTag())); - } -} - -void vst::m_ptext(int pnum) -{ - if(!plug || pnum < 0 || pnum >= plug->GetNumParams()) return; - - char display[256]; // how many chars needed? - memset(display,0,sizeof(display)); - plug->GetParamValue(pnum,display); - - t_atom at[2]; - SetInt(at[0],pnum); - SetString(at[1],display); - ToOutAnything(GetOutAttr(),sym_ptext,2,at); -} - -void vst::m_ptexts(int argc,const t_atom *argv) -{ - if(plug) { - char str[255]; - PrintList(argc,argv,str,sizeof str); - - if(*str) { - int ix = plug->GetParamIx(str); - if(ix >= 0) - m_ptext(ix); - else - post("%s %s - Parameter not found",thisName(),GetString(thisTag()),str); - } - else - post("%s - Syntax: %s name value",thisName(),GetString(thisTag())); - } -} - -void vst::m_note(int note,int velocity) -{ - if(!plug) return; - - if(velocity > 0) - plug->AddNoteOn(note,velocity); - else - plug->AddNoteOff(note); -} - -void vst::Respond(const t_symbol *sym,int argc,const t_atom *argv) -{ - FLEXT_ASSERT(sym); - ToOutAnything(GetOutAttr(),sym,argc,argv); -} diff --git a/externals/grill/vst/src/main.h b/externals/grill/vst/src/main.h deleted file mode 100644 index c395b63b..00000000 --- a/externals/grill/vst/src/main.h +++ /dev/null @@ -1,28 +0,0 @@ -/* -vst~ - VST plugin object for PD -based on the work of Jarno Seppänen and Mark Williamson - -Copyright (c)2003-2005 Thomas Grill (gr@grrrr.org) -For information on usage and redistribution, and for a DISCLAIMER OF ALL -WARRANTIES, see the file, "license.txt," in this distribution. -*/ - -#ifndef __VST_H -#define __VST_H - -#define FLEXT_ATTRIBUTES 1 - -#include - -#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 500) -#error You need at least flext version 0.5.0 -#endif - -#if FLEXT_OS == FLEXT_OS_WIN || FLEXT_OS == FLEXT_OS_MAC -// -#else -#error Platform not supported! -#endif - -#endif - diff --git a/externals/grill/vst/src/vst.rc b/externals/grill/vst/src/vst.rc deleted file mode 100644 index 8f8e368b..00000000 --- a/externals/grill/vst/src/vst.rc +++ /dev/null @@ -1,135 +0,0 @@ -// Microsoft Visual C++ generated resource script. -// -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "afxres.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// Englisch (USA) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) -#endif //_WIN32 - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,0,0,1 - PRODUCTVERSION 1,0,0,1 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x4L - FILETYPE 0x2L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "FileDescription", "vst~ external" - VALUE "FileVersion", "0,1, 0, 8" - VALUE "InternalName", "vst~" - VALUE "LegalCopyright", "Copyright (C) 2003-2005 Thomas Grill" - VALUE "OriginalFilename", "vst~.DLL" - VALUE "ProductName", "VST plugin object" - VALUE "ProductVersion", "0, 1, 0, 8" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END - -#endif // Englisch (USA) resources -///////////////////////////////////////////////////////////////////////////// - - -///////////////////////////////////////////////////////////////////////////// -// Deutsch (Österreich) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEA) -#ifdef _WIN32 -LANGUAGE LANG_GERMAN, SUBLANG_GERMAN_AUSTRIAN -#pragma code_page(1252) -#endif //_WIN32 - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#include ""afxres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE -BEGIN - "#define _AFX_NO_SPLITTER_RESOURCES\r\n" - "#define _AFX_NO_OLE_RESOURCES\r\n" - "#define _AFX_NO_TRACKER_RESOURCES\r\n" - "#define _AFX_NO_PROPERTY_RESOURCES\r\n" - "\r\n" - "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n" - "#ifdef _WIN32\r\n" - "LANGUAGE 9, 1\r\n" - "#pragma code_page(1252)\r\n" - "#endif //_WIN32\r\n" - "#include ""afxres.rc"" // Standard components\r\n" - "#endif\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - -#endif // Deutsch (Österreich) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// -#define _AFX_NO_SPLITTER_RESOURCES -#define _AFX_NO_OLE_RESOURCES -#define _AFX_NO_TRACKER_RESOURCES -#define _AFX_NO_PROPERTY_RESOURCES - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE 9, 1 -#pragma code_page(1252) -#endif //_WIN32 -#include "afxres.rc" // Standard components -#endif - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - diff --git a/externals/grill/vst/src/vstedit.cpp b/externals/grill/vst/src/vstedit.cpp deleted file mode 100644 index 1536b9d3..00000000 --- a/externals/grill/vst/src/vstedit.cpp +++ /dev/null @@ -1,82 +0,0 @@ -/* -vst~ - VST plugin object for PD -based on the work of Jarno Seppänen and Mark Williamson - -Copyright (c)2003-2005 Thomas Grill (gr@grrrr.org) -For information on usage and redistribution, and for a DISCLAIMER OF ALL -WARRANTIES, see the file, "license.txt," in this distribution. -*/ - -#include "vsthost.h" -#include "editor.h" - - -void VSTPlugin::Edit(bool open) -{ - if(Is()) { - if(open) { - if(HasEditor() && !IsEdited()) - StartEditor(this); - } - else if(IsEdited()) - StopEditor(this); - } -} - -void VSTPlugin::StartEditing(WHandle h) -{ - FLEXT_ASSERT(h != NULL); - Dispatch(effEditOpen,0,0,hwnd = h); - - TitleEditor(this,title.c_str()); -} - -void VSTPlugin::StopEditing() -{ - if(Is() && IsEdited()) - Dispatch(effEditClose); -} - -void VSTPlugin::Visible(bool vis,bool upd) -{ - visible = vis; - if(upd && Is() && IsEdited()) ShowEditor(this,vis); -} - -void VSTPlugin::SetPos(int x,int y,bool upd) -{ - posx = x; posy = y; - if(upd && Is() && IsEdited()) MoveEditor(this,posx,posy); -} - -void VSTPlugin::SetSize(int x,int y,bool upd) -{ - sizex = x; sizey = y; - if(upd && Is() && IsEdited()) SizeEditor(this,sizex,sizey); -} - -void VSTPlugin::SetCaption(bool c) -{ - caption = c; - if(Is() && IsEdited()) CaptionEditor(this,c); -} - -void VSTPlugin::SetHandle(bool h) -{ - handle = h; - if(Is() && IsEdited()) HandleEditor(this,h); -} - -void VSTPlugin::SetTitle(const char *t) -{ - title = t; - if(Is() && IsEdited()) TitleEditor(this,t); -} - -void VSTPlugin::ToFront() -{ - if(Is() && IsEdited()) { - FrontEditor(this); - Dispatch(effEditTop,0,0,vendorname); - } -} diff --git a/externals/grill/vst/src/vsthost.cpp b/externals/grill/vst/src/vsthost.cpp deleted file mode 100644 index 3fd1a935..00000000 --- a/externals/grill/vst/src/vsthost.cpp +++ /dev/null @@ -1,461 +0,0 @@ -/* -vst~ - VST plugin object for PD -based on the work of Jarno Seppänen and Mark Williamson - -Copyright (c)2003-2005 Thomas Grill (gr@grrrr.org) -For information on usage and redistribution, and for a DISCLAIMER OF ALL -WARRANTIES, see the file, "license.txt," in this distribution. -*/ - -#include "vsthost.h" -#include "editor.h" -#include -#include "flcontainers.h" - -const t_symbol - *VSTPlugin::sym_param, - *VSTPlugin::sym_event, - *VSTPlugin::sym_evmidi, - *VSTPlugin::sym_evaudio, - *VSTPlugin::sym_evvideo, - *VSTPlugin::sym_evparam, - *VSTPlugin::sym_evtrigger, - *VSTPlugin::sym_evsysex, - *VSTPlugin::sym_ev_, - *VSTPlugin::sym_midi[8]; - - -class DelPlugin - : public Fifo::Cell -{ -public: - DelPlugin(VSTPlugin *p): plug(p) {} - VSTPlugin *plug; -}; - -static TypedLifo todel; -flext::ThrCond VSTPlugin::thrcond; - -void VSTPlugin::Setup() -{ - LaunchThread(worker); - - sym_param = flext::MakeSymbol("param"); - sym_event = flext::MakeSymbol("event"); - sym_evmidi = flext::MakeSymbol("midi"); - sym_evaudio = flext::MakeSymbol("audio"); - sym_evvideo = flext::MakeSymbol("video"); - sym_evparam = flext::MakeSymbol("param"); - sym_evtrigger = flext::MakeSymbol("trigger"); - sym_evsysex = flext::MakeSymbol("sysex"); - sym_ev_ = flext::MakeSymbol("???"); - - sym_midi[0] = flext::MakeSymbol("noteoff"); - sym_midi[1] = flext::MakeSymbol("note"); - sym_midi[2] = flext::MakeSymbol("atouch"); - sym_midi[3] = flext::MakeSymbol("ctlchg"); - sym_midi[4] = flext::MakeSymbol("progchg"); - sym_midi[5] = flext::MakeSymbol("atouch"); - sym_midi[6] = flext::MakeSymbol("pbend"); - sym_midi[7] = flext::MakeSymbol("sysex"); -} - -VSTPlugin::VSTPlugin(Responder *resp) - : effect(NULL),pluginmain(NULL),audiomaster(NULL) -#if FLEXT_OS == FLEXT_OS_WIN - , hdll(NULL) -#endif - , hwnd(NULL) - , responder(resp) - , posx(0),posy(0),sizex(0),sizey(0) - , visible(true),caption(true),handle(false) - , midichannel(0),eventqusz(0),dumpevents(false) - , paramnamecnt(0) - , transchg(true) - , playing(false),looping(false),feedback(false) - , samplerate(0) - , samplepos(0),ppqpos(0) - , tempo(120) - , timesignom(4),timesigden(4) - , barstartpos(0) - , cyclestartpos(0),cycleendpos(0) - , smpteoffset(0),smpterate(0) -{} - -VSTPlugin::~VSTPlugin() -{ - Free(); -} - -VSTPlugin *VSTPlugin::New(Responder *resp) -{ - FLEXT_ASSERT(resp); - return new VSTPlugin(resp); -} - -void VSTPlugin::Delete(VSTPlugin *p) -{ - FLEXT_ASSERT(p); - - // tell plugin to close editor! - StopEditor(p); - // transfer to deletion thread - todel.Push(new DelPlugin(p)); - thrcond.Signal(); -} - -void VSTPlugin::worker(thr_params *) -{ - TypedLifo tmp; - bool again = false; - for(;;) { - // wait for signal - if(again) { - thrcond.TimedWait(0.01); - again = false; - } - else - thrcond.Wait(); - - DelPlugin *p; - while((p = todel.Pop()) != NULL) { - // see if editing has stopped - if(p && p->plug->hwnd == NULL) { - // yes, it is now safe to delete the plug - post("DELETE %s",p->plug->dllname.c_str()); - delete p->plug; - delete p; - } - else { - tmp.Push(p); - again = true; - } - } - - // put back remaining entries - while((p = tmp.Pop()) != NULL) todel.Push(p); - } -} - -#if FLEXT_OS == FLEXT_OS_MAC -OSStatus FSPathMakeFSSpec(const UInt8 *path,FSSpec *spec,Boolean *isDirectory) /* can be NULL */ -{ - OSStatus result; - FSRef ref; - - /* check parameters */ - require_action(NULL != spec, BadParameter, result = paramErr); - - /* convert the POSIX path to an FSRef */ - result = FSPathMakeRef(path, &ref, isDirectory); - require_noerr(result, FSPathMakeRef); - - /* and then convert the FSRef to an FSSpec */ - result = FSGetCatalogInfo(&ref, kFSCatInfoNone, NULL, NULL, spec, NULL); - require_noerr(result, FSGetCatalogInfo); - -FSGetCatalogInfo: -FSPathMakeRef: -BadParameter: - return result; -} -#endif - -// hdll, pluginmain and audiomaster are set here -// must be NULL beforehand! -bool VSTPlugin::NewPlugin(const char *plugname) -{ - FLEXT_ASSERT(!pluginmain && !audiomaster); - - dllname = plugname; - -#if FLEXT_OS == FLEXT_OS_WIN - hdll = LoadLibraryEx(dllname.c_str(),NULL,0 /*DONT_RESOLVE_DLL_REFERENCES*/); -/* - char buf[255],*c; - strcpy(buf,dllname.c_str()); - for(c = buf; *c; ++c) - if(*c == '/') - *c = '\\'; - char *sl = strrchr(buf,'\\'); - if(sl) *sl = 0; - SetCurrentDirectory(buf); - hdll = LoadLibrary(dllname.c_str()); -*/ - if(hdll) pluginmain = (PVSTMAIN)GetProcAddress(hdll,"main"); - audiomaster = Master; - -#elif FLEXT_OS == FLEXT_OS_MAC - short resFileID; - FSSpec spec; - OSErr err; - - err = FSPathMakeFSSpec(dllname.c_str(),&spec,NULL); - resFileID = FSpOpenResFile(&spec, fsRdPerm); - short cResCB = Count1Resources('aEff'); - - for(int i = 0; i < cResCB; i++) { - Handle codeH; - CFragConnectionID connID; - Ptr mainAddr; - Str255 errName; - Str255 fragName; - char fragNameCStr[256]; - short resID; - OSType resType; - - codeH = Get1IndResource('aEff', short(i+1)); - if(!codeH) continue; - - GetResInfo(codeH, &resID, &resType, fragName); - DetachResource(codeH); - HLock(codeH); - - err = GetMemFragment(*codeH, - GetHandleSize(codeH), - fragName, - kPrivateCFragCopy, - &connID, (Ptr *) & mainAddr, errName); - - if(!err) { - #ifdef __CFM__ - pluginmain = (PVSTMAIN)NewMachOFromCFM(mainAddr); - #else - pluginmain = (PVSTMAIN)mainAddr; - #endif - } - } - CloseResFile(resFileID); - - audiomaster = -#ifdef __CFM__ - NewCFMFromMachO(Master); -#else - Master; -#endif - -#else -#error Platform not supported -#endif - - if(pluginmain && audiomaster) - return true; - else { - FreePlugin(); - return false; - } -} - -void VSTPlugin::FreePlugin() -{ -#if FLEXT_OS == FLEXT_OS_WIN - if(hdll) { FreeLibrary(hdll); hdll = NULL; } -#elif FLEXT_OS == FLEXT_OS_MAC - -#ifdef __MACOSX__ -#ifdef __CFM__ - if(audiomaster) DisposeCFMFromMachO(audiomaster); - if(pluginmain) DisposeMachOFromCFM(pluginmain); -#endif -#endif - -#else -#error Platform not supported -#endif - - effect = NULL; - audiomaster = NULL; - pluginmain = NULL; -} - -/* -This is static to be able to communicate between the plugin methods -and the static Audiomaster function -the this (plugin->user) pointer has not been initialized at the point it is needed -static should not be a problem, as we are single-threaded and it is immediately -queried in a called function -*/ -long VSTPlugin::uniqueid = 0; - -std::string VSTPlugin::dllloading; - -bool VSTPlugin::InstPlugin(long plugid) -{ - uniqueid = plugid; - dllloading = dllname; - - FLEXT_ASSERT(pluginmain && audiomaster); - - //This calls the "main" function and receives the pointer to the AEffect structure. - try { effect = pluginmain(audiomaster); } - catch(std::exception &e) { - flext::post("vst~ - caught exception while instantiating plugin: %s",e.what()); - } - catch(...) { - flext::post("vst~ - caught exception while instantiating plugin"); - } - - if(!effect) - return false; - else if(effect->magic != kEffectMagic) { - effect = NULL; - return false; - } - return true; -} - -bool VSTPlugin::Instance(const char *name,const char *subname) -{ - bool ok = false; - FLEXT_ASSERT(effect == NULL); - - try { - -/* - if(!ok && dllname != name) { - FreePlugin(); - // freshly load plugin - ok = NewPlugin(name) && InstPlugin(); - } -*/ - ok = NewPlugin(name) && InstPlugin(); - - if(ok && subname && *subname && Dispatch(effGetPlugCategory) == kPlugCategShell) { - // sub plugin-name given -> scan plugs - - long plugid; - char tmp[64]; - - // Waves5 continues with the next plug after the last loaded - // that's not what we want - workaround: swallow all remaining - while((plugid = Dispatch(effShellGetNextPlugin,0,0,tmp))) {} - - // restart from the beginning - while((plugid = Dispatch(effShellGetNextPlugin,0,0,tmp))) { - // subplug needs a name - FLEXT_LOG1("subplug %s",tmp); - if(!strcmp(subname,tmp)) - // found - break; - } - - // re-init with plugid set - if(plugid) ok = InstPlugin(plugid); - } - - if(ok) { - //init plugin - effect->user = this; - ok = Dispatch(effOpen) == 0; - } - - if(ok) { - ok = Dispatch(effIdentify) == 'NvEf'; - } - - if(ok) { - *productname = 0; - long ret = Dispatch(effGetProductString,0,0,productname); - - if(!*productname) { - // no product name given by plugin -> extract it from the filename - - std::string str1(dllname); - std::string::size_type slpos = str1.rfind('\\'); - if(slpos == std::string::npos) { - slpos = str1.rfind('/'); - if(slpos == std::string::npos) - slpos = 0; - else - ++slpos; - } - else - ++slpos; - std::string str2 = str1.substr(slpos); - int snip = str2.find('.'); - if( snip != std::string::npos ) - str1 = str2.substr(0,snip); - else - str1 = str2; - strcpy(productname,str1.c_str()); - } - - if(*productname) { - char tmp[512]; - sprintf(tmp,"vst~ - %s",productname); - title = tmp; - } - else - title = "vst~"; - - *vendorname = 0; - Dispatch(effGetVendorString,0,0,vendorname); - } - - } - catch(std::exception &e) { - flext::post("vst~ - caught exception while loading plugin: %s",e.what()); - ok = false; - } - catch(...) { - flext::post("vst~ - Caught exception while loading plugin"); - ok = false; - } - - if(!ok) Free(); - return ok; -} - -void VSTPlugin::Free() -{ - // This should only also in destruction - - try { - if(effect) { - FLEXT_ASSERT(!IsEdited()); - - // shut down plugin - Dispatch(effMainsChanged, 0, 0); - Dispatch(effClose); - } - } - catch(...) {} - - FreePlugin(); -} - -void VSTPlugin::DspInit(float sr,int blsz) -{ - try { - // sample rate and block size must _first_ be set - Dispatch(effSetSampleRate,0,0,NULL,samplerate = sr); - Dispatch(effSetBlockSize, 0,blsz); - // then signal that mains have changed! - Dispatch(effMainsChanged,0,1); - } - catch(std::exception &e) { - flext::post("vst~ - caught exception while initializing dsp: %s",e.what()); - } - catch(...) { - flext::post("vst~ - caught exception while initializing dsp"); - } -} - -void VSTPlugin::ListPlugs(const t_symbol *sym) const -{ - if(responder) { - if(Is() && Dispatch(effGetPlugCategory) == kPlugCategShell) { - t_atom at; - // sub plugin-name given -> scan plugs - char tmp[64]; - // scan shell for subplugins - while(Dispatch(effShellGetNextPlugin,0,0,tmp)) { - SetString(at,tmp); - responder->Respond(sym,1,&at); - } - } - - // bang - responder->Respond(sym); - } -} diff --git a/externals/grill/vst/src/vsthost.h b/externals/grill/vst/src/vsthost.h deleted file mode 100644 index 00225b62..00000000 --- a/externals/grill/vst/src/vsthost.h +++ /dev/null @@ -1,357 +0,0 @@ -/* -vst~ - VST plugin object for PD -based on the work of Jarno Seppänen and Mark Williamson - -Copyright (c)2003-2005 Thomas Grill (gr@grrrr.org) -For information on usage and redistribution, and for a DISCLAIMER OF ALL -WARRANTIES, see the file, "license.txt," in this distribution. -*/ - -#ifndef __VSTHOST_H -#define __VSTHOST_H - -#include -#include -#include -#include - -#include "AEffectx.h" -#include "AEffEditor.hpp" - - -#if FLEXT_OS == FLEXT_OS_WIN -#include -typedef HWND WHandle; -typedef HMODULE MHandle; -#elif FLEXT_OS == FLEXT_OS_MAC -#include -typedef Handle WHandle; -typedef void *MHandle; -#else -#error Platform not supported! -#endif - - -#define MIDI_MAX_EVENTS 64 - -class Responder -{ -public: - virtual void Respond(const t_symbol *sym,int argc = 0,const t_atom *argv = NULL) = 0; -}; - - -class VSTPlugin: - public flext -{ -public: - static VSTPlugin *New(Responder *resp); - static void Delete(VSTPlugin *p); - - static void Setup(); - - bool Instance(const char *plug,const char *subplug = NULL); - void DspInit(float samplerate,int blocksize); - -private: - VSTPlugin(Responder *resp); - ~VSTPlugin(); - - static ThrCond thrcond; - static void worker(thr_params *p); - - void Free(); - - ////////////////////////////////////////////////////////////////////////////// - -public: - bool Is() const { return effect != NULL; } - - long GetVersion() const { return effect->version; } - - bool IsSynth() const { return HasFlags(effFlagsIsSynth); } - bool IsReplacing() const { return HasFlags(effFlagsCanReplacing); } - bool HasEditor() const { return HasFlags(effFlagsHasEditor); } - - const char *GetName() const { return productname; } - const char *GetVendorName() const { return vendorname; } - const char *GetDllName() const { return dllname.c_str(); } - - long UniqueID() const { return effect->uniqueID; } - - int GetNumInputs() const { return effect->numInputs; } - int GetNumOutputs() const { return effect->numOutputs; } - - void ListPlugs(const t_symbol *sym) const; - -private: - char productname[300]; - char vendorname[300]; - std::string dllname; // Contains dll name - - ////////////////////////////////////////////////////////////////////////////// - -public: - int GetNumParams() const { return effect?effect->numParams:0; } - void GetParamName(int numparam,char *name) const; - void GetParamValue(int numparam,char *parval) const; - float GetParamValue(int numparam) const; - - // scan plugin names (can take a _long_ time!!) - void ScanParams(int i = -1); - // get number of scanned parameters - int ScannedParams() const { return paramnamecnt; } - // get index of named (scanned) parameter... -1 if not found - int GetParamIx(const char *p) const; - - bool SetParamFloat(int parameter, float value); - bool SetParamInt(int parameter, int value) { return SetParamFloat(parameter,value/65535.0f); } - - void SetCurrentProgram(int prg) { Dispatch(effSetProgram,0,prg); } - int GetCurrentProgram() const { return Dispatch(effGetProgram); } - int GetNumPrograms() const { return effect->numPrograms; } - - int GetNumCategories() const { return Dispatch(effGetNumProgramCategories); } - bool GetProgramName(int cat,int p,char* buf) const; - -private: - struct NameCmp: - std::less - { - bool operator()(const std::string &a,const std::string &b) const { return a.compare(b) < 0; } - }; - - typedef std::map NameMap; - int paramnamecnt; - NameMap paramnames; - - ////////////////////////////////////////////////////////////////////////////// - -public: - void SetPos(int x,int y,bool upd = true); - void SetSize(int x,int y,bool upd = true); - void SetX(int x,bool upd = true) { SetPos(x,posy,upd); } - void SetY(int y,bool upd = true) { SetPos(posx,y,upd); } - void SetW(int x,bool upd = true) { SetSize(x,sizey,upd); } - void SetH(int y,bool upd = true) { SetSize(sizex,y,upd); } - int GetX() const { return posx; } - int GetY() const { return posy; } - int GetW() const { return sizex; } - int GetH() const { return sizey; } - void SetCaption(bool b); - bool GetCaption() const { return caption; } - void SetHandle(bool h); - bool GetHandle() const { return handle; } - void SetTitle(const char *t); - const char *GetTitle() const { return title.c_str(); } - - void ToFront(); - - void Edit(bool open); - - void StartEditing(WHandle h); - void StopEditing(); - bool IsEdited() const { return hwnd != NULL; } - WHandle EditorHandle() const { return hwnd; } - void EditingEnded() { hwnd = NULL; thrcond.Signal(); } - - void GetEditorRect(ERect &er) const { ERect *r; Dispatch(effEditGetRect,0,0,&r); er = *r; } - void EditorIdle() { Dispatch(effEditIdle); } - - void Visible(bool vis,bool upd = true); - bool IsVisible() const { return visible; } - - void Paint(ERect &r) const { Dispatch(effEditDraw,0,0,&r); } - -private: - bool visible; - int posx,posy,sizex,sizey; // Window position - bool caption; // Window border - bool handle; // Window handle (like taskbar button) - std::string title; // Window title - - ////////////////////////////////////////////////////////////////////////////// - -public: - enum { - MIDI_NOTEOFF = 0x80, - MIDI_NOTEON = 0x90, - MIDI_POLYAFTERTOUCH = 0xa0, - MIDI_CONTROLCHANGE = 0xb0, - MIDI_PROGRAMCHANGE = 0xc0, - MIDI_AFTERTOUCH = 0xd0, - MIDI_PITCHBEND = 0xe0, - MIDI_SYSEX = 0xf0, - }; - - void SetEvents(bool ev) { dumpevents = ev; } - bool GetEvents() const { return dumpevents; } - - bool AddMIDI(unsigned char data0,unsigned char data1 = 0,unsigned char data2 = 0); - - static int range(int value,int mn = 0,int mx = 127) { return value < mn?mn:(value > mx?mx:value); } - - void SetChannel(int channel) { midichannel = range(channel,0,0xf); } - int GetChannel() const { return midichannel; } - - bool AddNoteOn(unsigned char note,unsigned char speed /*,unsigned char midichannel = 0*/) - { - return AddMIDI(MIDI_NOTEON+midichannel,note,speed); - } - - bool AddNoteOff(unsigned char note /*,unsigned char midichannel = 0*/) - { - return AddMIDI(MIDI_NOTEOFF+midichannel,note,0); - } - - void AddControlChange(int control,int value) - { - AddMIDI(MIDI_CONTROLCHANGE+midichannel,range(control),range(value)); - } - - void AddProgramChange(int value) - { - AddMIDI(MIDI_PROGRAMCHANGE+midichannel,range(value),0); - } - - void AddPitchBend(int value) - { - AddMIDI(MIDI_PITCHBEND+midichannel,(value&127),((value>>7)&127)); - } - - void AddAftertouch(int value) - { - AddMIDI(MIDI_AFTERTOUCH+midichannel,range(value)); - } - - void AddPolyAftertouch(unsigned char note,int value) - { - AddMIDI(MIDI_POLYAFTERTOUCH+midichannel,note,range(value)); - } - -private: - void SendMidi(); - - // static VstTimeInfo _timeInfo; - VstMidiEvent midievent[MIDI_MAX_EVENTS]; - VstEvents events; - int eventqusz; - - char midichannel; - bool dumpevents; - - ////////////////////////////////////////////////////////////////////////////// - -public: - - void SetPlaying(bool p) { if(playing != p) transchg = true,playing = p; } - bool GetPlaying() const { return playing; } - void SetLooping(bool p) { if(looping != p) transchg = true,looping = p; } - bool GetLooping() const { return looping; } - void SetFeedback(bool p) { feedback = p; } - bool GetFeedback() const { return feedback; } - - void SetSamplePos(double p) { if(samplepos != p) transchg = true,samplepos = p; } - double GetSamplePos() const { return samplepos; } - void SetTempo(double p) { if(tempo != p) transchg = true,tempo = p; } - double GetTempo() const { return tempo; } - void SetPPQPos(double p) { if(ppqpos != p) transchg = true,ppqpos = p; } - double GetPPQPos() const { return ppqpos; } - - void SetTimesigNom(int p) { if(timesignom != p) transchg = true,timesignom = p; } - int GetTimesigNom() const { return timesignom; } - void SetTimesigDen(int p) { if(timesigden != p) transchg = true,timesigden = p; } - int GetTimesigDen() const { return timesigden; } - void SetBarStart(double p) { if(barstartpos != p) transchg = true,barstartpos = p; } - double GetBarStart() const { return barstartpos; } - void SetCycleStart(double p) { if(cyclestartpos != p) transchg = true,cyclestartpos = p; } - double GetCycleStart() const { return cyclestartpos; } - void SetCycleEnd(double p) { if(cycleendpos != p) transchg = true,cycleendpos = p; } - double GetCycleEnd() const { return cycleendpos; } - - void SetSmpteOffset(int p) { if(smpteoffset != p) transchg = true,smpteoffset = p; } - int GetSmpteOffset() const { return smpteoffset; } - void SetSmpteRate(int p) { if(smpterate != p) transchg = true,smpterate = p; } - int GetSmpteRate() const { return smpterate; } - -private: - - bool playing,looping,feedback; - float samplerate; - bool transchg; - - double samplepos,tempo; - double ppqpos; - - int timesignom,timesigden; - double barstartpos; - double cyclestartpos,cycleendpos; - int smpteoffset,smpterate; - - ////////////////////////////////////////////////////////////////////////////// - -public: - bool processReplacing(float **inputs,float **outputs,long sampleframes ) - { - FLEXT_ASSERT(effect); - effect->processReplacing(effect,inputs,outputs,sampleframes); - if(playing) updatepos(sampleframes); - return true; - } - - bool process(float **inputs,float **outputs,long sampleframes ) - { - FLEXT_ASSERT(effect); - effect->process(effect,inputs,outputs,sampleframes); - return true; - } - -private: - - void updatepos(long frames); - - ////////////////////////////////////////////////////////////////////////////// - -private: - Responder *responder; - - bool NewPlugin(const char *plugname); - void FreePlugin(); - bool InstPlugin(long plugid = 0); - - static long uniqueid; - static std::string dllloading; - - inline long GetFlags() const { return effect?effect->flags:0; } - inline bool HasFlags(long msk) const { return effect && (effect->flags&msk); } - - -#if FLEXT_OS == FLEXT_OS_WIN - // the handle to the shared library - MHandle hdll; -#endif - // the handle to the plugin editor window - WHandle hwnd; - // the VST plugin instance - AEffect *effect; - - typedef AEffect *(VSTCALLBACK *PVSTMAIN)(audioMasterCallback audioMaster); - PVSTMAIN pluginmain; - audioMasterCallback audiomaster; - - long Dispatch(long opCode,long index = 0,long value = 0,void *ptr = NULL,float opt = 0) const - { - FLEXT_ASSERT(effect); - return effect->dispatcher(effect,opCode,index,value,ptr,opt); - } - - static long VSTCALLBACK Master(AEffect *effect, long opcode, long index, long value, void *ptr, float opt); - - static const t_symbol *sym_param; - static const t_symbol *sym_event,*sym_evmidi,*sym_evaudio,*sym_evvideo,*sym_evparam,*sym_evtrigger,*sym_evsysex,*sym_ev_; - static const t_symbol *sym_midi[8]; - - void ProcessEvent(const VstEvent &ev); -}; - -#endif diff --git a/externals/grill/vst/src/vstmaster.cpp b/externals/grill/vst/src/vstmaster.cpp deleted file mode 100644 index 6730a647..00000000 --- a/externals/grill/vst/src/vstmaster.cpp +++ /dev/null @@ -1,282 +0,0 @@ -/* -vst~ - VST plugin object for PD -based on the work of Jarno Seppänen and Mark Williamson - -Copyright (c)2003-2005 Thomas Grill (gr@grrrr.org) -For information on usage and redistribution, and for a DISCLAIMER OF ALL -WARRANTIES, see the file, "license.txt," in this distribution. -*/ - -#include "vsthost.h" - -static const int VST_VERSION = 100; -static const char *vendor = "grrrr.org"; -static const char *product = "vst~"; - - -void VSTPlugin::ProcessEvent(const VstEvent &ev) -{ - if(!responder && dumpevents) return; - - if(ev.type == kVstMidiType) { - const VstMidiEvent &mev = (const VstMidiEvent &)ev; - t_atom lst[10]; - SetSymbol(lst[0],sym_evmidi); - int midi = ((unsigned char)mev.midiData[0]>>4)-8; - FLEXT_ASSERT(midi >= 0 && midi < 8); - SetSymbol(lst[1],sym_midi[midi]); - SetInt(lst[2],(unsigned char)mev.midiData[0]&0x0f); - SetInt(lst[3],(unsigned char)mev.midiData[1]); - SetInt(lst[4],(unsigned char)mev.midiData[2]); - // what about running status? (obviously not possible) - SetInt(lst[5],mev.deltaFrames); - SetInt(lst[6],mev.noteLength); - SetInt(lst[7],mev.noteOffset); - SetInt(lst[8],(int)mev.detune); - SetInt(lst[9],(int)mev.noteOffVelocity); - responder->Respond(sym_event,9,lst); - } - else { - const t_symbol *sym; - if(ev.type == kVstAudioType) - sym = sym_evaudio; - else if(ev.type == kVstVideoType) - sym = sym_evvideo; - else if(ev.type == kVstParameterType) - sym = sym_evparam; - else if(ev.type == kVstTriggerType) - sym = sym_evtrigger; - else if(ev.type == kVstSysExType) - sym = sym_evsysex; - else - sym = sym_ev_; - - int data = ev.byteSize-sizeof(ev.deltaFrames)-sizeof(ev.flags); - const int stsize = 16; - t_atom stlst[stsize]; - t_atom *lst = data+3 > stsize?new t_atom[data+3]:stlst; - - SetSymbol(lst[0],sym); - SetInt(lst[1],ev.deltaFrames); - SetInt(lst[2],ev.flags); - for(int i = 0; i < data; ++i) SetInt(lst[3],(unsigned char)ev.data[i]); - - responder->Respond(sym_event,data+3,lst); - - if(lst != stlst) delete[] lst; - } -} - -// Host callback dispatcher -long VSTPlugin::Master(AEffect *effect, long opcode, long index, long value, void *ptr, float opt) -{ - if(opcode != audioMasterGetTime) - FLEXT_LOG6("VST -> host: Eff = 0x%.8X, Opcode = %d, Index = %d, Value = %d, PTR = %.8X, OPT = %.3f\n",(int)effect, opcode,index,value,(int)ptr,opt); - - VSTPlugin *th = effect?(VSTPlugin *)effect->user:NULL; - - switch (opcode) { - case audioMasterAutomate: // 0 - if(th && th->feedback && th->responder) { - t_atom lst[2]; - SetInt(lst[0],index); - SetFloat(lst[1],opt); - th->responder->Respond(sym_param,2,lst); - } - return 0; - - case audioMasterVersion: // 1 - // support VST 2.3 - return 2300; - - case audioMasterCurrentId: // 2 - // set to subplugin id (default 0) - return uniqueid; - - case audioMasterIdle: // 3 - effect->dispatcher(effect, effEditIdle, 0, 0, NULL, 0.0f); - return 0; - - case audioMasterPinConnected: // 4 - //! \todo set connection state correctly (if possible..) - // index=pin, value=0..input, else..output - FLEXT_LOG2("Pin connected pin=%li conn=%li",index,value); - return 0; // 0 means connected - - case audioMasterWantMidi: // 6 - FLEXT_LOG1("Want MIDI = %li",value); - return 0; // VST header says: "currently ignored" - - case audioMasterGetTime: { // 7 - if(!th) return 0; - - static VstTimeInfo time; - memset(&time,0,sizeof(time)); - - // flags - time.flags = kVstTempoValid|kVstBarsValid|kVstCyclePosValid|kVstPpqPosValid|kVstSmpteValid|kVstTimeSigValid; - - if(th->transchg) { time.flags |= kVstTransportChanged; th->transchg = false; } - if(th->playing) time.flags |= kVstTransportPlaying; - if(th->looping) time.flags |= kVstTransportCycleActive; -// if(th->feedback) time.flags |= kVstAutomationWriting; - - time.sampleRate = th->samplerate; - time.samplePos = th->samplepos; - time.ppqPos = th->ppqpos; - - time.tempo = th->tempo; - time.barStartPos = th->barstartpos; - time.cycleStartPos = th->cyclestartpos; - time.cycleEndPos = th->cycleendpos; - - time.timeSigNumerator = th->timesignom; - time.timeSigDenominator = th->timesigden; - - // SMPTE data - time.smpteOffset = th->smpteoffset; - time.smpteFrameRate = th->smpterate; - -// time.samplesToNextClock = 0; - - if(value&kVstNanosValid) { - time.nanoSeconds = flext::GetOSTime()*1.e9; - time.flags |= kVstNanosValid; - } - - return (long)&time; - } - - case audioMasterProcessEvents: { // 8 - // VST event data from plugin - VstEvents *evs = static_cast(ptr); - if(th) { - for(int i = 0; i < evs->numEvents; ++i) - th->ProcessEvent(*evs->events[i]); - return 1; - } - else - return 0; - } - - case audioMasterSetTime: { // 9 - VstTimeInfo *tminfo = static_cast(ptr); - FLEXT_LOG3("TimeInfo pos=%lf rate=%lf filter=%li",tminfo->samplePos,tminfo->sampleRate,value); - return 0; // not supported - } - - case audioMasterTempoAt: // 10 - return 0; // not supported - - case audioMasterGetNumAutomatableParameters: // 11 - return 0; // not supported - - case audioMasterSizeWindow: // 15 - return 0; - - case audioMasterGetSampleRate: // 16 - return 0; // not supported - case audioMasterGetBlockSize: // 17 - return 0; // not supported - - case audioMasterGetCurrentProcessLevel: // 23 - // return thread state - return flext::IsSystemThread()?2:1; - - case audioMasterGetAutomationState: // 24 -// return th?(th->feedback?2:1):0; - return 0; - - case audioMasterGetVendorString: // 32 - strcpy((char*)ptr,vendor); - return 0; - - case audioMasterGetProductString: // 33 - strcpy((char *)ptr,product); - return 0; - - case audioMasterGetVendorVersion: // 34 - return VST_VERSION; - - case audioMasterCanDo: // 37 - FLEXT_LOG1("\taudioMasterCanDo PTR = %s",ptr); - if(!strcmp((char *)ptr,"sendVstEvents")) - return 1; - else if(!strcmp((char *)ptr,"sendVstMidiEvent")) - return 1; - else if(!strcmp((char *)ptr,"sendVstTimeInfo")) - return 1; // NOT YET - else if(!strcmp((char *)ptr,"receiveVstEvents")) - return 1; - else if(!strcmp((char *)ptr,"receiveVstMidiEvent")) - return 1; - else if(!strcmp((char *)ptr,"receiveVstTimeInfo")) - return 1; // NOT YET - else if(!strcmp((char *)ptr,"reportConnectionChanges")) - return 0; // \TODO PD has hard times supporting that... - else if(!strcmp((char *)ptr,"acceptIOChanges")) - return 0; // \TODO what does this means exactly? - else if(!strcmp((char *)ptr,"supplyIdle")) - return 1; - else if(!strcmp((char *)ptr,"sizeWindow")) - return 1; - else if(!strcmp((char *)ptr,"supportShell")) - return 0; // deprecated - new one is shellCategory - else if(!strcmp((char *)ptr,"offline")) - return 0; // not supported - else if(!strcmp((char *)ptr,"asyncProcessing")) - return 0; // not supported - else if(!strcmp((char *)ptr,"shellCategory")) - return 1; // supported! - else if(!strcmp((char *)ptr,"editFile")) - return 0; // not supported - else if(!strcmp((char *)ptr,"openFileSelector")) - return 0; // not supported - else if(!strcmp((char *)ptr,"closeFileSelector")) - return 0; // not supported - else if(!strcmp((char *)ptr,"startStopProcess")) - return 0; // not supported -#ifdef FLEXT_DEBUG - else - post("Unknown audioMasterCanDo PTR = %s",ptr); -#endif - - return 0; // not supported - - case audioMasterGetLanguage: // 38 - return kVstLangEnglish; - - case audioMasterGetDirectory: // 41 - return (long)(th?th->dllname.c_str():dllloading.c_str()); - - case audioMasterUpdateDisplay: // 42 - FLEXT_LOG("UPDATE DISPLAY"); - return 0; - - default: - FLEXT_LOG1("Unknown opcode %li",opcode); - return 0; - } -} - -void VSTPlugin::updatepos(long frames) -{ - bool inloop = ppqpos < cycleendpos; - - // \todo should the sample position also jump back when cycling? - // and if, how? - samplepos += frames; - - // \todo this factor should be cached - ppqpos += frames*tempo/(samplerate*60); - - if(looping) { - double cyclelen = cycleendpos-cyclestartpos; - if(cyclelen > 0) { - if(inloop && ppqpos >= cycleendpos) - ppqpos = cyclestartpos+fmod(ppqpos-cyclestartpos,cyclelen); - } - else - ppqpos = cyclestartpos; - } -} diff --git a/externals/grill/vst/src/vstmidi.cpp b/externals/grill/vst/src/vstmidi.cpp deleted file mode 100644 index 8bddba98..00000000 --- a/externals/grill/vst/src/vstmidi.cpp +++ /dev/null @@ -1,52 +0,0 @@ -/* -vst~ - VST plugin object for PD -based on the work of Jarno Seppänen and Mark Williamson - -Copyright (c)2003-2005 Thomas Grill (gr@grrrr.org) -For information on usage and redistribution, and for a DISCLAIMER OF ALL -WARRANTIES, see the file, "license.txt," in this distribution. -*/ - -#include "vsthost.h" - -bool VSTPlugin::AddMIDI(unsigned char data0,unsigned char data1,unsigned char data2) -{ - if(Is()) { - VstMidiEvent *pevent = &midievent[eventqusz]; - - pevent->type = kVstMidiType; - pevent->byteSize = 24; - pevent->deltaFrames = 0; - pevent->flags = 0; - pevent->detune = 0; - pevent->noteLength = 0; - pevent->noteOffset = 0; - pevent->reserved1 = 0; - pevent->reserved2 = 0; - pevent->noteOffVelocity = 0; - pevent->midiData[0] = data0; - pevent->midiData[1] = data1; - pevent->midiData[2] = data2; - pevent->midiData[3] = 0; - - if(eventqusz < MIDI_MAX_EVENTS) ++eventqusz; - SendMidi(); - return true; - } - else return false; -} - - -void VSTPlugin::SendMidi() -{ - if(Is() && eventqusz > 0) { - // Prepare MIDI events and free queue dispatching all events - events.numEvents = eventqusz; - events.reserved = 0; - for(int q = 0; q < eventqusz; q++) - events.events[q] = (VstEvent*)&midievent[q]; - - Dispatch(effProcessEvents, 0, 0, &events, 0.0f); - eventqusz = 0; - } -} diff --git a/externals/grill/vst/src/vstparam.cpp b/externals/grill/vst/src/vstparam.cpp deleted file mode 100644 index bb80263e..00000000 --- a/externals/grill/vst/src/vstparam.cpp +++ /dev/null @@ -1,106 +0,0 @@ -/* -vst~ - VST plugin object for PD -based on the work of Jarno Seppänen and Mark Williamson - -Copyright (c)2003-2005 Thomas Grill (gr@grrrr.org) -For information on usage and redistribution, and for a DISCLAIMER OF ALL -WARRANTIES, see the file, "license.txt," in this distribution. -*/ - -#include "vsthost.h" -#include - -static void striptrail(char *txt) -{ - // strip trailing whitespace - for(int i = strlen(txt)-1; i >= 0; --i) - // cast to unsigned char since isspace functions don't want characters like 0x80 = -128 - if(isspace(((unsigned char *)txt)[i])) txt[i] = 0; - else break; -} - -void VSTPlugin::GetParamName(int numparam,char *name) const -{ - if(numparam < GetNumParams()) { - name[0] = 0; - Dispatch(effGetParamName,numparam,0,name); - striptrail(name); - } - else - name[0] = 0; -} - -bool VSTPlugin::SetParamFloat(int parameter,float value) -{ - if(Is() && parameter >= 0 && parameter < GetNumParams()) { - effect->setParameter(effect,parameter,value); - return true; - } - else - return false; -} - -void VSTPlugin::GetParamValue(int numparam,char *parval) const -{ - if(Is()) { - if(numparam < GetNumParams()) { - // how many chars needed? - char par_display[64]; par_display[0] = 0; - Dispatch(effGetParamDisplay,numparam,0,par_display); -// if(par_display[7]) par_display[8] = 0; // set trailing zero - - // how many chars needed? - char par_label[64]; par_label[0] = 0; - Dispatch(effGetParamLabel,numparam,0,par_label); - striptrail(par_label); -// if(par_label[7]) par_label[8] = 0; // set trailing zero - - sprintf(parval,"%s%s",par_display,par_label); - } - else - strcpy(parval,"Index out of range"); - } - else - strcpy(parval,"Plugin not loaded"); -} - -float VSTPlugin::GetParamValue(int numparam) const -{ - if(Is() && numparam < GetNumParams()) - return effect->getParameter(effect,numparam); - else - return -1.0; -} - -void VSTPlugin::ScanParams(int cnt) -{ - if(cnt < 0) cnt = GetNumParams(); - if(paramnamecnt >= cnt) return; - if(cnt >= GetNumParams()) cnt = GetNumParams(); - - char name[64]; - for(int i = paramnamecnt; i < cnt; ++i) { - GetParamName(i,name); - if(*name) paramnames[std::string(name)] = i; - } - paramnamecnt = cnt; -} - -int VSTPlugin::GetParamIx(const char *p) const -{ - NameMap::const_iterator it = paramnames.find(std::string(p)); - return it == paramnames.end()?-1:it->second; -} - -bool VSTPlugin::GetProgramName(int cat,int p,char *buf) const -{ - buf[0] = 0; - int parameter = p; - if(parameter < GetNumPrograms() && cat < GetNumCategories()) { - Dispatch(effGetProgramNameIndexed,parameter,cat,buf); - striptrail(buf); - return true; - } - else - return false; -} diff --git a/externals/grill/vst/vst.vcproj b/externals/grill/vst/vst.vcproj deleted file mode 100644 index 17426f48..00000000 --- a/externals/grill/vst/vst.vcproj +++ /dev/null @@ -1,348 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/externals/grill/vst/vst.xcode/project.pbxproj b/externals/grill/vst/vst.xcode/project.pbxproj deleted file mode 100644 index 67b0c224..00000000 --- a/externals/grill/vst/vst.xcode/project.pbxproj +++ /dev/null @@ -1,422 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 39; - objects = { - 014CEA440018CDF011CA2923 = { - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_ALTIVEC_EXTENSIONS = YES; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_GENERATE_DEBUGGING_SYMBOLS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = "FLEXT_SYS=2 FLEXT_SHARED"; - ZERO_LINK = YES; - }; - isa = PBXBuildStyle; - name = Development; - }; - 014CEA450018CDF011CA2923 = { - buildSettings = { - COPY_PHASE_STRIP = YES; - GCC_ALTIVEC_EXTENSIONS = YES; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_MODEL_TUNING = ""; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = "FLEXT_SYS=2 FLEXT_SHARED"; - ZERO_LINK = NO; - }; - isa = PBXBuildStyle; - name = Deployment; - }; -//010 -//011 -//012 -//013 -//014 -//030 -//031 -//032 -//033 -//034 - 034768DFFF38A50411DB9C8B = { - children = ( - D2AAC0C705546C1D00DB518D, - ); - isa = PBXGroup; - name = Products; - refType = 4; - sourceTree = ""; - }; -//030 -//031 -//032 -//033 -//034 -//080 -//081 -//082 -//083 -//084 - 0867D690FE84028FC02AAC07 = { - buildSettings = { - }; - buildStyles = ( - 014CEA440018CDF011CA2923, - 014CEA450018CDF011CA2923, - ); - hasScannedForEncodings = 1; - isa = PBXProject; - mainGroup = 0867D691FE84028FC02AAC07; - productRefGroup = 034768DFFF38A50411DB9C8B; - projectDirPath = ""; - targets = ( - D2AAC0C605546C1D00DB518D, - ); - }; - 0867D691FE84028FC02AAC07 = { - children = ( - E91C4A8207ECD9EA00062063, - E91C4A8307ECD9EA00062063, - E91C4A8407ECD9EA00062063, - E91C4A8507ECD9EA00062063, - E91C4A8607ECD9EA00062063, - E91C4A8707ECD9EA00062063, - E91C4A8807ECD9EA00062063, - E91C4A8907ECD9EA00062063, - E9304A5F07732F1F00EE7812, - E9E87848074674890035356B, - E9E87845074674560035356B, - E9E87713074673750035356B, - E9E87710074673590035356B, - E9C0C57907461746002B8D0A, - E9C0C57A07461746002B8D0A, - 034768DFFF38A50411DB9C8B, - ); - isa = PBXGroup; - name = vst; - refType = 4; - sourceTree = ""; - }; -//080 -//081 -//082 -//083 -//084 -//D20 -//D21 -//D22 -//D23 -//D24 - D2AAC0C305546C1D00DB518D = { - buildActionMask = 2147483647; - files = ( - E9C0C58007461746002B8D0A, - E91C4A8A07ECD9EA00062063, - E91C4A8B07ECD9EA00062063, - E91C4A8E07ECD9EA00062063, - ); - isa = PBXHeadersBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - D2AAC0C405546C1D00DB518D = { - buildActionMask = 2147483647; - files = ( - E9C0C57F07461746002B8D0A, - E9304A6007732F1F00EE7812, - E91C4A8C07ECD9EA00062063, - E91C4A8D07ECD9EA00062063, - E91C4A8F07ECD9EA00062063, - E91C4A9007ECD9EA00062063, - E91C4A9107ECD9EA00062063, - ); - isa = PBXSourcesBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - D2AAC0C505546C1D00DB518D = { - buildActionMask = 2147483647; - files = ( - E9E87711074673590035356B, - E9E87714074673750035356B, - E9E87846074674560035356B, - E9E87849074674890035356B, - ); - isa = PBXFrameworksBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - D2AAC0C605546C1D00DB518D = { - buildPhases = ( - D2AAC0C305546C1D00DB518D, - D2AAC0C405546C1D00DB518D, - D2AAC0C505546C1D00DB518D, - ); - buildRules = ( - ); - buildSettings = { - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - EXECUTABLE_EXTENSION = pd_darwin; - GCC_GENERATE_DEBUGGING_SYMBOLS = NO; - GCC_PRECOMPILE_PREFIX_HEADER = NO; - GCC_PREFIX_HEADER = ""; - GCC_PREPROCESSOR_DEFINITIONS = "FLEXT_SYS=2 FLEXT_SHARED"; - HEADER_SEARCH_PATHS = "/usr/local/include/flext $PD/src /Volumes/Daten/Prog/packs/vstsdk2.3/source/common"; - INSTALL_PATH = ""; - LIBRARY_STYLE = BUNDLE; - OTHER_LDFLAGS = "-bundle_loader /Applications/audio/Pd-0.38-3.app/Contents/Resources/bin/pd"; - PRODUCT_NAME = "vst~"; - SKIP_INSTALL = YES; - }; - dependencies = ( - ); - isa = PBXNativeTarget; - name = vst; - productName = vst; - productReference = D2AAC0C705546C1D00DB518D; - productType = "com.apple.product-type.library.dynamic"; - }; - D2AAC0C705546C1D00DB518D = { - explicitFileType = "compiled.mach-o.dylib"; - includeInIndex = 0; - isa = PBXFileReference; - path = "vst~.pd_darwin"; - refType = 3; - sourceTree = BUILT_PRODUCTS_DIR; - }; -//D20 -//D21 -//D22 -//D23 -//D24 -//E90 -//E91 -//E92 -//E93 -//E94 - E91C4A8207ECD9EA00062063 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = editor.h; - path = src/editor.h; - refType = 4; - sourceTree = ""; - }; - E91C4A8307ECD9EA00062063 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.cpp.h; - name = editormac.hpp; - path = src/editormac.hpp; - refType = 4; - sourceTree = ""; - }; - E91C4A8407ECD9EA00062063 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.cpp.cpp; - name = vstedit.cpp; - path = src/vstedit.cpp; - refType = 4; - sourceTree = ""; - }; - E91C4A8507ECD9EA00062063 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.cpp.cpp; - name = vsthost.cpp; - path = src/vsthost.cpp; - refType = 4; - sourceTree = ""; - }; - E91C4A8607ECD9EA00062063 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = vsthost.h; - path = src/vsthost.h; - refType = 4; - sourceTree = ""; - }; - E91C4A8707ECD9EA00062063 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.cpp.cpp; - name = vstmaster.cpp; - path = src/vstmaster.cpp; - refType = 4; - sourceTree = ""; - }; - E91C4A8807ECD9EA00062063 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.cpp.cpp; - name = vstmidi.cpp; - path = src/vstmidi.cpp; - refType = 4; - sourceTree = ""; - }; - E91C4A8907ECD9EA00062063 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.cpp.cpp; - name = vstparam.cpp; - path = src/vstparam.cpp; - refType = 4; - sourceTree = ""; - }; - E91C4A8A07ECD9EA00062063 = { - fileRef = E91C4A8207ECD9EA00062063; - isa = PBXBuildFile; - settings = { - }; - }; - E91C4A8B07ECD9EA00062063 = { - fileRef = E91C4A8307ECD9EA00062063; - isa = PBXBuildFile; - settings = { - }; - }; - E91C4A8C07ECD9EA00062063 = { - fileRef = E91C4A8407ECD9EA00062063; - isa = PBXBuildFile; - settings = { - }; - }; - E91C4A8D07ECD9EA00062063 = { - fileRef = E91C4A8507ECD9EA00062063; - isa = PBXBuildFile; - settings = { - }; - }; - E91C4A8E07ECD9EA00062063 = { - fileRef = E91C4A8607ECD9EA00062063; - isa = PBXBuildFile; - settings = { - }; - }; - E91C4A8F07ECD9EA00062063 = { - fileRef = E91C4A8707ECD9EA00062063; - isa = PBXBuildFile; - settings = { - }; - }; - E91C4A9007ECD9EA00062063 = { - fileRef = E91C4A8807ECD9EA00062063; - isa = PBXBuildFile; - settings = { - }; - }; - E91C4A9107ECD9EA00062063 = { - fileRef = E91C4A8907ECD9EA00062063; - isa = PBXBuildFile; - settings = { - }; - }; - E9304A5F07732F1F00EE7812 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.cpp.cpp; - name = editor.cpp; - path = src/editor.cpp; - refType = 4; - sourceTree = ""; - }; - E9304A6007732F1F00EE7812 = { - fileRef = E9304A5F07732F1F00EE7812; - isa = PBXBuildFile; - settings = { - }; - }; - E9C0C57907461746002B8D0A = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.cpp.cpp; - name = main.cpp; - path = src/main.cpp; - refType = 4; - sourceTree = ""; - }; - E9C0C57A07461746002B8D0A = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = main.h; - path = src/main.h; - refType = 4; - sourceTree = ""; - }; - E9C0C57F07461746002B8D0A = { - fileRef = E9C0C57907461746002B8D0A; - isa = PBXBuildFile; - settings = { - }; - }; - E9C0C58007461746002B8D0A = { - fileRef = E9C0C57A07461746002B8D0A; - isa = PBXBuildFile; - settings = { - }; - }; - E9E87710074673590035356B = { - isa = PBXFileReference; - lastKnownFileType = wrapper.framework; - name = System.framework; - path = /System/Library/Frameworks/System.framework; - refType = 0; - sourceTree = ""; - }; - E9E87711074673590035356B = { - fileRef = E9E87710074673590035356B; - isa = PBXBuildFile; - settings = { - }; - }; - E9E87713074673750035356B = { - isa = PBXFileReference; - lastKnownFileType = wrapper.framework; - name = ApplicationServices.framework; - path = /System/Library/Frameworks/ApplicationServices.framework; - refType = 0; - sourceTree = ""; - }; - E9E87714074673750035356B = { - fileRef = E9E87713074673750035356B; - isa = PBXBuildFile; - settings = { - }; - }; - E9E87845074674560035356B = { - isa = PBXFileReference; - lastKnownFileType = "compiled.mach-o.dylib"; - name = "libflext-pd.dylib"; - path = "/usr/local/lib/libflext-pd.dylib"; - refType = 0; - sourceTree = ""; - }; - E9E87846074674560035356B = { - fileRef = E9E87845074674560035356B; - isa = PBXBuildFile; - settings = { - }; - }; - E9E87848074674890035356B = { - isa = PBXFileReference; - lastKnownFileType = wrapper.framework; - name = vecLib.framework; - path = /System/Library/Frameworks/vecLib.framework; - refType = 0; - sourceTree = ""; - }; - E9E87849074674890035356B = { - fileRef = E9E87848074674890035356B; - isa = PBXBuildFile; - settings = { - }; - }; - }; - rootObject = 0867D690FE84028FC02AAC07; -} -- cgit v1.2.1