aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--AUTHORS4
-rw-r--r--COPYING365
-rw-r--r--INSTALL59
-rw-r--r--NEWS17
-rw-r--r--README23
-rw-r--r--fomp.lv2/autowah.ttl75
-rw-r--r--fomp.lv2/cs_chorus1.ttl77
-rw-r--r--fomp.lv2/cs_chorus2.ttl78
-rw-r--r--fomp.lv2/cs_phaser1.ttl111
-rw-r--r--fomp.lv2/cs_phaser1_lfo.ttl112
-rw-r--r--fomp.lv2/manifest.ttl.in110
-rw-r--r--fomp.lv2/mvchpf1.ttl82
-rw-r--r--fomp.lv2/mvclpf1.ttl104
-rw-r--r--fomp.lv2/mvclpf2.ttl104
-rw-r--r--fomp.lv2/mvclpf3.ttl104
-rw-r--r--fomp.lv2/mvclpf4.ttl120
-rw-r--r--fomp.lv2/parametric1.ttl196
-rw-r--r--fomp.lv2/pulse_vco.ttl95
-rw-r--r--fomp.lv2/rec_vco.ttl127
-rw-r--r--fomp.lv2/reverb.ttl137
-rw-r--r--fomp.lv2/reverb_amb.ttl149
-rw-r--r--fomp.lv2/saw_vco.ttl103
-rw-r--r--fomp.lv2/triple_chorus.ttl90
-rw-r--r--src/autowah.cc130
-rw-r--r--src/autowah.h52
-rw-r--r--src/autowah_lv2.cc56
-rw-r--r--src/blvco.cc354
-rw-r--r--src/blvco.h92
-rw-r--r--src/blvco_lv2.cc90
-rw-r--r--src/cs_chorus.cc406
-rw-r--r--src/cs_chorus.h106
-rw-r--r--src/cs_chorus_if.cc247
-rw-r--r--src/cs_chorus_lv2.cc90
-rw-r--r--src/cs_phaser.cc191
-rw-r--r--src/cs_phaser.h66
-rw-r--r--src/cs_phaser_if.cc236
-rw-r--r--src/cs_phaser_lv2.cc73
-rw-r--r--src/exp2ap.h28
-rw-r--r--src/filters.cc113
-rw-r--r--src/filters.h130
-rw-r--r--src/filters_lv2.cc56
-rw-r--r--src/ladspaplugin.h59
-rw-r--r--src/mvchpf24.cc126
-rw-r--r--src/mvchpf24.h46
-rw-r--r--src/mvchpf24_if.cc150
-rw-r--r--src/mvchpf24_lv2.cc87
-rw-r--r--src/mvclpf24.cc439
-rw-r--r--src/mvclpf24.h110
-rw-r--r--src/mvclpf24_if.cc299
-rw-r--r--src/mvclpf24_lv2.cc136
-rw-r--r--src/pareq.cc199
-rw-r--r--src/pareq.h74
-rw-r--r--src/plugin_lv2.h55
-rw-r--r--src/reverbs.cc125
-rw-r--r--src/reverbs.h134
-rw-r--r--src/reverbs_lv2.cc73
-rw-r--r--src/zreverb.cc425
-rw-r--r--src/zreverb.h244
-rw-r--r--waflib/.gitignore (renamed from .gitignore)0
-rw-r--r--waflib/Build.py (renamed from Build.py)0
-rw-r--r--waflib/COPYING25
-rw-r--r--waflib/ConfigSet.py (renamed from ConfigSet.py)0
-rw-r--r--waflib/Configure.py (renamed from Configure.py)0
-rw-r--r--waflib/Context.py (renamed from Context.py)0
-rw-r--r--waflib/Errors.py (renamed from Errors.py)0
-rw-r--r--waflib/Logs.py (renamed from Logs.py)0
-rw-r--r--waflib/Node.py (renamed from Node.py)0
-rw-r--r--waflib/Options.py (renamed from Options.py)0
-rw-r--r--waflib/README.md (renamed from README.md)0
-rw-r--r--waflib/Runner.py (renamed from Runner.py)0
-rw-r--r--waflib/Scripting.py (renamed from Scripting.py)0
-rw-r--r--waflib/Task.py (renamed from Task.py)0
-rw-r--r--waflib/TaskGen.py (renamed from TaskGen.py)0
-rw-r--r--waflib/Tools/__init__.py (renamed from Tools/__init__.py)0
-rw-r--r--waflib/Tools/ar.py (renamed from Tools/ar.py)0
-rw-r--r--waflib/Tools/asm.py (renamed from Tools/asm.py)0
-rw-r--r--waflib/Tools/bison.py (renamed from Tools/bison.py)0
-rw-r--r--waflib/Tools/c.py (renamed from Tools/c.py)0
-rw-r--r--waflib/Tools/c_aliases.py (renamed from Tools/c_aliases.py)0
-rw-r--r--waflib/Tools/c_config.py (renamed from Tools/c_config.py)0
-rw-r--r--waflib/Tools/c_osx.py (renamed from Tools/c_osx.py)0
-rw-r--r--waflib/Tools/c_preproc.py (renamed from Tools/c_preproc.py)0
-rw-r--r--waflib/Tools/c_tests.py (renamed from Tools/c_tests.py)0
-rw-r--r--waflib/Tools/ccroot.py (renamed from Tools/ccroot.py)0
-rw-r--r--waflib/Tools/clang.py (renamed from Tools/clang.py)0
-rw-r--r--waflib/Tools/clangxx.py (renamed from Tools/clangxx.py)0
-rw-r--r--waflib/Tools/compiler_c.py (renamed from Tools/compiler_c.py)0
-rw-r--r--waflib/Tools/compiler_cxx.py (renamed from Tools/compiler_cxx.py)0
-rw-r--r--waflib/Tools/compiler_d.py (renamed from Tools/compiler_d.py)0
-rw-r--r--waflib/Tools/compiler_fc.py (renamed from Tools/compiler_fc.py)0
-rw-r--r--waflib/Tools/cs.py (renamed from Tools/cs.py)0
-rw-r--r--waflib/Tools/cxx.py (renamed from Tools/cxx.py)0
-rw-r--r--waflib/Tools/d.py (renamed from Tools/d.py)0
-rw-r--r--waflib/Tools/d_config.py (renamed from Tools/d_config.py)0
-rw-r--r--waflib/Tools/d_scan.py (renamed from Tools/d_scan.py)0
-rw-r--r--waflib/Tools/dbus.py (renamed from Tools/dbus.py)0
-rw-r--r--waflib/Tools/dmd.py (renamed from Tools/dmd.py)0
-rw-r--r--waflib/Tools/errcheck.py (renamed from Tools/errcheck.py)0
-rw-r--r--waflib/Tools/fc.py (renamed from Tools/fc.py)0
-rw-r--r--waflib/Tools/fc_config.py (renamed from Tools/fc_config.py)0
-rw-r--r--waflib/Tools/fc_scan.py (renamed from Tools/fc_scan.py)0
-rw-r--r--waflib/Tools/flex.py (renamed from Tools/flex.py)0
-rw-r--r--waflib/Tools/g95.py (renamed from Tools/g95.py)0
-rw-r--r--waflib/Tools/gas.py (renamed from Tools/gas.py)0
-rw-r--r--waflib/Tools/gcc.py (renamed from Tools/gcc.py)0
-rw-r--r--waflib/Tools/gdc.py (renamed from Tools/gdc.py)0
-rw-r--r--waflib/Tools/gfortran.py (renamed from Tools/gfortran.py)0
-rw-r--r--waflib/Tools/glib2.py (renamed from Tools/glib2.py)0
-rw-r--r--waflib/Tools/gnu_dirs.py (renamed from Tools/gnu_dirs.py)0
-rw-r--r--waflib/Tools/gxx.py (renamed from Tools/gxx.py)0
-rw-r--r--waflib/Tools/icc.py (renamed from Tools/icc.py)0
-rw-r--r--waflib/Tools/icpc.py (renamed from Tools/icpc.py)0
-rw-r--r--waflib/Tools/ifort.py (renamed from Tools/ifort.py)0
-rw-r--r--waflib/Tools/intltool.py (renamed from Tools/intltool.py)0
-rw-r--r--waflib/Tools/irixcc.py (renamed from Tools/irixcc.py)0
-rw-r--r--waflib/Tools/javaw.py (renamed from Tools/javaw.py)0
-rw-r--r--waflib/Tools/ldc2.py (renamed from Tools/ldc2.py)0
-rw-r--r--waflib/Tools/lua.py (renamed from Tools/lua.py)0
-rw-r--r--waflib/Tools/md5_tstamp.py (renamed from Tools/md5_tstamp.py)0
-rw-r--r--waflib/Tools/msvc.py (renamed from Tools/msvc.py)0
-rw-r--r--waflib/Tools/nasm.py (renamed from Tools/nasm.py)0
-rw-r--r--waflib/Tools/nobuild.py (renamed from Tools/nobuild.py)0
-rw-r--r--waflib/Tools/perl.py (renamed from Tools/perl.py)0
-rw-r--r--waflib/Tools/python.py (renamed from Tools/python.py)0
-rw-r--r--waflib/Tools/qt5.py (renamed from Tools/qt5.py)0
-rw-r--r--waflib/Tools/ruby.py (renamed from Tools/ruby.py)0
-rw-r--r--waflib/Tools/suncc.py (renamed from Tools/suncc.py)0
-rw-r--r--waflib/Tools/suncxx.py (renamed from Tools/suncxx.py)0
-rw-r--r--waflib/Tools/tex.py (renamed from Tools/tex.py)0
-rw-r--r--waflib/Tools/vala.py (renamed from Tools/vala.py)0
-rw-r--r--waflib/Tools/waf_unit_test.py (renamed from Tools/waf_unit_test.py)0
-rw-r--r--waflib/Tools/winres.py (renamed from Tools/winres.py)0
-rw-r--r--waflib/Tools/xlc.py (renamed from Tools/xlc.py)0
-rw-r--r--waflib/Tools/xlcxx.py (renamed from Tools/xlcxx.py)0
-rw-r--r--waflib/Utils.py (renamed from Utils.py)0
-rw-r--r--waflib/__init__.py (renamed from __init__.py)0
-rw-r--r--waflib/ansiterm.py (renamed from ansiterm.py)0
-rw-r--r--waflib/extras/__init__.py (renamed from extras/__init__.py)0
-rw-r--r--waflib/extras/autowaf.py (renamed from extras/autowaf.py)0
-rw-r--r--waflib/extras/batched_cc.py (renamed from extras/batched_cc.py)0
-rw-r--r--waflib/extras/biber.py (renamed from extras/biber.py)0
-rw-r--r--waflib/extras/bjam.py (renamed from extras/bjam.py)0
-rw-r--r--waflib/extras/blender.py (renamed from extras/blender.py)0
-rw-r--r--waflib/extras/boo.py (renamed from extras/boo.py)0
-rw-r--r--waflib/extras/boost.py (renamed from extras/boost.py)0
-rw-r--r--waflib/extras/build_file_tracker.py (renamed from extras/build_file_tracker.py)0
-rw-r--r--waflib/extras/build_logs.py (renamed from extras/build_logs.py)0
-rw-r--r--waflib/extras/buildcopy.py (renamed from extras/buildcopy.py)0
-rw-r--r--waflib/extras/c_bgxlc.py (renamed from extras/c_bgxlc.py)0
-rw-r--r--waflib/extras/c_dumbpreproc.py (renamed from extras/c_dumbpreproc.py)0
-rw-r--r--waflib/extras/c_emscripten.py (renamed from extras/c_emscripten.py)0
-rw-r--r--waflib/extras/c_nec.py (renamed from extras/c_nec.py)0
-rw-r--r--waflib/extras/cabal.py (renamed from extras/cabal.py)0
-rw-r--r--waflib/extras/cfg_altoptions.py (renamed from extras/cfg_altoptions.py)0
-rw-r--r--waflib/extras/clang_compilation_database.py (renamed from extras/clang_compilation_database.py)0
-rw-r--r--waflib/extras/codelite.py (renamed from extras/codelite.py)0
-rw-r--r--waflib/extras/color_gcc.py (renamed from extras/color_gcc.py)0
-rw-r--r--waflib/extras/color_rvct.py (renamed from extras/color_rvct.py)0
-rw-r--r--waflib/extras/compat15.py (renamed from extras/compat15.py)0
-rw-r--r--waflib/extras/cppcheck.py (renamed from extras/cppcheck.py)0
-rw-r--r--waflib/extras/cpplint.py (renamed from extras/cpplint.py)0
-rw-r--r--waflib/extras/cross_gnu.py (renamed from extras/cross_gnu.py)0
-rw-r--r--waflib/extras/cython.py (renamed from extras/cython.py)0
-rw-r--r--waflib/extras/dcc.py (renamed from extras/dcc.py)0
-rw-r--r--waflib/extras/distnet.py (renamed from extras/distnet.py)0
-rw-r--r--waflib/extras/doxygen.py (renamed from extras/doxygen.py)0
-rw-r--r--waflib/extras/dpapi.py (renamed from extras/dpapi.py)0
-rw-r--r--waflib/extras/eclipse.py (renamed from extras/eclipse.py)0
-rw-r--r--waflib/extras/erlang.py (renamed from extras/erlang.py)0
-rw-r--r--waflib/extras/fast_partial.py (renamed from extras/fast_partial.py)0
-rw-r--r--waflib/extras/fc_bgxlf.py (renamed from extras/fc_bgxlf.py)0
-rw-r--r--waflib/extras/fc_cray.py (renamed from extras/fc_cray.py)0
-rw-r--r--waflib/extras/fc_nag.py (renamed from extras/fc_nag.py)0
-rw-r--r--waflib/extras/fc_nec.py (renamed from extras/fc_nec.py)0
-rw-r--r--waflib/extras/fc_open64.py (renamed from extras/fc_open64.py)0
-rw-r--r--waflib/extras/fc_pgfortran.py (renamed from extras/fc_pgfortran.py)0
-rw-r--r--waflib/extras/fc_solstudio.py (renamed from extras/fc_solstudio.py)0
-rw-r--r--waflib/extras/fc_xlf.py (renamed from extras/fc_xlf.py)0
-rw-r--r--waflib/extras/file_to_object.py (renamed from extras/file_to_object.py)0
-rw-r--r--waflib/extras/fluid.py (renamed from extras/fluid.py)0
-rw-r--r--waflib/extras/freeimage.py (renamed from extras/freeimage.py)0
-rw-r--r--waflib/extras/fsb.py (renamed from extras/fsb.py)0
-rw-r--r--waflib/extras/fsc.py (renamed from extras/fsc.py)0
-rw-r--r--waflib/extras/gccdeps.py (renamed from extras/gccdeps.py)0
-rw-r--r--waflib/extras/gdbus.py (renamed from extras/gdbus.py)0
-rw-r--r--waflib/extras/gob2.py (renamed from extras/gob2.py)0
-rw-r--r--waflib/extras/halide.py (renamed from extras/halide.py)0
-rwxr-xr-xwaflib/extras/javatest.py (renamed from extras/javatest.py)0
-rw-r--r--waflib/extras/kde4.py (renamed from extras/kde4.py)0
-rw-r--r--waflib/extras/local_rpath.py (renamed from extras/local_rpath.py)0
-rw-r--r--waflib/extras/lv2.py (renamed from extras/lv2.py)0
-rw-r--r--waflib/extras/make.py (renamed from extras/make.py)0
-rw-r--r--waflib/extras/midl.py (renamed from extras/midl.py)0
-rw-r--r--waflib/extras/msvcdeps.py (renamed from extras/msvcdeps.py)0
-rw-r--r--waflib/extras/msvs.py (renamed from extras/msvs.py)0
-rw-r--r--waflib/extras/netcache_client.py (renamed from extras/netcache_client.py)0
-rw-r--r--waflib/extras/objcopy.py (renamed from extras/objcopy.py)0
-rw-r--r--waflib/extras/ocaml.py (renamed from extras/ocaml.py)0
-rw-r--r--waflib/extras/package.py (renamed from extras/package.py)0
-rw-r--r--waflib/extras/parallel_debug.py (renamed from extras/parallel_debug.py)0
-rw-r--r--waflib/extras/pch.py (renamed from extras/pch.py)0
-rw-r--r--waflib/extras/pep8.py (renamed from extras/pep8.py)0
-rw-r--r--waflib/extras/pgicc.py (renamed from extras/pgicc.py)0
-rw-r--r--waflib/extras/pgicxx.py (renamed from extras/pgicxx.py)0
-rw-r--r--waflib/extras/proc.py (renamed from extras/proc.py)0
-rw-r--r--waflib/extras/protoc.py (renamed from extras/protoc.py)0
-rw-r--r--waflib/extras/pyqt5.py (renamed from extras/pyqt5.py)0
-rw-r--r--waflib/extras/pytest.py (renamed from extras/pytest.py)0
-rw-r--r--waflib/extras/qnxnto.py (renamed from extras/qnxnto.py)0
-rw-r--r--waflib/extras/qt4.py (renamed from extras/qt4.py)0
-rw-r--r--waflib/extras/relocation.py (renamed from extras/relocation.py)0
-rw-r--r--waflib/extras/remote.py (renamed from extras/remote.py)0
-rw-r--r--waflib/extras/resx.py (renamed from extras/resx.py)0
-rw-r--r--waflib/extras/review.py (renamed from extras/review.py)0
-rw-r--r--waflib/extras/rst.py (renamed from extras/rst.py)0
-rw-r--r--waflib/extras/run_do_script.py (renamed from extras/run_do_script.py)0
-rw-r--r--waflib/extras/run_m_script.py (renamed from extras/run_m_script.py)0
-rw-r--r--waflib/extras/run_py_script.py (renamed from extras/run_py_script.py)0
-rw-r--r--waflib/extras/run_r_script.py (renamed from extras/run_r_script.py)0
-rw-r--r--waflib/extras/sas.py (renamed from extras/sas.py)0
-rw-r--r--waflib/extras/satellite_assembly.py (renamed from extras/satellite_assembly.py)0
-rw-r--r--waflib/extras/scala.py (renamed from extras/scala.py)0
-rw-r--r--waflib/extras/slow_qt4.py (renamed from extras/slow_qt4.py)0
-rw-r--r--waflib/extras/softlink_libs.py (renamed from extras/softlink_libs.py)0
-rw-r--r--waflib/extras/stale.py (renamed from extras/stale.py)0
-rw-r--r--waflib/extras/stracedeps.py (renamed from extras/stracedeps.py)0
-rw-r--r--waflib/extras/swig.py (renamed from extras/swig.py)0
-rw-r--r--waflib/extras/syms.py (renamed from extras/syms.py)0
-rw-r--r--waflib/extras/ticgt.py (renamed from extras/ticgt.py)0
-rw-r--r--waflib/extras/unity.py (renamed from extras/unity.py)0
-rw-r--r--waflib/extras/use_config.py (renamed from extras/use_config.py)0
-rw-r--r--waflib/extras/valadoc.py (renamed from extras/valadoc.py)0
-rw-r--r--waflib/extras/waf_xattr.py (renamed from extras/waf_xattr.py)0
-rw-r--r--waflib/extras/why.py (renamed from extras/why.py)0
-rw-r--r--waflib/extras/win32_opts.py (renamed from extras/win32_opts.py)0
-rw-r--r--waflib/extras/wix.py (renamed from extras/wix.py)0
-rw-r--r--waflib/extras/xcode6.py (renamed from extras/xcode6.py)0
-rw-r--r--waflib/fixpy2.py (renamed from fixpy2.py)0
-rwxr-xr-xwaflib/processor.py (renamed from processor.py)0
-rwxr-xr-xwaflib/waf16
-rw-r--r--wscript101
241 files changed, 7856 insertions, 25 deletions
diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 0000000..88d7337
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,4 @@
+These plugins were written by Fons Adriaensen <fons@linuxaudio.org>, originally
+as LADSPA plugins. All credit for their sonic quality belongs to him.
+
+This LV2 port is by David Robillard <d@drobilla.net>. \ No newline at end of file
diff --git a/COPYING b/COPYING
index a4147d2..d60c31a 100644
--- a/COPYING
+++ b/COPYING
@@ -1,25 +1,340 @@
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
-3. The name of the author may not be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
-IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
-IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
+ 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.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 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) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/INSTALL b/INSTALL
new file mode 100644
index 0000000..623cddd
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,59 @@
+Installation Instructions
+=========================
+
+Basic Installation
+------------------
+
+Building this software requires only Python. To install with default options:
+
+ ./waf configure
+ ./waf
+ ./waf install
+
+You may need to become root for the install stage, for example:
+
+ sudo ./waf install
+
+Configuration Options
+---------------------
+
+All supported options can be viewed using the command:
+
+ ./waf --help
+
+Most options only need to be passed during the configure stage, for example:
+
+ ./waf configure --prefix=/usr
+ ./waf
+ ./waf install
+
+Compiler Configuration
+----------------------
+
+Several standard environment variables can be used to control how compilers are
+invoked:
+
+ * CC: Path to C compiler
+ * CFLAGS: C compiler options
+ * CXX: Path to C++ compiler
+ * CXXFLAGS: C++ compiler options
+ * CPPFLAGS: C preprocessor options
+ * LINKFLAGS: Linker options
+
+Installation Directories
+------------------------
+
+The --prefix option (or the PREFIX environment variable) can be used to change
+the prefix which all files are installed under. There are also several options
+allowing for more fine-tuned control, see the --help output for details.
+
+Packaging
+---------
+
+Everything can be installed to a specific root directory by passing a --destdir
+option to the install stage (or setting the DESTDIR environment variable),
+which adds a prefix to all install paths. For example:
+
+ ./waf configure --prefix=/usr
+ ./waf
+ ./waf install --destdir=/tmp/package
diff --git a/NEWS b/NEWS
new file mode 100644
index 0000000..05bfc37
--- /dev/null
+++ b/NEWS
@@ -0,0 +1,17 @@
+fomp (1.1.0) unstable;
+
+ * Fix phaser plugin data and list phasers in manifest
+ * Fix port symbol for MVCLPF4 input gain
+ (technically breaks state compatibility, but old symbol was an oversight)
+ * Remove invalid reference to old LADSPA pulse_vco binary
+ * Add missing default values
+ * Add reverb and reverb_amb
+
+ -- David Robillard <d@drobilla.net> Sat, 25 Jul 2015 13:23:20 -0400
+
+fomp (1.0.0) stable;
+
+ * Initial release
+
+ -- David Robillard <d@drobilla.net> Sat, 27 Oct 2012 16:54:00 -0400
+
diff --git a/README b/README
new file mode 100644
index 0000000..ca371b5
--- /dev/null
+++ b/README
@@ -0,0 +1,23 @@
+FOMP
+----
+
+This is an LV2 port of the MCP, VCO, FIL, and WAH plugins by Fons Adriaensen.
+
+There are 13 plugins in total: 1 auto-wah, 1 EQ, 3 chorus, 5 filters, and 3
+oscillators.
+
+The plugin implementations are identical to their LADSPA forebears, except the
+primary frequency port of oscillators and filters has been converted to Hz to
+facilitate use in any host without assuming the hidden tuning frequency of
+AlsaModularSynth. All other frequency ports remain as they were, using octaves
+for faithful Moog-like modulation.
+
+Aside from that, the main benefit of these LV2 ports is improved metadata: CV
+ports are distinguishable from audio ports, controls have units where
+applicable, documentation is built-in for display in host UIs, and so on.
+
+The oscillators and filters are mainly useful in modular synthesizers, but
+since CV ports are distinct from audio ports, they should work fine in
+non-modular hosts as well.
+
+ -- David Robillard <d@drobilla.net>
diff --git a/fomp.lv2/autowah.ttl b/fomp.lv2/autowah.ttl
new file mode 100644
index 0000000..56dd8a0
--- /dev/null
+++ b/fomp.lv2/autowah.ttl
@@ -0,0 +1,75 @@
+@prefix doap: <http://usefulinc.com/ns/doap#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix fomp: <http://drobilla.net/plugins/fomp/> .
+@prefix lv2: <http://lv2plug.in/ns/lv2core#> .
+@prefix owl: <http://www.w3.org/2002/07/owl#> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+
+<http://drobilla.net/plugins/fomp/autowah>
+ a lv2:Plugin ,
+ lv2:FilterPlugin ;
+ doap:name "Auto-wah" ;
+ lv2:microVersion 0 ;
+ lv2:minorVersion 0 ;
+ lv2:optionalFeature lv2:hardRTCapable ;
+ lv2:project fomp: ;
+ lv2:port [
+ a lv2:AudioPort ,
+ lv2:InputPort ;
+ lv2:index 0 ;
+ lv2:name "Input" ;
+ lv2:symbol "in"
+ ] , [
+ a lv2:AudioPort ,
+ lv2:OutputPort ;
+ lv2:index 1 ;
+ lv2:name "Output" ;
+ lv2:symbol "out"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0.0 ;
+ lv2:index 2 ;
+ lv2:maximum 20.0 ;
+ lv2:minimum -20.0 ;
+ lv2:name "Drive" ;
+ lv2:symbol "drive"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0.5 ;
+ lv2:index 3 ;
+ lv2:maximum 1.0 ;
+ lv2:minimum 0.0 ;
+ lv2:name "Decay" ;
+ lv2:symbol "decay"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0.5 ;
+ lv2:index 4 ;
+ lv2:maximum 1.0 ;
+ lv2:minimum 0.0 ;
+ lv2:name "Range" ;
+ lv2:symbol "range"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0.5 ;
+ lv2:index 5 ;
+ lv2:maximum 1.0 ;
+ lv2:minimum 0.0 ;
+ lv2:name "Freq" ;
+ lv2:symbol "freq"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0.5 ;
+ lv2:index 6 ;
+ lv2:maximum 1.0 ;
+ lv2:minimum 0.0 ;
+ lv2:name "Mix" ;
+ lv2:symbol "mix"
+ ] .
diff --git a/fomp.lv2/cs_chorus1.ttl b/fomp.lv2/cs_chorus1.ttl
new file mode 100644
index 0000000..326195b
--- /dev/null
+++ b/fomp.lv2/cs_chorus1.ttl
@@ -0,0 +1,77 @@
+@prefix doap: <http://usefulinc.com/ns/doap#> .
+@prefix fomp: <http://drobilla.net/plugins/fomp/> .
+@prefix lv2: <http://lv2plug.in/ns/lv2core#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix units: <http://lv2plug.in/ns/extensions/units#> .
+
+fomp:cs_chorus1
+ a lv2:Plugin ,
+ lv2:ChorusPlugin ;
+ doap:name "CS Chorus 1" ;
+ lv2:minorVersion 0 ;
+ lv2:optionalFeature lv2:hardRTCapable ;
+ lv2:project fomp: ;
+ lv2:port [
+ a lv2:AudioPort ,
+ lv2:InputPort ;
+ lv2:index 0 ;
+ lv2:name "Input" ;
+ lv2:symbol "in"
+ ] , [
+ a lv2:AudioPort ,
+ lv2:OutputPort ;
+ lv2:index 1 ;
+ lv2:name "Output" ;
+ lv2:symbol "out"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0.0 ;
+ lv2:index 2 ;
+ lv2:maximum 30.0 ;
+ lv2:minimum 0.0 ;
+ lv2:name "Delay" ;
+ lv2:symbol "delay" ;
+ units:unit units:ms
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:index 3 ;
+ lv2:maximum 10.0 ;
+ lv2:minimum 0.003 ;
+ lv2:name "Mod Frequency 1" ;
+ lv2:portProperty <http://lv2plug.in/ns/ext/port-props#logarithmic> ;
+ lv2:symbol "mod_freq_1" ;
+ units:unit units:hz
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0.0 ;
+ lv2:index 4 ;
+ lv2:maximum 10.0 ;
+ lv2:minimum 0.0 ;
+ lv2:name "Mod Amplitude 1" ;
+ lv2:symbol "mod_amp_1" ;
+ units:unit units:ms
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:index 5 ;
+ lv2:maximum 30.0 ;
+ lv2:minimum 0.01 ;
+ lv2:name "Mod Frequency 2" ;
+ lv2:portProperty <http://lv2plug.in/ns/ext/port-props#logarithmic> ;
+ lv2:symbol "mod_freq_2" ;
+ units:unit units:hz
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0.0 ;
+ lv2:index 6 ;
+ lv2:maximum 3.0 ;
+ lv2:minimum 0.0 ;
+ lv2:name "Mod Amplitude 2" ;
+ lv2:symbol "mod_amp_2" ;
+ units:unit units:ms
+ ] ;
+ rdfs:comment "Based on a CSound orchestra file by Sean Costello. There are two low frequency oscillators, each having three outputs that are 120 degrees apart in phase. The summed outputs modulate three delay lines. Make sure the static delay (first parameter) is at least equal to the sum of the two modulation depths." .
diff --git a/fomp.lv2/cs_chorus2.ttl b/fomp.lv2/cs_chorus2.ttl
new file mode 100644
index 0000000..acfe3e1
--- /dev/null
+++ b/fomp.lv2/cs_chorus2.ttl
@@ -0,0 +1,78 @@
+@prefix doap: <http://usefulinc.com/ns/doap#> .
+@prefix fomp: <http://drobilla.net/plugins/fomp/> .
+@prefix lv2: <http://lv2plug.in/ns/lv2core#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix units: <http://lv2plug.in/ns/extensions/units#> .
+
+fomp:cs_chorus2
+ a lv2:Plugin ,
+ lv2:ChorusPlugin ;
+ doap:name "CS Chorus 2" ;
+ lv2:microVersion 0 ;
+ lv2:minorVersion 0 ;
+ lv2:optionalFeature lv2:hardRTCapable ;
+ lv2:project fomp: ;
+ lv2:port [
+ a lv2:AudioPort ,
+ lv2:InputPort ;
+ lv2:index 0 ;
+ lv2:name "Input" ;
+ lv2:symbol "in"
+ ] , [
+ a lv2:AudioPort ,
+ lv2:OutputPort ;
+ lv2:index 1 ;
+ lv2:name "Output" ;
+ lv2:symbol "out1"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0.0 ;
+ lv2:index 2 ;
+ lv2:maximum 30.0 ;
+ lv2:minimum 0.0 ;
+ lv2:name "Delay" ;
+ lv2:symbol "delay" ;
+ units:unit units:ms
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:index 3 ;
+ lv2:maximum 10.0 ;
+ lv2:minimum 0.003 ;
+ lv2:name "Mod Frequency 1" ;
+ lv2:portProperty <http://lv2plug.in/ns/ext/port-props#logarithmic> ;
+ lv2:symbol "mod_freq_1" ;
+ units:unit units:ms
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0.0 ;
+ lv2:index 4 ;
+ lv2:maximum 10.0 ;
+ lv2:minimum 0.0 ;
+ lv2:name "Mod Amplitude 1" ;
+ lv2:symbol "mod_amp_1" ;
+ units:unit units:ms
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:index 5 ;
+ lv2:maximum 30.0 ;
+ lv2:minimum 0.01 ;
+ lv2:name "Mod Frequency 2" ;
+ lv2:portProperty <http://lv2plug.in/ns/ext/port-props#logarithmic> ;
+ lv2:symbol "mod_freq_2" ;
+ units:unit units:hz
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0.0 ;
+ lv2:index 6 ;
+ lv2:maximum 3.0 ;
+ lv2:minimum 0.0 ;
+ lv2:name "Mod Amplitude 2" ;
+ lv2:symbol "mod_amp_2" ;
+ units:unit units:ms
+ ] ;
+ rdfs:comment "Functionally identical to variant 1, but upsamples the input to the delay lines in an attempt to mitigate the errors produced by the linear interpolation at the output." .
diff --git a/fomp.lv2/cs_phaser1.ttl b/fomp.lv2/cs_phaser1.ttl
new file mode 100644
index 0000000..91aea11
--- /dev/null
+++ b/fomp.lv2/cs_phaser1.ttl
@@ -0,0 +1,111 @@
+@prefix doap: <http://usefulinc.com/ns/doap#> .
+@prefix fomp: <http://drobilla.net/plugins/fomp/> .
+@prefix lv2: <http://lv2plug.in/ns/lv2core#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix units: <http://lv2plug.in/ns/extensions/units#> .
+
+fomp:cs_phaser1
+ a lv2:Plugin ,
+ lv2:PhaserPlugin ;
+ doap:name "CS Phaser 1" ;
+ lv2:microVersion 0 ;
+ lv2:minorVersion 0 ;
+ lv2:optionalFeature lv2:hardRTCapable ;
+ lv2:project fomp: ;
+ lv2:port [
+ a lv2:AudioPort ,
+ lv2:InputPort ;
+ lv2:index 0 ;
+ lv2:name "Input" ;
+ lv2:symbol "in"
+ ] , [
+ a lv2:AudioPort ,
+ lv2:OutputPort ;
+ lv2:index 1 ;
+ lv2:name "Output" ;
+ lv2:symbol "out"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0.0 ;
+ lv2:index 10 ;
+ lv2:maximum 1.0 ;
+ lv2:minimum -1.0 ;
+ lv2:name "Feedback gain" ;
+ lv2:symbol "fb_gain"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0.0 ;
+ lv2:index 11 ;
+ lv2:maximum 1.0 ;
+ lv2:minimum -1.0 ;
+ lv2:name "Output mix" ;
+ lv2:symbol "out_mix"
+ ] , [
+ a lv2:CVPort ,
+ lv2:InputPort ;
+ lv2:index 2 ;
+ lv2:name "FM" ;
+ lv2:symbol "fm"
+ ] , [
+ a lv2:CVPort ,
+ lv2:InputPort ;
+ lv2:index 3 ;
+ lv2:name "Exp FM" ;
+ lv2:symbol "exp_fm"
+ ] , [
+ a lv2:CVPort ,
+ lv2:InputPort ;
+ lv2:index 4 ;
+ lv2:name "Lin FM" ;
+ lv2:symbol "lin_fm"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0.0 ;
+ lv2:index 5 ;
+ lv2:maximum 10.0 ;
+ lv2:minimum -40.0 ;
+ lv2:name "Input gain" ;
+ lv2:symbol "in_gain" ;
+ units:unit units:db
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:index 6 ;
+ lv2:maximum 30.0 ;
+ lv2:minimum 1.0 ;
+ lv2:default 1.0 ;
+ lv2:name "Sections" ;
+ lv2:portProperty lv2:integer ;
+ lv2:symbol "sections"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0.0 ;
+ lv2:index 7 ;
+ lv2:maximum 6.0 ;
+ lv2:minimum -6.0 ;
+ lv2:name "Frequency" ;
+ lv2:symbol "freq"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:index 8 ;
+ lv2:maximum 10.0 ;
+ lv2:minimum 0.0 ;
+ lv2:default 0.0 ;
+ lv2:name "Exp FM gain" ;
+ lv2:symbol "exp_fm_gain"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:index 9 ;
+ lv2:maximum 10.0 ;
+ lv2:minimum 0.0 ;
+ lv2:default 0.0 ;
+ lv2:name "Lin FM gain" ;
+ lv2:symbol "lin_fm_gain"
+ ] ;
+ rdfs:comment "This is similar to the CSound module 'phaser1'. It's a series connection of 1 to 30 first order allpass filters with feedback. For 'Output mix', the range -1 to 0 crossfades between the inverted output and the input, and the range 0 to 1 crossfades between the input and the non-inverted output. Without feedback, the maximum effect is at +/- 0.5. For both 'Feedback gain' and 'Output mix', the best polarity depends on whether the number of sections is even or odd." .
diff --git a/fomp.lv2/cs_phaser1_lfo.ttl b/fomp.lv2/cs_phaser1_lfo.ttl
new file mode 100644
index 0000000..74cba4d
--- /dev/null
+++ b/fomp.lv2/cs_phaser1_lfo.ttl
@@ -0,0 +1,112 @@
+@prefix doap: <http://usefulinc.com/ns/doap#> .
+@prefix fomp: <http://drobilla.net/plugins/fomp/> .
+@prefix lv2: <http://lv2plug.in/ns/lv2core#> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix units: <http://lv2plug.in/ns/extensions/units#> .
+
+fomp:cs_phaser1_lfo
+ a lv2:Plugin ,
+ lv2:PhaserPlugin ;
+ doap:name "CS Phaser 1 with LFO" ;
+ lv2:microVersion 0 ;
+ lv2:minorVersion 0 ;
+ lv2:optionalFeature lv2:hardRTCapable ;
+ lv2:project fomp: ;
+ lv2:port [
+ a lv2:AudioPort ,
+ lv2:InputPort ;
+ lv2:index 0 ;
+ lv2:name "Input" ;
+ lv2:symbol "in"
+ ] , [
+ a lv2:AudioPort ,
+ lv2:OutputPort ;
+ lv2:index 1 ;
+ lv2:name "Output" ;
+ lv2:symbol "out"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ units:unit units:db ;
+ lv2:default 0.0 ;
+ lv2:index 2 ;
+ lv2:maximum 10.0 ;
+ lv2:minimum -40.0 ;
+ lv2:name "Input gain" ;
+ lv2:symbol "in_gain"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:index 3 ;
+ lv2:maximum 30.0 ;
+ lv2:minimum 1.0 ;
+ lv2:name "Sections" ;
+ lv2:portProperty lv2:integer ;
+ lv2:symbol "sections"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0.0 ;
+ lv2:index 4 ;
+ lv2:maximum 6.0 ;
+ lv2:minimum -6.0 ;
+ lv2:name "Frequency" ;
+ lv2:symbol "freq"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:index 5 ;
+ lv2:maximum 30.0 ;
+ lv2:minimum 0.01 ;
+ lv2:name "LFO frequency" ;
+ lv2:portProperty <http://lv2plug.in/ns/ext/port-props#logarithmic> ;
+ lv2:symbol "lfo_freq" ;
+ units:unit units:hz
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0.0 ;
+ lv2:index 6 ;
+ lv2:maximum 1.0 ;
+ lv2:minimum -1.0 ;
+ lv2:name "LFO waveform" ;
+ lv2:symbol "lfo_waveform" ;
+ lv2:scalePoint [
+ rdfs:label "Falling Saw" ;
+ rdf:value -1.0
+ ] , [
+ rdfs:label "Triangle" ;
+ rdf:value 0.0
+ ] , [
+ rdfs:label "Rising Saw" ;
+ rdf:value 1.0
+ ]
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:index 7 ;
+ lv2:maximum 10.0 ;
+ lv2:minimum 0.0 ;
+ lv2:name "Modulation gain" ;
+ lv2:symbol "mod_gain"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0.0 ;
+ lv2:index 8 ;
+ lv2:maximum 1.0 ;
+ lv2:minimum -1.0 ;
+ lv2:name "Feedback gain" ;
+ lv2:symbol "fb_gain"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0.0 ;
+ lv2:index 9 ;
+ lv2:maximum 1.0 ;
+ lv2:minimum -1.0 ;
+ lv2:name "Output mix" ;
+ lv2:symbol "out_mix"
+ ] ;
+ rdfs:comment "Similar to CS Phaser 1, but the external modulation has been replaced by a built-in LFO." .
diff --git a/fomp.lv2/manifest.ttl.in b/fomp.lv2/manifest.ttl.in
new file mode 100644
index 0000000..fa8730e
--- /dev/null
+++ b/fomp.lv2/manifest.ttl.in
@@ -0,0 +1,110 @@
+@prefix doap: <http://usefulinc.com/ns/doap#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix fomp: <http://drobilla.net/plugins/fomp/> .
+@prefix lv2: <http://lv2plug.in/ns/lv2core#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+
+<http://drobilla.net/drobilla#me>
+ a foaf:Person ;
+ foaf:name "David Robillard" ;
+ foaf:mbox <mailto:d@drobilla.net> ;
+ rdfs:seeAlso <http://drobilla.net/drobilla> .
+
+fomp:
+ a doap:Project ;
+ lv2:symbol "fomp" ;
+ doap:name "Fomp LV2" ;
+ doap:shortdesc "An LV2 port of Fons Adriaensen's modular plugins." ;
+ doap:homepage <http://drobilla.net/software/fomp-lv2> ;
+ doap:license <http://opensource.org/licenses/gpl-2.0> ;
+ doap:maintainer <http://drobilla.net/drobilla#me> ;
+ doap:developer [
+ a foaf:Person ;
+ foaf:name "Fons Adriaensen" ;
+ foaf:mbox <mailto:fons@linuxaudio.org>
+ ] .
+
+fomp:mvclpf1
+ a lv2:Plugin ;
+ rdfs:seeAlso <mvclpf1.ttl> ;
+ lv2:binary <mvclpf24@LIB_EXT@> .
+
+fomp:mvclpf2
+ a lv2:Plugin ;
+ rdfs:seeAlso <mvclpf2.ttl> ;
+ lv2:binary <mvclpf24@LIB_EXT@> .
+
+fomp:mvclpf3
+ a lv2:Plugin ;
+ rdfs:seeAlso <mvclpf3.ttl> ;
+ lv2:binary <mvclpf24@LIB_EXT@> .
+
+fomp:mvclpf4
+ a lv2:Plugin ;
+ rdfs:seeAlso <mvclpf4.ttl> ;
+ lv2:binary <mvclpf24@LIB_EXT@> .
+
+fomp:mvchpf1
+ a lv2:Plugin ;
+ rdfs:seeAlso <mvchpf1.ttl> ;
+ lv2:binary <mvchpf24@LIB_EXT@> .
+
+fomp:cs_chorus1
+ a lv2:Plugin ;
+ rdfs:seeAlso <cs_chorus1.ttl> ;
+ lv2:binary <cs_chorus@LIB_EXT@> .
+
+fomp:cs_chorus2
+ a lv2:Plugin ;
+ rdfs:seeAlso <cs_chorus2.ttl> ;
+ lv2:binary <cs_chorus@LIB_EXT@> .
+
+fomp:cs_phaser1
+ a lv2:Plugin ;
+ rdfs:seeAlso <cs_phaser1.ttl> ;
+ lv2:binary <cs_phaser@LIB_EXT@> .
+
+fomp:cs_phaser1_lfo
+ a lv2:Plugin ;
+ rdfs:seeAlso <cs_phaser1_lfo.ttl> ;
+ lv2:binary <cs_phaser@LIB_EXT@> .
+
+fomp:triple_chorus
+ a lv2:Plugin ;
+ rdfs:seeAlso <triple_chorus.ttl> ;
+ lv2:binary <cs_chorus@LIB_EXT@> .
+
+fomp:pulse_vco
+ a lv2:Plugin ;
+ rdfs:seeAlso <pulse_vco.ttl> ;
+ lv2:binary <blvco@LIB_EXT@> .
+
+fomp:saw_vco
+ a lv2:Plugin ;
+ rdfs:seeAlso <saw_vco.ttl> ;
+ lv2:binary <blvco@LIB_EXT@> .
+
+fomp:rec_vco
+ a lv2:Plugin ;
+ rdfs:seeAlso <rec_vco.ttl> ;
+ lv2:binary <blvco@LIB_EXT@> .
+
+fomp:parametric1
+ a lv2:Plugin ;
+ rdfs:seeAlso <parametric1.ttl> ;
+ lv2:binary <filters@LIB_EXT@> .
+
+fomp:autowah
+ a lv2:Plugin ;
+ rdfs:seeAlso <autowah.ttl> ;
+ lv2:binary <autowah@LIB_EXT@> .
+
+fomp:reverb
+ a lv2:Plugin ;
+ rdfs:seeAlso <reverb.ttl> ;
+ lv2:binary <reverbs@LIB_EXT@> .
+
+fomp:reverb_amb
+ a lv2:Plugin ;
+ rdfs:seeAlso <reverb_amb.ttl> ;
+ lv2:binary <reverbs@LIB_EXT@> .
diff --git a/fomp.lv2/mvchpf1.ttl b/fomp.lv2/mvchpf1.ttl
new file mode 100644
index 0000000..b4a2b13
--- /dev/null
+++ b/fomp.lv2/mvchpf1.ttl
@@ -0,0 +1,82 @@
+@prefix doap: <http://usefulinc.com/ns/doap#> .
+@prefix fomp: <http://drobilla.net/plugins/fomp/> .
+@prefix lv2: <http://lv2plug.in/ns/lv2core#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix units: <http://lv2plug.in/ns/extensions/units#> .
+
+fomp:mvchpf1
+ a lv2:Plugin ,
+ lv2:HighpassPlugin ;
+ doap:name "Moog High-Pass Filter 1" ;
+ lv2:microVersion 0 ;
+ lv2:minorVersion 0 ;
+ lv2:optionalFeature lv2:hardRTCapable ;
+ lv2:project fomp: ;
+ lv2:port [
+ a lv2:AudioPort ,
+ lv2:InputPort ;
+ lv2:index 0 ;
+ lv2:name "Input" ;
+ lv2:symbol "in"
+ ] , [
+ a lv2:AudioPort ,
+ lv2:OutputPort ;
+ lv2:index 1 ;
+ lv2:name "Output" ;
+ lv2:symbol "out"
+ ] , [
+ a lv2:CVPort ,
+ lv2:InputPort ;
+ lv2:index 2 ;
+ lv2:name "FM" ;
+ lv2:symbol "fm" ;
+ units:unit units:oct
+ ] , [
+ a lv2:CVPort ,
+ lv2:InputPort ;
+ lv2:index 3 ;
+ lv2:name "Exp FM" ;
+ lv2:symbol "exp_fm" ;
+ units:unit units:oct
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0.0 ;
+ lv2:index 4 ;
+ lv2:maximum 10.0 ;
+ lv2:minimum -60.0 ;
+ lv2:name "Input gain" ;
+ lv2:symbol "in_gain" ;
+ units:unit units:db
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 440.0 ;
+ lv2:index 5 ;
+ lv2:maximum 1.0 ;
+ lv2:minimum 0.000001 ;
+ lv2:name "Frequency" ;
+ lv2:portProperty <http://lv2plug.in/ns/ext/port-props#logarithmic> ,
+ lv2:sampleRate ;
+ lv2:symbol "freq" ;
+ units:unit units:hz
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:index 6 ;
+ lv2:maximum 10.0 ;
+ lv2:minimum 0.0 ;
+ lv2:name "Exp FM gain" ;
+ lv2:symbol "exp_gm_gain"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0.0 ;
+ lv2:index 7 ;
+ lv2:maximum 15.0 ;
+ lv2:minimum -15.0 ;
+ lv2:name "Output gain" ;
+ lv2:symbol "out_gain" ;
+ units:unit units:db
+ ] ;
+ rdfs:comment "Based on the voltage controlled highpass filter by Robert Moog, with some attention to the nonlinear effects. This is quite different from the lowpass filters. When you 'overdrive' the filter, the cutoff frequency will rise. This first version is really very experimental." .
diff --git a/fomp.lv2/mvclpf1.ttl b/fomp.lv2/mvclpf1.ttl
new file mode 100644
index 0000000..25d92fe
--- /dev/null
+++ b/fomp.lv2/mvclpf1.ttl
@@ -0,0 +1,104 @@
+@prefix doap: <http://usefulinc.com/ns/doap#> .
+@prefix fomp: <http://drobilla.net/plugins/fomp/> .
+@prefix lv2: <http://lv2plug.in/ns/lv2core#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix units: <http://lv2plug.in/ns/extensions/units#> .
+
+fomp:mvclpf1
+ a lv2:Plugin ,
+ lv2:LowpassPlugin ;
+ doap:name "Moog Low-Pass Filter 1" ;
+ lv2:microVersion 0 ;
+ lv2:minorVersion 0 ;
+ lv2:optionalFeature lv2:hardRTCapable ;
+ lv2:project fomp: ;
+ lv2:port [
+ a lv2:AudioPort ,
+ lv2:InputPort ;
+ lv2:index 0 ;
+ lv2:name "Input" ;
+ lv2:symbol "in"
+ ] , [
+ a lv2:AudioPort ,
+ lv2:OutputPort ;
+ lv2:index 1 ;
+ lv2:name "Output" ;
+ lv2:symbol "out"
+ ] , [
+ a lv2:CVPort ,
+ lv2:InputPort ;
+ lv2:index 2 ;
+ lv2:name "FM" ;
+ lv2:symbol "fm" ;
+ units:unit units:oct
+ ] , [
+ a lv2:CVPort ,
+ lv2:InputPort ;
+ lv2:index 3 ;
+ lv2:name "Exp FM" ;
+ lv2:symbol "exp_fm" ;
+ units:unit units:oct
+ ] , [
+ a lv2:CVPort ,
+ lv2:InputPort ;
+ lv2:index 4 ;
+ lv2:name "Resonance Mod" ;
+ lv2:symbol "res_mod"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0.0 ;
+ lv2:index 5 ;
+ lv2:maximum 10.0 ;
+ lv2:minimum -60.0 ;
+ lv2:name "Input gain" ;
+ lv2:symbol "in_gain" ;
+ units:unit units:db
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 440.0 ;
+ lv2:index 6 ;
+ lv2:maximum 1.0 ;
+ lv2:minimum 0.000001 ;
+ lv2:name "Frequency" ;
+ lv2:portProperty <http://lv2plug.in/ns/ext/port-props#logarithmic> ,
+ lv2:sampleRate ;
+ lv2:symbol "freq" ;
+ units:unit units:hz
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:index 7 ;
+ lv2:maximum 10.0 ;
+ lv2:minimum 0.0 ;
+ lv2:name "Exp. FM gain" ;
+ lv2:symbol "exp_fm_gain"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:index 8 ;
+ lv2:maximum 1.0 ;
+ lv2:minimum 0.0 ;
+ lv2:name "Resonance" ;
+ lv2:symbol "res"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:index 9 ;
+ lv2:maximum 1.0 ;
+ lv2:minimum 0.0 ;
+ lv2:name "Resonance gain" ;
+ lv2:symbol "res_gain"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0.0 ;
+ lv2:index 10 ;
+ lv2:maximum 15.0 ;
+ lv2:minimum -15.0 ;
+ lv2:name "Output gain" ;
+ lv2:symbol "out_gain" ;
+ units:unit units:db
+ ] ;
+ rdfs:comment "A fairly simple design which does not even pretend to come close the 'real thing'. It uses a very crude approximation of the non-linear resistor in the first filter section only. Retained in this distribution because it's a cheap (in terms of CPU usage) general purpose 24 dB/oct lowpass filter that could be useful." .
diff --git a/fomp.lv2/mvclpf2.ttl b/fomp.lv2/mvclpf2.ttl
new file mode 100644
index 0000000..a7f5ff0
--- /dev/null
+++ b/fomp.lv2/mvclpf2.ttl
@@ -0,0 +1,104 @@
+@prefix doap: <http://usefulinc.com/ns/doap#> .
+@prefix fomp: <http://drobilla.net/plugins/fomp/> .
+@prefix lv2: <http://lv2plug.in/ns/lv2core#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix units: <http://lv2plug.in/ns/extensions/units#> .
+
+fomp:mvclpf2
+ a lv2:Plugin ,
+ lv2:LowpassPlugin ;
+ doap:name "Moog Low-Pass Filter 2" ;
+ lv2:microVersion 0 ;
+ lv2:minorVersion 0 ;
+ lv2:optionalFeature lv2:hardRTCapable ;
+ lv2:project fomp: ;
+ lv2:port [
+ a lv2:AudioPort ,
+ lv2:InputPort ;
+ lv2:index 0 ;
+ lv2:name "Input" ;
+ lv2:symbol "in"
+ ] , [
+ a lv2:AudioPort ,
+ lv2:OutputPort ;
+ lv2:index 1 ;
+ lv2:name "Output" ;
+ lv2:symbol "out"
+ ] , [
+ a lv2:CVPort ,
+ lv2:InputPort ;
+ lv2:index 2 ;
+ lv2:name "FM" ;
+ lv2:symbol "fm" ;
+ units:unit units:oct
+ ] , [
+ a lv2:CVPort ,
+ lv2:InputPort ;
+ lv2:index 3 ;
+ lv2:name "Exp FM" ;
+ lv2:symbol "exp_fm" ;
+ units:unit units:oct
+ ] , [
+ a lv2:CVPort ,
+ lv2:InputPort ;
+ lv2:index 4 ;
+ lv2:name "Resonance Mod" ;
+ lv2:symbol "res_mod"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0.0 ;
+ lv2:index 5 ;
+ lv2:maximum 10.0 ;
+ lv2:minimum -60.0 ;
+ lv2:name "Input gain" ;
+ lv2:symbol "in_gain" ;
+ units:unit units:db
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 440.0 ;
+ lv2:index 6 ;
+ lv2:maximum 1.0 ;
+ lv2:minimum 0.000001 ;
+ lv2:name "Frequency" ;
+ lv2:portProperty <http://lv2plug.in/ns/ext/port-props#logarithmic> ,
+ lv2:sampleRate ;
+ lv2:symbol "freq" ;
+ units:unit units:hz
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:index 7 ;
+ lv2:maximum 10.0 ;
+ lv2:minimum 0.0 ;
+ lv2:name "Exp FM gain" ;
+ lv2:symbol "exp_fm_gain"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:index 8 ;
+ lv2:maximum 1.0 ;
+ lv2:minimum 0.0 ;
+ lv2:name "Resonance" ;
+ lv2:symbol "res"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:index 9 ;
+ lv2:maximum 1.0 ;
+ lv2:minimum 0.0 ;
+ lv2:name "Resonance gain" ;
+ lv2:symbol "res_gain"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0.0 ;
+ lv2:index 10 ;
+ lv2:maximum 15.0 ;
+ lv2:minimum -15.0 ;
+ lv2:name "Output gain" ;
+ lv2:symbol "out_gain" ;
+ units:unit units:db
+ ] ;
+ rdfs:comment "Uses five non-linear elements, in the input and in all four filter sections. It works by using the derivative of the nonlinearity (for which 1 / (1 + x * x) is reasonable approximation). The main advantage of this is that only one evaluation of the non-linear function is required for each section. The four variables that contain the filter state (c1...c4) represent not the voltage on the capacitors (as in the first filter) but the current flowing in the resistive part." .
diff --git a/fomp.lv2/mvclpf3.ttl b/fomp.lv2/mvclpf3.ttl
new file mode 100644
index 0000000..9d6ff60
--- /dev/null
+++ b/fomp.lv2/mvclpf3.ttl
@@ -0,0 +1,104 @@
+@prefix doap: <http://usefulinc.com/ns/doap#> .
+@prefix fomp: <http://drobilla.net/plugins/fomp/> .
+@prefix lv2: <http://lv2plug.in/ns/lv2core#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix units: <http://lv2plug.in/ns/extensions/units#> .
+
+fomp:mvclpf3
+ a lv2:Plugin ,
+ lv2:LowpassPlugin ;
+ doap:name "Moog Low-Pass Filter 3" ;
+ lv2:microVersion 0 ;
+ lv2:minorVersion 0 ;
+ lv2:optionalFeature lv2:hardRTCapable ;
+ lv2:project fomp: ;
+ lv2:port [
+ a lv2:AudioPort ,
+ lv2:InputPort ;
+ lv2:index 0 ;
+ lv2:name "Input" ;
+ lv2:symbol "in"
+ ] , [
+ a lv2:AudioPort ,
+ lv2:OutputPort ;
+ lv2:index 1 ;
+ lv2:name "Output" ;
+ lv2:symbol "out"
+ ] , [
+ a lv2:CVPort ,
+ lv2:InputPort ;
+ lv2:index 2 ;
+ lv2:name "FM" ;
+ lv2:symbol "fm" ;
+ units:unit units:oct
+ ] , [
+ a lv2:CVPort ,
+ lv2:InputPort ;
+ lv2:index 3 ;
+ lv2:name "Exp FM" ;
+ lv2:symbol "exp_fm" ;
+ units:unit units:oct
+ ] , [
+ a lv2:CVPort ,
+ lv2:InputPort ;
+ lv2:index 4 ;
+ lv2:name "Resonance Mod" ;
+ lv2:symbol "res_mod"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0.0 ;
+ lv2:index 5 ;
+ lv2:maximum 10.0 ;
+ lv2:minimum -60.0 ;
+ lv2:name "Input gain" ;
+ lv2:symbol "in_gain" ;
+ units:unit units:db
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 440.0 ;
+ lv2:index 6 ;
+ lv2:maximum 1.0 ;
+ lv2:minimum 0.000001 ;
+ lv2:name "Frequency" ;
+ lv2:portProperty <http://lv2plug.in/ns/ext/port-props#logarithmic> ,
+ lv2:sampleRate ;
+ lv2:symbol "freq" ;
+ units:unit units:hz
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:index 7 ;
+ lv2:maximum 10.0 ;
+ lv2:minimum 0.0 ;
+ lv2:name "Exp FM gain" ;
+ lv2:symbol "exp_fm_gain"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:index 8 ;
+ lv2:maximum 1.0 ;
+ lv2:minimum 0.0 ;
+ lv2:name "Resonance" ;
+ lv2:symbol "res"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:index 9 ;
+ lv2:maximum 1.0 ;
+ lv2:minimum 0.0 ;
+ lv2:name "Resonance gain" ;
+ lv2:symbol "res_gain"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0.0 ;
+ lv2:index 10 ;
+ lv2:maximum 15.0 ;
+ lv2:minimum -15.0 ;
+ lv2:name "Output gain" ;
+ lv2:symbol "out_gain" ;
+ units:unit units:db
+ ] ;
+ rdfs:comment "Based on variant 2, with two differences. It uses the the technique described by Stilson and Smith to extend the constant-Q range, and the internal sample frequency is doubled, giving a better approximation to the non-linear behaviour at high freqencies. This variant has high Q over the entire frequency range and will oscillate up to above 10 kHz, while the two others show a decreasing Q at high frequencies. This filter is reasonably well tuned, and can be 'played' as a VCO up to at least 5 kHz." .
diff --git a/fomp.lv2/mvclpf4.ttl b/fomp.lv2/mvclpf4.ttl
new file mode 100644
index 0000000..8c7c9e0
--- /dev/null
+++ b/fomp.lv2/mvclpf4.ttl
@@ -0,0 +1,120 @@
+@prefix doap: <http://usefulinc.com/ns/doap#> .
+@prefix fomp: <http://drobilla.net/plugins/fomp/> .
+@prefix lv2: <http://lv2plug.in/ns/lv2core#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix units: <http://lv2plug.in/ns/extensions/units#> .
+
+fomp:mvclpf4
+ a lv2:Plugin ,
+ lv2:LowpassPlugin ;
+ doap:name "Moog Low-Pass Filter 4" ;
+ lv2:microVersion 0 ;
+ lv2:minorVersion 0 ;
+ lv2:optionalFeature lv2:hardRTCapable ;
+ lv2:project fomp: ;
+ lv2:port [
+ a lv2:AudioPort ,
+ lv2:InputPort ;
+ lv2:index 0 ;
+ lv2:name "Input" ;
+ lv2:symbol "in"
+ ] , [
+ a lv2:AudioPort ,
+ lv2:OutputPort ;
+ lv2:index 1 ;
+ lv2:name "Output" ;
+ lv2:symbol "out"
+ ] , [
+ a lv2:CVPort ,
+ lv2:InputPort ;
+ lv2:default 0.0 ;
+ lv2:index 2 ;
+ lv2:name "FM" ;
+ lv2:symbol "fm" ;
+ units:unit units:oct
+ ] , [
+ a lv2:CVPort ,
+ lv2:InputPort ;
+ lv2:default 0.0 ;
+ lv2:index 3 ;
+ lv2:name "Exp FM" ;
+ lv2:symbol "exp_fm" ;
+ units:unit units:oct
+ ] , [
+ a lv2:CVPort ,
+ lv2:InputPort ;
+ lv2:default 0.0 ;
+ lv2:index 4 ;
+ lv2:name "Resonance Mod" ;
+ lv2:symbol "res_mod"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0.0 ;
+ lv2:index 5 ;
+ lv2:maximum 10.0 ;
+ lv2:minimum -60.0 ;
+ lv2:name "Input gain" ;
+ lv2:symbol "in_gain" ;
+ units:unit units:db
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 440.0 ;
+ lv2:index 6 ;
+ lv2:maximum 1.0 ;
+ lv2:minimum 0.000001 ;
+ lv2:name "Frequency" ;
+ lv2:portProperty <http://lv2plug.in/ns/ext/port-props#logarithmic> ,
+ lv2:sampleRate ;
+ lv2:symbol "freq" ;
+ units:unit units:hz
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0.0 ;
+ lv2:index 7 ;
+ lv2:maximum 10.0 ;
+ lv2:minimum 0.0 ;
+ lv2:name "Exp FM gain" ;
+ lv2:symbol "exp_fm_gain"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0.0 ;
+ lv2:index 8 ;
+ lv2:maximum 1.0 ;
+ lv2:minimum 0.0 ;
+ lv2:name "Resonance" ;
+ lv2:symbol "res"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0.0 ;
+ lv2:index 9 ;
+ lv2:maximum 1.0 ;
+ lv2:minimum 0.0 ;
+ lv2:name "Resonance gain" ;
+ lv2:symbol "res_gain"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0.0 ;
+ lv2:index 10 ;
+ lv2:maximum 4.0 ;
+ lv2:minimum 0.0 ;
+ lv2:name "Filter poles" ;
+ lv2:portProperty lv2:integer ;
+ lv2:symbol "poles"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0.0 ;
+ lv2:index 11 ;
+ lv2:maximum 15.0 ;
+ lv2:minimum -15.0 ;
+ lv2:name "Output gain" ;
+ lv2:symbol "out_gain" ;
+ units:unit units:db
+ ] ;
+ rdfs:comment "The same as variant 3, but adds a selection of 0, 6, 12, 18 or 24 db/oct output." .
diff --git a/fomp.lv2/parametric1.ttl b/fomp.lv2/parametric1.ttl
new file mode 100644
index 0000000..545c03d
--- /dev/null
+++ b/fomp.lv2/parametric1.ttl
@@ -0,0 +1,196 @@
+@prefix doap: <http://usefulinc.com/ns/doap#> .
+@prefix fomp: <http://drobilla.net/plugins/fomp/> .
+@prefix lv2: <http://lv2plug.in/ns/lv2core#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix units: <http://lv2plug.in/ns/extensions/units#> .
+
+fomp:parametric1
+ a lv2:Plugin ,
+ lv2:ParaEQPlugin ;
+ doap:name "4-Band Parametric Filter" ;
+ lv2:microVersion 0 ;
+ lv2:minorVersion 0 ;
+ lv2:optionalFeature lv2:hardRTCapable ;
+ lv2:project fomp: ;
+ lv2:port [
+ a lv2:AudioPort ,
+ lv2:InputPort ;
+ lv2:index 0 ;
+ lv2:name "Input" ;
+ lv2:symbol "in"
+ ] , [
+ a lv2:AudioPort ,
+ lv2:OutputPort ;
+ lv2:index 1 ;
+ lv2:name "Output" ;
+ lv2:symbol "out"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0.0 ;
+ lv2:index 2 ;
+ lv2:name "Filter" ;
+ lv2:portProperty lv2:toggled ;
+ lv2:symbol "filter"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0.0 ;
+ lv2:index 3 ;
+ lv2:maximum 20.0 ;
+ lv2:minimum -20.0 ;
+ lv2:name "Gain" ;
+ lv2:symbol "gain"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0.0 ;
+ lv2:index 4 ;
+ lv2:name "Section 1" ;
+ lv2:portProperty lv2:toggled ;
+ lv2:symbol "sec_1"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 200.0 ;
+ lv2:index 5 ;
+ lv2:maximum 2000.0 ;
+ lv2:minimum 20.0 ;
+ lv2:name "Frequency 1" ;
+ lv2:portProperty <http://lv2plug.in/ns/ext/port-props#logarithmic> ;
+ lv2:symbol "freq_1" ;
+ units:unit units:hz
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 1.0 ;
+ lv2:index 6 ;
+ lv2:maximum 8.0 ;
+ lv2:minimum 0.125 ;
+ lv2:name "Bandwidth 1" ;
+ lv2:portProperty <http://lv2plug.in/ns/ext/port-props#logarithmic> ;
+ lv2:symbol "bw_1"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0.0 ;
+ lv2:index 7 ;
+ lv2:maximum 20.0 ;
+ lv2:minimum -20.0 ;
+ lv2:name "Gain 1" ;
+ lv2:symbol "gain_1"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0.0 ;
+ lv2:index 8 ;
+ lv2:name "Section 2" ;
+ lv2:portProperty lv2:toggled ;
+ lv2:symbol "sec_2"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 400.0 ;
+ lv2:index 9 ;
+ lv2:maximum 4000.0 ;
+ lv2:minimum 40.0 ;
+ lv2:name "Frequency 2" ;
+ lv2:portProperty <http://lv2plug.in/ns/ext/port-props#logarithmic> ;
+ lv2:symbol "freq_2" ;
+ units:unit units:hz
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 1.0 ;
+ lv2:index 10 ;
+ lv2:maximum 8.0 ;
+ lv2:minimum 0.125 ;
+ lv2:name "Bandwidth 2" ;
+ lv2:portProperty <http://lv2plug.in/ns/ext/port-props#logarithmic> ;
+ lv2:symbol "bw_2"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0.0 ;
+ lv2:index 11 ;
+ lv2:maximum 20.0 ;
+ lv2:minimum -20.0 ;
+ lv2:name "Gain 2" ;
+ lv2:symbol "gain_2"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0.0 ;
+ lv2:index 12 ;
+ lv2:name "Section 3" ;
+ lv2:portProperty lv2:toggled ;
+ lv2:symbol "sec_3"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 1000.0 ;
+ lv2:index 13 ;
+ lv2:maximum 10000.0 ;
+ lv2:minimum 100.0 ;
+ lv2:name "Frequency 3" ;
+ lv2:portProperty <http://lv2plug.in/ns/ext/port-props#logarithmic> ;
+ lv2:symbol "freq_3" ;
+ units:unit units:hz
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 1.0 ;
+ lv2:index 14 ;
+ lv2:maximum 8.0 ;
+ lv2:minimum 0.125 ;
+ lv2:name "Bandwidth 3" ;
+ lv2:portProperty <http://lv2plug.in/ns/ext/port-props#logarithmic> ;
+ lv2:symbol "bw_3"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0.0 ;
+ lv2:index 15 ;
+ lv2:maximum 20.0 ;
+ lv2:minimum -20.0 ;
+ lv2:name "Gain 3" ;
+ lv2:symbol "gain_3"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0.0 ;
+ lv2:index 16 ;
+ lv2:name "Section 4" ;
+ lv2:portProperty lv2:toggled ;
+ lv2:symbol "sec_4"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 2000.0 ;
+ lv2:index 17 ;
+ lv2:maximum 20000.0 ;
+ lv2:minimum 200.0 ;
+ lv2:name "Frequency 4" ;
+ lv2:portProperty <http://lv2plug.in/ns/ext/port-props#logarithmic> ;
+ lv2:symbol "freq_4" ;
+ units:unit units:hz
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 1.0 ;
+ lv2:index 18 ;
+ lv2:maximum 8.0 ;
+ lv2:minimum 0.125 ;
+ lv2:name "Bandwidth 4" ;
+ lv2:portProperty <http://lv2plug.in/ns/ext/port-props#logarithmic> ;
+ lv2:symbol "bw_4"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0.0 ;
+ lv2:index 19 ;
+ lv2:maximum 20.0 ;
+ lv2:minimum -20.0 ;
+ lv2:name "Gain 4" ;
+ lv2:symbol "gain_4"
+ ] .
diff --git a/fomp.lv2/pulse_vco.ttl b/fomp.lv2/pulse_vco.ttl
new file mode 100644
index 0000000..77dd0af
--- /dev/null
+++ b/fomp.lv2/pulse_vco.ttl
@@ -0,0 +1,95 @@
+@prefix doap: <http://usefulinc.com/ns/doap#> .
+@prefix fomp: <http://drobilla.net/plugins/fomp/> .
+@prefix lv2: <http://lv2plug.in/ns/lv2core#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix units: <http://lv2plug.in/ns/extensions/units#> .
+
+fomp:pulse_vco
+ a lv2:Plugin ,
+ lv2:OscillatorPlugin ;
+ doap:name "Pulse VCO" ;
+ lv2:microVersion 0 ;
+ lv2:minorVersion 0 ;
+ lv2:optionalFeature lv2:hardRTCapable ;
+ lv2:project fomp: ;
+ lv2:port [
+ a lv2:AudioPort ,
+ lv2:OutputPort ;
+ lv2:index 0 ;
+ lv2:name "Output" ;
+ lv2:symbol "out"
+ ] , [
+ a lv2:CVPort ,
+ lv2:InputPort ;
+ lv2:default 440.0 ;
+ lv2:index 1 ;
+ lv2:maximum 1.0 ;
+ lv2:minimum 0.000001 ;
+ lv2:name "Frequency" ;
+ lv2:portProperty <http://lv2plug.in/ns/ext/port-props#logarithmic> ,
+ lv2:sampleRate ;
+ lv2:symbol "freq" ;
+ units:unit units:hz
+ ] , [
+ a lv2:CVPort ,
+ lv2:InputPort ;
+ lv2:index 2 ;
+ lv2:name "Exp FM" ;
+ lv2:symbol "exp_fm" ;
+ units:unit units:oct
+ ] , [
+ a lv2:CVPort ,
+ lv2:InputPort ;
+ lv2:index 3 ;
+ lv2:name "Lin FM" ;
+ lv2:symbol "lin_fm"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0.0 ;
+ lv2:index 4 ;
+ lv2:maximum 4.0 ;
+ lv2:minimum -4.0 ;
+ lv2:name "Octave" ;
+ lv2:portProperty lv2:integer ;
+ lv2:symbol "octave"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0.0 ;
+ lv2:index 5 ;
+ lv2:maximum 1.0 ;
+ lv2:minimum 0.0 ;
+ lv2:name "Tune" ;
+ lv2:symbol "tune"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0.0 ;
+ lv2:index 6 ;
+ lv2:maximum 4.0 ;
+ lv2:minimum 0.0 ;
+ lv2:name "Exp FM gain" ;
+ lv2:symbol "exp_fm_gain"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0.0 ;
+ lv2:index 7 ;
+ lv2:maximum 4.0 ;
+ lv2:minimum 0.0 ;
+ lv2:name "Lin FM gain" ;
+ lv2:symbol "lin_fm_gain"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 1.0 ;
+ lv2:index 8 ;
+ lv2:maximum 1.0 ;
+ lv2:minimum 0.0 ;
+ lv2:name "LP filter" ;
+ lv2:symbol "lp_filter"
+ ] ;
+ rdfs:comment """Based on the principle of using a precomputed interpolated dirac pulse. This is the pulse variant (flat amplitude spectrum).
+
+Aliases should be below -80dB for fundamental frequencies below the sample rate / 6 (i.e. up to 8 kHz at Fsamp = 48 kHz). This frequency range includes the fundamental frequencies of all known musical instruments.""" .
diff --git a/fomp.lv2/rec_vco.ttl b/fomp.lv2/rec_vco.ttl
new file mode 100644
index 0000000..2d99e11
--- /dev/null
+++ b/fomp.lv2/rec_vco.ttl
@@ -0,0 +1,127 @@
+@prefix doap: <http://usefulinc.com/ns/doap#> .
+@prefix fomp: <http://drobilla.net/plugins/fomp/> .
+@prefix lv2: <http://lv2plug.in/ns/lv2core#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix units: <http://lv2plug.in/ns/extensions/units#> .
+
+fomp:rec_vco
+ a lv2:Plugin ,
+ lv2:OscillatorPlugin ;
+ doap:name "Rec VCO" ;
+ lv2:microVersion 0 ;
+ lv2:minorVersion 0 ;
+ lv2:optionalFeature lv2:hardRTCapable ;
+ lv2:project fomp: ;
+ lv2:port [
+ a lv2:AudioPort ,
+ lv2:OutputPort ;
+ lv2:index 0 ;
+ lv2:name "Output" ;
+ lv2:symbol "out"
+ ] , [
+ a lv2:CVPort ,
+ lv2:InputPort ;
+ lv2:default 440.0 ;
+ lv2:index 1 ;
+ lv2:maximum 1.0 ;
+ lv2:minimum 0.000001 ;
+ lv2:name "Frequency" ;
+ lv2:portProperty <http://lv2plug.in/ns/ext/port-props#logarithmic> ,
+ lv2:sampleRate ;
+ lv2:symbol "freq" ;
+ units:unit units:hz
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0.0 ;
+ lv2:index 10 ;
+ lv2:maximum 1.0 ;
+ lv2:minimum -1.0 ;
+ lv2:name "Waveform" ;
+ lv2:symbol "waveform"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0.0 ;
+ lv2:index 11 ;
+ lv2:maximum 4.0 ;
+ lv2:minimum 0.0 ;
+ lv2:name "Form mod" ;
+ lv2:symbol "form_mod"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 1.0 ;
+ lv2:index 12 ;
+ lv2:maximum 1.0 ;
+ lv2:minimum 0.0 ;
+ lv2:name "LP filter" ;
+ lv2:symbol "lp_filrer"
+ ] , [
+ a lv2:CVPort ,
+ lv2:InputPort ;
+ lv2:index 2 ;
+ lv2:name "Exp FM" ;
+ lv2:symbol "exp_fm" ;
+ units:unit units:oct
+ ] , [
+ a lv2:CVPort ,
+ lv2:InputPort ;
+ lv2:index 3 ;
+ lv2:name "Lin FM" ;
+ lv2:symbol "lin_fm"
+ ] , [
+ a lv2:CVPort ,
+ lv2:InputPort ;
+ lv2:index 4 ;
+ lv2:name "Mod" ;
+ lv2:symbol "mod"
+ ] , [
+ a lv2:CVPort ,
+ lv2:InputPort ;
+ lv2:index 5 ;
+ lv2:name "Sync" ;
+ lv2:symbol "sync"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0.0 ;
+ lv2:index 6 ;
+ lv2:maximum 4.0 ;
+ lv2:minimum -4.0 ;
+ lv2:name "Octave" ;
+ lv2:portProperty lv2:integer ;
+ lv2:symbol "octave"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0.0 ;
+ lv2:index 7 ;
+ lv2:maximum 1.0 ;
+ lv2:minimum 0.0 ;
+ lv2:name "Tune" ;
+ lv2:symbol "tune"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0.0 ;
+ lv2:index 8 ;
+ lv2:maximum 4.0 ;
+ lv2:minimum 0.0 ;
+ lv2:name "Exp FM gain" ;
+ lv2:symbol "exp_fm_gain"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0.0 ;
+ lv2:index 9 ;
+ lv2:maximum 4.0 ;
+ lv2:minimum 0.0 ;
+ lv2:name "Lin FM gain" ;
+ lv2:symbol "lin_fm_gain"
+ ] ;
+ rdfs:comment """Based on the principle of using a precomputed interpolated dirac pulse. The 'edge' for this rectangular variant is made by integrating the anti-aliased pulse.
+
+Aliases should be below -80dB for fundamental frequencies below the sample rate / 6 (i.e. up to 8 kHz at Fsamp = 48 kHz). This frequency range includes the fundamental frequencies of all known musical instruments.
+
+Tests by Matthias Nagorni revealed the output sounded quite 'harsh' when compared to his analogue instruments. Comparing the spectra, it became clear that a mathematically 'exact' spectrum was not desirable from a musical point of view. For this reason, a built-in lowpass filter was added. The default setting (0.5) will yield output identical to that of the Moog Voyager.""" .
diff --git a/fomp.lv2/reverb.ttl b/fomp.lv2/reverb.ttl
new file mode 100644
index 0000000..c7af965
--- /dev/null
+++ b/fomp.lv2/reverb.ttl
@@ -0,0 +1,137 @@
+@prefix doap: <http://usefulinc.com/ns/doap#> .
+@prefix fomp: <http://drobilla.net/plugins/fomp/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix lv2: <http://lv2plug.in/ns/lv2core#> .
+@prefix owl: <http://www.w3.org/2002/07/owl#> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+
+fomp:reverb
+ a lv2:Plugin ,
+ lv2:ReverbPlugin ;
+ doap:name "reverb" ;
+ lv2:microVersion 0 ;
+ lv2:minorVersion 0 ;
+ lv2:optionalFeature lv2:hardRTCapable ;
+ lv2:requiredFeature lv2:isLive ;
+ lv2:project fomp: ;
+ lv2:port [
+ a lv2:AudioPort ,
+ lv2:InputPort ;
+ lv2:index 0 ;
+ lv2:name "In L" ;
+ lv2:symbol "in_l"
+ ] , [
+ a lv2:AudioPort ,
+ lv2:InputPort ;
+ lv2:index 1 ;
+ lv2:name "In R" ;
+ lv2:symbol "in_r"
+ ] , [
+ a lv2:AudioPort ,
+ lv2:OutputPort ;
+ lv2:index 2 ;
+ lv2:name "Out L" ;
+ lv2:symbol "out_l"
+ ] , [
+ a lv2:AudioPort ,
+ lv2:OutputPort ;
+ lv2:index 3 ;
+ lv2:name "Out R" ;
+ lv2:symbol "out_r"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0.06 ;
+ lv2:index 4 ;
+ lv2:maximum 0.1 ;
+ lv2:minimum 0.02 ;
+ lv2:name "Delay" ;
+ lv2:symbol "delay"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 223.607 ;
+ lv2:index 5 ;
+ lv2:maximum 1000 ;
+ lv2:minimum 50 ;
+ lv2:name "Xover" ;
+ lv2:portProperty <http://lv2plug.in/ns/ext/port-props#logarithmic> ;
+ lv2:symbol "xover"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 2.75 ;
+ lv2:index 6 ;
+ lv2:maximum 8 ;
+ lv2:minimum 1 ;
+ lv2:name "RT-low" ;
+ lv2:symbol "rt_low"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 2.75 ;
+ lv2:index 7 ;
+ lv2:maximum 8 ;
+ lv2:minimum 1 ;
+ lv2:name "RT-mid" ;
+ lv2:symbol "rt_mid"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 6000 ;
+ lv2:index 8 ;
+ lv2:maximum 24000 ;
+ lv2:minimum 1500 ;
+ lv2:name "Damping" ;
+ lv2:portProperty <http://lv2plug.in/ns/ext/port-props#logarithmic> ;
+ lv2:symbol "damping"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 159.054 ;
+ lv2:index 9 ;
+ lv2:maximum 10000 ;
+ lv2:minimum 40 ;
+ lv2:name "F1-freq" ;
+ lv2:portProperty <http://lv2plug.in/ns/ext/port-props#logarithmic> ;
+ lv2:symbol "f1_freq"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0 ;
+ lv2:index 10 ;
+ lv2:maximum 20 ;
+ lv2:minimum -20 ;
+ lv2:name "F1-gain" ;
+ lv2:symbol "f1_gain"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 2514.87 ;
+ lv2:index 11 ;
+ lv2:maximum 10000 ;
+ lv2:minimum 40 ;
+ lv2:name "F2-freq" ;
+ lv2:portProperty <http://lv2plug.in/ns/ext/port-props#logarithmic> ;
+ lv2:symbol "f2_freq"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0 ;
+ lv2:index 12 ;
+ lv2:maximum 20 ;
+ lv2:minimum -20 ;
+ lv2:name "F2-gain" ;
+ lv2:symbol "f2_gain"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0.5 ;
+ lv2:index 13 ;
+ lv2:maximum 1 ;
+ lv2:minimum 0 ;
+ lv2:name "Output mix" ;
+ lv2:symbol "out_mix"
+ ] .
diff --git a/fomp.lv2/reverb_amb.ttl b/fomp.lv2/reverb_amb.ttl
new file mode 100644
index 0000000..3df491f
--- /dev/null
+++ b/fomp.lv2/reverb_amb.ttl
@@ -0,0 +1,149 @@
+@prefix doap: <http://usefulinc.com/ns/doap#> .
+@prefix fomp: <http://drobilla.net/plugins/fomp/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix lv2: <http://lv2plug.in/ns/lv2core#> .
+@prefix owl: <http://www.w3.org/2002/07/owl#> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+
+fomp:reverb_amb
+ a lv2:Plugin ,
+ lv2:ReverbPlugin ;
+ doap:name "reverb-amb" ;
+ lv2:microVersion 0 ;
+ lv2:minorVersion 0 ;
+ lv2:optionalFeature lv2:hardRTCapable ;
+ lv2:requiredFeature lv2:isLive ;
+ lv2:project fomp: ;
+ lv2:port [
+ a lv2:AudioPort ,
+ lv2:InputPort ;
+ lv2:index 0 ;
+ lv2:name "In L" ;
+ lv2:symbol "in_l"
+ ] , [
+ a lv2:AudioPort ,
+ lv2:InputPort ;
+ lv2:index 1 ;
+ lv2:name "In R" ;
+ lv2:symbol "in_r"
+ ] , [
+ a lv2:AudioPort ,
+ lv2:OutputPort ;
+ lv2:index 2 ;
+ lv2:name "Out W" ;
+ lv2:symbol "out_w"
+ ] , [
+ a lv2:AudioPort ,
+ lv2:OutputPort ;
+ lv2:index 3 ;
+ lv2:name "Out X" ;
+ lv2:symbol "out_x"
+ ] , [
+ a lv2:AudioPort ,
+ lv2:OutputPort ;
+ lv2:index 4 ;
+ lv2:name "Out Y" ;
+ lv2:symbol "out_y"
+ ] , [
+ a lv2:AudioPort ,
+ lv2:OutputPort ;
+ lv2:index 5 ;
+ lv2:name "Out Z" ;
+ lv2:symbol "out_z"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0.06 ;
+ lv2:index 6 ;
+ lv2:maximum 0.1 ;
+ lv2:minimum 0.02 ;
+ lv2:name "Delay" ;
+ lv2:symbol "delay"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 223.607 ;
+ lv2:index 7 ;
+ lv2:maximum 1000 ;
+ lv2:minimum 50 ;
+ lv2:name "Xover" ;
+ lv2:portProperty <http://lv2plug.in/ns/ext/port-props#logarithmic> ;
+ lv2:symbol "xover"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 2.75 ;
+ lv2:index 8 ;
+ lv2:maximum 8 ;
+ lv2:minimum 1 ;
+ lv2:name "RT-low" ;
+ lv2:symbol "rt_low"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 2.75 ;
+ lv2:index 9 ;
+ lv2:maximum 8 ;
+ lv2:minimum 1 ;
+ lv2:name "RT-mid" ;
+ lv2:symbol "rt_mid"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 6000 ;
+ lv2:index 10 ;
+ lv2:maximum 24000 ;
+ lv2:minimum 1500 ;
+ lv2:name "Damping" ;
+ lv2:portProperty <http://lv2plug.in/ns/ext/port-props#logarithmic> ;
+ lv2:symbol "damping"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 159.054 ;
+ lv2:index 11 ;
+ lv2:maximum 10000 ;
+ lv2:minimum 40 ;
+ lv2:name "F1-freq" ;
+ lv2:portProperty <http://lv2plug.in/ns/ext/port-props#logarithmic> ;
+ lv2:symbol "fw_freq"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0 ;
+ lv2:index 12 ;
+ lv2:maximum 20 ;
+ lv2:minimum -20 ;
+ lv2:name "F1-gain" ;
+ lv2:symbol "fw_gain"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 2514.87 ;
+ lv2:index 13 ;
+ lv2:maximum 10000 ;
+ lv2:minimum 40 ;
+ lv2:name "F2-freq" ;
+ lv2:portProperty <http://lv2plug.in/ns/ext/port-props#logarithmic> ;
+ lv2:symbol "f2_freq"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0 ;
+ lv2:index 14 ;
+ lv2:maximum 20 ;
+ lv2:minimum -20 ;
+ lv2:name "F2-gain" ;
+ lv2:symbol "f2_gain"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0 ;
+ lv2:index 15 ;
+ lv2:maximum 9 ;
+ lv2:minimum -9 ;
+ lv2:name "XYZ gain" ;
+ lv2:symbol "xyz_gain"
+ ] .
diff --git a/fomp.lv2/saw_vco.ttl b/fomp.lv2/saw_vco.ttl
new file mode 100644
index 0000000..7fbde9b
--- /dev/null
+++ b/fomp.lv2/saw_vco.ttl
@@ -0,0 +1,103 @@
+@prefix doap: <http://usefulinc.com/ns/doap#> .
+@prefix fomp: <http://drobilla.net/plugins/fomp/> .
+@prefix lv2: <http://lv2plug.in/ns/lv2core#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix units: <http://lv2plug.in/ns/extensions/units#> .
+
+fomp:saw_vco
+ a lv2:Plugin ,
+ lv2:OscillatorPlugin ;
+ doap:name "Saw VCO" ;
+ lv2:microVersion 0 ;
+ lv2:minorVersion 0 ;
+ lv2:optionalFeature lv2:hardRTCapable ;
+ lv2:project fomp: ;
+ lv2:port [
+ a lv2:AudioPort ,
+ lv2:OutputPort ;
+ lv2:index 0 ;
+ lv2:name "Output" ;
+ lv2:symbol "out"
+ ] , [
+ a lv2:CVPort ,
+ lv2:InputPort ;
+ lv2:default 440.0 ;
+ lv2:index 1 ;
+ lv2:maximum 1.0 ;
+ lv2:minimum 0.000001 ;
+ lv2:name "Frequency" ;
+ lv2:portProperty <http://lv2plug.in/ns/ext/port-props#logarithmic> ,
+ lv2:sampleRate ;
+ lv2:symbol "freq" ;
+ units:unit units:hz
+ ] , [
+ a lv2:CVPort ,
+ lv2:InputPort ;
+ lv2:index 2 ;
+ lv2:name "Exp FM" ;
+ lv2:symbol "exp_fm" ;
+ units:unit units:oct
+ ] , [
+ a lv2:CVPort ,
+ lv2:InputPort ;
+ lv2:index 3 ;
+ lv2:name "Lin FM" ;
+ lv2:symbol "lin_fm"
+ ] , [
+ a lv2:CVPort ,
+ lv2:InputPort ;
+ lv2:index 4 ;
+ lv2:name "Sync" ;
+ lv2:symbol "sync"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0.0 ;
+ lv2:index 5 ;
+ lv2:maximum 4.0 ;
+ lv2:minimum -4.0 ;
+ lv2:name "Octave" ;
+ lv2:portProperty lv2:integer ;
+ lv2:symbol "octave"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0.0 ;
+ lv2:index 6 ;
+ lv2:maximum 1.0 ;
+ lv2:minimum 0.0 ;
+ lv2:name "Tune" ;
+ lv2:symbol "tune"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0.0 ;
+ lv2:index 7 ;
+ lv2:maximum 4.0 ;
+ lv2:minimum 0.0 ;
+ lv2:name "Exp FM gain" ;
+ lv2:symbol "exp_fm_gain"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0.0 ;
+ lv2:index 8 ;
+ lv2:maximum 4.0 ;
+ lv2:minimum 0.0 ;
+ lv2:name "Lin FM gain" ;
+ lv2:symbol "lin_fm_gain"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 1.0 ;
+ lv2:index 9 ;
+ lv2:maximum 1.0 ;
+ lv2:minimum 0.0 ;
+ lv2:name "LP filter" ;
+ lv2:symbol "lp_filter"
+ ] ;
+ rdfs:comment """Based on the principle of using a precomputed interpolated dirac pulse. The 'edge' for this saw variant (1/F amplitude spectrum) is made by integrating the anti-aliased pulse.
+
+Aliases should be below -80dB for fundamental frequencies below the sample rate / 6 (i.e. up to 8 kHz at Fsamp = 48 kHz). This frequency range includes the fundamental frequencies of all known musical instruments.
+
+Tests by Matthias Nagorni revealed the output sounded quite 'harsh' when compared to his analogue instruments. Comparing the spectra, it became clear that a mathematically 'exact' spectrum was not desirable from a musical point of view. For this reason, a built-in lowpass filter was added. The default setting (0.5) will yield output identical to that of the Moog Voyager.""" .
diff --git a/fomp.lv2/triple_chorus.ttl b/fomp.lv2/triple_chorus.ttl
new file mode 100644
index 0000000..913c5c3
--- /dev/null
+++ b/fomp.lv2/triple_chorus.ttl
@@ -0,0 +1,90 @@
+@prefix doap: <http://usefulinc.com/ns/doap#> .
+@prefix fomp: <http://drobilla.net/plugins/fomp/> .
+@prefix lv2: <http://lv2plug.in/ns/lv2core#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix units: <http://lv2plug.in/ns/extensions/units#> .
+
+fomp:triple_chorus
+ a lv2:Plugin ,
+ lv2:ChorusPlugin ;
+ doap:name "Triple chorus" ;
+ lv2:microVersion 0 ;
+ lv2:minorVersion 0 ;
+ lv2:optionalFeature lv2:hardRTCapable ;
+ lv2:project fomp: ;
+ lv2:port [
+ a lv2:AudioPort ,
+ lv2:InputPort ;
+ lv2:index 0 ;
+ lv2:name "Input" ;
+ lv2:symbol "in"
+ ] , [
+ a lv2:AudioPort ,
+ lv2:OutputPort ;
+ lv2:index 1 ;
+ lv2:name "Output1" ;
+ lv2:symbol "out1"
+ ] , [
+ a lv2:AudioPort ,
+ lv2:OutputPort ;
+ lv2:index 2 ;
+ lv2:name "Output2" ;
+ lv2:symbol "out2"
+ ] , [
+ a lv2:AudioPort ,
+ lv2:OutputPort ;
+ lv2:index 3 ;
+ lv2:name "Output3" ;
+ lv2:symbol "out3"
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0.0 ;
+ lv2:index 4 ;
+ lv2:maximum 30.0 ;
+ lv2:minimum 0.0 ;
+ lv2:name "Delay" ;
+ lv2:symbol "delay" ;
+ units:unit units:ms
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:index 5 ;
+ lv2:maximum 10.0 ;
+ lv2:minimum 0.003 ;
+ lv2:name "Mod Frequency 1" ;
+ lv2:portProperty <http://lv2plug.in/ns/ext/port-props#logarithmic> ;
+ lv2:symbol "mod_freq_1" ;
+ units:unit units:hz
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0.0 ;
+ lv2:index 6 ;
+ lv2:maximum 10.0 ;
+ lv2:minimum 0.0 ;
+ lv2:name "Mod Amplitude 1" ;
+ lv2:symbol "mod_amp_1" ;
+ units:unit units:ms
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:index 7 ;
+ lv2:maximum 30.0 ;
+ lv2:minimum 0.01 ;
+ lv2:name "Mod Frequency 2" ;
+ lv2:portProperty <http://lv2plug.in/ns/ext/port-props#logarithmic> ;
+ lv2:symbol "mod_freq_2" ;
+ units:unit units:hz
+ ] , [
+ a lv2:ControlPort ,
+ lv2:InputPort ;
+ lv2:default 0.0 ;
+ lv2:index 8 ;
+ lv2:maximum 3.0 ;
+ lv2:minimum 0.0 ;
+ lv2:name "Mod Amplitude 2" ;
+ lv2:symbol "mod_amp_2" ;
+ units:unit units:ms
+ ] ;
+ rdfs:comment "The same as CS Chorus 2, but has three separate outputs. Plan L,C,R for a nice stereo effect." .
diff --git a/src/autowah.cc b/src/autowah.cc
new file mode 100644
index 0000000..a18c8d3
--- /dev/null
+++ b/src/autowah.cc
@@ -0,0 +1,130 @@
+/*
+ Copyright (C) 2009 Fons Adriaensen <fons@kokkinizita.net>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+
+#include <math.h>
+#include <string.h>
+#include "autowah.h"
+
+
+void Ladspa_Autowah::setport (PortIndex port, PortData *data)
+{
+ _port [port] = (float*)data;
+}
+
+
+#define G_RES 4.0f
+#define F_MIN 300.0f
+#define F_RAT 10
+#define B_MIN 0.03f
+#define B_RAT 4
+#define T_MIN 0.05f
+#define T_LOG 2
+
+
+void Ladspa_Autowah::active (bool act)
+{
+ if (! act) return;
+
+ _wbase = F_MIN * 6.28f / _fsam;
+ _bbase = B_MIN;
+ _rfact = 64.0f / (_fsam * T_MIN);
+ _z1 = _z2 = 0;
+ _s1 = _s2 = 0;
+ _gx = _gy = 0;
+ _dr = 0;
+}
+
+
+void Ladspa_Autowah::runproc (SampleCount len, bool add)
+{
+ int i, k;
+ float *inp = _port [A_INP];
+ float *out = _port [A_OUT];
+ float z1, z2, s1, s2, gx, gy;
+ float ds1, ds2, dgx, dgy;
+ float gd, rf, md, fr, dr;
+ float b, p, t, w, x, y;
+
+ gx = _gx;
+ gy = _gy;
+ t = _port [C_OPMIX][0];
+ _gy = G_RES * t;
+ _gx = _gy + 1 - t;
+ dgx = (_gx - gx) / len;
+ dgy = (_gy - gy) / len;
+
+ gd = 10 * powf (10.0f, 0.05f * _port [C_DRIVE][0]);
+ rf = 1.0f - _rfact / powf (10.0f, T_LOG * _port [C_DECAY][0]);
+ md = _port [C_RANGE][0];
+ fr = _port [C_FREQ][0];
+
+ z1 = _z1;
+ z2 = _z2;
+ s1 = _s1;
+ s2 = _s2;
+ dr = _dr;
+
+ while (len)
+ {
+ k = (len > 80) ? 64 : len;
+
+ p = 0;
+ for (i = 0; i < k; i++)
+ {
+ x = inp [i];
+ p += x * x;
+ }
+ p = gd * sqrtf (p / k);
+
+ if (p > dr) dr += 0.1f *(p - dr);
+ if (dr > md) dr = md;
+ t = dr + fr;
+ dr = dr * rf + 1e-10f;
+ w = _wbase * (1 + (F_RAT - 1) * t * t);
+ b = w * _bbase * (1 + (B_RAT - 1) * t);
+ if (w > 0.7f) w = 0.7f;
+
+ _s1 = -cosf (w);
+ _s2 = (1 - b) / (1 + b);
+ ds1 = (_s1 - s1) / k;
+ ds2 = (_s2 - s2) / k;
+
+ for (i = 0; i < k; i++)
+ {
+ s1 += ds1;
+ s2 += ds2;
+ gx += dgx;
+ gy += dgy;
+ x = inp [i];
+ y = x - s2 * z2;
+ out [i] = gx * x - gy * (z2 + s2 * y);
+ y -= s1 * z1;
+ z2 = z1 + s1 * y;
+ z1 = y + 1e-10f;
+ }
+ inp += k;
+ out += k;
+ len -= k;
+ }
+
+ _z1 = z1;
+ _z2 = z2;
+ _dr = dr;
+}
+
diff --git a/src/autowah.h b/src/autowah.h
new file mode 100644
index 0000000..79a3d9c
--- /dev/null
+++ b/src/autowah.h
@@ -0,0 +1,52 @@
+/*
+ Copyright (C) 2009 Fons Adriaensen <fons@kokkinizita.net>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+
+#ifndef __AUTOWAH_H
+#define __AUTOWAH_H
+
+
+#include "ladspaplugin.h"
+
+
+class Ladspa_Autowah : public LadspaPlugin
+{
+public:
+
+ enum { A_INP, A_OUT, C_DRIVE, C_DECAY, C_RANGE, C_FREQ, C_OPMIX, NPORT };
+
+ Ladspa_Autowah (SampleRate fsam) : LadspaPlugin (fsam) {}
+ virtual void setport (PortIndex port, PortData *data);
+ virtual void active (bool act);
+ virtual void runproc (SampleCount len, bool add);
+ virtual ~Ladspa_Autowah (void) {}
+
+private:
+
+ float *_port [NPORT];
+ float _wbase;
+ float _bbase;
+ float _rfact;
+ float _z1, _z2;
+ float _s1, _s2;
+ float _gx, _gy;
+ float _dr;
+};
+
+
+#endif
diff --git a/src/autowah_lv2.cc b/src/autowah_lv2.cc
new file mode 100644
index 0000000..29a64ee
--- /dev/null
+++ b/src/autowah_lv2.cc
@@ -0,0 +1,56 @@
+/*
+ Copyright (C) 2012 David Robillard <d@drobilla.net>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#include <stddef.h>
+
+#include "autowah.h"
+#include "plugin_lv2.h"
+
+extern "C" {
+
+static LV2_Handle
+instantiate(const LV2_Descriptor* descriptor,
+ double rate,
+ const char* bundle_path,
+ const LV2_Feature* const* features)
+{
+ return new Ladspa_Autowah(rate);
+}
+
+static const LV2_Descriptor descriptor = {
+ "http://drobilla.net/plugins/fomp/autowah",
+ instantiate,
+ connect_port,
+ activate,
+ run,
+ deactivate,
+ cleanup,
+ NULL
+};
+
+LV2_SYMBOL_EXPORT
+const LV2_Descriptor*
+lv2_descriptor(uint32_t index)
+{
+ switch (index) {
+ case 0: return &descriptor;
+ default: return NULL;
+ }
+}
+
+} // extern "C"
diff --git a/src/blvco.cc b/src/blvco.cc
new file mode 100644
index 0000000..328f4b0
--- /dev/null
+++ b/src/blvco.cc
@@ -0,0 +1,354 @@
+/*
+ Copyright (C) 2003 Fons Adriaensen
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+
+#include <stdio.h>
+#include <string.h>
+#include <math.h>
+#include "blvco.h"
+#include "exp2ap.h"
+
+extern float exp2ap (float x);
+
+
+static float _pulse [] =
+{
+ 0.000000, 0.000366, 0.001458, 0.003117, 0.005028, 0.006756, 0.007806, 0.007704,
+ 0.006086, 0.002778, -0.002139, -0.008292, -0.015022, -0.021434, -0.026492, -0.029153,
+ -0.028511, -0.023957, -0.015297, -0.002869, 0.012417, 0.029105, 0.045302, 0.058853,
+ 0.067578, 0.069533, 0.063273, 0.048113, 0.024337, -0.006682, -0.042487, -0.079654,
+ -0.114036, -0.141088, -0.156243, -0.155364, -0.135210, -0.093843, -0.030932, 0.052092,
+ 0.152049, 0.264172, 0.382359, 0.499585, 0.608450, 0.701808, 0.773391, 0.818353,
+ 0.833670, 0.818353, 0.773391, 0.701808, 0.608450, 0.499585, 0.382359, 0.264172,
+ 0.152049, 0.052092, -0.030932, -0.093843, -0.135210, -0.155364, -0.156243, -0.141088,
+ -0.114036, -0.079654, -0.042487, -0.006682, 0.024337, 0.048113, 0.063273, 0.069533,
+ 0.067578, 0.058853, 0.045302, 0.029105, 0.012417, -0.002869, -0.015297, -0.023957,
+ -0.028511, -0.029153, -0.026492, -0.021434, -0.015022, -0.008292, -0.002139, 0.002778,
+ 0.006086, 0.007704, 0.007806, 0.006756, 0.005028, 0.003117, 0.001458, 0.000366,
+ 0.000000
+};
+
+
+static const float lg2midc = log2f(261.63f);
+
+
+void Ladspa_VCO_pulse1::setport (PortIndex port, PortData *data)
+{
+ _port [port] = (float*)data;
+}
+
+
+void Ladspa_VCO_pulse1::active (bool act)
+{
+ _p = 0.5;
+ _w = _y = _z = 0;
+ _j = 0;
+ memset (_f, 0, (FILLEN + NCOEFF) * sizeof (float));
+}
+
+
+void Ladspa_VCO_pulse1::runproc (SampleCount len, bool add)
+{
+ int i, j, n;
+ float *outp, *freq, *expm, *linm;
+ float a, p, r, t, w, dw, y, z, *f;
+
+ outp = _port[OUTP];
+ freq = _port[FREQ] - 1;
+ expm = _port[EXPM] - 1;
+ linm = _port[LINM] - 1;
+
+ p = _p;
+ w = _w;
+ y = _y;
+ z = _z;
+ j = _j;
+
+ a = 0.2 + 0.8 * _port [FILT][0];
+ do
+ {
+ n = (len > 24) ? 16 : len;
+ freq += n;
+ expm += n;
+ linm += n;
+ len -= n;
+
+ t = (exp2ap (log2f(*freq) - lg2midc + _port[OCTN][0] + _port[TUNE][0] + *expm * _port[EXPG][0] + 8.03136)
+ + 1e3 * *linm * _port[LING][0]) / _fsam;
+ if (t < 1e-5) t = 1e-5;
+ if (t > 0.5) t = 0.5;
+ dw = (t - w) / n;
+
+ while (n--)
+ {
+ w += dw;
+ p += w;
+ if (p >= 1.0)
+ {
+ p -= 1.0;
+ r = NPHASE * p / w;
+ i = (int) r;
+ r -= i;
+ f = _f + j;
+ while (i < NPHASE * NCOEFF)
+ {
+ *f++ += r * _pulse [i + 1 ] + (1 - r) * _pulse [i];
+ i += NPHASE;
+ }
+ }
+
+ y = _f [j];
+ z += a * (y - z);
+ *outp++ = z;
+ if (++j == FILLEN)
+ {
+ j = 0;
+ memcpy (_f, _f + FILLEN, NCOEFF * sizeof (float));
+ memset (_f + NCOEFF, 0, FILLEN * sizeof (float));
+ }
+ }
+ }
+ while (len);
+
+ _p = p;
+ _w = w;
+ _y = y;
+ _z = z;
+ _j = j;
+}
+
+
+
+void Ladspa_VCO_saw1::setport (PortIndex port, PortData *data)
+{
+ _port [port] = (float*)data;
+}
+
+
+void Ladspa_VCO_saw1::active (bool act)
+{
+ _p = 0.5;
+ _w = _x = _y = _z = _d = 0;
+ _j = 0;
+ memset (_f, 0, (FILLEN + NCOEFF) * sizeof (float));
+}
+
+
+void Ladspa_VCO_saw1::runproc (SampleCount len, bool add)
+{
+ int i, j, n;
+ float *outp, *freq, *expm, *linm, *sync;
+ float a, d, p, r, t, w, dw, x, y, z, *f;
+
+ outp = _port[OUTP];
+ freq = _port[FREQ] - 1;
+ expm = _port[EXPM] - 1;
+ linm = _port[LINM] - 1;
+ sync = _port[SYNC];
+
+ p = _p;
+ w = _w;
+ x = _x;
+ y = _y;
+ z = _z;
+ d = _d;
+ j = _j;
+
+ a = 0.2 + 0.8 * _port [FILT][0];
+ do
+ {
+ n = (len > 24) ? 16 : len;
+ freq += n;
+ expm += n;
+ linm += n;
+ len -= n;
+
+ t = (exp2ap (log2f(*freq) - lg2midc + _port[OCTN][0] + _port[TUNE][0] + *expm * _port[EXPG][0] + 8.03136 + d)
+ + 1e3 * *linm * _port[LING][0]) / _fsam;
+ if (t < 1e-5) t = 1e-5;
+ if (t > 0.5) t = 0.5;
+ dw = (t - w) / n;
+
+ while (n--)
+ {
+ w += dw;
+ p += w;
+ if (p >= 1.0)
+ {
+ p -= 1.0;
+ r = NPHASE * p / w;
+ i = (int) r;
+ r -= i;
+ f = _f + j;
+ while (i < NPHASE * NCOEFF)
+ {
+ *f++ += r * _pulse [i + 1 ] + (1 - r) * _pulse [i];
+ i += NPHASE;
+ }
+ }
+
+ x += _f [j] - w * (0.01 * y + 0.2 * x + 1);
+ y += 6.3 * w * x;
+ z += a * (x - z);
+ *outp++ = z;
+ d += 0.01 * (y * *sync++ - d);
+ if (++j == FILLEN)
+ {
+ j = 0;
+ memcpy (_f, _f + FILLEN, NCOEFF * sizeof (float));
+ memset (_f + NCOEFF, 0, FILLEN * sizeof (float));
+ }
+ }
+ }
+ while (len);
+
+ _p = p;
+ _w = w;
+ _x = x;
+ _y = y;
+ _z = z;
+ _d = d;
+ _j = j;
+}
+
+
+
+void Ladspa_VCO_rec1::setport (PortIndex port, PortData *data)
+{
+ _port [port] = (float*)data;
+}
+
+
+void Ladspa_VCO_rec1::active (bool act)
+{
+ _p = 0.0;
+ _x = _y = _z = _d = 0;
+ _w = 0;
+ _b = 0.5;
+ _j = _k = 0;
+ memset (_f, 0, (FILLEN + NCOEFF) * sizeof (float));
+}
+
+
+void Ladspa_VCO_rec1::runproc (SampleCount len, bool add)
+{
+ int i, j, k, n;
+ float *outp, *freq, *expm, *linm, *wavm, *sync;
+ float a, b, db, d, p, r, t, w, dw, x, y, z, *f;
+
+ outp = _port[OUTP];
+ freq = _port[FREQ] - 1;
+ expm = _port[EXPM] - 1;
+ linm = _port[LINM] - 1;
+ wavm = _port[WAVM] - 1;
+ sync = _port[SYNC];
+
+ p = _p;
+ w = _w;
+ b = _b;
+ x = _x;
+ y = _y;
+ z = _z;
+ d = _d;
+ j = _j;
+ k = _k;
+
+ a = 0.2 + 0.8 * _port [FILT][0];
+ do
+ {
+ n = (len > 24) ? 16 : len;
+ freq += n;
+ expm += n;
+ linm += n;
+ wavm += n;
+ len -= n;
+
+ t = (exp2ap (log2f(*freq) - lg2midc + _port[OCTN][0] + _port[TUNE][0] + *expm * _port[EXPG][0] + 8.03136 + d)
+ + 1e3 * *linm * _port[LING][0]) / _fsam;
+ if (t < 1e-5) t = 1e-5;
+ if (t > 0.5) t = 0.5;
+ dw = (t - w) / n;
+ t = 0.5 * (1.0 + _port [WAVE][0] + *wavm * _port [WMOD][0]);
+ if (t < 0.02) t = 0.02;
+ if (t > 0.98) t = 0.98;
+ db = (t - b) / n;
+
+ while (n--)
+ {
+ w += dw;
+ b += db;
+ p += w;
+ t = k ? 1.0 : b;
+ while (p >= t)
+ {
+ if (k)
+ {
+ k = 0;
+ p -= 1.0;
+ r = NPHASE * p / w;
+ t = b;
+ i = (int) r;
+ r -= i;
+ f = _f + j;
+ while (i < NPHASE * NCOEFF)
+ {
+ *f++ += r * _pulse [i + 1 ] + (1 - r) * _pulse [i];
+ i += NPHASE;
+ }
+ }
+ else
+ {
+ k = 1;
+ r = NPHASE * (p - t) / w;
+ t = 1.0;
+ i = (int) r;
+ r -= i;
+ f = _f + j;
+ while (i < NPHASE * NCOEFF)
+ {
+ *f++ -= r * _pulse [i + 1 ] + (1 - r) * _pulse [i];
+ i += NPHASE;
+ }
+ }
+ }
+ x -= w * (0.01 * y + 0.2 * x);
+ x += _f [j];
+ y += 6.3 * w * x;
+ z += a * (x - z);
+ *outp++ = z;
+ d += 0.01 * (y * *sync++ - d);
+ if (++j == FILLEN)
+ {
+ j = 0;
+ memcpy (_f, _f + FILLEN, NCOEFF * sizeof (float));
+ memset (_f + NCOEFF, 0, FILLEN * sizeof (float));
+ }
+ }
+ }
+ while (len);
+
+ _p = p;
+ _w = w;
+ _b = b;
+ _x = x;
+ _y = y;
+ _z = z;
+ _d = d;
+ _j = j;
+ _k = k;
+}
diff --git a/src/blvco.h b/src/blvco.h
new file mode 100644
index 0000000..c56a33e
--- /dev/null
+++ b/src/blvco.h
@@ -0,0 +1,92 @@
+/*
+ Copyright (C) 2003 Fons Adriaensen
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+
+#ifndef __VCOSAWPULSE_H
+#define __VCOSAWPULSE_H
+
+#include "ladspaplugin.h"
+
+
+class Ladspa_VCO_pulse1 : public LadspaPlugin
+{
+public:
+
+ enum { NPHASE = 8, NCOEFF = 12, FILLEN = 256 };
+ enum { OUTP, FREQ, EXPM, LINM, OCTN, TUNE, EXPG, LING, FILT, NPORT };
+
+ Ladspa_VCO_pulse1 (SampleRate fsam) : LadspaPlugin (fsam) {}
+ virtual void setport (PortIndex port, PortData *data);
+ virtual void active (bool act);
+ virtual void runproc (SampleCount len, bool add);
+ virtual ~Ladspa_VCO_pulse1 (void) {}
+
+private:
+
+ float *_port [NPORT];
+ float _p, _w, _y, _z;
+ float _f [FILLEN + NCOEFF];
+ int _j;
+};
+
+
+class Ladspa_VCO_saw1 : public LadspaPlugin
+{
+public:
+
+ enum { NPHASE = 8, NCOEFF = 12, FILLEN = 256 };
+ enum { OUTP, FREQ, EXPM, LINM, SYNC, OCTN, TUNE, EXPG, LING, FILT, NPORT };
+
+ Ladspa_VCO_saw1 (SampleRate fsam) : LadspaPlugin (fsam) {}
+ virtual void setport (PortIndex port, PortData *data);
+ virtual void active (bool act);
+ virtual void runproc (SampleCount len, bool add);
+ virtual ~Ladspa_VCO_saw1 (void) {}
+
+private:
+
+ float *_port [NPORT];
+ float _p, _w, _x, _y, _z, _d;
+ float _f [FILLEN + NCOEFF];
+ int _j;
+};
+
+
+class Ladspa_VCO_rec1 : public LadspaPlugin
+{
+public:
+
+ enum { NPHASE = 8, NCOEFF = 12, FILLEN = 256 };
+ enum { OUTP, FREQ, EXPM, LINM, WAVM, SYNC, OCTN, TUNE, EXPG, LING, WAVE, WMOD, FILT, NPORT };
+
+ Ladspa_VCO_rec1 (SampleRate fsam) : LadspaPlugin (fsam) {}
+ virtual void setport (PortIndex port, PortData *data);
+ virtual void active (bool act);
+ virtual void runproc (SampleCount len, bool add);
+ virtual ~Ladspa_VCO_rec1 (void) {}
+
+private:
+
+ float *_port [NPORT];
+ float _p, _w, _b, _x, _y, _z, _d;
+ float _f [FILLEN + NCOEFF];
+ int _j, _k;
+};
+
+
+#endif
diff --git a/src/blvco_lv2.cc b/src/blvco_lv2.cc
new file mode 100644
index 0000000..1e539e6
--- /dev/null
+++ b/src/blvco_lv2.cc
@@ -0,0 +1,90 @@
+/*
+ Copyright (C) 2012 David Robillard <d@drobilla.net>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#include <stddef.h>
+
+#include "blvco.h"
+#include "plugin_lv2.h"
+
+extern "C" {
+
+static LV2_Handle
+instantiate1(const LV2_Descriptor* descriptor,
+ double rate,
+ const char* bundle_path,
+ const LV2_Feature* const* features)
+{
+ return new Ladspa_VCO_pulse1(rate);
+}
+
+static LV2_Handle
+instantiate2(const LV2_Descriptor* descriptor,
+ double rate,
+ const char* bundle_path,
+ const LV2_Feature* const* features)
+{
+ return new Ladspa_VCO_saw1(rate);
+}
+
+static LV2_Handle
+instantiate3(const LV2_Descriptor* descriptor,
+ double rate,
+ const char* bundle_path,
+ const LV2_Feature* const* features)
+{
+ return new Ladspa_VCO_rec1(rate);
+}
+
+static const LV2_Descriptor descriptors[3] = {
+ { "http://drobilla.net/plugins/fomp/pulse_vco",
+ instantiate1,
+ connect_port,
+ activate,
+ run,
+ deactivate,
+ cleanup,
+ NULL },
+ { "http://drobilla.net/plugins/fomp/saw_vco",
+ instantiate2,
+ connect_port,
+ activate,
+ run,
+ deactivate,
+ cleanup,
+ NULL },
+ { "http://drobilla.net/plugins/fomp/rec_vco",
+ instantiate3,
+ connect_port,
+ activate,
+ run,
+ deactivate,
+ cleanup,
+ NULL },
+};
+
+LV2_SYMBOL_EXPORT
+const LV2_Descriptor*
+lv2_descriptor(uint32_t index)
+{
+ if (index < 3) {
+ return &descriptors[index];
+ }
+ return NULL;
+}
+
+} // extern "C"
diff --git a/src/cs_chorus.cc b/src/cs_chorus.cc
new file mode 100644
index 0000000..5cb28c5
--- /dev/null
+++ b/src/cs_chorus.cc
@@ -0,0 +1,406 @@
+/*
+ Copyright (C) 2003-2008 Fons Adriaensen <fons@kokkinizita.net>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+
+#include <math.h>
+#include <string.h>
+#include "cs_chorus.h"
+
+
+
+Ladspa_CS_chorus1::Ladspa_CS_chorus1 (SampleRate fsam) : LadspaPlugin (fsam)
+{
+ _size = (unsigned long)(ceil (30 * fsam / 1000.0)) + 64;
+ _size = (_size >> 6) << 6;
+ _line = new float [_size + 1];
+}
+
+
+Ladspa_CS_chorus1::~Ladspa_CS_chorus1 (void)
+{
+ delete[] _line;
+}
+
+
+void Ladspa_CS_chorus1::setport (PortIndex port, PortData *data)
+{
+ _port [port] = (float*)data;
+}
+
+
+void Ladspa_CS_chorus1::active (bool act)
+{
+ unsigned int i;
+
+ if (act)
+ {
+ _wi = _gi = 0;
+ _x1 = _x2 = 1;
+ _y1 = _y2 = 0;
+ memset (_line, 0, (_size + 1) * sizeof (float));
+ for (i = 0; i < 3; i++) _ri [i] = _dr [i] = 0;
+ }
+}
+
+
+void Ladspa_CS_chorus1::runproc (SampleCount len, bool add)
+{
+ unsigned long i, k, wi;
+ int j;
+ float *p0, *p1;
+ float t, x, y;
+ p0 = _port [INPUT];
+ p1 = _port [OUTPUT];
+
+ wi = _wi;
+ do
+ {
+ if (_gi == 0)
+ {
+ _gi = 64;
+
+ t = 402.12f * _port [FREQ1][0] / _fsam;
+ x = _x1 - t * _y1;
+ y = _y1 + t * _x1;
+ t = sqrtf (x * x + y * y);
+ _x1 = x / t;
+ _y1 = y / t;
+
+ t = 402.12f * _port [FREQ2][0] / _fsam;
+ x = _x2 - t * _y2;
+ y = _y2 + t * _x2;
+ t = sqrtf (x * x + y * y);
+ _x2 = x / t;
+ _y2 = y / t;
+
+ x = _port [TMOD1][0] * _x1 + _port [TMOD2][0] * _x2;
+ y = _port [TMOD1][0] * _y1 + _port [TMOD2][0] * _y2;
+
+ _dr [0] = x;
+ _dr [1] = -0.500f * x + 0.866f * y;
+ _dr [2] = -0.500f * x - 0.866f * y;
+
+ for (j = 0; j < 3; j++)
+ {
+ t = _port [DELAY][0] + _dr [j];
+ if (t < 0) t = 0;
+ if (t > 30) t = 30;
+ t *= _fsam / 1000.0f;
+ _dr [j] = (t - _ri [j]) / 64;
+ }
+ }
+
+ k = (_gi < len) ? _gi : len;
+ _gi -= k;
+ len -= k;
+
+ while (k--)
+ {
+ _line [++wi] = *p0++;
+ y = 0;
+ for (j = 0; j < 3; j++)
+ {
+ x = wi - _ri [j];
+ _ri [j] += _dr [j];
+ if (x < 0) x += _size;
+ i = (int)(floorf (x));
+ x -= i;
+ y += (1 - x) * _line [i] + x * _line [i + 1];
+ }
+ y *= 0.333f;
+ if (add) *p1++ += y * _gain;
+ else *p1++ = y;
+
+ }
+ if (wi == _size) _line [wi = 0] = _line [_size];
+ }
+ while (len);
+
+ _wi = wi;
+}
+
+
+
+
+Ladspa_CS_chorus2::Ladspa_CS_chorus2 (SampleRate fsam) : LadspaPlugin (fsam)
+{
+ _size = (unsigned long)(ceil (30 * fsam / 500.0)) + 192;
+ _size = (_size >> 6) << 6;
+ _line = new float [_size + 1];
+}
+
+
+Ladspa_CS_chorus2::~Ladspa_CS_chorus2 (void)
+{
+ delete[] _line;
+}
+
+
+void Ladspa_CS_chorus2::setport (PortIndex port, PortData *data)
+{
+ _port [port] = (float*)data;
+}
+
+
+void Ladspa_CS_chorus2::active (bool act)
+{
+ unsigned int i;
+
+ if (act)
+ {
+ _wi = _gi = 0;
+ _x1 = _x2 = 1;
+ _y1 = _y2 = 0;
+ _a = _b = 0;
+ memset (_line, 0, (_size + 1) * sizeof (float));
+ for (i = 0; i < 3; i++) _ri [i] = _dr [i] = 0;
+ }
+}
+
+
+void Ladspa_CS_chorus2::runproc (SampleCount len, bool add)
+{
+ unsigned long i, k, wi;
+ int j;
+ float *p0, *p1;
+ float a, b, t, x, y;
+
+ p0 = _port [INPUT];
+ p1 = _port [OUTPUT];
+
+ wi = _wi;
+ a = _a;
+ b = _b;
+ do
+ {
+ if (_gi == 0)
+ {
+ _gi = 64;
+
+ t = 402.12f * _port [FREQ1][0] / _fsam;
+ x = _x1 - t * _y1;
+ y = _y1 + t * _x1;
+ t = sqrtf (x * x + y * y);
+ _x1 = x / t;
+ _y1 = y / t;
+
+ t = 402.12f * _port [FREQ2][0] / _fsam;
+ x = _x2 - t * _y2;
+ y = _y2 + t * _x2;
+ t = sqrtf (x * x + y * y);
+ _x2 = x / t;
+ _y2 = y / t;
+
+ x = _port [TMOD1][0] * _x1 + _port [TMOD2][0] * _x2;
+ y = _port [TMOD1][0] * _y1 + _port [TMOD2][0] * _y2;
+
+ _dr [0] = x;
+ _dr [1] = -0.500f * x + 0.866f * y;
+ _dr [2] = -0.500f * x - 0.866f * y;
+
+ for (j = 0; j < 3; j++)
+ {
+ t = _port [DELAY][0] + _dr [j];
+ if (t < 0) t = 0;
+ if (t > 30) t = 30;
+ t *= _fsam / 500.0f;
+ _dr [j] = (t - _ri [j]) / 64;
+ }
+ }
+
+ k = (_gi < len) ? _gi : len;
+ _gi -= k;
+ len -= k;
+
+ while (k--)
+ {
+ x = *p0++ + 0.52f * a - 0.25f * b;
+ _line [++wi] = 0.5f * (x + b) + a;
+ b = a;
+ a = x;
+ x = 0.52f * a - 0.25f * b;
+ _line [++wi] = 0.5f * (x + b) + a;
+ b = a;
+ a = x;
+
+ y = 0;
+ for (j = 0; j < 3; j++)
+ {
+ x = wi - _ri [j];
+ _ri [j] += _dr [j];
+ if (x < 0) x += _size;
+ i = (int)(floorf (x));
+ x -= i;
+ y += (1 - x) * _line [i] + x * _line [i + 1];
+ }
+ y *= 0.333f;
+ if (add) *p1++ += y * _gain;
+ else *p1++ = y;
+
+ }
+ if (wi == _size) _line [wi = 0] = _line [_size];
+ }
+ while (len);
+
+ _wi = wi;
+ _a = a;
+ _b = b;
+}
+
+
+
+
+Ladspa_CS_chorus3::Ladspa_CS_chorus3 (SampleRate fsam) : LadspaPlugin (fsam)
+{
+ _size = (unsigned long)(ceil (30 * fsam / 500.0)) + 192;
+ _size = (_size >> 6) << 6;
+ _line = new float [_size + 1];
+}
+
+
+Ladspa_CS_chorus3::~Ladspa_CS_chorus3 (void)
+{
+ delete[] _line;
+}
+
+
+void Ladspa_CS_chorus3::setport (PortIndex port, PortData *data)
+{
+ _port [port] = (float*)data;
+}
+
+
+void Ladspa_CS_chorus3::active (bool act)
+{
+ unsigned int i;
+
+ if (act)
+ {
+ _wi = _gi = 0;
+ _x1 = _x2 = 1;
+ _y1 = _y2 = 0;
+ _a = _b = 0;
+ memset (_line, 0, (_size + 1) * sizeof (float));
+ for (i = 0; i < 3; i++) _ri [i] = _dr [i] = 0;
+ }
+}
+
+
+void Ladspa_CS_chorus3::runproc (SampleCount len, bool add)
+{
+ unsigned long i, k, wi;
+ int j;
+ float *p0, *p1, *p2, *p3;
+ float a, b, t, x, y;
+
+ p0 = _port [INPUT];
+ p1 = _port [OUTPUT1];
+ p2 = _port [OUTPUT2];
+ p3 = _port [OUTPUT3];
+
+ wi = _wi;
+ a = _a;
+ b = _b;
+ do
+ {
+ if (_gi == 0)
+ {
+ _gi = 64;
+
+ t = 402.12f * _port [FREQ1][0] / _fsam;
+ x = _x1 - t * _y1;
+ y = _y1 + t * _x1;
+ t = sqrtf (x * x + y * y);
+ _x1 = x / t;
+ _y1 = y / t;
+
+ t = 402.12f * _port [FREQ2][0] / _fsam;
+ x = _x2 - t * _y2;
+ y = _y2 + t * _x2;
+ t = sqrtf (x * x + y * y);
+ _x2 = x / t;
+ _y2 = y / t;
+
+ x = _port [TMOD1][0] * _x1 + _port [TMOD2][0] * _x2;
+ y = _port [TMOD1][0] * _y1 + _port [TMOD2][0] * _y2;
+
+ _dr [0] = x;
+ _dr [1] = -0.500f * x + 0.866f * y;
+ _dr [2] = -0.500f * x - 0.866f * y;
+
+ for (j = 0; j < 3; j++)
+ {
+ t = _port [DELAY][0] + _dr [j];
+ if (t < 0) t = 0;
+ if (t > 30) t = 30;
+ t *= _fsam / 500.0f;
+ _dr [j] = (t - _ri [j]) / 64;
+ }
+ }
+
+ k = (_gi < len) ? _gi : len;
+ _gi -= k;
+ len -= k;
+
+ while (k--)
+ {
+ x = *p0++ + 0.52f * a - 0.25f * b;
+ _line [++wi] = 0.5f * (x + b) + a;
+ b = a;
+ a = x;
+ x = 0.52f * a - 0.25f * b;
+ _line [++wi] = 0.5f * (x + b) + a;
+ b = a;
+ a = x;
+
+ x = wi - _ri [0];
+ _ri [0] += _dr [0];
+ if (x < 0) x += _size;
+ i = (int)(floorf (x));
+ x -= i;
+ y = (1 - x) * _line [i] + x * _line [i + 1];
+ if (add) *p1++ += y * _gain;
+ else *p1++ = y;
+
+ x = wi - _ri [1];
+ _ri [1] += _dr [1];
+ if (x < 0) x += _size;
+ i = (int)(floorf (x));
+ x -= i;
+ y = (1 - x) * _line [i] + x * _line [i + 1];
+ if (add) *p2++ += y * _gain;
+ else *p2++ = y;
+
+ x = wi - _ri [2];
+ _ri [2] += _dr [2];
+ if (x < 0) x += _size;
+ i = (int)(floorf (x));
+ x -= i;
+ y = (1 - x) * _line [i] + x * _line [i + 1];
+ if (add) *p3++ += y * _gain;
+ else *p3++ = y;
+ }
+ if (wi == _size) _line [wi = 0] = _line [_size];
+ }
+ while (len);
+
+ _wi = wi;
+ _a = a;
+ _b = b;
+}
+
diff --git a/src/cs_chorus.h b/src/cs_chorus.h
new file mode 100644
index 0000000..9228ffa
--- /dev/null
+++ b/src/cs_chorus.h
@@ -0,0 +1,106 @@
+/*
+ Copyright (C) 2003-2008 Fons Adriaensen <fons@kokkinizita.net>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+
+#ifndef __CS_CHORUS_H
+#define __CS_CHORUS_H
+
+#include "ladspaplugin.h"
+
+
+class Ladspa_CS_chorus1 : public LadspaPlugin
+{
+public:
+
+ enum { INPUT, OUTPUT, DELAY, FREQ1, TMOD1, FREQ2, TMOD2, NPORT };
+
+ Ladspa_CS_chorus1 (SampleRate fsam);
+ virtual void setport (PortIndex port, PortData *data);
+ virtual void active (bool act);
+ virtual void runproc (SampleCount len, bool add);
+ virtual ~Ladspa_CS_chorus1 (void);
+
+private:
+
+ float *_port [NPORT];
+ unsigned long _size;
+ unsigned long _wi;
+ unsigned long _gi;
+ float _ri [3];
+ float _dr [3];
+ float _x1, _y1;
+ float _x2, _y2;
+ float *_line;
+};
+
+
+class Ladspa_CS_chorus2 : public LadspaPlugin
+{
+public:
+
+ enum { INPUT, OUTPUT, DELAY, FREQ1, TMOD1, FREQ2, TMOD2, NPORT };
+
+ Ladspa_CS_chorus2 (SampleRate fsam);
+ virtual void setport (PortIndex port, PortData *data);
+ virtual void active (bool act);
+ virtual void runproc (SampleCount len, bool add);
+ virtual ~Ladspa_CS_chorus2 (void);
+
+private:
+
+ float *_port [NPORT];
+ unsigned long _size;
+ unsigned long _wi;
+ unsigned long _gi;
+ float _ri [3];
+ float _dr [3];
+ float _x1, _y1;
+ float _x2, _y2;
+ float _a, _b;
+ float *_line;
+};
+
+
+class Ladspa_CS_chorus3 : public LadspaPlugin
+{
+public:
+
+ enum { INPUT, OUTPUT1, OUTPUT2, OUTPUT3, DELAY, FREQ1, TMOD1, FREQ2, TMOD2, NPORT };
+
+ Ladspa_CS_chorus3 (SampleRate fsam);
+ virtual void setport (PortIndex port, PortData *data);
+ virtual void active (bool act);
+ virtual void runproc (SampleCount len, bool add);
+ virtual ~Ladspa_CS_chorus3 (void);
+
+private:
+
+ float *_port [NPORT];
+ unsigned long _size;
+ unsigned long _wi;
+ unsigned long _gi;
+ float _ri [3];
+ float _dr [3];
+ float _x1, _y1;
+ float _x2, _y2;
+ float _a, _b;
+ float *_line;
+};
+
+
+#endif
diff --git a/src/cs_chorus_if.cc b/src/cs_chorus_if.cc
new file mode 100644
index 0000000..4b5c270
--- /dev/null
+++ b/src/cs_chorus_if.cc
@@ -0,0 +1,247 @@
+/*
+ Copyright (C) 2003-2008 Fons Adriaensen <fons@kokkinizita.net>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+//-----------------------------------------------------------------------------------
+// Common definitions
+
+
+#include "cs_chorus.h"
+
+#define NMODS 3
+#define VERSION "0.4.0"
+
+
+static const char* maker = "Fons Adriaensen <fons@kokkinizita.net>";
+static const char* copyr = "(C) 2003-2008 Fons Adriaensen - License: GPL2";
+
+
+static void pconnect (LADSPA_Handle H, PortIndex port, LADSPA_Data *data)
+{
+ ((LadspaPlugin *)H)->setport (port, data);
+}
+
+static void activate (LADSPA_Handle H)
+{
+ ((LadspaPlugin *)H)->active (true);
+}
+
+static void runplugin (LADSPA_Handle H, unsigned long k)
+{
+ ((LadspaPlugin *)H)->runproc (k, false);
+}
+
+static void runadding (LADSPA_Handle H, unsigned long k)
+{
+ ((LadspaPlugin *)H)->runproc (k, true);
+}
+
+static void setadding (LADSPA_Handle H, LADSPA_Data gain)
+{
+ ((LadspaPlugin *)H)->setgain (gain);
+}
+
+static void deactivate (LADSPA_Handle H)
+{
+ ((LadspaPlugin *)H)->active (false);
+}
+
+static void cleanup (LADSPA_Handle H)
+{
+ delete (LadspaPlugin *) H;
+}
+
+//-----------------------------------------------------------------------------------
+// Plugin definitions
+
+
+static const char* name1 = "Chorus1 - Based on CSound orchestra by Sean Costello";
+static const char* label1 = "Chorus1";
+
+static LADSPA_Handle instant1 (const struct _LADSPA_Descriptor *desc, unsigned long rate)
+{
+ return new Ladspa_CS_chorus1 (rate);
+}
+
+
+static const char* name2 = "Chorus2 - Based on CSound orchestra by Sean Costello";
+static const char* label2 = "Chorus2";
+
+static LADSPA_Handle instant2 (const struct _LADSPA_Descriptor *desc, unsigned long rate)
+{
+ return new Ladspa_CS_chorus2 (rate);
+}
+
+
+static const char* name3 = "Triple chorus";
+static const char* label3 = "TripleChorus";
+
+static LADSPA_Handle instant3 (const struct _LADSPA_Descriptor *desc, unsigned long rate)
+{
+ return new Ladspa_CS_chorus3 (rate);
+}
+
+
+
+static const LADSPA_PortDescriptor pdesc12 [Ladspa_CS_chorus1::NPORT] =
+{
+ LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO,
+ LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO,
+ LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL,
+ LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL,
+ LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL,
+ LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL,
+ LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL
+};
+
+static const char * const pname12 [Ladspa_CS_chorus1::NPORT] =
+{
+ "Input",
+ "Output",
+ "Delay (ms)",
+ "Mod Frequency 1 (Hz)",
+ "Mod Amplitude 1 (ms)",
+ "Mod Frequency 2 (Hz)",
+ "Mod Amplitude 2 (ms)"
+};
+
+static const LADSPA_PortRangeHint phint12 [Ladspa_CS_chorus1::NPORT] =
+{
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_DEFAULT_0, 0, 30 },
+ { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_LOGARITHMIC, 0.003, 10 },
+ { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_DEFAULT_0, 0, 10 },
+ { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_LOGARITHMIC, 0.01, 30 },
+ { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_DEFAULT_0, 0, 3 }
+};
+
+
+static const LADSPA_PortDescriptor pdesc3 [Ladspa_CS_chorus3::NPORT] =
+{
+ LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO,
+ LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO,
+ LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO,
+ LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO,
+ LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL,
+ LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL,
+ LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL,
+ LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL,
+ LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL
+};
+
+static const char * const pname3 [Ladspa_CS_chorus3::NPORT] =
+{
+ "Input",
+ "Output1",
+ "Output2",
+ "Output3",
+ "Delay (ms)",
+ "Mod Frequency 1 (Hz)",
+ "Mod Amplitude 1 (ms)",
+ "Mod Frequency 2 (Hz)",
+ "Mod Amplitude 2 (ms)"
+};
+
+static const LADSPA_PortRangeHint phint3 [Ladspa_CS_chorus3::NPORT] =
+{
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_DEFAULT_0, 0, 30 },
+ { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_LOGARITHMIC, 0.003, 10 },
+ { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_DEFAULT_0, 0, 10 },
+ { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_LOGARITHMIC, 0.01, 30 },
+ { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_DEFAULT_0, 0, 3 }
+};
+
+
+static const LADSPA_Descriptor moddescr [NMODS] =
+{
+ {
+ 1944,
+ label1,
+ LADSPA_PROPERTY_REALTIME | LADSPA_PROPERTY_HARD_RT_CAPABLE,
+ name1,
+ maker,
+ copyr,
+ Ladspa_CS_chorus1::NPORT,
+ pdesc12,
+ pname12,
+ phint12,
+ 0,
+ instant1,
+ pconnect,
+ activate,
+ runplugin,
+ runadding,
+ setadding,
+ deactivate,
+ cleanup
+ },
+ {
+ 1945,
+ label2,
+ LADSPA_PROPERTY_REALTIME | LADSPA_PROPERTY_HARD_RT_CAPABLE,
+ name2,
+ maker,
+ copyr,
+ Ladspa_CS_chorus1::NPORT,
+ pdesc12,
+ pname12,
+ phint12,
+ 0,
+ instant2,
+ pconnect,
+ activate,
+ runplugin,
+ runadding,
+ setadding,
+ deactivate,
+ cleanup
+ },
+ {
+ 1951,
+ label3,
+ LADSPA_PROPERTY_REALTIME | LADSPA_PROPERTY_HARD_RT_CAPABLE,
+ name3,
+ maker,
+ copyr,
+ Ladspa_CS_chorus3::NPORT,
+ pdesc3,
+ pname3,
+ phint3,
+ 0,
+ instant3,
+ pconnect,
+ activate,
+ runplugin,
+ runadding,
+ setadding,
+ deactivate,
+ cleanup
+ }
+};
+
+extern "C" const LADSPA_Descriptor *ladspa_descriptor (unsigned long i)
+{
+ if (i >= NMODS) return 0;
+ return moddescr + i;
+}
+
+//-----------------------------------------------------------------------------------
diff --git a/src/cs_chorus_lv2.cc b/src/cs_chorus_lv2.cc
new file mode 100644
index 0000000..bb58b6c
--- /dev/null
+++ b/src/cs_chorus_lv2.cc
@@ -0,0 +1,90 @@
+/*
+ Copyright (C) 2012 David Robillard <d@drobilla.net>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#include <stddef.h>
+
+#include "cs_chorus.h"
+#include "plugin_lv2.h"
+
+extern "C" {
+
+static LV2_Handle
+instantiate1(const LV2_Descriptor* descriptor,
+ double rate,
+ const char* bundle_path,
+ const LV2_Feature* const* features)
+{
+ return new Ladspa_CS_chorus1(rate);
+}
+
+static LV2_Handle
+instantiate2(const LV2_Descriptor* descriptor,
+ double rate,
+ const char* bundle_path,
+ const LV2_Feature* const* features)
+{
+ return new Ladspa_CS_chorus2(rate);
+}
+
+static LV2_Handle
+instantiate3(const LV2_Descriptor* descriptor,
+ double rate,
+ const char* bundle_path,
+ const LV2_Feature* const* features)
+{
+ return new Ladspa_CS_chorus3(rate);
+}
+
+static const LV2_Descriptor descriptors[3] = {
+ { "http://drobilla.net/plugins/fomp/cs_chorus1",
+ instantiate1,
+ connect_port,
+ activate,
+ run,
+ deactivate,
+ cleanup,
+ NULL },
+ { "http://drobilla.net/plugins/fomp/cs_chorus2",
+ instantiate2,
+ connect_port,
+ activate,
+ run,
+ deactivate,
+ cleanup,
+ NULL },
+ { "http://drobilla.net/plugins/fomp/triple_chorus",
+ instantiate3,
+ connect_port,
+ activate,
+ run,
+ deactivate,
+ cleanup,
+ NULL },
+};
+
+LV2_SYMBOL_EXPORT
+const LV2_Descriptor*
+lv2_descriptor(uint32_t index)
+{
+ if (index < 3) {
+ return &descriptors[index];
+ }
+ return NULL;
+}
+
+} // extern "C"
diff --git a/src/cs_phaser.cc b/src/cs_phaser.cc
new file mode 100644
index 0000000..099c90c
--- /dev/null
+++ b/src/cs_phaser.cc
@@ -0,0 +1,191 @@
+/*
+ Copyright (C) 2003-2008 Fons Adriaensen <fons@kokkinizita.net>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+
+#include <stdio.h>
+#include <math.h>
+#include "cs_phaser.h"
+#include "exp2ap.h"
+
+
+void Ladspa_CS_phaser1::setport (PortIndex port, PortData *data)
+{
+ _port [port] = (float*)data;
+}
+
+
+void Ladspa_CS_phaser1::active (bool act)
+{
+ if (act)
+ {
+ _w = _z = 0;
+ for (int i = 0; i < NSECT; i++) _c [i] = 0;
+ }
+}
+
+
+void Ladspa_CS_phaser1::runproc (SampleCount len, bool add)
+{
+ int i, k, ns;
+ float *p0, *p1, *p2, *p3, *p4;
+ float g0, gf, gi, gm;
+ float d, t, w, dw, x, z;
+
+ p0 = _port [0];
+ p1 = _port [1];
+ p2 = _port [2] - 1;
+ p3 = _port [3] - 1;
+ p4 = _port [4] - 1;
+
+ ns = (int)(floor (_port [6][0] + 0.5));
+ g0 = exp2ap (0.1661f * _port [5][0]);
+ gf = _port [10][0];
+ gm = _port [11][0];
+ gi = 1 - fabs (gm);
+
+ w = _w;
+ z = _z + 1e-10f;
+
+ do
+ {
+ k = (len > 24) ? 16 : len;
+ p2 += k;
+ p3 += k;
+ p4 += k;
+ len -= k;
+
+ t = (exp2ap (_port [8][0] * *p3 + _port [7][0] + *p2 + 9.683f) + _port [9][0] * *p4 * 1000.0f) / _fsam;
+ if (t < 0.0f) t = 0.0f;
+ if (t > 1.5f) t = 1.5f;
+ t = (sinf (t) - 1) / cosf (t) + 1;
+ dw = (t - w) / k;
+
+ while (k--)
+ {
+ w += dw;
+ x = g0 * *p0++;
+ z = gf * z + x;
+ z = 4 * tanhf (0.25f * z);
+ for (i = 0; i < ns; i++)
+ {
+ t = _c [i];
+ d = w * (2 * z - t);
+ t += d;
+ _c [i] = t + d;
+ z = t - z;
+ }
+ t = gm * z + gi * x;
+ if (add) *p1++ += t * _gain;
+ else *p1++ = t;
+ }
+ }
+ while (len);
+
+ _w = w;
+ _z = z;
+}
+
+
+
+void Ladspa_CS_phaser1lfo::setport (PortIndex port, PortData *data)
+{
+ _port [port] = (float*)data;
+}
+
+
+void Ladspa_CS_phaser1lfo::active (bool act)
+{
+ if (act)
+ {
+ _gi = 0;
+ _z = _w = _v = _p = 0;
+ for (int i = 0; i < NSECT; i++) _c [i] = 0;
+ }
+}
+
+
+
+
+void Ladspa_CS_phaser1lfo::runproc (SampleCount len, bool add)
+{
+ int i, k, ns;
+ float *p0, *p1;
+ float g0, gf, gi, gm;
+ float d, t, w, v, x, z;
+
+ p0 = _port [0];
+ p1 = _port [1];
+
+ ns = (int)(floor (_port [3][0] + 0.5));
+ g0 = exp2ap (0.1661f * _port [2][0]);
+ gf = _port [8][0];
+ gm = _port [9][0];
+ gi = 1 - fabs (gm);
+
+ z = _z + 1e-10f;
+ w = _w;
+ v = _v;
+
+ do
+ {
+ if (_gi == 0)
+ {
+ _gi = DSUB;
+ _p += 2 * DSUB * _port [5][0] / _fsam;
+ if (_p > 1) _p -= 2;
+ x = 0.999f * _port [6][0];
+ d = _p - x;
+ if (d < 0) t = 0.5f + d / (1 + x);
+ else t = 0.5f - d / (1 - x);
+ t = exp2ap (_port [7][0] * t + _port [4][0] + 9.683f) / _fsam;
+ if (t < 0.0f) t = 0.0f;
+ if (t > 1.5f) t = 1.5f;
+ t = (sinf (t) - 1) / cosf (t) + 1;
+ v = (t - w) / DSUB;
+ }
+
+ k = (_gi < len) ? _gi : len;
+ _gi -= k;
+ len -= k;
+ while (k--)
+ {
+ x = g0 * *p0++;
+ z = gf * z + x;
+ z = 4 * tanhf (0.25f * z);
+ for (i = 0; i < ns; i++)
+ {
+ t = _c [i];
+ d = w * (2 * z - t);
+ t += d;
+ _c [i] = t + d;
+ z = t - z;
+ }
+ t = gm * z + gi * x;
+ if (add) *p1++ += t * _gain;
+ else *p1++ = t;
+ w += v;
+ }
+ }
+ while (len);
+
+ _z = z;
+ _w = w;
+ _v = v;
+}
+
+
diff --git a/src/cs_phaser.h b/src/cs_phaser.h
new file mode 100644
index 0000000..d0e0f3c
--- /dev/null
+++ b/src/cs_phaser.h
@@ -0,0 +1,66 @@
+/*
+ Copyright (C) 2003-2008 Fons Adriaensen <fons@kokkinizita.net>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+
+#ifndef __CS_PHASER_H
+#define __CS_PHASER_H
+
+#include "ladspaplugin.h"
+
+
+class Ladspa_CS_phaser1 : public LadspaPlugin
+{
+public:
+
+ enum { NPORT = 12, NSECT = 30 };
+
+ Ladspa_CS_phaser1 (SampleRate fsam) : LadspaPlugin (fsam) {}
+ virtual void setport (PortIndex port, PortData *data);
+ virtual void active (bool act);
+ virtual void runproc (SampleCount len, bool add);
+ virtual ~Ladspa_CS_phaser1 (void) {}
+
+private:
+
+ float *_port [NPORT];
+ float _w, _z, _c [NSECT];
+};
+
+
+class Ladspa_CS_phaser1lfo : public LadspaPlugin
+{
+public:
+
+ enum { NPORT = 10, NSECT = 30 };
+
+ Ladspa_CS_phaser1lfo (SampleRate fsam) : LadspaPlugin (fsam) {}
+ virtual void setport (PortIndex port, PortData *data);
+ virtual void active (bool act);
+ virtual void runproc (SampleCount len, bool add);
+ virtual ~Ladspa_CS_phaser1lfo (void) {}
+
+private:
+
+ enum { DSUB = 32 };
+
+ float *_port [NPORT];
+ float _z, _w, _v, _p, _c [NSECT];
+ unsigned int _gi;
+};
+
+#endif
diff --git a/src/cs_phaser_if.cc b/src/cs_phaser_if.cc
new file mode 100644
index 0000000..d1ef98c
--- /dev/null
+++ b/src/cs_phaser_if.cc
@@ -0,0 +1,236 @@
+/*
+ Copyright (C) 2003-2008 Fons Adriaensen <fons@kokkinizita.net>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+//-----------------------------------------------------------------------------------
+// Common definitions
+
+
+#include "cs_phaser.h"
+
+#define VERSION "0.4.0"
+#define NMODS 2
+
+
+static const char* maker = "Fons Adriaensen <fons@kokkinizita.net>";
+static const char* copyr = "(C) 2003-2008 Fons Adriaensen - License: GPL2";
+
+
+static void pconnect (LADSPA_Handle H, unsigned long port, LADSPA_Data *data)
+{
+ ((LadspaPlugin *)H)->setport (port, data);
+}
+
+static void activate (LADSPA_Handle H)
+{
+ ((LadspaPlugin *)H)->active (true);
+}
+
+static void runplugin (LADSPA_Handle H, unsigned long k)
+{
+ ((LadspaPlugin *)H)->runproc (k, false);
+}
+
+static void runadding (LADSPA_Handle H, unsigned long k)
+{
+ ((LadspaPlugin *)H)->runproc (k, true);
+}
+
+static void setadding (LADSPA_Handle H, LADSPA_Data gain)
+{
+ ((LadspaPlugin *)H)->setgain (gain);
+}
+
+static void deactivate (LADSPA_Handle H)
+{
+ ((LadspaPlugin *)H)->active (false);
+}
+
+static void cleanup (LADSPA_Handle H)
+{
+ delete (LadspaPlugin *) H;
+}
+
+//-----------------------------------------------------------------------------------
+
+static const char* name0 = "Phaser1 - Similar to CSound's phaser1 by Sean Costello";
+static const char* label0 = "Phaser1";
+
+static LADSPA_Handle instant0 (const struct _LADSPA_Descriptor *desc, unsigned long rate)
+{
+ return new Ladspa_CS_phaser1 (rate);
+}
+
+
+static const LADSPA_PortDescriptor pdesc0 [Ladspa_CS_phaser1::NPORT] =
+{
+ LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO,
+ LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO,
+ LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO,
+ LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO,
+ LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO,
+ LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL,
+ LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL,
+ LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL,
+ LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL,
+ LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL,
+ LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL,
+ LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL
+};
+
+static const char * const pname0 [Ladspa_CS_phaser1::NPORT] =
+{
+ "Input",
+ "Output",
+ "Frequency",
+ "Exp FM",
+ "Lin FM",
+ "Input gain (dB)",
+ "Sections",
+ "Frequency",
+ "Exp FM gain",
+ "Lin FM gain",
+ "Feedback gain",
+ "Output mix"
+};
+
+static const LADSPA_PortRangeHint phint0 [Ladspa_CS_phaser1::NPORT] =
+{
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_DEFAULT_0, -40, 10 },
+ { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_INTEGER, 1, Ladspa_CS_phaser1::NSECT },
+ { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_DEFAULT_0, -6, 6 },
+ { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE, 0, 10 },
+ { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE, 0, 10 },
+ { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_DEFAULT_0, -1, 1 },
+ { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_DEFAULT_0, -1, 1 },
+};
+
+
+//-----------------------------------------------------------------------------------
+
+static const char* name1 = "Phaser1 with LFO";
+static const char* label1 = "Phaser1+LFO";
+
+static LADSPA_Handle instant1 (const struct _LADSPA_Descriptor *desc, unsigned long rate)
+{
+ return new Ladspa_CS_phaser1lfo (rate);
+}
+
+
+static const LADSPA_PortDescriptor pdesc1 [Ladspa_CS_phaser1lfo::NPORT] =
+{
+ LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO,
+ LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO,
+ LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL,
+ LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL,
+ LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL,
+ LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL,
+ LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL,
+ LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL,
+ LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL,
+ LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL
+};
+
+static const char * const pname1 [Ladspa_CS_phaser1lfo::NPORT] =
+{
+ "Input",
+ "Output",
+ "Input gain (dB)",
+ "Sections",
+ "Frequency",
+ "LFO frequency (Hz)",
+ "LFO waveform",
+ "Modulation gain",
+ "Feedback gain",
+ "Output mix"
+};
+
+static const LADSPA_PortRangeHint phint1 [Ladspa_CS_phaser1lfo::NPORT] =
+{
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_DEFAULT_0, -40, 10 },
+ { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_INTEGER, 1, Ladspa_CS_phaser1lfo::NSECT },
+ { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_DEFAULT_0, -6, 6 },
+ { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_LOGARITHMIC, 0.01, 30 },
+ { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_DEFAULT_0, -1, 1 },
+ { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE, 0, 10 },
+ { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_DEFAULT_0, -1, 1 },
+ { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_DEFAULT_0, -1, 1 },
+};
+
+
+//-----------------------------------------------------------------------------------
+
+static const LADSPA_Descriptor moddescr [NMODS] =
+{
+ {
+ 1946,
+ label0,
+ LADSPA_PROPERTY_REALTIME | LADSPA_PROPERTY_HARD_RT_CAPABLE,
+ name0,
+ maker,
+ copyr,
+ Ladspa_CS_phaser1::NPORT,
+ pdesc0,
+ pname0,
+ phint0,
+ 0,
+ instant0,
+ pconnect,
+ activate,
+ runplugin,
+ runadding,
+ setadding,
+ deactivate,
+ cleanup
+ },
+ {
+ 1947,
+ label1,
+ LADSPA_PROPERTY_REALTIME | LADSPA_PROPERTY_HARD_RT_CAPABLE,
+ name1,
+ maker,
+ copyr,
+ Ladspa_CS_phaser1lfo::NPORT,
+ pdesc1,
+ pname1,
+ phint1,
+ 0,
+ instant1,
+ pconnect,
+ activate,
+ runplugin,
+ runadding,
+ setadding,
+ deactivate,
+ cleanup
+ }
+};
+
+extern "C" const LADSPA_Descriptor *ladspa_descriptor (unsigned long i)
+{
+ if (i >= NMODS) return 0;
+ return moddescr + i;
+}
+
+//-----------------------------------------------------------------------------------
diff --git a/src/cs_phaser_lv2.cc b/src/cs_phaser_lv2.cc
new file mode 100644
index 0000000..576d4a2
--- /dev/null
+++ b/src/cs_phaser_lv2.cc
@@ -0,0 +1,73 @@
+/*
+ Copyright (C) 2012 David Robillard <d@drobilla.net>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#include <stddef.h>
+
+#include "cs_phaser.h"
+#include "plugin_lv2.h"
+
+extern "C" {
+
+static LV2_Handle
+instantiate1(const LV2_Descriptor* descriptor,
+ double rate,
+ const char* bundle_path,
+ const LV2_Feature* const* features)
+{
+ return new Ladspa_CS_phaser1(rate);
+}
+
+static LV2_Handle
+instantiate2(const LV2_Descriptor* descriptor,
+ double rate,
+ const char* bundle_path,
+ const LV2_Feature* const* features)
+{
+ return new Ladspa_CS_phaser1lfo(rate);
+}
+
+static const LV2_Descriptor descriptors[3] = {
+ { "http://drobilla.net/plugins/fomp/cs_phaser1",
+ instantiate1,
+ connect_port,
+ activate,
+ run,
+ deactivate,
+ cleanup,
+ NULL },
+ { "http://drobilla.net/plugins/fomp/cs_phaser1_lfo",
+ instantiate2,
+ connect_port,
+ activate,
+ run,
+ deactivate,
+ cleanup,
+ NULL },
+};
+
+LV2_SYMBOL_EXPORT
+const LV2_Descriptor*
+lv2_descriptor(uint32_t index)
+{
+ if (index < 2) {
+ return &descriptors[index];
+ }
+ return NULL;
+}
+
+} // extern "C"
diff --git a/src/exp2ap.h b/src/exp2ap.h
new file mode 100644
index 0000000..2485539
--- /dev/null
+++ b/src/exp2ap.h
@@ -0,0 +1,28 @@
+/*
+ Copyright (C) 2003-2008 Fons Adriaensen <fons@kokkinizita.net>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#include <math.h>
+
+static inline float exp2ap (float x)
+{
+ const int i = (int)(floorf (x));
+ x -= i;
+ return ldexpf (1 + x * (0.6930f + x * (0.2416f + x * (0.0517f + x * 0.0137f))), i);
+}
+
+
diff --git a/src/filters.cc b/src/filters.cc
new file mode 100644
index 0000000..8c93696
--- /dev/null
+++ b/src/filters.cc
@@ -0,0 +1,113 @@
+/*
+ Copyright (C) 2004-2009 Fons Adriaensen <fons@kokkinizita.net>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+
+#include <string.h>
+#include "filters.h"
+#include "exp2ap.h"
+
+
+void Ladspa_Paramfilt::setport (PortIndex port, PortData *data)
+{
+ _port [port] = (float*)data;
+}
+
+
+void Ladspa_Paramfilt::active (bool act)
+{
+ int j;
+
+ if (! act) return;
+ _fade = 0;
+ _gain = 1;
+ for (j = 0; j < NSECT; j++) _sect [j].init ();
+}
+
+
+void Ladspa_Paramfilt::runproc (SampleCount len, bool add)
+{
+ int i, j, k;
+ float *aip = _port [AIP];
+ float *aop = _port [AOP];
+ float *p, sig [48];
+ float t, g, d;
+ float fgain;
+ float sfreq [NSECT];
+ float sband [NSECT];
+ float sgain [NSECT];
+
+ fgain = exp2ap (0.1661 * _port [GAIN][0]);
+ for (j = 0; j < NSECT; j++)
+ {
+ t = _port [SECT + 4 * j + Paramsect::FREQ][0] / _fsam;
+ if (t < 0.0002) t = 0.0002;
+ if (t > 0.4998) t = 0.4998;
+ sfreq [j] = t;
+ sband [j] = _port [SECT + 4 * j + Paramsect::BAND][0];
+ if (_port [SECT + 4 * j + Paramsect::SECT][0] > 0) sgain [j] = exp2ap (0.1661 * _port [SECT + 4 * j + Paramsect::GAIN][0]);
+ else sgain [j] = 1.0;
+ }
+
+ while (len)
+ {
+ k = (len > 48) ? 32 : len;
+
+ t = fgain;
+ g = _gain;
+ if (t > 1.25 * g) t = 1.25 * g;
+ else if (t < 0.80 * g) t = 0.80 * g;
+ _gain = t;
+ d = (t - g) / k;
+ for (i = 0; i < k; i++)
+ {
+ g += d;
+ sig [i] = g * aip [i];
+ }
+
+ for (j = 0; j < NSECT; j++) _sect [j].proc (k, sig, sfreq [j], sband [j], sgain [j]);
+
+ j = _fade;
+ g = j / 16.0;
+ p = 0;
+ if (_port [FILT][0] > 0)
+ {
+ if (j == 16) p = sig;
+ else ++j;
+ }
+ else
+ {
+ if (j == 0) p = aip;
+ else --j;
+ }
+ _fade = j;
+ if (p) memcpy (aop, p, k * sizeof (float));
+ else
+ {
+ d = (j / 16.0 - g) / k;
+ for (i = 0; i < k; i++)
+ {
+ g += d;
+ aop [i] = g * sig [i] + (1 - g) * aip [i];
+ }
+ }
+ aip += k;
+ aop += k;
+ len -= k;
+ }
+}
+
diff --git a/src/filters.h b/src/filters.h
new file mode 100644
index 0000000..3000870
--- /dev/null
+++ b/src/filters.h
@@ -0,0 +1,130 @@
+/*
+ Copyright (C) 2004-2009 Fons Adriaensen <fons@kokkinizita.net>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+
+#ifndef __FILTERS_H
+#define __FILTERS_H
+
+#include <math.h>
+#include "ladspaplugin.h"
+
+
+class Paramsect
+{
+public:
+
+ enum { SECT, FREQ, BAND, GAIN };
+
+ void init (void)
+ {
+ _f = 0.25f;
+ _b = _g = 1.0f;
+ _a = _s1 = _s2 = _z1 = _z2 = 0.0f;
+ }
+
+ void proc (int k, float *sig, float f, float b, float g)
+ {
+ float s1, s2, d1, d2, a, da, x, y;
+ bool u2 = false;
+
+ s1 = _s1;
+ s2 = _s2;
+ a = _a;
+ d1 = 0;
+ d2 = 0;
+ da = 0;
+
+ if (f != _f)
+ {
+ if (f < 0.5f * _f) f = 0.5f * _f;
+ else if (f > 2.0f * _f) f = 2.0f * _f;
+ _f = f;
+ _s1 = -cosf (6.283185f * f);
+ d1 = (_s1 - s1) / k;
+ u2 = true;
+ }
+
+ if (g != _g)
+ {
+ if (g < 0.5f * _g) g = 0.5f * _g;
+ else if (g > 2.0f * _g) g = 2.0f * _g;
+ _g = g;
+ _a = 0.5f * (g - 1.0f);
+ da = (_a - a) / k;
+ u2 = true;
+ }
+
+ if (b != _b)
+ {
+ if (b < 0.5f * _b) b = 0.5f * _b;
+ else if (b > 2.0f * _b) b = 2.0f * _b;
+ _b = b;
+ u2 = true;
+ }
+
+ if (u2)
+ {
+ b *= 7 * f / sqrtf (g);
+ _s2 = (1 - b) / (1 + b);
+ d2 = (_s2 - s2) / k;
+ }
+
+ while (k--)
+ {
+ s1 += d1;
+ s2 += d2;
+ a += da;
+ x = *sig;
+ y = x - s2 * _z2;
+ *sig++ -= a * (_z2 + s2 * y - x);
+ y -= s1 * _z1;
+ _z2 = _z1 + s1 * y;
+ _z1 = y + 1e-10f;
+ }
+ }
+
+private:
+
+ float _f, _b, _g;
+ float _s1, _s2, _a;
+ float _z1, _z2;
+};
+
+
+class Ladspa_Paramfilt : public LadspaPlugin
+{
+public:
+
+ enum { AIP, AOP, FILT, GAIN, SECT, NSECT = 4, NPORT = 20 };
+
+ Ladspa_Paramfilt (SampleRate fsam) : LadspaPlugin (fsam) {}
+ virtual void setport (PortIndex port, PortData *data);
+ virtual void active (bool act);
+ virtual void runproc (SampleCount len, bool add);
+ virtual ~Ladspa_Paramfilt (void) {}
+
+private:
+
+ float *_port [NPORT];
+ float _gain;
+ int _fade;
+ Paramsect _sect [NSECT];
+};
+
+
+#endif
diff --git a/src/filters_lv2.cc b/src/filters_lv2.cc
new file mode 100644
index 0000000..0696c38
--- /dev/null
+++ b/src/filters_lv2.cc
@@ -0,0 +1,56 @@
+/*
+ Copyright (C) 2012 David Robillard <d@drobilla.net>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#include <stddef.h>
+
+#include "filters.h"
+#include "plugin_lv2.h"
+
+extern "C" {
+
+static LV2_Handle
+instantiate(const LV2_Descriptor* descriptor,
+ double rate,
+ const char* bundle_path,
+ const LV2_Feature* const* features)
+{
+ return new Ladspa_Paramfilt(rate);
+}
+
+static const LV2_Descriptor descriptor = {
+ "http://drobilla.net/plugins/fomp/parametric1",
+ instantiate,
+ connect_port,
+ activate,
+ run,
+ deactivate,
+ cleanup,
+ NULL
+};
+
+LV2_SYMBOL_EXPORT
+const LV2_Descriptor*
+lv2_descriptor(uint32_t index)
+{
+ switch (index) {
+ case 0: return &descriptor;
+ default: return NULL;
+ }
+}
+
+} // extern "C"
diff --git a/src/ladspaplugin.h b/src/ladspaplugin.h
new file mode 100644
index 0000000..61d1210
--- /dev/null
+++ b/src/ladspaplugin.h
@@ -0,0 +1,59 @@
+/*
+ Copyright (C) 2003-2008 Fons Adriaensen <fons@kokkinizita.net>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+
+#ifndef __LADSPAPLUGIN_H
+#define __LADSPAPLUGIN_H
+
+#include <lv2/lv2plug.in/ns/lv2core/lv2.h>
+
+
+/* This class name is now a misnomer but I have left it as-is to minimize
+ fragmentation. The following typedefs serve the same purpose, so the
+ plugins can be built with the correct LV2 type (e.g. uint32_t instead of
+ unsigned long) without 'hard' switching the DSP code to the new type. This
+ way, it should be straightforward to make the same code build as both LADSPA
+ and LV2 plugins, should the packages merge. ~ David Robillard, Aug. 2012 */
+
+typedef double SampleRate;
+typedef uint32_t SampleCount;
+typedef uint32_t PortIndex;
+typedef void PortData;
+
+class LadspaPlugin
+{
+public:
+
+ LadspaPlugin (SampleRate fsam) : _gain (1.0), _fsam (fsam) {}
+
+ virtual void setport (PortIndex port, PortData *data) = 0;
+ virtual void active (bool act) = 0;
+ virtual void runproc (SampleCount len, bool add) = 0;
+ virtual ~LadspaPlugin (void) {}
+
+ void setgain (float gain) { _gain = gain; }
+
+protected:
+
+ float _gain;
+ float _fsam;
+};
+
+
+
+#endif
diff --git a/src/mvchpf24.cc b/src/mvchpf24.cc
new file mode 100644
index 0000000..96d3097
--- /dev/null
+++ b/src/mvchpf24.cc
@@ -0,0 +1,126 @@
+/*
+ Copyright (C) 2003-2008 Fons Adriaensen <fons@kokkinizita.net>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+
+#include <stdio.h>
+#include <math.h>
+#include "mvchpf24.h"
+#include "exp2ap.h"
+
+
+static const float lg2midc = log2f(261.63f);
+
+
+void Ladspa_Mvchpf1::setport (PortIndex port, PortData *data)
+{
+ _port [port] = (float*)data;
+}
+
+
+void Ladspa_Mvchpf1::active (bool act)
+{
+ _c1 = _c2 = _c3 = _c4 = _x = 0;
+ _w = 1e5;
+}
+
+
+void Ladspa_Mvchpf1::runproc (SampleCount len, bool add)
+{
+ int k;
+ float *p0, *p1, *p2, *p3;
+ float c1, c2, c3, c4;
+ float g0, g1, d, w, dw, t, x, y;
+
+ p0 = _port [AINP];
+ p1 = _port [AOUT];
+ p2 = _port [AFREQ] - 1;
+ p3 = _port [AFMOD] - 1;
+ g0 = exp2ap (0.1661f * _port [CINP][0]) / 4;
+ g1 = exp2ap (0.1661f * _port [COUT][0]) * 4;
+ if (add) g1 *= _gain;
+
+ c1 = _c1;
+ c2 = _c2;
+ c3 = _c3;
+ c4 = _c4;
+ w = _w;
+ x = _x;
+
+ do
+ {
+ k = (len > 24) ? 16 : len;
+ p2 += k;
+ p3 += k;
+ len -= k;
+
+ t = _fsam / exp2ap (_port [CFMOD][0] * *p3 + *p2 + log2f(_port [CFREQ][0]) - lg2midc + 9.2f);
+ if (t < 2) t = 2;
+ dw = (t - w) / k;
+
+ while (k--)
+ {
+ w += dw;
+
+ x = y = *p0++ * g0 - 0.3f * x;
+
+ d = x - c1 + 1e-10f;
+ t = d * d;
+ d *= (1 + t) / (w + t);
+ c1 += d;
+ x -= c1;
+ c1 += d;
+
+ d = x - c2 + 1e-10f;
+ t = d * d;
+ d *= (1 + t) / (w + t);
+ c2 += d;
+ x -= c2;
+ c2 += d;
+
+ d = x - c3 + 1e-10f;
+ t = d * d;
+ d *= (1 + t) / (w + t);
+ c3 += d;
+ x -= c3;
+ c3 += d;
+
+ d = x - c4 + 1e-10f;
+ t = d * d;
+ d *= (1 + t) / (w + t);
+ c4 += d;
+ x -= c4;
+ c4 += d;
+
+ if (add) *p1++ += g1 * x;
+ else *p1++ = g1 * x;
+
+ x -= y;
+ }
+ }
+ while (len);
+
+ _c1 = c1;
+ _c2 = c2;
+ _c3 = c3;
+ _c4 = c4;
+ _w = w;
+ _x = x;
+}
+
+
+
diff --git a/src/mvchpf24.h b/src/mvchpf24.h
new file mode 100644
index 0000000..3fbaee4
--- /dev/null
+++ b/src/mvchpf24.h
@@ -0,0 +1,46 @@
+/*
+ Copyright (C) 2003-2008 Fons Adriaensen <fons@kokkinizita.net>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+
+#ifndef __MVCHPF24_H
+#define __MVCHPF24_H
+
+#include "ladspaplugin.h"
+
+
+class Ladspa_Mvchpf1 : public LadspaPlugin
+{
+public:
+
+ enum { AINP, AOUT, AFREQ, AFMOD, CINP, CFREQ, CFMOD, COUT, NPORT };
+
+ Ladspa_Mvchpf1 (SampleRate fsam) : LadspaPlugin (fsam) {}
+ virtual void setport (PortIndex port, PortData *data);
+ virtual void active (bool act);
+ virtual void runproc (SampleCount len, bool add);
+ virtual ~Ladspa_Mvchpf1 (void) {}
+
+private:
+
+ float *_port [NPORT];
+ float _c1, _c2, _c3, _c4, _w, _x;
+
+};
+
+
+#endif
diff --git a/src/mvchpf24_if.cc b/src/mvchpf24_if.cc
new file mode 100644
index 0000000..337f6ae
--- /dev/null
+++ b/src/mvchpf24_if.cc
@@ -0,0 +1,150 @@
+/*
+ Copyright (C) 2003-2008 Fons Adriaensen <fons@kokkinizita.net>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+//-----------------------------------------------------------------------------------
+// Common definitions
+
+
+#include "mvchpf24.h"
+
+#define NMODS 1
+#define VERSION "0.4.0"
+
+
+static const char* maker = "Fons Adriaensen <fons@kokkinizita.net>";
+static const char* copyr = "(C) 2003-2008 Fons Adriaensen - License: GPL2";
+
+
+static void pconnect (LADSPA_Handle H, unsigned long port, LADSPA_Data *data)
+{
+ ((LadspaPlugin *)H)->setport (port, data);
+}
+
+static void activate (LADSPA_Handle H)
+{
+ ((LadspaPlugin *)H)->active (true);
+}
+
+static void runplugin (LADSPA_Handle H, unsigned long k)
+{
+ ((LadspaPlugin *)H)->runproc (k, false);
+}
+
+static void runadding (LADSPA_Handle H, unsigned long k)
+{
+ ((LadspaPlugin *)H)->runproc (k, true);
+}
+
+static void setadding (LADSPA_Handle H, LADSPA_Data gain)
+{
+ ((LadspaPlugin *)H)->setgain (gain);
+}
+
+static void deactivate (LADSPA_Handle H)
+{
+ ((LadspaPlugin *)H)->active (false);
+}
+
+static void cleanup (LADSPA_Handle H)
+{
+ delete (LadspaPlugin *) H;
+}
+
+//-----------------------------------------------------------------------------------
+// Plugin definitions
+
+
+static const char* name1 = "Mvchpf-1 Digital implementation of the VC HP filter invented by R.A. Moog";
+static const char* label1 = "Mvchpf-1";
+
+
+static LADSPA_Handle instant1 (const struct _LADSPA_Descriptor *desc, unsigned long rate)
+{
+ return new Ladspa_Mvchpf1 (rate);
+}
+
+
+static const char * const pname1 [Ladspa_Mvchpf1::NPORT] =
+{
+ "Input",
+ "Output",
+ "Frequency",
+ "Exp FM",
+ "Input gain (dB)",
+ "Frequency",
+ "Exp FM gain",
+ "Output gain (dB)"
+};
+
+static const LADSPA_PortDescriptor pdesc1 [Ladspa_Mvchpf1::NPORT] =
+{
+ LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO,
+ LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO,
+ LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO,
+ LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO,
+ LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL,
+ LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL,
+ LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL,
+ LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL
+};
+
+static const LADSPA_PortRangeHint phint1 [Ladspa_Mvchpf1::NPORT] =
+{
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_DEFAULT_0, -60, 10 },
+ { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_DEFAULT_0, -6, 6 },
+ { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE, 0, 10 },
+ { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_DEFAULT_0, -15, 15 },
+};
+
+
+static const LADSPA_Descriptor moddescr [NMODS] =
+{
+ {
+ 1960,
+ label1,
+ LADSPA_PROPERTY_REALTIME | LADSPA_PROPERTY_HARD_RT_CAPABLE,
+ name1,
+ maker,
+ copyr,
+ Ladspa_Mvchpf1::NPORT,
+ pdesc1,
+ pname1,
+ phint1,
+ 0,
+ instant1,
+ pconnect,
+ activate,
+ runplugin,
+ runadding,
+ setadding,
+ deactivate,
+ cleanup
+ }
+};
+
+extern "C" const LADSPA_Descriptor *ladspa_descriptor (unsigned long i)
+{
+ if (i >= NMODS) return 0;
+ return moddescr + i;
+}
+
+//-----------------------------------------------------------------------------------
diff --git a/src/mvchpf24_lv2.cc b/src/mvchpf24_lv2.cc
new file mode 100644
index 0000000..c34fca3
--- /dev/null
+++ b/src/mvchpf24_lv2.cc
@@ -0,0 +1,87 @@
+/*
+ Copyright (C) 2012 David Robillard <d@drobilla.net>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#include <stddef.h>
+
+#include "mvchpf24.h"
+
+extern "C" {
+
+static void
+connect_port(LV2_Handle instance,
+ uint32_t port,
+ void* data)
+{
+ ((LadspaPlugin*)instance)->setport(port, data);
+}
+
+static void
+activate(LV2_Handle instance)
+{
+ ((LadspaPlugin*)instance)->active(true);
+}
+
+static void
+run(LV2_Handle instance, uint32_t n_samples)
+{
+ ((LadspaPlugin*)instance)->runproc(n_samples, false);
+}
+
+static void
+deactivate(LV2_Handle instance)
+{
+ ((LadspaPlugin*)instance)->active(false);
+}
+
+static void
+cleanup(LV2_Handle instance)
+{
+ delete ((LadspaPlugin*)instance);
+}
+
+static LV2_Handle
+instantiate(const LV2_Descriptor* descriptor,
+ double rate,
+ const char* bundle_path,
+ const LV2_Feature* const* features)
+{
+ return new Ladspa_Mvchpf1(rate);
+}
+
+static const LV2_Descriptor descriptor = {
+ "http://drobilla.net/plugins/fomp/mvchpf1",
+ instantiate,
+ connect_port,
+ activate,
+ run,
+ deactivate,
+ cleanup,
+ NULL
+};
+
+LV2_SYMBOL_EXPORT
+const LV2_Descriptor*
+lv2_descriptor(uint32_t index)
+{
+ switch (index) {
+ case 0: return &descriptor;
+ default: return NULL;
+ }
+}
+
+} // extern "C"
diff --git a/src/mvclpf24.cc b/src/mvclpf24.cc
new file mode 100644
index 0000000..357fd7c
--- /dev/null
+++ b/src/mvclpf24.cc
@@ -0,0 +1,439 @@
+/*
+ Copyright (C) 2003-2008 Fons Adriaensen <fons@kokkinizita.net>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+
+#include <stdio.h>
+#include <math.h>
+#include "mvclpf24.h"
+#include "exp2ap.h"
+
+
+static const float lg2midc = log2f(261.63f);
+
+
+void Ladspa_Moogvcf1::setport (PortIndex port, PortData *data)
+{
+ _port [port] = (float*)data;
+}
+
+
+void Ladspa_Moogvcf1::active (bool act)
+{
+ _c1 = _c2 = _c3 = _c4 = _c5 = _w = _r = 0;
+}
+
+
+void Ladspa_Moogvcf1::runproc (SampleCount len, bool add)
+{
+ int k;
+ float *p0, *p1, *p2, *p3, *p4;
+ float c1, c2, c3, c4, c5;
+ float g0, g1, r, dr, w, dw, x, t;
+
+ p0 = _port [A_INPUT];
+ p1 = _port [A_OUTPUT];
+ p2 = _port [A_FREQ] - 1;
+ p3 = _port [A_FMOD] - 1;
+ p4 = _port [A_RESO] - 1;
+ g0 = exp2ap (0.1661f * _port [C_IPGAIN][0]) / 4;
+ g1 = exp2ap (0.1661f * _port [C_OPGAIN][0]) * 4;
+ if (add) g1 *= _gain;
+
+ c1 = _c1 + 1e-6f;
+ c2 = _c2;
+ c3 = _c3;
+ c4 = _c4;
+ c5 = _c5;
+ w = _w;
+ r = _r;
+
+ do
+ {
+ k = (len > 24) ? 16 : len;
+ p2 += k;
+ p3 += k;
+ p4 += k;
+ len -= k;
+
+ t = exp2ap (_port [C_FMODG][0] * *p3 + log2f(_port [C_FREQ][0]) - lg2midc + *p2 + 10.82f) / _fsam;
+ if (t < 0.8f) t *= 1 - 0.4f * t - 0.125f * t * t;
+ else
+ {
+ t *= 0.6f;
+ if (t > 0.92f) t = 0.92f;
+ }
+ dw = (t - w) / k;
+
+ t = _port [C_RESOG][0] * *p4 + _port [C_RESO][0];
+ if (r > 1) r = 1;
+ if (r < 0) r = 0;
+ dr = (t - r) / k;
+
+ while (k--)
+ {
+ w += dw;
+ r += dr;
+ x = -4.2 * r * c5 + *p0++ * g0 + 1e-10f;
+ t = c1 / (1 + fabsf (c1));
+ c1 += w * (x - t);
+ x = c1 / (1 + fabsf (c1));
+ c2 += w * (x - c2);
+ c3 += w * (c2 - c3);
+ c4 += w * (c3 - c4);
+ if (add) *p1++ += g1 * c4;
+ else *p1++ = g1 * c4;
+ c5 += 0.5f * (c4 - c5);
+ }
+ }
+ while (len);
+
+ _c1 = c1;
+ _c2 = c2;
+ _c3 = c3;
+ _c4 = c4;
+ _c5 = c5;
+ _w = w;
+ _r = r;
+}
+
+
+
+void Ladspa_Moogvcf2::setport (PortIndex port, PortData *data)
+{
+ _port [port] = (float*)data;
+}
+
+
+void Ladspa_Moogvcf2::active (bool act)
+{
+ _c1 = _c2 = _c3 = _c4 = _c5 = _w = _r = 0;
+}
+
+
+void Ladspa_Moogvcf2::runproc (SampleCount len, bool add)
+{
+ int k;
+ float *p0, *p1, *p2, *p3, *p4;
+ float c1, c2, c3, c4, c5;
+ float g0, g1, r, dr, w, dw, x, t;
+
+ p0 = _port [A_INPUT];
+ p1 = _port [A_OUTPUT];
+ p2 = _port [A_FREQ] - 1;
+ p3 = _port [A_FMOD] - 1;
+ p4 = _port [A_RESO] - 1;
+ g0 = exp2ap (0.1661f * _port [C_IPGAIN][0]) / 4;
+ g1 = exp2ap (0.1661f * _port [C_OPGAIN][0]) * 4;
+ if (add) g1 *= _gain;
+
+ c1 = _c1 + 1e-6f;
+ c2 = _c2;
+ c3 = _c3;
+ c4 = _c4;
+ c5 = _c5;
+ w = _w;
+ r = _r;
+
+ do
+ {
+ k = (len > 24) ? 16 : len;
+ p2 += k;
+ p3 += k;
+ p4 += k;
+ len -= k;
+
+ t = exp2ap (_port [C_FMODG][0] * *p3 + log2f(_port [C_FREQ][0]) - lg2midc + *p2 + 10.71f) / _fsam;
+ if (t < 0.8f) t *= 1 - 0.4f * t - 0.125f * t * t;
+ else
+ {
+ t *= 0.6f;
+ if (t > 0.92f) t = 0.92f;
+ }
+ dw = (t - w) / k;
+
+ t = _port [C_RESOG][0] * *p4 + _port [C_RESO][0];
+ if (t > 1) t = 1;
+ if (t < 0) t = 0;
+ dr = (t - r) / k;
+
+ while (k--)
+ {
+ w += dw;
+ r += dr;
+
+ x = -4.5f * r * c5 + *p0++ * g0 + 1e-10f;
+// x = tanhf (x);
+ x /= sqrtf (1 + x * x);
+ c1 += w * (x - c1) / (1 + c1 * c1);
+ c2 += w * (c1 - c2) / (1 + c2 * c2);
+ c3 += w * (c2 - c3) / (1 + c3 * c3);
+ c4 += w * (c3 - c4) / (1 + c4 * c4);
+
+ if (add) *p1++ += g1 * (c4);
+ else *p1++ = g1 * (c4);
+ c5 += 0.5f * (c4 - c5);
+ }
+ }
+ while (len);
+
+ _c1 = c1;
+ _c2 = c2;
+ _c3 = c3;
+ _c4 = c4;
+ _c5 = c5;
+ _w = w;
+ _r = r;
+}
+
+
+
+void Ladspa_Moogvcf3::setport (PortIndex port, PortData *data)
+{
+ _port [port] = (float*)data;
+}
+
+
+void Ladspa_Moogvcf3::active (bool act)
+{
+ _c1 = _c2 = _c3 = _c4 = _c5 = _w = _r = 0;
+}
+
+
+void Ladspa_Moogvcf3::runproc (SampleCount len, bool add)
+{
+ int k;
+ float *p0, *p1, *p2, *p3, *p4;
+ float c1, c2, c3, c4, c5;
+ float g0, g1, r, dr, w, dw, x, t, d;
+
+ p0 = _port [A_INPUT];
+ p1 = _port [A_OUTPUT];
+ p2 = _port [A_FREQ] - 1;
+ p3 = _port [A_FMOD] - 1;
+ p4 = _port [A_RESO] - 1;
+ g0 = exp2ap (0.1661f * _port [C_IPGAIN][0]) / 4;
+ g1 = exp2ap (0.1661f * _port [C_OPGAIN][0]) * 4;
+ if (add) g1 *= _gain;
+
+ c1 = _c1;
+ c2 = _c2;
+ c3 = _c3;
+ c4 = _c4;
+ c5 = _c5;
+ w = _w;
+ r = _r;
+
+ do
+ {
+ k = (len > 24) ? 16 : len;
+ p2 += k;
+ p3 += k;
+ p4 += k;
+ len -= k;
+
+ t = exp2ap (_port [C_FMODG][0] * *p3 + log2f(_port [C_FREQ][0]) - lg2midc + *p2 + 9.70f) / _fsam;
+ if (t < 0.75f) t *= 1.005f - t * (0.624f - t * (0.65f - t * 0.54f));
+ else
+ {
+ t *= 0.6748f;
+ if (t > 0.82f) t = 0.82f;
+ }
+ dw = (t - w) / k;
+
+ t = _port [C_RESOG][0] * *p4 + _port [C_RESO][0];
+ if (t > 1) t = 1;
+ if (t < 0) t = 0;
+ dr = (t - r) / k;
+
+ while (k--)
+ {
+ w += dw;
+ r += dr;
+
+ x = *p0 * g0 - (4.3f - 0.2f * w) * r * c5 + 1e-10f;
+// x = tanhf (x);
+ x /= sqrtf (1 + x * x);
+ d = w * (x - c1) / (1 + c1 * c1);
+ x = c1 + 0.77f * d;
+ c1 = x + 0.23f * d;
+ d = w * (x - c2) / (1 + c2 * c2);
+ x = c2 + 0.77f * d;
+ c2 = x + 0.23f * d;
+ d = w * (x - c3) / (1 + c3 * c3);
+ x = c3 + 0.77f * d;
+ c3 = x + 0.23f * d;
+ d = w * (x - c4);
+ x = c4 + 0.77f * d;
+ c4 = x + 0.23f * d;
+ c5 += 0.85f * (c4 - c5);
+
+ x = *p0++ * g0 -(4.3f - 0.2f * w) * r * c5;
+// x = tanhf (x);
+ x /= sqrtf (1 + x * x);
+ d = w * (x - c1) / (1 + c1 * c1);
+ x = c1 + 0.77f * d;
+ c1 = x + 0.23f * d;
+ d = w * (x - c2) / (1 + c2 * c2);
+ x = c2 + 0.77f * d;
+ c2 = x + 0.23f * d;
+ d = w * (x - c3) / (1 + c3 * c3);
+ x = c3 + 0.77f * d;
+ c3 = x + 0.23f * d;
+ d = w * (x - c4);
+ x = c4 + 0.77f * d;
+ c4 = x + 0.23f * d;
+ c5 += 0.85f * (c4 - c5);
+
+ if (add) *p1++ += g1 * c4;
+ else *p1++ = g1 * c4;
+ }
+ }
+ while (len);
+
+ _c1 = c1;
+ _c2 = c2;
+ _c3 = c3;
+ _c4 = c4;
+ _c5 = c5;
+ _w = w;
+ _r = r;
+}
+
+
+void Ladspa_Moogvcf4::setport (PortIndex port, PortData *data)
+{
+ _port [port] = (float*)data;
+}
+
+
+void Ladspa_Moogvcf4::active (bool act)
+{
+ _c1 = _c2 = _c3 = _c4 = _c5 = _w = _r = 0;
+}
+
+
+void Ladspa_Moogvcf4::runproc (SampleCount len, bool add)
+{
+ int k, op;
+ float *p0, *p1, *p2, *p3, *p4;
+ float c1, c2, c3, c4, c5;
+ float g0, g1, r, dr, w, dw, x, t, d, y;
+
+ p0 = _port [A_INPUT];
+ p1 = _port [A_OUTPUT];
+ p2 = _port [A_FREQ] - 1;
+ p3 = _port [A_FMOD] - 1;
+ p4 = _port [A_RESO] - 1;
+ g0 = exp2ap (0.1661f * _port [C_IPGAIN][0]) / 4;
+ g1 = exp2ap (0.1661f * _port [C_OPGAIN][0]) * 4;
+ op = (int)(floorf (_port [C_LPFILT][0] + 0.5));
+ if (add) g1 *= _gain;
+
+ c1 = _c1 + 1e-6f;
+ c2 = _c2;
+ c3 = _c3;
+ c4 = _c4;
+ c5 = _c5;
+ w = _w;
+ r = _r;
+
+ do
+ {
+ k = (len > 24) ? 16 : len;
+ p2 += k;
+ p3 += k;
+ p4 += k;
+ len -= k;
+
+ t = exp2ap (_port [C_FMODG][0] * *p3 + log2f(_port [C_FREQ][0]) - lg2midc + *p2 + 9.70f) / _fsam;
+ if (t < 0.75f) t *= 1.005f - t * (0.624f - t * (0.65f - t * 0.54f));
+ else
+ {
+ t *= 0.6748f;
+ if (t > 0.82f) t = 0.82f;
+ }
+ dw = (t - w) / k;
+
+ t = _port [C_RESOG][0] * *p4 + _port [C_RESO][0];
+ if (t > 1) t = 1;
+ if (t < 0) t = 0;
+ dr = (t - r) / k;
+
+ while (k--)
+ {
+ w += dw;
+ r += dr;
+
+ x = *p0 * g0 - (4.3f - 0.2f * w) * r * c5 + 1e-10f;
+// x = tanhf (x);
+ x /= sqrtf (1 + x * x);
+ d = w * (x - c1) / (1 + c1 * c1);
+ x = c1 + 0.77f * d;
+ c1 = x + 0.23f * d;
+ d = w * (x - c2) / (1 + c2 * c2);
+ x = c2 + 0.77f * d;
+ c2 = x + 0.23f * d;
+ d = w * (x - c3) / (1 + c3 * c3);
+ x = c3 + 0.77f * d;
+ c3 = x + 0.23f * d;
+ d = w * (x - c4);
+ x = c4 + 0.77f * d;
+ c4 = x + 0.23f * d;
+ c5 += 0.85f * (c4 - c5);
+
+ x = y = *p0++ * g0 -(4.3f - 0.2f * w) * r * c5;
+// x = tanhf (x);
+ x /= sqrtf (1 + x * x);
+ d = w * (x - c1) / (1 + c1 * c1);
+ x = c1 + 0.77f * d;
+ c1 = x + 0.23f * d;
+ d = w * (x - c2) / (1 + c2 * c2);
+ x = c2 + 0.77f * d;
+ c2 = x + 0.23f * d;
+ d = w * (x - c3) / (1 + c3 * c3);
+ x = c3 + 0.77f * d;
+ c3 = x + 0.23f * d;
+ d = w * (x - c4);
+ x = c4 + 0.77f * d;
+ c4 = x + 0.23f * d;
+ c5 += 0.85f * (c4 - c5);
+
+ switch (op)
+ {
+ case 1: y = c1; break;
+ case 2: y = c2; break;
+ case 3: y = c3; break;
+ case 4: y = c4; break;
+ }
+
+ if (add) *p1++ += g1 * y;
+ else *p1++ = g1 * y;
+ }
+ }
+ while (len);
+
+ _c1 = c1;
+ _c2 = c2;
+ _c3 = c3;
+ _c4 = c4;
+ _c5 = c5;
+ _w = w;
+ _r = r;
+}
+
+
diff --git a/src/mvclpf24.h b/src/mvclpf24.h
new file mode 100644
index 0000000..f1132d3
--- /dev/null
+++ b/src/mvclpf24.h
@@ -0,0 +1,110 @@
+/*
+ Copyright (C) 2003-2008 Fons Adriaensen <fons@kokkinizita.net>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+
+#ifndef __MOOGVCF_H
+#define __MOOGVCF_H
+
+#include "ladspaplugin.h"
+
+
+class Ladspa_Moogvcf1 : public LadspaPlugin
+{
+public:
+
+ enum { A_INPUT, A_OUTPUT, A_FREQ, A_FMOD, A_RESO,
+ C_IPGAIN, C_FREQ, C_FMODG, C_RESO, C_RESOG, C_OPGAIN, NPORT };
+
+ Ladspa_Moogvcf1 (SampleRate fsam) : LadspaPlugin (fsam) {}
+ virtual void setport (PortIndex port, PortData *data);
+ virtual void active (bool act);
+ virtual void runproc (SampleCount len, bool add);
+ virtual ~Ladspa_Moogvcf1 (void) {}
+
+private:
+
+ float *_port [NPORT];
+ float _c1, _c2, _c3, _c4, _c5, _w, _r;
+
+};
+
+
+class Ladspa_Moogvcf2 : public LadspaPlugin
+{
+public:
+
+ enum { A_INPUT, A_OUTPUT, A_FREQ, A_FMOD, A_RESO,
+ C_IPGAIN, C_FREQ, C_FMODG, C_RESO, C_RESOG, C_OPGAIN, NPORT };
+
+ Ladspa_Moogvcf2 (SampleRate fsam) : LadspaPlugin (fsam) {}
+ virtual void setport (PortIndex port, PortData *data);
+ virtual void active (bool act);
+ virtual void runproc (SampleCount len, bool add);
+ virtual ~Ladspa_Moogvcf2 (void) {}
+
+private:
+
+ float *_port [NPORT];
+ float _c1, _c2, _c3, _c4, _c5, _w, _r;
+
+};
+
+
+class Ladspa_Moogvcf3 : public LadspaPlugin
+{
+public:
+
+ enum { A_INPUT, A_OUTPUT, A_FREQ, A_FMOD, A_RESO,
+ C_IPGAIN, C_FREQ, C_FMODG, C_RESO, C_RESOG, C_OPGAIN, NPORT };
+
+ Ladspa_Moogvcf3 (SampleRate fsam) : LadspaPlugin (fsam) {}
+ virtual void setport (PortIndex port, PortData *data);
+ virtual void active (bool act);
+ virtual void runproc (SampleCount len, bool add);
+ virtual ~Ladspa_Moogvcf3 (void) {}
+
+private:
+
+ float *_port [NPORT];
+ float _c1, _c2, _c3, _c4, _c5, _w, _r;
+
+};
+
+
+class Ladspa_Moogvcf4 : public LadspaPlugin
+{
+public:
+
+ enum { A_INPUT, A_OUTPUT, A_FREQ, A_FMOD, A_RESO,
+ C_IPGAIN, C_FREQ, C_FMODG, C_RESO, C_RESOG,
+ C_LPFILT, C_OPGAIN, NPORT, NLABEL = 5 };
+
+ Ladspa_Moogvcf4 (SampleRate fsam) : LadspaPlugin (fsam) {}
+ virtual void setport (PortIndex port, PortData *data);
+ virtual void active (bool act);
+ virtual void runproc (SampleCount len, bool add);
+ virtual ~Ladspa_Moogvcf4 (void) {}
+
+private:
+
+ float *_port [NPORT];
+ float _c1, _c2, _c3, _c4, _c5, _w, _r;
+
+};
+
+#endif
diff --git a/src/mvclpf24_if.cc b/src/mvclpf24_if.cc
new file mode 100644
index 0000000..301ae92
--- /dev/null
+++ b/src/mvclpf24_if.cc
@@ -0,0 +1,299 @@
+/*
+ Copyright (C) 2003-2008 Fons Adriaensen <fons@kokkinizita.net>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+//-----------------------------------------------------------------------------------
+// Common definitions
+
+
+#include "mvclpf24.h"
+
+#define NMODS 4
+#define VERSION "0.4.0"
+
+
+static const char* maker = "Fons Adriaensen <fons@kokkinizita.net>";
+static const char* copyr = "(C) 2003-2008 Fons Adriaensen - License: GPL2";
+
+
+static void pconnect (LADSPA_Handle H, unsigned long port, LADSPA_Data *data)
+{
+ ((LadspaPlugin *)H)->setport (port, data);
+}
+
+static void activate (LADSPA_Handle H)
+{
+ ((LadspaPlugin *)H)->active (true);
+}
+
+static void runplugin (LADSPA_Handle H, unsigned long k)
+{
+ ((LadspaPlugin *)H)->runproc (k, false);
+}
+
+static void runadding (LADSPA_Handle H, unsigned long k)
+{
+ ((LadspaPlugin *)H)->runproc (k, true);
+}
+
+static void setadding (LADSPA_Handle H, LADSPA_Data gain)
+{
+ ((LadspaPlugin *)H)->setgain (gain);
+}
+
+static void deactivate (LADSPA_Handle H)
+{
+ ((LadspaPlugin *)H)->active (false);
+}
+
+static void cleanup (LADSPA_Handle H)
+{
+ delete (LadspaPlugin *) H;
+}
+
+//-----------------------------------------------------------------------------------
+// Plugin definitions
+
+
+static const char* name1 = "Mvclpf-1 Digital implementation of the VC filter invented by R.A.Moog";
+static const char* label1 = "Mvclpf-1";
+
+static LADSPA_Handle instant1 (const struct _LADSPA_Descriptor *desc, unsigned long rate)
+{
+ return new Ladspa_Moogvcf1 (rate);
+}
+
+static const char* name2 = "Mvclpf-2 Digital implementation of the VC filter invented by R.A.Moog";
+static const char* label2 = "Mvclpf-2";
+
+static LADSPA_Handle instant2 (const struct _LADSPA_Descriptor *desc, unsigned long rate)
+{
+ return new Ladspa_Moogvcf2 (rate);
+}
+
+static const char* name3 = "Mvclpf-3 Digital implementation of the VC filter invented by R.A.Moog";
+static const char* label3 = "Mvclpf-3";
+
+static LADSPA_Handle instant3 (const struct _LADSPA_Descriptor *desc, unsigned long rate)
+{
+ return new Ladspa_Moogvcf3 (rate);
+}
+
+static const char* name4 = "Mvclpf-4 Digital implementation of the VC filter invented by R.A.Moog";
+static const char* label4 = "Mvclpf-4";
+
+static LADSPA_Handle instant4 (const struct _LADSPA_Descriptor *desc, unsigned long rate)
+{
+ return new Ladspa_Moogvcf4 (rate);
+}
+
+
+static const char * const pname1 [Ladspa_Moogvcf1::NPORT] =
+{
+ "Input",
+ "Output",
+ "Frequency",
+ "Exp FM",
+ "Resonance",
+ "Input gain (dB)",
+ "Frequency",
+ "Exp FM gain",
+ "Resonance",
+ "Resonance gain",
+ "Output gain (dB)"
+};
+
+static const LADSPA_PortDescriptor pdesc1 [Ladspa_Moogvcf1::NPORT] =
+{
+ LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO,
+ LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO,
+ LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO,
+ LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO,
+ LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO,
+ LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL,
+ LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL,
+ LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL,
+ LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL,
+ LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL,
+ LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL
+};
+
+static const LADSPA_PortRangeHint phint1 [Ladspa_Moogvcf1::NPORT] =
+{
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_DEFAULT_0, -60, 10 },
+ { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_DEFAULT_0, -6, 6 },
+ { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE, 0, 10 },
+ { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE, 0, 1 },
+ { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE, 0, 1 },
+ { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_DEFAULT_0, -15, 15 },
+};
+
+
+static const char * const pname4 [Ladspa_Moogvcf4::NPORT + Ladspa_Moogvcf4::NLABEL] =
+{
+ "Input",
+ "Output",
+ "Frequency",
+ "Exp FM",
+ "Resonance",
+ "Input gain (dB)",
+ "Frequency",
+ "Exp FM gain",
+ "Resonance",
+ "Resonance gain",
+ "Filter poles",
+ "Output gain (dB)",
+ "No lowpass",
+ " 6 dB/oct",
+ "12 dB/oct",
+ "18 dB/oct",
+ "24 dB/oct"
+};
+
+static const LADSPA_PortDescriptor pdesc4 [Ladspa_Moogvcf4::NPORT] =
+{
+ LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO,
+ LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO,
+ LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO,
+ LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO,
+ LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO,
+ LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL,
+ LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL,
+ LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL,
+ LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL,
+ LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL,
+ LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL,
+ LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL
+};
+
+static const LADSPA_PortRangeHint phint4 [Ladspa_Moogvcf4::NPORT] =
+{
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_DEFAULT_0, -60, 10 },
+ { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_DEFAULT_0, -6, 6 },
+ { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE, 0, 10 },
+ { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE, 0, 1 },
+ { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE, 0, 1 },
+ { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_INTEGER /*| LADSPA_HINT_SWITCHED*/, 0, 4 },
+ { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_DEFAULT_0, -15, 15 },
+};
+
+
+static const LADSPA_Descriptor moddescr [NMODS] =
+{
+ {
+ 1941,
+ label1,
+ LADSPA_PROPERTY_REALTIME | LADSPA_PROPERTY_HARD_RT_CAPABLE,
+ name1,
+ maker,
+ copyr,
+ Ladspa_Moogvcf1::NPORT,
+ pdesc1,
+ pname1,
+ phint1,
+ 0,
+ instant1,
+ pconnect,
+ activate,
+ runplugin,
+ runadding,
+ setadding,
+ deactivate,
+ cleanup
+ },
+ {
+ 1942,
+ label2,
+ LADSPA_PROPERTY_REALTIME | LADSPA_PROPERTY_HARD_RT_CAPABLE,
+ name2,
+ maker,
+ copyr,
+ Ladspa_Moogvcf2::NPORT,
+ pdesc1,
+ pname1,
+ phint1,
+ 0,
+ instant2,
+ pconnect,
+ activate,
+ runplugin,
+ runadding,
+ setadding,
+ deactivate,
+ cleanup
+ },
+ {
+ 1943,
+ label3,
+ LADSPA_PROPERTY_REALTIME | LADSPA_PROPERTY_HARD_RT_CAPABLE,
+ name3,
+ maker,
+ copyr,
+ Ladspa_Moogvcf3::NPORT,
+ pdesc1,
+ pname1,
+ phint1,
+ 0,
+ instant3,
+ pconnect,
+ activate,
+ runplugin,
+ runadding,
+ setadding,
+ deactivate,
+ cleanup
+ },
+ {
+ 1948,
+ label4,
+ LADSPA_PROPERTY_REALTIME | LADSPA_PROPERTY_HARD_RT_CAPABLE,
+ name4,
+ maker,
+ copyr,
+ Ladspa_Moogvcf4::NPORT,
+ pdesc4,
+ pname4,
+ phint4,
+ 0,
+ instant4,
+ pconnect,
+ activate,
+ runplugin,
+ runadding,
+ setadding,
+ deactivate,
+ cleanup
+ }
+};
+
+extern "C" const LADSPA_Descriptor *ladspa_descriptor (unsigned long i)
+{
+ if (i >= NMODS) return 0;
+ return moddescr + i;
+}
+
+//-----------------------------------------------------------------------------------
diff --git a/src/mvclpf24_lv2.cc b/src/mvclpf24_lv2.cc
new file mode 100644
index 0000000..dbd8b51
--- /dev/null
+++ b/src/mvclpf24_lv2.cc
@@ -0,0 +1,136 @@
+/*
+ Copyright (C) 2012 David Robillard <d@drobilla.net>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#include <stddef.h>
+
+#include "mvclpf24.h"
+
+extern "C" {
+
+static void
+connect_port(LV2_Handle instance,
+ uint32_t port,
+ void* data)
+{
+ ((LadspaPlugin*)instance)->setport(port, data);
+}
+
+static void
+activate(LV2_Handle instance)
+{
+ ((LadspaPlugin*)instance)->active(true);
+}
+
+static void
+run(LV2_Handle instance, uint32_t n_samples)
+{
+ ((LadspaPlugin*)instance)->runproc(n_samples, false);
+}
+
+static void
+deactivate(LV2_Handle instance)
+{
+ ((LadspaPlugin*)instance)->active(false);
+}
+
+static void
+cleanup(LV2_Handle instance)
+{
+ delete ((LadspaPlugin*)instance);
+}
+
+static LV2_Handle
+instantiate1(const LV2_Descriptor* descriptor,
+ double rate,
+ const char* bundle_path,
+ const LV2_Feature* const* features)
+{
+ return new Ladspa_Moogvcf1(rate);
+}
+
+static LV2_Handle
+instantiate2(const LV2_Descriptor* descriptor,
+ double rate,
+ const char* bundle_path,
+ const LV2_Feature* const* features)
+{
+ return new Ladspa_Moogvcf2(rate);
+}
+static LV2_Handle
+instantiate3(const LV2_Descriptor* descriptor,
+ double rate,
+ const char* bundle_path,
+ const LV2_Feature* const* features)
+{
+ return new Ladspa_Moogvcf3(rate);
+}
+static LV2_Handle
+instantiate4(const LV2_Descriptor* descriptor,
+ double rate,
+ const char* bundle_path,
+ const LV2_Feature* const* features)
+{
+ return new Ladspa_Moogvcf4(rate);
+}
+
+static const LV2_Descriptor descriptors[4] = {
+ { "http://drobilla.net/plugins/fomp/mvclpf1",
+ instantiate1,
+ connect_port,
+ activate,
+ run,
+ deactivate,
+ cleanup,
+ NULL },
+ { "http://drobilla.net/plugins/fomp/mvclpf2",
+ instantiate2,
+ connect_port,
+ activate,
+ run,
+ deactivate,
+ cleanup,
+ NULL },
+ { "http://drobilla.net/plugins/fomp/mvclpf3",
+ instantiate3,
+ connect_port,
+ activate,
+ run,
+ deactivate,
+ cleanup,
+ NULL },
+ { "http://drobilla.net/plugins/fomp/mvclpf4",
+ instantiate4,
+ connect_port,
+ activate,
+ run,
+ deactivate,
+ cleanup,
+ NULL }
+};
+
+LV2_SYMBOL_EXPORT
+const LV2_Descriptor*
+lv2_descriptor(uint32_t index)
+{
+ if (index < 4) {
+ return &descriptors[index];
+ }
+ return NULL;
+}
+
+} // extern "C"
diff --git a/src/pareq.cc b/src/pareq.cc
new file mode 100644
index 0000000..4feb991
--- /dev/null
+++ b/src/pareq.cc
@@ -0,0 +1,199 @@
+// ----------------------------------------------------------------------
+//
+// Copyright (C) 2010-2013 Fons Adriaensen <fons@linuxaudio.org>
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//
+// ----------------------------------------------------------------------
+
+
+#include <math.h>
+#include <string.h>
+#include "pareq.h"
+
+
+Pareq::Pareq (void) :
+ _touch0 (0),
+ _touch1 (0),
+ _state (BYPASS),
+ _g0 (1),
+ _g1 (1),
+ _f0 (1e3f),
+ _f1 (1e3f)
+{
+ setfsamp (0.0f);
+}
+
+
+Pareq::~Pareq (void)
+{
+}
+
+
+void Pareq::setfsamp (float fsamp)
+{
+ _fsamp = fsamp;
+ reset ();
+}
+
+
+void Pareq::reset (void)
+{
+ memset (_z1, 0, sizeof (float) * MAXCH);
+ memset (_z2, 0, sizeof (float) * MAXCH);
+}
+
+
+void Pareq::prepare (int nsamp)
+{
+ bool upd = false;
+ float g, f;
+
+ if (_touch1 != _touch0)
+ {
+ if (_g0 < 0.1f) _g0 = 0.1f;
+ if (_g0 > 10.0f) _g0 = 10.0f;
+ if (_f0 < 20.0f) _f0 = 20.0f;
+ if (_f0 > 20e3f) _f0 = 20e3f;
+ g = _g0;
+ f = _f0;
+ if (g != _g1)
+ {
+ upd = true;
+ if (g > 2 * _g1) _g1 *= 2;
+ else if (_g1 > 2 * g) _g1 /= 2;
+ else _g1 = g;
+ }
+ if (f != _f1)
+ {
+ upd = true;
+ if (f > 2 * _f1) _f1 *= 2;
+ else if (_f1 > 2 * f) _f1 /= 2;
+ else _f1 = f;
+ }
+ if (upd)
+ {
+ if ((_state == BYPASS) && (_g1 == 1))
+ {
+ calcpar1 (0, _g1, _f1);
+ }
+ else
+ {
+ _state = SMOOTH;
+ calcpar1 (nsamp, _g1, _f1);
+ }
+ }
+ else
+ {
+ _touch1 = _touch0;
+ if (fabs (_g1 - 1) < 0.001f)
+ {
+ _state = BYPASS;
+ reset ();
+ }
+ else
+ {
+ _state = STATIC;
+ }
+ }
+ }
+}
+
+
+void Pareq::calcpar1 (int nsamp, float g, float f)
+{
+ float b, c1, c2, gg;
+
+ f *= float (M_PI) / _fsamp;
+ b = 2 * f / sqrtf (g);
+ gg = 0.5f * (g - 1);
+ c1 = -cosf (2 * f);
+ c2 = (1 - b) / (1 + b);
+ if (nsamp)
+ {
+ _dc1 = (c1 - _c1) / nsamp + 1e-30f;
+ _dc2 = (c2 - _c2) / nsamp + 1e-30f;
+ _dgg = (gg - _gg) / nsamp + 1e-30f;
+ }
+ else
+ {
+ _c1 = c1;
+ _c2 = c2;
+ _gg = gg;
+ }
+}
+
+
+void Pareq::process1 (int nsamp, int nchan, float *data[])
+{
+ int i, j;
+ float c1, c2, gg;
+ float x, y, z1, z2;
+ float *p;
+
+ c1 = _c1;
+ c2 = _c2;
+ gg = _gg;
+ if (_state == SMOOTH)
+ {
+ for (i = 0; i < nchan; i++)
+ {
+ p = data [i];
+ z1 = _z1 [i];
+ z2 = _z2 [i];
+ c1 = _c1;
+ c2 = _c2;
+ gg = _gg;
+ for (j = 0; j < nsamp; j++)
+ {
+ c1 += _dc1;
+ c2 += _dc2;
+ gg += _dgg;
+ x = *p;
+ y = x - c2 * z2;
+ *p++ = x - gg * (z2 + c2 * y - x);
+ y -= c1 * z1;
+ z2 = z1 + c1 * y;
+ z1 = y + 1e-20f;
+ }
+ _z1 [i] = z1;
+ _z2 [i] = z2;
+ }
+ _c1 = c1;
+ _c2 = c2;
+ _gg = gg;
+ }
+ else
+ {
+ for (i = 0; i < nchan; i++)
+ {
+ p = data [i];
+ z1 = _z1 [i];
+ z2 = _z2 [i];
+ for (j = 0; j < nsamp; j++)
+ {
+ x = *p;
+ y = x - c2 * z2;
+ *p++ = x - gg * (z2 + c2 * y - x);
+ y -= c1 * z1;
+ z2 = z1 + c1 * y;
+ z1 = y + 1e-20f;
+ }
+ _z1 [i] = z1;
+ _z2 [i] = z2;
+ }
+ }
+}
+
diff --git a/src/pareq.h b/src/pareq.h
new file mode 100644
index 0000000..b2448be
--- /dev/null
+++ b/src/pareq.h
@@ -0,0 +1,74 @@
+// ----------------------------------------------------------------------
+//
+// Copyright (C) 2010-2013 Fons Adriaensen <fons@linuxaudio.org>
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//
+// ----------------------------------------------------------------------
+
+
+#ifndef __PAREQ_H
+#define __PAREQ_H
+
+
+#include <stdint.h>
+#include <math.h>
+
+
+class Pareq
+{
+public:
+
+ Pareq (void);
+ ~Pareq (void);
+
+ void setfsamp (float fsamp);
+ void setparam (float f, float g)
+ {
+ _f0 = f;
+ _g0 = powf (10.0f, 0.05f * g);
+ _touch0++;
+ }
+ void reset (void);
+ void prepare (int nsamp);
+ void process (int nsamp, int nchan, float *data[])
+ {
+ if (_state != BYPASS) process1 (nsamp, nchan, data);
+ }
+
+private:
+
+ enum { BYPASS, STATIC, SMOOTH, MAXCH = 4 };
+
+ void calcpar1 (int nsamp, float g, float f);
+ void process1 (int nsamp, int nchan, float *data[]);
+
+ volatile int16_t _touch0;
+ volatile int16_t _touch1;
+ int _state;
+ float _fsamp;
+
+ float _g0, _g1;
+ float _f0, _f1;
+ float _c1, _dc1;
+ float _c2, _dc2;
+ float _gg, _dgg;
+
+ float _z1 [MAXCH];
+ float _z2 [MAXCH];
+};
+
+
+#endif
diff --git a/src/plugin_lv2.h b/src/plugin_lv2.h
new file mode 100644
index 0000000..4014b59
--- /dev/null
+++ b/src/plugin_lv2.h
@@ -0,0 +1,55 @@
+/*
+ Copyright (C) 2012 David Robillard <d@drobilla.net>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#include "ladspaplugin.h"
+
+extern "C" {
+
+static void
+connect_port(LV2_Handle instance,
+ uint32_t port,
+ void* data)
+{
+ ((LadspaPlugin*)instance)->setport(port, data);
+}
+
+static void
+activate(LV2_Handle instance)
+{
+ ((LadspaPlugin*)instance)->active(true);
+}
+
+static void
+run(LV2_Handle instance, uint32_t n_samples)
+{
+ ((LadspaPlugin*)instance)->runproc(n_samples, false);
+}
+
+static void
+deactivate(LV2_Handle instance)
+{
+ ((LadspaPlugin*)instance)->active(false);
+}
+
+static void
+cleanup(LV2_Handle instance)
+{
+ delete ((LadspaPlugin*)instance);
+}
+
+} // extern "C"
diff --git a/src/reverbs.cc b/src/reverbs.cc
new file mode 100644
index 0000000..9e8e5af
--- /dev/null
+++ b/src/reverbs.cc
@@ -0,0 +1,125 @@
+// -----------------------------------------------------------------------
+//
+// Copyright (C) 2003-2014 Fons Adriaensen <fons@linuxaudio.org>
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//
+// -----------------------------------------------------------------------
+
+
+#include <stdio.h>
+#include <math.h>
+#include "reverbs.h"
+
+
+void Ladspa_zita_reverb::setport (PortIndex port, PortData *data)
+{
+ _port [port] = (float*)data;
+}
+
+
+void Ladspa_zita_reverb::active (bool act)
+{
+ if (! act)
+ {
+ _zreverb->reset ();
+ _nprep = 0;
+ }
+}
+
+
+void Ladspa_zita_reverb::runproc (SampleCount frames, bool add)
+{
+ unsigned long k;
+ float *inp [2] = { _port [A_INPL], _port [A_INPR] };
+ float *out [2] = { _port [A_OUTL], _port [A_OUTR] };
+
+ _zreverb->set_delay (_port [C_DELAY][0]);
+ _zreverb->set_xover (_port [C_XOVER][0]);
+ _zreverb->set_rtlow (_port [C_RTLOW][0]);
+ _zreverb->set_rtmid (_port [C_RTMID][0]);
+ _zreverb->set_fdamp (_port [C_FDAMP][0]);
+ _zreverb->set_eq1 (_port [C_FREQ1][0], _port [C_GAIN1][0]);
+ _zreverb->set_eq2 (_port [C_FREQ2][0], _port [C_GAIN2][0]);
+ _zreverb->set_opmix (_port [C_OPMIX][0]);
+ while (frames)
+ {
+ if (!_nprep)
+ {
+ _zreverb->prepare (FRAGM);
+ _nprep = FRAGM;
+ }
+ k = (_nprep < frames) ? _nprep : frames;
+ _zreverb->process (k, inp, out);
+ inp [0] += k;
+ inp [1] += k;
+ out [0] += k;
+ out [1] += k;
+ frames -= k;
+ _nprep -= k;
+ }
+}
+
+
+
+void Ladspa_zita_reverb_amb::setport (PortIndex port, PortData *data)
+{
+ _port [port] = (float*)data;
+}
+
+
+void Ladspa_zita_reverb_amb::active (bool act)
+{
+ if (! act)
+ {
+ _zreverb->reset ();
+ _nprep = 0;
+ }
+}
+
+
+void Ladspa_zita_reverb_amb::runproc (SampleCount frames, bool add)
+{
+ unsigned long k;
+ float *inp [2] = { _port [A_INPL], _port [A_INPR] };
+ float *out [4] = { _port [A_OUTW], _port [A_OUTX], _port [A_OUTY], _port [A_OUTZ] };
+
+ _zreverb->set_delay (_port [C_DELAY][0]);
+ _zreverb->set_xover (_port [C_XOVER][0]);
+ _zreverb->set_rtlow (_port [C_RTLOW][0]);
+ _zreverb->set_rtmid (_port [C_RTMID][0]);
+ _zreverb->set_fdamp (_port [C_FDAMP][0]);
+ _zreverb->set_eq1 (_port [C_FREQ1][0], _port [C_GAIN1][0]);
+ _zreverb->set_eq2 (_port [C_FREQ2][0], _port [C_GAIN2][0]);
+ _zreverb->set_rgxyz (_port [C_RGXYZ][0]);
+ while (frames)
+ {
+ if (!_nprep)
+ {
+ _zreverb->prepare (FRAGM);
+ _nprep = FRAGM;
+ }
+ k = (_nprep < frames) ? _nprep : frames;
+ _zreverb->process (k, inp, out);
+ inp [0] += k;
+ inp [1] += k;
+ out [0] += k;
+ out [1] += k;
+ out [2] += k;
+ out [3] += k;
+ frames -= k;
+ _nprep -= k;
+ }
+}
diff --git a/src/reverbs.h b/src/reverbs.h
new file mode 100644
index 0000000..2650856
--- /dev/null
+++ b/src/reverbs.h
@@ -0,0 +1,134 @@
+// -----------------------------------------------------------------------
+//
+// Copyright (C) 2003-2014 Fons Adriaensen <fons@linuxaudio.org>
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//
+// -----------------------------------------------------------------------
+
+
+#ifndef __REVERBS_H
+#define __REVERBS_H
+
+#include "ladspaplugin.h"
+#include "zreverb.h"
+
+
+// -----------------------------------------------------------------------
+
+
+class Ladspa_zita_reverb : public LadspaPlugin
+{
+public:
+
+ enum
+ {
+ A_INPL,
+ A_INPR,
+ A_OUTL,
+ A_OUTR,
+ C_DELAY,
+ C_XOVER,
+ C_RTLOW,
+ C_RTMID,
+ C_FDAMP,
+ C_FREQ1,
+ C_GAIN1,
+ C_FREQ2,
+ C_GAIN2,
+ C_OPMIX,
+ NPORT
+ };
+
+ Ladspa_zita_reverb (SampleRate fsam) : LadspaPlugin (fsam)
+ {
+ _zreverb = new Zreverb ();
+ _zreverb->init (fsam, false);
+ _nprep = 0;
+ }
+ virtual void setport (PortIndex port, PortData *data);
+ virtual void active (bool act);
+ virtual void runproc (SampleCount len, bool add);
+ virtual ~Ladspa_zita_reverb (void)
+ {
+ delete _zreverb;
+ }
+
+private:
+
+ enum { FRAGM = 2048 };
+
+ float *_port [NPORT];
+ Zreverb *_zreverb;
+ unsigned long _nprep;
+};
+
+
+// -----------------------------------------------------------------------
+
+
+class Ladspa_zita_reverb_amb : public LadspaPlugin
+{
+public:
+
+ enum
+ {
+ A_INPL,
+ A_INPR,
+ A_OUTW,
+ A_OUTX,
+ A_OUTY,
+ A_OUTZ,
+ C_DELAY,
+ C_XOVER,
+ C_RTLOW,
+ C_RTMID,
+ C_FDAMP,
+ C_FREQ1,
+ C_GAIN1,
+ C_FREQ2,
+ C_GAIN2,
+ C_RGXYZ,
+ NPORT
+ };
+
+ Ladspa_zita_reverb_amb (unsigned long fsam) : LadspaPlugin (fsam)
+ {
+ _zreverb = new Zreverb ();
+ _zreverb->init (fsam, true);
+ _nprep = 0;
+ }
+ virtual void setport (PortIndex port, PortData *data);
+ virtual void active (bool act);
+ virtual void runproc (SampleCount len, bool add);
+ virtual ~Ladspa_zita_reverb_amb (void)
+ {
+ delete _zreverb;
+ }
+
+private:
+
+ enum { FRAGM = 2048 };
+
+ float *_port [NPORT];
+ Zreverb *_zreverb;
+ unsigned long _nprep;
+};
+
+
+// -----------------------------------------------------------------------
+
+
+#endif
diff --git a/src/reverbs_lv2.cc b/src/reverbs_lv2.cc
new file mode 100644
index 0000000..e6eb9f0
--- /dev/null
+++ b/src/reverbs_lv2.cc
@@ -0,0 +1,73 @@
+/*
+ Copyright (C) 2014 David Robillard <d@drobilla.net>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#include <stddef.h>
+
+#include "reverbs.h"
+#include "plugin_lv2.h"
+
+extern "C" {
+
+static LV2_Handle
+instantiate(const LV2_Descriptor* descriptor,
+ double rate,
+ const char* bundle_path,
+ const LV2_Feature* const* features)
+{
+ return new Ladspa_zita_reverb(rate);
+}
+
+static LV2_Handle
+instantiate_amb(const LV2_Descriptor* descriptor,
+ double rate,
+ const char* bundle_path,
+ const LV2_Feature* const* features)
+{
+ return new Ladspa_zita_reverb_amb(rate);
+}
+
+static const LV2_Descriptor descriptors[] = {
+ {
+ "http://drobilla.net/plugins/fomp/reverb",
+ instantiate,
+ connect_port,
+ activate,
+ run,
+ deactivate,
+ cleanup,
+ NULL
+ } , {
+ "http://drobilla.net/plugins/fomp/reverb_amb",
+ instantiate_amb,
+ connect_port,
+ activate,
+ run,
+ deactivate,
+ cleanup,
+ NULL
+ }
+};
+
+LV2_SYMBOL_EXPORT
+const LV2_Descriptor*
+lv2_descriptor(uint32_t index)
+{
+ return (index < 2) ? &descriptors[index] : NULL;
+}
+
+} // extern "C"
diff --git a/src/zreverb.cc b/src/zreverb.cc
new file mode 100644
index 0000000..98055a2
--- /dev/null
+++ b/src/zreverb.cc
@@ -0,0 +1,425 @@
+// -----------------------------------------------------------------------
+//
+// Copyright (C) 2003-2013 Fons Adriaensen <fons@linuxaudio.org>
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//
+// -----------------------------------------------------------------------
+
+
+#include <stdio.h>
+#include <string.h>
+#include <math.h>
+#include "zreverb.h"
+
+
+// -----------------------------------------------------------------------
+
+
+Diff1::Diff1 (void) :
+ _size (0),
+ _line (0)
+{
+}
+
+
+Diff1::~Diff1 (void)
+{
+ fini ();
+}
+
+
+void Diff1::init (int size, float c)
+{
+ _size = size;
+ _line = new float [size];
+ _c = c;
+ reset ();
+}
+
+
+void Diff1::fini (void)
+{
+ delete[] _line;
+ _size = 0;
+ _line = 0;
+}
+
+
+void Diff1::reset (void)
+{
+ memset (_line, 0, _size * sizeof (float));
+ _i = 0;
+}
+
+
+// -----------------------------------------------------------------------
+
+
+Delay::Delay (void) :
+ _size (0),
+ _line (0)
+{
+}
+
+
+Delay::~Delay (void)
+{
+ fini ();
+}
+
+
+void Delay::init (int size)
+{
+ _size = size;
+ _line = new float [size];
+ reset ();
+}
+
+
+void Delay::fini (void)
+{
+ delete[] _line;
+ _size = 0;
+ _line = 0;
+}
+
+
+void Delay::reset (void)
+{
+ memset (_line, 0, _size * sizeof (float));
+ _i = 0;
+}
+
+
+// -----------------------------------------------------------------------
+
+
+Vdelay::Vdelay (void) :
+ _size (0),
+ _line (0)
+{
+}
+
+
+Vdelay::~Vdelay (void)
+{
+ fini ();
+}
+
+
+void Vdelay::init (int size)
+{
+ _size = size;
+ _line = new float [size];
+ reset ();
+}
+
+
+void Vdelay::fini (void)
+{
+ delete[] _line;
+ _size = 0;
+ _line = 0;
+}
+
+
+void Vdelay::reset (void)
+{
+ memset (_line, 0, _size * sizeof (float));
+ _iwr = 0;
+ _ir0 = 0;
+ _ir1 = 0;
+}
+
+
+void Vdelay::set_delay (int del)
+{
+ _ir1 = _iwr - del;
+ if (_ir1 < 0) _ir1 += _size;
+}
+
+
+// -----------------------------------------------------------------------
+
+
+void Filt1::set_params (float del, float tmf, float tlo, float wlo, float thi, float chi)
+{
+ float g, t;
+
+ _gmf = powf (0.001f, del / tmf);
+ _glo = powf (0.001f, del / tlo) / _gmf - 1.0f;
+ _wlo = wlo;
+ g = powf (0.001f, del / thi) / _gmf;
+ t = (1 - g * g) / (2 * g * g * chi);
+ _whi = (sqrtf (1 + 4 * t) - 1) / (2 * t);
+}
+
+
+// -----------------------------------------------------------------------
+
+
+float Zreverb::_tdiff1 [8] =
+{
+ 20346e-6f,
+ 24421e-6f,
+ 31604e-6f,
+ 27333e-6f,
+ 22904e-6f,
+ 29291e-6f,
+ 13458e-6f,
+ 19123e-6f
+};
+
+
+float Zreverb::_tdelay [8] =
+{
+ 153129e-6f,
+ 210389e-6f,
+ 127837e-6f,
+ 256891e-6f,
+ 174713e-6f,
+ 192303e-6f,
+ 125000e-6f,
+ 219991e-6f
+};
+
+
+Zreverb::Zreverb (void)
+{
+}
+
+
+Zreverb::~Zreverb (void)
+{
+ fini ();
+}
+
+
+void Zreverb::init (float fsamp, bool ambis)
+{
+ int i, k1, k2;
+
+ _fsamp = fsamp;
+ _ambis = ambis;
+ _cntA1 = 1;
+ _cntA2 = 0;
+ _cntB1 = 1;
+ _cntB2 = 0;
+ _cntC1 = 1;
+ _cntC2 = 0;
+
+ _ipdel = 0.04f;
+ _xover = 200.0f;
+ _rtlow = 3.0f;
+ _rtmid = 2.0f;
+ _fdamp = 3e3f;
+ _opmix = 1.0f;
+ _rgxyz = 0.0f;
+
+ _g0 = _d0 = 0;
+ _g1 = _d1 = 0;
+
+ _vdelay0.init ((int)(0.1f * _fsamp));
+ _vdelay1.init ((int)(0.1f * _fsamp));
+ for (i = 0; i < 8; i++)
+ {
+ k1 = (int)(floorf (_tdiff1 [i] * _fsamp + 0.5f));
+ k2 = (int)(floorf (_tdelay [i] * _fsamp + 0.5f));
+ _diff1 [i].init (k1, (i & 1) ? -0.6f : 0.6f);
+ _delay [i].init (k2 - k1);
+ }
+
+ _pareq1.setfsamp (fsamp);
+ _pareq2.setfsamp (fsamp);
+}
+
+
+void Zreverb::fini (void)
+{
+}
+
+
+void Zreverb::reset (void)
+{
+ int i;
+
+ _vdelay0.reset ();
+ _vdelay1.reset ();
+ for (i = 0; i < 8; i++)
+ {
+ _diff1 [i].reset ();
+ _filt1 [i].reset ();
+ _delay [i].reset ();
+ }
+}
+
+
+void Zreverb::prepare (int nfram)
+{
+ int a, b, c, i, k;
+ float t0, t1, wlo, chi;
+
+ a = _cntA1;
+ b = _cntB1;
+ c = _cntC1;
+ _d0 = _d1 = 0;
+
+ if (a != _cntA2)
+ {
+ if (_ipdel < 0.02f) _ipdel = 0.02f;
+ if (_ipdel > 0.10f) _ipdel = 0.10f;
+ k = (int)(floorf ((_ipdel - 0.02f) * _fsamp + 0.5f));
+ _vdelay0.set_delay (k);
+ _vdelay1.set_delay (k);
+ _cntA2 = a;
+ }
+
+ if (b != _cntB2)
+ {
+ if (_xover < 50.0f) _xover = 50.0f;
+ if (_xover > 1.0e3f) _xover = 1.0e3f;
+ if (_rtlow < 1.0f) _rtlow = 1.0f;
+ if (_rtlow > 8.0f) _rtlow = 8.0f;
+ if (_rtmid < 1.0f) _rtmid = 1.0f;
+ if (_rtmid > 8.0f) _rtmid = 8.0f;
+ if (_fdamp < 1.5e3f) _fdamp = 1.5e3f;
+ if (_fdamp > 24.0e3f) _fdamp = 24.0e3f;
+ wlo = 6.2832f * _xover / _fsamp;
+ if (_fdamp > 0.49f * _fsamp) chi = 2;
+ else chi = 1 - cosf (6.2832f * _fdamp / _fsamp);
+ for (i = 0; i < 8; i++)
+ {
+ _filt1 [i].set_params (_tdelay [i], _rtmid, _rtlow, wlo, 0.5f * _rtmid, chi);
+ }
+ _cntB2 = b;
+ }
+
+ if (c != _cntC2)
+ {
+ if (_rtmid < 1.0f) _rtmid = 1.0f;
+ if (_rtmid > 8.0f) _rtmid = 8.0f;
+ if (_ambis)
+ {
+ if (_rgxyz < -9.0f) _rgxyz = -9.0f;
+ if (_rgxyz > 9.0f) _rgxyz = 9.0f;
+ t0 = 1.0f / sqrtf (_rtmid);
+ t1 = t0 * powf (10.0f, 0.05f * _rgxyz);
+ }
+ else
+ {
+ if (_opmix < 0.0f) _opmix = 0.0f;
+ if (_opmix > 1.0f) _opmix = 1.0f;
+ t0 = (1 - _opmix) * (1 + _opmix);
+ t1 = 0.7f * _opmix * (2 - _opmix) / sqrtf (_rtmid);
+ }
+ _d0 = (t0 - _g0) / nfram;
+ _d1 = (t1 - _g1) / nfram;
+ _cntC2 = c;
+ }
+
+ _pareq1.prepare (nfram);
+ _pareq2.prepare (nfram);
+}
+
+
+void Zreverb::process (int nfram, float *inp [], float *out [])
+{
+ int i, n;
+ float *p0, *p1;
+ float *q0, *q1, *q2, *q3;
+ float t, g, x0, x1, x2, x3, x4, x5, x6, x7;
+
+ g = sqrtf (0.125f);
+
+ p0 = inp [0];
+ p1 = inp [1];
+ q0 = out [0];
+ q1 = out [1];
+ q2 = out [2];
+ q3 = out [3];
+
+ for (i = 0; i < nfram; i++)
+ {
+ _vdelay0.write (p0 [i]);
+ _vdelay1.write (p1 [i]);
+
+ t = 0.3f * _vdelay0.read1 ();
+ x0 = _diff1 [0].process (_delay [0].read () + t);
+ x1 = _diff1 [1].process (_delay [1].read () + t);
+ x2 = _diff1 [2].process (_delay [2].read () - t);
+ x3 = _diff1 [3].process (_delay [3].read () - t);
+ t = 0.3f * _vdelay1.read1 ();
+ x4 = _diff1 [4].process (_delay [4].read () + t);
+ x5 = _diff1 [5].process (_delay [5].read () + t);
+ x6 = _diff1 [6].process (_delay [6].read () - t);
+ x7 = _diff1 [7].process (_delay [7].read () - t);
+
+ t = x0 - x1; x0 += x1; x1 = t;
+ t = x2 - x3; x2 += x3; x3 = t;
+ t = x4 - x5; x4 += x5; x5 = t;
+ t = x6 - x7; x6 += x7; x7 = t;
+ t = x0 - x2; x0 += x2; x2 = t;
+ t = x1 - x3; x1 += x3; x3 = t;
+ t = x4 - x6; x4 += x6; x6 = t;
+ t = x5 - x7; x5 += x7; x7 = t;
+ t = x0 - x4; x0 += x4; x4 = t;
+ t = x1 - x5; x1 += x5; x5 = t;
+ t = x2 - x6; x2 += x6; x6 = t;
+ t = x3 - x7; x3 += x7; x7 = t;
+
+ if (_ambis)
+ {
+ _g0 += _d0;
+ _g1 += _d1;
+ q0 [i] = _g0 * x0;
+ q1 [i] = _g1 * x1;
+ q2 [i] = _g1 * x4;
+ q3 [i] = _g1 * x2;
+ }
+ else
+ {
+ _g1 += _d1;
+ q0 [i] = _g1 * (x1 + x2);
+ q1 [i] = _g1 * (x1 - x2);
+ }
+
+ _delay [0].write (_filt1 [0].process (g * x0));
+ _delay [1].write (_filt1 [1].process (g * x1));
+ _delay [2].write (_filt1 [2].process (g * x2));
+ _delay [3].write (_filt1 [3].process (g * x3));
+ _delay [4].write (_filt1 [4].process (g * x4));
+ _delay [5].write (_filt1 [5].process (g * x5));
+ _delay [6].write (_filt1 [6].process (g * x6));
+ _delay [7].write (_filt1 [7].process (g * x7));
+ }
+
+ n = _ambis ? 4 : 2;
+ _pareq1.process (nfram, n, out);
+ _pareq2.process (nfram, n, out);
+ if (!_ambis)
+ {
+ for (i = 0; i < nfram; i++)
+ {
+ _g0 += _d0;
+ q0 [i] += _g0 * _vdelay0.read0 ();
+ q1 [i] += _g0 * _vdelay1.read0 ();
+ }
+ }
+}
+
+
+// -----------------------------------------------------------------------
+
diff --git a/src/zreverb.h b/src/zreverb.h
new file mode 100644
index 0000000..2f9b905
--- /dev/null
+++ b/src/zreverb.h
@@ -0,0 +1,244 @@
+// -----------------------------------------------------------------------
+//
+// Copyright (C) 2003-2013 Fons Adriaensen <fons@linuxaudio.org>
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//
+// -----------------------------------------------------------------------
+
+
+#ifndef __ZREVERB_H
+#define __ZREVERB_H
+
+#include "pareq.h"
+
+
+// -----------------------------------------------------------------------
+
+
+class Diff1
+{
+private:
+
+ friend class Zreverb;
+
+ Diff1 (void);
+ ~Diff1 (void);
+
+ void init (int size, float c);
+ void fini (void);
+ void reset (void);
+
+ float process (float x)
+ {
+ float z = _line [_i];
+ x -= _c * z;
+ _line [_i] = x;
+ if (++_i == _size) _i = 0;
+ return z + _c * x;
+ }
+
+ int _i;
+ float _c;
+ int _size;
+ float *_line;
+};
+
+
+// -----------------------------------------------------------------------
+
+
+class Filt1
+{
+private:
+
+ friend class Zreverb;
+
+ Filt1 (void) : _slo (0), _shi (0) {}
+ ~Filt1 (void) {}
+
+ void set_params (float del, float tmf, float tlo, float wlo, float thi, float chi);
+
+ float process (float x)
+ {
+ _slo += _wlo * (x - _slo) + 1e-10f;
+ x += _glo * _slo;
+ _shi += _whi * (x - _shi);
+ return _gmf * _shi;
+ }
+
+ void reset (void)
+ {
+ _slo = 0;
+ _shi = 0;
+ }
+
+ float _gmf;
+ float _glo;
+ float _wlo;
+ float _whi;
+ float _slo;
+ float _shi;
+};
+
+
+
+
+// -----------------------------------------------------------------------
+
+
+class Delay
+{
+private:
+
+ friend class Zreverb;
+
+ Delay (void);
+ ~Delay (void);
+
+ void init (int size);
+ void fini (void);
+ void reset (void);
+
+ float read (void)
+ {
+ return _line [_i];
+ }
+
+ void write (float x)
+ {
+ _line [_i++] = x;
+ if (_i == _size) _i = 0;
+ }
+
+ int _i;
+ int _size;
+ float *_line;
+};
+
+
+// -----------------------------------------------------------------------
+
+
+class Vdelay
+{
+private:
+
+ friend class Zreverb;
+
+ Vdelay (void);
+ ~Vdelay (void);
+
+ void init (int size);
+ void fini (void);
+ void reset (void);
+ void set_delay (int del);
+
+ void write (float x)
+ {
+ _line [_iwr++] = x;
+ if (_iwr == _size) _iwr = 0;
+ }
+
+ float read0 (void)
+ {
+ float x = _line [_ir0++];
+ if (_ir0 == _size) _ir0 = 0;
+ return x;
+ }
+
+ float read1 (void)
+ {
+ float x = _line [_ir1++];
+ if (_ir1 == _size) _ir1 = 0;
+ return x;
+ }
+
+ int _iwr;
+ int _ir0;
+ int _ir1;
+ int _size;
+ float *_line;
+};
+
+
+// -----------------------------------------------------------------------
+
+
+class Zreverb
+{
+public:
+
+ Zreverb (void);
+ ~Zreverb (void);
+
+ void init (float fsamp, bool ambis);
+ void fini (void);
+
+ void reset (void);
+ void prepare (int n);
+ void process (int n, float *inp [], float *out []);
+
+ void set_delay (float v) { _ipdel = v; _cntA1++; }
+ void set_xover (float v) { _xover = v; _cntB1++; }
+ void set_rtlow (float v) { _rtlow = v; _cntB1++; }
+ void set_rtmid (float v) { _rtmid = v; _cntB1++; _cntC1++; }
+ void set_fdamp (float v) { _fdamp = v; _cntB1++; }
+ void set_opmix (float v) { _opmix = v; _cntC1++; }
+ void set_rgxyz (float v) { _rgxyz = v; _cntC1++; }
+ void set_eq1 (float f, float g) { _pareq1.setparam (f, g); }
+ void set_eq2 (float f, float g) { _pareq2.setparam (f, g); }
+
+private:
+
+
+ float _fsamp;
+ bool _ambis;
+
+ Vdelay _vdelay0;
+ Vdelay _vdelay1;
+ Diff1 _diff1 [8];
+ Filt1 _filt1 [8];
+ Delay _delay [8];
+
+ volatile int _cntA1;
+ volatile int _cntB1;
+ volatile int _cntC1;
+ int _cntA2;
+ int _cntB2;
+ int _cntC2;
+ float _ipdel;
+ float _xover;
+ float _rtlow;
+ float _rtmid;
+ float _fdamp;
+ float _opmix;
+ float _rgxyz;
+
+ float _g0, _d0;
+ float _g1, _d1;
+
+ Pareq _pareq1;
+ Pareq _pareq2;
+
+ static float _tdiff1 [8];
+ static float _tdelay [8];
+};
+
+
+// -----------------------------------------------------------------------
+
+
+#endif
diff --git a/.gitignore b/waflib/.gitignore
index 8d35cb3..8d35cb3 100644
--- a/.gitignore
+++ b/waflib/.gitignore
diff --git a/Build.py b/waflib/Build.py
index 1afcba6..1afcba6 100644
--- a/Build.py
+++ b/waflib/Build.py
diff --git a/waflib/COPYING b/waflib/COPYING
new file mode 100644
index 0000000..a4147d2
--- /dev/null
+++ b/waflib/COPYING
@@ -0,0 +1,25 @@
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+3. The name of the author may not be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
diff --git a/ConfigSet.py b/waflib/ConfigSet.py
index b300bb5..b300bb5 100644
--- a/ConfigSet.py
+++ b/waflib/ConfigSet.py
diff --git a/Configure.py b/waflib/Configure.py
index d0a4793..d0a4793 100644
--- a/Configure.py
+++ b/waflib/Configure.py
diff --git a/Context.py b/waflib/Context.py
index bb47c92..bb47c92 100644
--- a/Context.py
+++ b/waflib/Context.py
diff --git a/Errors.py b/waflib/Errors.py
index bf75c1b..bf75c1b 100644
--- a/Errors.py
+++ b/waflib/Errors.py
diff --git a/Logs.py b/waflib/Logs.py
index 2a47516..2a47516 100644
--- a/Logs.py
+++ b/waflib/Logs.py
diff --git a/Node.py b/waflib/Node.py
index 4ac1ea8..4ac1ea8 100644
--- a/Node.py
+++ b/waflib/Node.py
diff --git a/Options.py b/waflib/Options.py
index ad802d4..ad802d4 100644
--- a/Options.py
+++ b/waflib/Options.py
diff --git a/README.md b/waflib/README.md
index c5361b9..c5361b9 100644
--- a/README.md
+++ b/waflib/README.md
diff --git a/Runner.py b/waflib/Runner.py
index 261084d..261084d 100644
--- a/Runner.py
+++ b/waflib/Runner.py
diff --git a/Scripting.py b/waflib/Scripting.py
index 749d4f2..749d4f2 100644
--- a/Scripting.py
+++ b/waflib/Scripting.py
diff --git a/Task.py b/waflib/Task.py
index 0fc449d..0fc449d 100644
--- a/Task.py
+++ b/waflib/Task.py
diff --git a/TaskGen.py b/waflib/TaskGen.py
index a74e643..a74e643 100644
--- a/TaskGen.py
+++ b/waflib/TaskGen.py
diff --git a/Tools/__init__.py b/waflib/Tools/__init__.py
index 079df35..079df35 100644
--- a/Tools/__init__.py
+++ b/waflib/Tools/__init__.py
diff --git a/Tools/ar.py b/waflib/Tools/ar.py
index b39b645..b39b645 100644
--- a/Tools/ar.py
+++ b/waflib/Tools/ar.py
diff --git a/Tools/asm.py b/waflib/Tools/asm.py
index b6f26fb..b6f26fb 100644
--- a/Tools/asm.py
+++ b/waflib/Tools/asm.py
diff --git a/Tools/bison.py b/waflib/Tools/bison.py
index eef56dc..eef56dc 100644
--- a/Tools/bison.py
+++ b/waflib/Tools/bison.py
diff --git a/Tools/c.py b/waflib/Tools/c.py
index effd6b6..effd6b6 100644
--- a/Tools/c.py
+++ b/waflib/Tools/c.py
diff --git a/Tools/c_aliases.py b/waflib/Tools/c_aliases.py
index c9d5369..c9d5369 100644
--- a/Tools/c_aliases.py
+++ b/waflib/Tools/c_aliases.py
diff --git a/Tools/c_config.py b/waflib/Tools/c_config.py
index d2b3c0d..d2b3c0d 100644
--- a/Tools/c_config.py
+++ b/waflib/Tools/c_config.py
diff --git a/Tools/c_osx.py b/waflib/Tools/c_osx.py
index f70b128..f70b128 100644
--- a/Tools/c_osx.py
+++ b/waflib/Tools/c_osx.py
diff --git a/Tools/c_preproc.py b/waflib/Tools/c_preproc.py
index 7e04b4a..7e04b4a 100644
--- a/Tools/c_preproc.py
+++ b/waflib/Tools/c_preproc.py
diff --git a/Tools/c_tests.py b/waflib/Tools/c_tests.py
index f858df5..f858df5 100644
--- a/Tools/c_tests.py
+++ b/waflib/Tools/c_tests.py
diff --git a/Tools/ccroot.py b/waflib/Tools/ccroot.py
index cfef8bf..cfef8bf 100644
--- a/Tools/ccroot.py
+++ b/waflib/Tools/ccroot.py
diff --git a/Tools/clang.py b/waflib/Tools/clang.py
index 3828e39..3828e39 100644
--- a/Tools/clang.py
+++ b/waflib/Tools/clang.py
diff --git a/Tools/clangxx.py b/waflib/Tools/clangxx.py
index 152013c..152013c 100644
--- a/Tools/clangxx.py
+++ b/waflib/Tools/clangxx.py
diff --git a/Tools/compiler_c.py b/waflib/Tools/compiler_c.py
index 2dba3f8..2dba3f8 100644
--- a/Tools/compiler_c.py
+++ b/waflib/Tools/compiler_c.py
diff --git a/Tools/compiler_cxx.py b/waflib/Tools/compiler_cxx.py
index 1af65a2..1af65a2 100644
--- a/Tools/compiler_cxx.py
+++ b/waflib/Tools/compiler_cxx.py
diff --git a/Tools/compiler_d.py b/waflib/Tools/compiler_d.py
index 43bb1f6..43bb1f6 100644
--- a/Tools/compiler_d.py
+++ b/waflib/Tools/compiler_d.py
diff --git a/Tools/compiler_fc.py b/waflib/Tools/compiler_fc.py
index 96b58e7..96b58e7 100644
--- a/Tools/compiler_fc.py
+++ b/waflib/Tools/compiler_fc.py
diff --git a/Tools/cs.py b/waflib/Tools/cs.py
index aecca6d..aecca6d 100644
--- a/Tools/cs.py
+++ b/waflib/Tools/cs.py
diff --git a/Tools/cxx.py b/waflib/Tools/cxx.py
index 194fad7..194fad7 100644
--- a/Tools/cxx.py
+++ b/waflib/Tools/cxx.py
diff --git a/Tools/d.py b/waflib/Tools/d.py
index e4cf73b..e4cf73b 100644
--- a/Tools/d.py
+++ b/waflib/Tools/d.py
diff --git a/Tools/d_config.py b/waflib/Tools/d_config.py
index 6637556..6637556 100644
--- a/Tools/d_config.py
+++ b/waflib/Tools/d_config.py
diff --git a/Tools/d_scan.py b/waflib/Tools/d_scan.py
index 14c6c31..14c6c31 100644
--- a/Tools/d_scan.py
+++ b/waflib/Tools/d_scan.py
diff --git a/Tools/dbus.py b/waflib/Tools/dbus.py
index d520f1c..d520f1c 100644
--- a/Tools/dbus.py
+++ b/waflib/Tools/dbus.py
diff --git a/Tools/dmd.py b/waflib/Tools/dmd.py
index 8917ca1..8917ca1 100644
--- a/Tools/dmd.py
+++ b/waflib/Tools/dmd.py
diff --git a/Tools/errcheck.py b/waflib/Tools/errcheck.py
index de8d75a..de8d75a 100644
--- a/Tools/errcheck.py
+++ b/waflib/Tools/errcheck.py
diff --git a/Tools/fc.py b/waflib/Tools/fc.py
index d9e8d8c..d9e8d8c 100644
--- a/Tools/fc.py
+++ b/waflib/Tools/fc.py
diff --git a/Tools/fc_config.py b/waflib/Tools/fc_config.py
index 222f3a5..222f3a5 100644
--- a/Tools/fc_config.py
+++ b/waflib/Tools/fc_config.py
diff --git a/Tools/fc_scan.py b/waflib/Tools/fc_scan.py
index 12cb0fc..12cb0fc 100644
--- a/Tools/fc_scan.py
+++ b/waflib/Tools/fc_scan.py
diff --git a/Tools/flex.py b/waflib/Tools/flex.py
index 2256657..2256657 100644
--- a/Tools/flex.py
+++ b/waflib/Tools/flex.py
diff --git a/Tools/g95.py b/waflib/Tools/g95.py
index f69ba4f..f69ba4f 100644
--- a/Tools/g95.py
+++ b/waflib/Tools/g95.py
diff --git a/Tools/gas.py b/waflib/Tools/gas.py
index 77afed7..77afed7 100644
--- a/Tools/gas.py
+++ b/waflib/Tools/gas.py
diff --git a/Tools/gcc.py b/waflib/Tools/gcc.py
index acdd473..acdd473 100644
--- a/Tools/gcc.py
+++ b/waflib/Tools/gcc.py
diff --git a/Tools/gdc.py b/waflib/Tools/gdc.py
index d89a66d..d89a66d 100644
--- a/Tools/gdc.py
+++ b/waflib/Tools/gdc.py
diff --git a/Tools/gfortran.py b/waflib/Tools/gfortran.py
index 1050667..1050667 100644
--- a/Tools/gfortran.py
+++ b/waflib/Tools/gfortran.py
diff --git a/Tools/glib2.py b/waflib/Tools/glib2.py
index 949fe37..949fe37 100644
--- a/Tools/glib2.py
+++ b/waflib/Tools/glib2.py
diff --git a/Tools/gnu_dirs.py b/waflib/Tools/gnu_dirs.py
index 2847071..2847071 100644
--- a/Tools/gnu_dirs.py
+++ b/waflib/Tools/gnu_dirs.py
diff --git a/Tools/gxx.py b/waflib/Tools/gxx.py
index 22c5d26..22c5d26 100644
--- a/Tools/gxx.py
+++ b/waflib/Tools/gxx.py
diff --git a/Tools/icc.py b/waflib/Tools/icc.py
index b6492c8..b6492c8 100644
--- a/Tools/icc.py
+++ b/waflib/Tools/icc.py
diff --git a/Tools/icpc.py b/waflib/Tools/icpc.py
index 8a6cc6c..8a6cc6c 100644
--- a/Tools/icpc.py
+++ b/waflib/Tools/icpc.py
diff --git a/Tools/ifort.py b/waflib/Tools/ifort.py
index 74934f3..74934f3 100644
--- a/Tools/ifort.py
+++ b/waflib/Tools/ifort.py
diff --git a/Tools/intltool.py b/waflib/Tools/intltool.py
index af95ba8..af95ba8 100644
--- a/Tools/intltool.py
+++ b/waflib/Tools/intltool.py
diff --git a/Tools/irixcc.py b/waflib/Tools/irixcc.py
index c3ae1ac..c3ae1ac 100644
--- a/Tools/irixcc.py
+++ b/waflib/Tools/irixcc.py
diff --git a/Tools/javaw.py b/waflib/Tools/javaw.py
index f6fd20c..f6fd20c 100644
--- a/Tools/javaw.py
+++ b/waflib/Tools/javaw.py
diff --git a/Tools/ldc2.py b/waflib/Tools/ldc2.py
index a51c344..a51c344 100644
--- a/Tools/ldc2.py
+++ b/waflib/Tools/ldc2.py
diff --git a/Tools/lua.py b/waflib/Tools/lua.py
index 15a333a..15a333a 100644
--- a/Tools/lua.py
+++ b/waflib/Tools/lua.py
diff --git a/Tools/md5_tstamp.py b/waflib/Tools/md5_tstamp.py
index 6428e46..6428e46 100644
--- a/Tools/md5_tstamp.py
+++ b/waflib/Tools/md5_tstamp.py
diff --git a/Tools/msvc.py b/waflib/Tools/msvc.py
index 17b347d..17b347d 100644
--- a/Tools/msvc.py
+++ b/waflib/Tools/msvc.py
diff --git a/Tools/nasm.py b/waflib/Tools/nasm.py
index 411d582..411d582 100644
--- a/Tools/nasm.py
+++ b/waflib/Tools/nasm.py
diff --git a/Tools/nobuild.py b/waflib/Tools/nobuild.py
index 2e4b055..2e4b055 100644
--- a/Tools/nobuild.py
+++ b/waflib/Tools/nobuild.py
diff --git a/Tools/perl.py b/waflib/Tools/perl.py
index 32b03fb..32b03fb 100644
--- a/Tools/perl.py
+++ b/waflib/Tools/perl.py
diff --git a/Tools/python.py b/waflib/Tools/python.py
index 25841d0..25841d0 100644
--- a/Tools/python.py
+++ b/waflib/Tools/python.py
diff --git a/Tools/qt5.py b/waflib/Tools/qt5.py
index 4f9c690..4f9c690 100644
--- a/Tools/qt5.py
+++ b/waflib/Tools/qt5.py
diff --git a/Tools/ruby.py b/waflib/Tools/ruby.py
index 8d92a79..8d92a79 100644
--- a/Tools/ruby.py
+++ b/waflib/Tools/ruby.py
diff --git a/Tools/suncc.py b/waflib/Tools/suncc.py
index 33d34fc..33d34fc 100644
--- a/Tools/suncc.py
+++ b/waflib/Tools/suncc.py
diff --git a/Tools/suncxx.py b/waflib/Tools/suncxx.py
index 3b384f6..3b384f6 100644
--- a/Tools/suncxx.py
+++ b/waflib/Tools/suncxx.py
diff --git a/Tools/tex.py b/waflib/Tools/tex.py
index eaf9fdb..eaf9fdb 100644
--- a/Tools/tex.py
+++ b/waflib/Tools/tex.py
diff --git a/Tools/vala.py b/waflib/Tools/vala.py
index 822ec50..822ec50 100644
--- a/Tools/vala.py
+++ b/waflib/Tools/vala.py
diff --git a/Tools/waf_unit_test.py b/waflib/Tools/waf_unit_test.py
index a71ed1c..a71ed1c 100644
--- a/Tools/waf_unit_test.py
+++ b/waflib/Tools/waf_unit_test.py
diff --git a/Tools/winres.py b/waflib/Tools/winres.py
index 586c596..586c596 100644
--- a/Tools/winres.py
+++ b/waflib/Tools/winres.py
diff --git a/Tools/xlc.py b/waflib/Tools/xlc.py
index 134dd41..134dd41 100644
--- a/Tools/xlc.py
+++ b/waflib/Tools/xlc.py
diff --git a/Tools/xlcxx.py b/waflib/Tools/xlcxx.py
index 76aa59b..76aa59b 100644
--- a/Tools/xlcxx.py
+++ b/waflib/Tools/xlcxx.py
diff --git a/Utils.py b/waflib/Utils.py
index b4665c4..b4665c4 100644
--- a/Utils.py
+++ b/waflib/Utils.py
diff --git a/__init__.py b/waflib/__init__.py
index 079df35..079df35 100644
--- a/__init__.py
+++ b/waflib/__init__.py
diff --git a/ansiterm.py b/waflib/ansiterm.py
index 0d20c63..0d20c63 100644
--- a/ansiterm.py
+++ b/waflib/ansiterm.py
diff --git a/extras/__init__.py b/waflib/extras/__init__.py
index c8a3c34..c8a3c34 100644
--- a/extras/__init__.py
+++ b/waflib/extras/__init__.py
diff --git a/extras/autowaf.py b/waflib/extras/autowaf.py
index 92d0e57..92d0e57 100644
--- a/extras/autowaf.py
+++ b/waflib/extras/autowaf.py
diff --git a/extras/batched_cc.py b/waflib/extras/batched_cc.py
index aad2872..aad2872 100644
--- a/extras/batched_cc.py
+++ b/waflib/extras/batched_cc.py
diff --git a/extras/biber.py b/waflib/extras/biber.py
index fd9db4e..fd9db4e 100644
--- a/extras/biber.py
+++ b/waflib/extras/biber.py
diff --git a/extras/bjam.py b/waflib/extras/bjam.py
index 8e04d3a..8e04d3a 100644
--- a/extras/bjam.py
+++ b/waflib/extras/bjam.py
diff --git a/extras/blender.py b/waflib/extras/blender.py
index e5efc28..e5efc28 100644
--- a/extras/blender.py
+++ b/waflib/extras/blender.py
diff --git a/extras/boo.py b/waflib/extras/boo.py
index 06623d4..06623d4 100644
--- a/extras/boo.py
+++ b/waflib/extras/boo.py
diff --git a/extras/boost.py b/waflib/extras/boost.py
index c2aaaa9..c2aaaa9 100644
--- a/extras/boost.py
+++ b/waflib/extras/boost.py
diff --git a/extras/build_file_tracker.py b/waflib/extras/build_file_tracker.py
index c4f26fd..c4f26fd 100644
--- a/extras/build_file_tracker.py
+++ b/waflib/extras/build_file_tracker.py
diff --git a/extras/build_logs.py b/waflib/extras/build_logs.py
index cdf8ed0..cdf8ed0 100644
--- a/extras/build_logs.py
+++ b/waflib/extras/build_logs.py
diff --git a/extras/buildcopy.py b/waflib/extras/buildcopy.py
index a6d9ac8..a6d9ac8 100644
--- a/extras/buildcopy.py
+++ b/waflib/extras/buildcopy.py
diff --git a/extras/c_bgxlc.py b/waflib/extras/c_bgxlc.py
index 6e3eaf7..6e3eaf7 100644
--- a/extras/c_bgxlc.py
+++ b/waflib/extras/c_bgxlc.py
diff --git a/extras/c_dumbpreproc.py b/waflib/extras/c_dumbpreproc.py
index ce9e1a4..ce9e1a4 100644
--- a/extras/c_dumbpreproc.py
+++ b/waflib/extras/c_dumbpreproc.py
diff --git a/extras/c_emscripten.py b/waflib/extras/c_emscripten.py
index e1ac494..e1ac494 100644
--- a/extras/c_emscripten.py
+++ b/waflib/extras/c_emscripten.py
diff --git a/extras/c_nec.py b/waflib/extras/c_nec.py
index 96bfae4..96bfae4 100644
--- a/extras/c_nec.py
+++ b/waflib/extras/c_nec.py
diff --git a/extras/cabal.py b/waflib/extras/cabal.py
index e10a0d1..e10a0d1 100644
--- a/extras/cabal.py
+++ b/waflib/extras/cabal.py
diff --git a/extras/cfg_altoptions.py b/waflib/extras/cfg_altoptions.py
index 47b1189..47b1189 100644
--- a/extras/cfg_altoptions.py
+++ b/waflib/extras/cfg_altoptions.py
diff --git a/extras/clang_compilation_database.py b/waflib/extras/clang_compilation_database.py
index 4d9b5e2..4d9b5e2 100644
--- a/extras/clang_compilation_database.py
+++ b/waflib/extras/clang_compilation_database.py
diff --git a/extras/codelite.py b/waflib/extras/codelite.py
index 523302c..523302c 100644
--- a/extras/codelite.py
+++ b/waflib/extras/codelite.py
diff --git a/extras/color_gcc.py b/waflib/extras/color_gcc.py
index b68c5eb..b68c5eb 100644
--- a/extras/color_gcc.py
+++ b/waflib/extras/color_gcc.py
diff --git a/extras/color_rvct.py b/waflib/extras/color_rvct.py
index f89ccbd..f89ccbd 100644
--- a/extras/color_rvct.py
+++ b/waflib/extras/color_rvct.py
diff --git a/extras/compat15.py b/waflib/extras/compat15.py
index 0e74df8..0e74df8 100644
--- a/extras/compat15.py
+++ b/waflib/extras/compat15.py
diff --git a/extras/cppcheck.py b/waflib/extras/cppcheck.py
index 13ff424..13ff424 100644
--- a/extras/cppcheck.py
+++ b/waflib/extras/cppcheck.py
diff --git a/extras/cpplint.py b/waflib/extras/cpplint.py
index e3302e5..e3302e5 100644
--- a/extras/cpplint.py
+++ b/waflib/extras/cpplint.py
diff --git a/extras/cross_gnu.py b/waflib/extras/cross_gnu.py
index 309f53b..309f53b 100644
--- a/extras/cross_gnu.py
+++ b/waflib/extras/cross_gnu.py
diff --git a/extras/cython.py b/waflib/extras/cython.py
index 481d6f4..481d6f4 100644
--- a/extras/cython.py
+++ b/waflib/extras/cython.py
diff --git a/extras/dcc.py b/waflib/extras/dcc.py
index c1a57c0..c1a57c0 100644
--- a/extras/dcc.py
+++ b/waflib/extras/dcc.py
diff --git a/extras/distnet.py b/waflib/extras/distnet.py
index 09a31a6..09a31a6 100644
--- a/extras/distnet.py
+++ b/waflib/extras/distnet.py
diff --git a/extras/doxygen.py b/waflib/extras/doxygen.py
index 28f56e9..28f56e9 100644
--- a/extras/doxygen.py
+++ b/waflib/extras/doxygen.py
diff --git a/extras/dpapi.py b/waflib/extras/dpapi.py
index b94d482..b94d482 100644
--- a/extras/dpapi.py
+++ b/waflib/extras/dpapi.py
diff --git a/extras/eclipse.py b/waflib/extras/eclipse.py
index bb78741..bb78741 100644
--- a/extras/eclipse.py
+++ b/waflib/extras/eclipse.py
diff --git a/extras/erlang.py b/waflib/extras/erlang.py
index 49f6d5b..49f6d5b 100644
--- a/extras/erlang.py
+++ b/waflib/extras/erlang.py
diff --git a/extras/fast_partial.py b/waflib/extras/fast_partial.py
index b3af513..b3af513 100644
--- a/extras/fast_partial.py
+++ b/waflib/extras/fast_partial.py
diff --git a/extras/fc_bgxlf.py b/waflib/extras/fc_bgxlf.py
index cca1810..cca1810 100644
--- a/extras/fc_bgxlf.py
+++ b/waflib/extras/fc_bgxlf.py
diff --git a/extras/fc_cray.py b/waflib/extras/fc_cray.py
index da733fa..da733fa 100644
--- a/extras/fc_cray.py
+++ b/waflib/extras/fc_cray.py
diff --git a/extras/fc_nag.py b/waflib/extras/fc_nag.py
index edcb218..edcb218 100644
--- a/extras/fc_nag.py
+++ b/waflib/extras/fc_nag.py
diff --git a/extras/fc_nec.py b/waflib/extras/fc_nec.py
index 67c8680..67c8680 100644
--- a/extras/fc_nec.py
+++ b/waflib/extras/fc_nec.py
diff --git a/extras/fc_open64.py b/waflib/extras/fc_open64.py
index 413719f..413719f 100644
--- a/extras/fc_open64.py
+++ b/waflib/extras/fc_open64.py
diff --git a/extras/fc_pgfortran.py b/waflib/extras/fc_pgfortran.py
index afb2817..afb2817 100644
--- a/extras/fc_pgfortran.py
+++ b/waflib/extras/fc_pgfortran.py
diff --git a/extras/fc_solstudio.py b/waflib/extras/fc_solstudio.py
index 53766df..53766df 100644
--- a/extras/fc_solstudio.py
+++ b/waflib/extras/fc_solstudio.py
diff --git a/extras/fc_xlf.py b/waflib/extras/fc_xlf.py
index 5a3da03..5a3da03 100644
--- a/extras/fc_xlf.py
+++ b/waflib/extras/fc_xlf.py
diff --git a/extras/file_to_object.py b/waflib/extras/file_to_object.py
index 1393b51..1393b51 100644
--- a/extras/file_to_object.py
+++ b/waflib/extras/file_to_object.py
diff --git a/extras/fluid.py b/waflib/extras/fluid.py
index 4814a35..4814a35 100644
--- a/extras/fluid.py
+++ b/waflib/extras/fluid.py
diff --git a/extras/freeimage.py b/waflib/extras/freeimage.py
index f27e525..f27e525 100644
--- a/extras/freeimage.py
+++ b/waflib/extras/freeimage.py
diff --git a/extras/fsb.py b/waflib/extras/fsb.py
index 1b8f398..1b8f398 100644
--- a/extras/fsb.py
+++ b/waflib/extras/fsb.py
diff --git a/extras/fsc.py b/waflib/extras/fsc.py
index c67e70b..c67e70b 100644
--- a/extras/fsc.py
+++ b/waflib/extras/fsc.py
diff --git a/extras/gccdeps.py b/waflib/extras/gccdeps.py
index d9758ab..d9758ab 100644
--- a/extras/gccdeps.py
+++ b/waflib/extras/gccdeps.py
diff --git a/extras/gdbus.py b/waflib/extras/gdbus.py
index 0e0476e..0e0476e 100644
--- a/extras/gdbus.py
+++ b/waflib/extras/gdbus.py
diff --git a/extras/gob2.py b/waflib/extras/gob2.py
index b4fa3b9..b4fa3b9 100644
--- a/extras/gob2.py
+++ b/waflib/extras/gob2.py
diff --git a/extras/halide.py b/waflib/extras/halide.py
index 6078e38..6078e38 100644
--- a/extras/halide.py
+++ b/waflib/extras/halide.py
diff --git a/extras/javatest.py b/waflib/extras/javatest.py
index 979b8d8..979b8d8 100755
--- a/extras/javatest.py
+++ b/waflib/extras/javatest.py
diff --git a/extras/kde4.py b/waflib/extras/kde4.py
index e49a9ec..e49a9ec 100644
--- a/extras/kde4.py
+++ b/waflib/extras/kde4.py
diff --git a/extras/local_rpath.py b/waflib/extras/local_rpath.py
index b2507e1..b2507e1 100644
--- a/extras/local_rpath.py
+++ b/waflib/extras/local_rpath.py
diff --git a/extras/lv2.py b/waflib/extras/lv2.py
index 815987f..815987f 100644
--- a/extras/lv2.py
+++ b/waflib/extras/lv2.py
diff --git a/extras/make.py b/waflib/extras/make.py
index 933d9ca..933d9ca 100644
--- a/extras/make.py
+++ b/waflib/extras/make.py
diff --git a/extras/midl.py b/waflib/extras/midl.py
index 43e6cf9..43e6cf9 100644
--- a/extras/midl.py
+++ b/waflib/extras/midl.py
diff --git a/extras/msvcdeps.py b/waflib/extras/msvcdeps.py
index fc1ecd4..fc1ecd4 100644
--- a/extras/msvcdeps.py
+++ b/waflib/extras/msvcdeps.py
diff --git a/extras/msvs.py b/waflib/extras/msvs.py
index 8aa2db0..8aa2db0 100644
--- a/extras/msvs.py
+++ b/waflib/extras/msvs.py
diff --git a/extras/netcache_client.py b/waflib/extras/netcache_client.py
index dc49048..dc49048 100644
--- a/extras/netcache_client.py
+++ b/waflib/extras/netcache_client.py
diff --git a/extras/objcopy.py b/waflib/extras/objcopy.py
index 82d8359..82d8359 100644
--- a/extras/objcopy.py
+++ b/waflib/extras/objcopy.py
diff --git a/extras/ocaml.py b/waflib/extras/ocaml.py
index afe73c0..afe73c0 100644
--- a/extras/ocaml.py
+++ b/waflib/extras/ocaml.py
diff --git a/extras/package.py b/waflib/extras/package.py
index c06498e..c06498e 100644
--- a/extras/package.py
+++ b/waflib/extras/package.py
diff --git a/extras/parallel_debug.py b/waflib/extras/parallel_debug.py
index 35883a3..35883a3 100644
--- a/extras/parallel_debug.py
+++ b/waflib/extras/parallel_debug.py
diff --git a/extras/pch.py b/waflib/extras/pch.py
index 103e752..103e752 100644
--- a/extras/pch.py
+++ b/waflib/extras/pch.py
diff --git a/extras/pep8.py b/waflib/extras/pep8.py
index 676beed..676beed 100644
--- a/extras/pep8.py
+++ b/waflib/extras/pep8.py
diff --git a/extras/pgicc.py b/waflib/extras/pgicc.py
index 9790b9c..9790b9c 100644
--- a/extras/pgicc.py
+++ b/waflib/extras/pgicc.py
diff --git a/extras/pgicxx.py b/waflib/extras/pgicxx.py
index eae121c..eae121c 100644
--- a/extras/pgicxx.py
+++ b/waflib/extras/pgicxx.py
diff --git a/extras/proc.py b/waflib/extras/proc.py
index 764abec..764abec 100644
--- a/extras/proc.py
+++ b/waflib/extras/proc.py
diff --git a/extras/protoc.py b/waflib/extras/protoc.py
index f3cb4d8..f3cb4d8 100644
--- a/extras/protoc.py
+++ b/waflib/extras/protoc.py
diff --git a/extras/pyqt5.py b/waflib/extras/pyqt5.py
index c21dfa7..c21dfa7 100644
--- a/extras/pyqt5.py
+++ b/waflib/extras/pyqt5.py
diff --git a/extras/pytest.py b/waflib/extras/pytest.py
index 7dd5a1a..7dd5a1a 100644
--- a/extras/pytest.py
+++ b/waflib/extras/pytest.py
diff --git a/extras/qnxnto.py b/waflib/extras/qnxnto.py
index 1158124..1158124 100644
--- a/extras/qnxnto.py
+++ b/waflib/extras/qnxnto.py
diff --git a/extras/qt4.py b/waflib/extras/qt4.py
index 90cae7e..90cae7e 100644
--- a/extras/qt4.py
+++ b/waflib/extras/qt4.py
diff --git a/extras/relocation.py b/waflib/extras/relocation.py
index 7e821f4..7e821f4 100644
--- a/extras/relocation.py
+++ b/waflib/extras/relocation.py
diff --git a/extras/remote.py b/waflib/extras/remote.py
index 3b038f7..3b038f7 100644
--- a/extras/remote.py
+++ b/waflib/extras/remote.py
diff --git a/extras/resx.py b/waflib/extras/resx.py
index caf4d31..caf4d31 100644
--- a/extras/resx.py
+++ b/waflib/extras/resx.py
diff --git a/extras/review.py b/waflib/extras/review.py
index 561e062..561e062 100644
--- a/extras/review.py
+++ b/waflib/extras/review.py
diff --git a/extras/rst.py b/waflib/extras/rst.py
index f3c3a5e..f3c3a5e 100644
--- a/extras/rst.py
+++ b/waflib/extras/rst.py
diff --git a/extras/run_do_script.py b/waflib/extras/run_do_script.py
index f3c5812..f3c5812 100644
--- a/extras/run_do_script.py
+++ b/waflib/extras/run_do_script.py
diff --git a/extras/run_m_script.py b/waflib/extras/run_m_script.py
index b5f27eb..b5f27eb 100644
--- a/extras/run_m_script.py
+++ b/waflib/extras/run_m_script.py
diff --git a/extras/run_py_script.py b/waflib/extras/run_py_script.py
index 3670381..3670381 100644
--- a/extras/run_py_script.py
+++ b/waflib/extras/run_py_script.py
diff --git a/extras/run_r_script.py b/waflib/extras/run_r_script.py
index b0d8f2b..b0d8f2b 100644
--- a/extras/run_r_script.py
+++ b/waflib/extras/run_r_script.py
diff --git a/extras/sas.py b/waflib/extras/sas.py
index 754c614..754c614 100644
--- a/extras/sas.py
+++ b/waflib/extras/sas.py
diff --git a/extras/satellite_assembly.py b/waflib/extras/satellite_assembly.py
index 005eb07..005eb07 100644
--- a/extras/satellite_assembly.py
+++ b/waflib/extras/satellite_assembly.py
diff --git a/extras/scala.py b/waflib/extras/scala.py
index a9880f0..a9880f0 100644
--- a/extras/scala.py
+++ b/waflib/extras/scala.py
diff --git a/extras/slow_qt4.py b/waflib/extras/slow_qt4.py
index ec7880b..ec7880b 100644
--- a/extras/slow_qt4.py
+++ b/waflib/extras/slow_qt4.py
diff --git a/extras/softlink_libs.py b/waflib/extras/softlink_libs.py
index 50c777f..50c777f 100644
--- a/extras/softlink_libs.py
+++ b/waflib/extras/softlink_libs.py
diff --git a/extras/stale.py b/waflib/extras/stale.py
index cac3f46..cac3f46 100644
--- a/extras/stale.py
+++ b/waflib/extras/stale.py
diff --git a/extras/stracedeps.py b/waflib/extras/stracedeps.py
index 37d82cb..37d82cb 100644
--- a/extras/stracedeps.py
+++ b/waflib/extras/stracedeps.py
diff --git a/extras/swig.py b/waflib/extras/swig.py
index fd3d6d2..fd3d6d2 100644
--- a/extras/swig.py
+++ b/waflib/extras/swig.py
diff --git a/extras/syms.py b/waflib/extras/syms.py
index dfa0059..dfa0059 100644
--- a/extras/syms.py
+++ b/waflib/extras/syms.py
diff --git a/extras/ticgt.py b/waflib/extras/ticgt.py
index f43a7ea..f43a7ea 100644
--- a/extras/ticgt.py
+++ b/waflib/extras/ticgt.py
diff --git a/extras/unity.py b/waflib/extras/unity.py
index 78128ed..78128ed 100644
--- a/extras/unity.py
+++ b/waflib/extras/unity.py
diff --git a/extras/use_config.py b/waflib/extras/use_config.py
index ef5129f..ef5129f 100644
--- a/extras/use_config.py
+++ b/waflib/extras/use_config.py
diff --git a/extras/valadoc.py b/waflib/extras/valadoc.py
index c50f69e..c50f69e 100644
--- a/extras/valadoc.py
+++ b/waflib/extras/valadoc.py
diff --git a/extras/waf_xattr.py b/waflib/extras/waf_xattr.py
index 351dd63..351dd63 100644
--- a/extras/waf_xattr.py
+++ b/waflib/extras/waf_xattr.py
diff --git a/extras/why.py b/waflib/extras/why.py
index 1bb941f..1bb941f 100644
--- a/extras/why.py
+++ b/waflib/extras/why.py
diff --git a/extras/win32_opts.py b/waflib/extras/win32_opts.py
index 9f7443c..9f7443c 100644
--- a/extras/win32_opts.py
+++ b/waflib/extras/win32_opts.py
diff --git a/extras/wix.py b/waflib/extras/wix.py
index d87bfbb..d87bfbb 100644
--- a/extras/wix.py
+++ b/waflib/extras/wix.py
diff --git a/extras/xcode6.py b/waflib/extras/xcode6.py
index 91bbff1..91bbff1 100644
--- a/extras/xcode6.py
+++ b/waflib/extras/xcode6.py
diff --git a/fixpy2.py b/waflib/fixpy2.py
index 24176e0..24176e0 100644
--- a/fixpy2.py
+++ b/waflib/fixpy2.py
diff --git a/processor.py b/waflib/processor.py
index 2eecf3b..2eecf3b 100755
--- a/processor.py
+++ b/waflib/processor.py
diff --git a/waflib/waf b/waflib/waf
new file mode 100755
index 0000000..e22930a
--- /dev/null
+++ b/waflib/waf
@@ -0,0 +1,16 @@
+#!/usr/bin/env python
+
+# Minimal waf script for projects that include waflib directly
+
+from waflib import Context, Scripting
+
+import inspect
+import os
+
+def main():
+ script_path = os.path.abspath(inspect.getfile(inspect.getmodule(main)))
+ project_path = os.path.dirname(script_path)
+ Scripting.waf_entry_point(os.getcwd(), Context.WAFVERSION, project_path)
+
+if __name__ == '__main__':
+ main()
diff --git a/wscript b/wscript
new file mode 100644
index 0000000..82279b4
--- /dev/null
+++ b/wscript
@@ -0,0 +1,101 @@
+#!/usr/bin/env python
+
+import os
+import shutil
+
+from waflib.extras import autowaf
+
+# Version of this package (even if built as a child)
+FOMP_VERSION = '1.1.0'
+
+# Mandatory waf variables
+APPNAME = 'fomp' # Package name for waf dist
+VERSION = FOMP_VERSION # Package version for waf dist
+top = '.' # Source directory
+out = 'build' # Build directory
+
+def options(opt):
+ opt.load('compiler_cxx')
+ opt.load('lv2')
+ autowaf.set_options(opt)
+
+def configure(conf):
+ autowaf.display_header('Fomp.LV2 Configuration')
+ conf.load('compiler_cxx', cache=True)
+ conf.load('lv2', cache=True)
+ conf.load('autowaf', cache=True)
+ autowaf.set_c_lang(conf, 'c99')
+
+ autowaf.check_pkg(conf, 'lv2', atleast_version='1.0.0', uselib_store='LV2')
+
+ # Set env.pluginlib_PATTERN
+ pat = conf.env.cxxshlib_PATTERN
+ if pat[0:3] == 'lib':
+ pat = pat[3:]
+ conf.env.pluginlib_PATTERN = pat
+ conf.env.pluginlib_EXT = pat[pat.rfind('.'):]
+
+ autowaf.display_summary(conf, {'LV2 bundle directory': conf.env.LV2DIR})
+
+def build_plugin(bld, lang, bundle, name, source, defines=None):
+ # Build plugin library
+ penv = bld.env.derive()
+ penv.cxxshlib_PATTERN = bld.env.pluginlib_PATTERN
+ obj = bld(features = '%s %sshlib' % (lang,lang),
+ env = penv,
+ source = source,
+ includes = ['.', 'src/include'],
+ name = name,
+ target = os.path.join(bundle, name),
+ uselib = ['LV2'],
+ install_path = '${LV2DIR}/' + bundle)
+ if defines != None:
+ obj.defines = defines
+
+def build(bld):
+ # Copy data files to build bundle (build/fomp.lv2)
+ def do_copy(task):
+ src = task.inputs[0].abspath()
+ tgt = task.outputs[0].abspath()
+ return shutil.copy(src, tgt)
+
+ for i in bld.path.ant_glob('fomp.lv2/*.ttl'):
+ bld(features = 'subst',
+ is_copy = True,
+ source = i,
+ target = 'fomp.lv2/%s' % i.name,
+ install_path = '${LV2DIR}/fomp.lv2')
+
+ bld(features = 'subst',
+ source = 'fomp.lv2/manifest.ttl.in',
+ target = 'fomp.lv2/manifest.ttl',
+ LIB_EXT = bld.env.pluginlib_EXT,
+ install_path = '${LV2DIR}/fomp.lv2')
+
+ plugins = ['autowah',
+ 'blvco',
+ 'cs_chorus',
+ 'cs_phaser',
+ 'filters',
+ 'mvchpf24',
+ 'mvclpf24']
+ for i in plugins:
+ build_plugin(bld, 'cxx', 'fomp.lv2', i,
+ ['src/%s.cc' % i,
+ 'src/%s_lv2.cc' % i])
+ build_plugin(bld, 'cxx', 'fomp.lv2', 'reverbs',
+ ['src/reverbs.cc',
+ 'src/pareq.cc',
+ 'src/zreverb.cc',
+ 'src/reverbs_lv2.cc'])
+
+def posts(ctx):
+ path = str(ctx.path.abspath())
+ autowaf.news_to_posts(
+ os.path.join(path, 'NEWS'),
+ {'title' : 'Fomp.LV2',
+ 'description' : autowaf.get_blurb(os.path.join(path, 'README')),
+ 'dist_pattern' : 'http://download.drobilla.net/fomp-lv2-%s.tar.bz2'},
+ { 'Author' : 'drobilla',
+ 'Tags' : 'LV2, Fomp.lv2' },
+ os.path.join(out, 'posts'))