commit ladspa for openSUSE:Factory
Hello community, here is the log from the commit of package ladspa for openSUSE:Factory checked in at Sat Apr 3 00:20:57 CEST 2010. -------- --- ladspa/ladspa-devel.changes 2008-02-13 13:49:03.000000000 +0100 +++ /mounts/work_src_done/STABLE/ladspa/ladspa-devel.changes 2010-01-21 08:26:21.000000000 +0100 @@ -1,0 +2,5 @@ +Thu Jan 21 07:27:40 UTC 2010 - davejplater@gmail.com + +- Update to 1.13 + +------------------------------------------------------------------- --- ladspa/ladspa.changes 2009-11-25 15:53:16.000000000 +0100 +++ /mounts/work_src_done/STABLE/ladspa/ladspa.changes 2010-03-22 06:17:02.000000000 +0100 @@ -1,0 +2,34 @@ +Mon Mar 22 05:12:28 UTC 2010 - davejplater@gmail.com + +- Add swh-configure-2.65.patch for autoconf-2.65 build + +------------------------------------------------------------------- +Tue Jan 26 07:21:56 UTC 2010 - davejplater@gmail.com + +- Fixed swt lib build with swh-liblo.dif & swh-configure.patch + +------------------------------------------------------------------- +Fri Jan 22 08:52:05 UTC 2010 - davejplater@gmail.com + +- Update plugins to AMB-plugins-0.6.1, FIL-plugins-0.3.0, + MCP-plugins-0.4.0, caps_0.4.4, pvoc_0.1.12, tap-plugins-0.7.1 and + vocoder-ladspa-0.3. +- Fix tap-type-punning-fix.dif + +------------------------------------------------------------------- +Thu Jan 21 07:00:52 UTC 2010 - davejplater@gmail.com + +- Update to ladspa-1.13 +- Removed ladspa_sdk-compile-fix.diff and adapted ladspa.dif +- Moved examples directory to {_docdir}/{name}/examples +- Updated "License: LGPL2.1+" +- Version 1.13 - 6 Nov 2007 + + • Fix compile error in sine.cpp (GCC4). + • Fix typo in text output by analyseplugin. + • Extra usage text in analyseplugin and applyplugin. + • Replace strdup() with localStrdup() in sine.cpp to avoid malloc/new + mismatch. + • Remove "local" part from install directories. + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- AMB-plugins-0.0.1.tar.bz2 FIL-plugins-0.0.1.tar.bz2 MCP-plugins-0.3.0.tar.bz2 caps_0.4.2.tar.bz2 ladspa_sdk-compile-fix.diff ladspa_sdk_1.12.tar.bz2 pvoc-0.1.10-gcc4-fix.diff pvoc_0.1.10.tar.bz2 tap-plugins-0.7.0.tar.bz2 vocoder-ladspa-0.2.tar.bz2 New: ---- AMB-plugins-0.6.1.tar.bz2 FIL-plugins-0.3.0.tar.bz2 MCP-plugins-0.4.0.tar.bz2 caps_0.4.4.tar.bz2 ladspa_sdk_1.13.tar.bz2 pvoc_0.1.12.tar.bz2 swh-configure-2.65.patch swh-configure.patch swh-libblo.dif tap-plugins-0.7.1.tar.bz2 vocoder-ladspa-0.3.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ladspa-devel.spec ++++++ --- /var/tmp/diff_new_pack.RKtF0t/_old 2010-04-03 00:20:43.000000000 +0200 +++ /var/tmp/diff_new_pack.RKtF0t/_new 2010-04-03 00:20:43.000000000 +0200 @@ -1,7 +1,7 @@ # -# spec file for package ladspa-devel (Version 1.12.code10.3) +# spec file for package ladspa-devel (Version 1.13) # -# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,15 +19,16 @@ Name: ladspa-devel -Summary: Include Files mandatory for Development. -Version: 1.12.code10.3 -Release: 106 -License: GPLv2+ +Summary: Include Files mandatory for Development +Version: 1.13 +Release: 1 +License: LGPLv2.1+ Group: Development/Libraries/C and C++ -Source: ladspa_sdk_1.12.tar.bz2 +Source: ladspa_sdk_1.13.tar.bz2 Url: http://www.ladspa.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch +Provides: ladspa-devel > 1.12.code10.3.1 %description This package contains include files to develop LADSPA plugins. ++++++ ladspa.spec ++++++ --- /var/tmp/diff_new_pack.RKtF0t/_old 2010-04-03 00:20:43.000000000 +0200 +++ /var/tmp/diff_new_pack.RKtF0t/_new 2010-04-03 00:20:43.000000000 +0200 @@ -1,7 +1,7 @@ # -# spec file for package ladspa (Version 1.12.code10.3.1) +# spec file for package ladspa (Version 1.13) # -# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,31 +19,32 @@ Name: ladspa -BuildRequires: fdupes fftw-devel fftw3-devel flac-devel gcc-c++ ladspa-devel libsndfile-devel pkgconfig -%define swh_version 0.4.15 -%define vocoder_version 0.2 +BuildRequires: fdupes fftw-devel fftw3-devel flac-devel gcc-c++ ladspa-devel libsndfile-devel pkgconfig xorg-x11-util-devel +%define AMB_version 0.6.1 +%define FIL_version 0.3.0 +%define MCP_version 0.4.0 +%define REV_version 0.3.1 +%define VCO_version 0.3.0 %define alienwah_version 1.13 -%define sooperlooper_version 0.93 +%define blepvco_version 0.1.0 %define blop_version 0.2.8 +%define caps_version 0.4.4 +%define pvoc_version 0.1.12 +%define sooperlooper_version 0.93 +%define swh_version 0.4.15 +%define tap_version 0.7.1 %define vcf_version 0.0.5 %define vlevel_version 0.5 -%define MCP_version 0.3.0 -%define REV_version 0.3.1 -%define VCO_version 0.3.0 -%define FIL_version 0.0.1 -%define AMB_version 0.0.1 -%define tap_version 0.7.0 -%define caps_version 0.4.2 -%define pvoc_version 0.1.10 -%define blepvco_version 0.1.0 +%define vocoder_version 0.3 Summary: The Linux Audio Developer's Simple Plug-In API -Version: 1.12.code10.3.1 -Release: 120 -License: GPLv2+ +Version: 1.13 +Release: 1 +License: LGPLv2.1+ Group: Development/Libraries/C and C++ AutoReq: on Autoprov: off -Source1: ladspa_sdk_1.12.tar.bz2 +Provides: ladspa > 1.12.code10.3.1 +Source1: ladspa_sdk_1.13.tar.bz2 Source2: cmt_src_1.15.tar.bz2 Source3: swh-plugins-%{swh_version}.tar.bz2 Source4: ladspa-swh.tex @@ -86,8 +87,13 @@ Patch16: pvoc-compile-fix.dif Patch17: swh-0.4.13-gcc4-fix.diff Patch18: sooperlooper-0.93-gcc4-fix.diff -Patch20: pvoc-0.1.10-gcc4-fix.diff -Patch21: ladspa_sdk-compile-fix.diff +Patch20: swh-libblo.dif +# swh-configure.patch changes for >= autoconf-2.65 in openSUSE 11.3 +%if %suse_version <= 1120 +Patch21: swh-configure.patch +%else +Patch21: swh-configure-2.65.patch +%endif Patch22: alienwah-compile-fix.diff Patch23: alienwah-float_complex.diff Patch25: pvoc-0.1.10-depend-copts-fix.diff @@ -129,14 +135,16 @@ # %setup -q -c -n ladspa -T -a 1 -a 2 -a 3 -a 6 -a 7 -a 8 -a 9 -a 10 -a 11 -a 12 -a 13 -a 14 -a 15 -a 16 -a 17 -a 18 -a 19 -a 20 -a 21 -a 22 -a 23 -a 24 %patch -(cd ladspa_sdk -%patch21 -) (cd swh-plugins-%{swh_version} %patch1 %patch15 %patch17 %patch26 -p1 +%patch20 -p1 +touch config.rpath +./autogen.sh --prefix=%{_prefix} +%{?suse_update_config:%{suse_update_config -f}} +%patch21 -p 1 ) (cd cmt %patch2 @@ -153,6 +161,7 @@ %patch6 %patch27 %patch28 +%{?suse_update_config:%{suse_update_config -f}} ) (cd vcf-%{vcf_version} %patch7 @@ -180,11 +189,8 @@ ) (cd pvoc-%{pvoc_version} %patch16 -%patch20 %patch25 ) -# (cd caps-%{caps_version} -# ) %build # This package failed when testing with -Wl,-as-needed being default. @@ -192,98 +198,101 @@ export SUSE_ASNEEDED=0 # LADSPA SDK cd ladspa_sdk/src -make CFLAGS="$RPM_OPT_FLAGS -fPIC" targets +make CFLAGS="$RPM_OPT_FLAGS -fPIC -ggdb" targets cd ../.. # CMT cd cmt/src -make CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -fPIC" targets +make CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -fPIC -ggdb" targets cd ../.. # SWH plugins cd swh-plugins-%{swh_version} +%if %suse_version <= 1100 autoreconf --install --force -CFLAGS="$RPM_OPT_FLAGS -fPIC -DPIC -fno-strict-aliasing" \ +%endif +#./autogen.sh --prefix=%{_prefix} --libdir=%{_libdir} +CFLAGS="$RPM_OPT_FLAGS -fPIC -ggdb -DPIC -fno-strict-aliasing" \ ./configure --prefix=%{_prefix} -make CFLAGS="$RPM_OPT_FLAGS -fPIC -DPIC -fno-strict-aliasing" +make CFLAGS="$RPM_OPT_FLAGS -fPIC -ggdb -DPIC -fno-strict-aliasing" cd .. # Vocoder cd vocoder-%{vocoder_version} -make CFLAGS="$RPM_OPT_FLAGS -fPIC" +make CFLAGS="$RPM_OPT_FLAGS -fPIC -ggdb" cd .. # Alien Wah cd alienwah-%{alienwah_version} -make CFLAGS="$RPM_OPT_FLAGS -fPIC" +make CFLAGS="$RPM_OPT_FLAGS -fPIC -ggdb" cd .. # Sooperlooper cd sooperlooper-%{sooperlooper_version} -make CFLAGS="$RPM_OPT_FLAGS -fPIC" +make CFLAGS="$RPM_OPT_FLAGS -fPIC -ggdb" cd .. # Blop cd blop-%{blop_version} -autoreconf --install --force +#autoreconf --install --force ./configure --prefix=%{_prefix} \ --with-ladspa-plugin-dir=%{_libdir}/ladspa -make CFLAGS="$RPM_OPT_FLAGS -DNO_DEBUG -DPIC -fPIC" +make CFLAGS="$RPM_OPT_FLAGS -DNO_DEBUG -DPIC -fPIC -ggdb" cd .. # VCF cd vcf-%{vcf_version} -make CFLAGS="$RPM_OPT_FLAGS -fPIC" +make CFLAGS="$RPM_OPT_FLAGS -fPIC -ggdb" cd .. # unmatched cd unmatched -make CFLAGS="$RPM_OPT_FLAGS -fPIC" +make CFLAGS="$RPM_OPT_FLAGS -fPIC -ggdb" cd .. # matched cd matched -make CFLAGS="$RPM_OPT_FLAGS -fPIC" +make CFLAGS="$RPM_OPT_FLAGS -fPIC -ggdb" cd .. # preamp cd preamp -make CFLAGS="$RPM_OPT_FLAGS -fPIC -fno-strict-aliasing" \ - CXXFLAGS="$RPM_OPT_FLAGS -fPIC -fno-strict-aliasing" +make CFLAGS="$RPM_OPT_FLAGS -fPIC -ggdb -fno-strict-aliasing" \ + CXXFLAGS="$RPM_OPT_FLAGS -fPIC -ggdb -fno-strict-aliasing" cd .. # MCP plugins cd MCP-plugins-%{MCP_version} -make CXXFLAGS="$RPM_OPT_FLAGS -fPIC" +make CXXFLAGS="$RPM_OPT_FLAGS -fPIC -ggdb" cd .. # REV plugins cd REV-plugins-%{REV_version} -make CXXFLAGS="$RPM_OPT_FLAGS -fPIC" +make CXXFLAGS="$RPM_OPT_FLAGS -fPIC -ggdb" cd .. # VCO plugins cd VCO-plugins-%{VCO_version} -make CXXFLAGS="$RPM_OPT_FLAGS -fPIC" +make CXXFLAGS="$RPM_OPT_FLAGS -fPIC -ggdb" cd .. # vlevel cd vlevel-%{vlevel_version} -make CXXFLAGS="$RPM_OPT_FLAGS -fPIC" +make CXXFLAGS="$RPM_OPT_FLAGS -fPIC -ggdb" cd .. # tap-plugins cd tap-plugins-%{tap_version} -make CFLAGS="$RPM_OPT_FLAGS -fPIC -c" +make CFLAGS="$RPM_OPT_FLAGS -fPIC -ggdb -c" cd .. # super-60 cd super-60 -make CFLAGS="$RPM_OPT_FLAGS -fPIC" +make CFLAGS="$RPM_OPT_FLAGS -ggdb -fPIC" cd .. # caps cd caps-%{caps_version} -make CFLAGS="$RPM_OPT_FLAGS -fPIC" +make CFLAGS="$RPM_OPT_FLAGS -ggdb -fPIC" cd .. # FIL plugins cd FIL-plugins-%{FIL_version} -make CXXFLAGS="$RPM_OPT_FLAGS -fPIC" +make CXXFLAGS="$RPM_OPT_FLAGS -ggdb -fPIC" cd .. # AMB plugins cd AMB-plugins-%{AMB_version} -make CXXFLAGS="$RPM_OPT_FLAGS -fPIC" +make CXXFLAGS="$RPM_OPT_FLAGS -ggdb -fPIC" cd .. # pvoc plugins cd pvoc-%{pvoc_version} -make OPTS="$RPM_OPT_FLAGS -fPIC" +make OPTS="$RPM_OPT_FLAGS -ggdb -fPIC" cd .. # blepvco cd blepvco-%{blepvco_version} -make CPPFLAGS="$RPM_OPT_FLAGS -fPIC" +make CPPFLAGS="$RPM_OPT_FLAGS -ggdb -fPIC" cd .. %install @@ -333,7 +342,8 @@ mkdir -p "$RPM_BUILD_ROOT"%{_bindir} install -c -m 755 vlevel-%{vlevel_version}/vlevel-bin "$RPM_BUILD_ROOT"%{_bindir} # additional RDF files -cp %{SOURCE30} $RPM_BUILD_ROOT%{_datadir}/ladspa/rdf +mkdir -p $RPM_BUILD_ROOT%{_datadir}/ladspa/rdf +cp -p %{SOURCE30} $RPM_BUILD_ROOT%{_datadir}/ladspa/rdf cp tap-plugins-%{tap_version}/*.rdf $RPM_BUILD_ROOT%{_datadir}/ladspa/rdf # install documents mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}/{cmt,swh,vcf} @@ -373,8 +383,8 @@ cp %{SOURCE4} %{SOURCE5} $RPM_BUILD_ROOT%{_docdir}/%{name}/swh cp %{SOURCE50} $RPM_BUILD_ROOT%{_docdir}/%{name}/vcf cp -av vlevel-%{vlevel_version}/docs $RPM_BUILD_ROOT%{_docdir}/%{name}/vlevel -mkdir -p $RPM_BUILD_ROOT%{_docdir}/examples/vlevel -cp -av vlevel-%{vlevel_version}/utils/* $RPM_BUILD_ROOT%{_docdir}/examples/vlevel +mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}/examples/vlevel +cp -av vlevel-%{vlevel_version}/utils/* $RPM_BUILD_ROOT%{_docdir}/%{name}/examples/vlevel chmod 644 $RPM_BUILD_ROOT%{_docdir}/%{name}/cmt/plugins.html # remove incldue file (already in devel package) rm -f $RPM_BUILD_ROOT%{_includedir}/* @@ -387,7 +397,7 @@ %files -f %{name}.lang %defattr(-,root,root) %doc %{_docdir}/%{name} -%doc %{_docdir}/examples +%doc %{_docdir}/%{name}/examples %{_libdir}/ladspa %{_bindir}/* %{_datadir}/ladspa ++++++ AMB-plugins-0.0.1.tar.bz2 -> AMB-plugins-0.6.1.tar.bz2 ++++++ ++++ 5640 lines of diff (skipped) ++++++ FIL-plugins-0.0.1.tar.bz2 -> FIL-plugins-0.3.0.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/FIL-plugins-0.0.1/AUTHORS new/FIL-plugins-0.3.0/AUTHORS --- old/FIL-plugins-0.0.1/AUTHORS 2004-05-09 23:54:24.000000000 +0200 +++ new/FIL-plugins-0.3.0/AUTHORS 2009-06-09 22:13:39.000000000 +0200 @@ -1 +1 @@ -Fons Adriaensen <fons.adriaensen@skynet.be> +Fons Adriaensen <fons@kokkinizita.net> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/FIL-plugins-0.0.1/Makefile new/FIL-plugins-0.3.0/Makefile --- old/FIL-plugins-0.0.1/Makefile 2004-05-08 23:25:51.000000000 +0200 +++ new/FIL-plugins-0.3.0/Makefile 2009-06-09 22:13:12.000000000 +0200 @@ -1,3 +1,19 @@ +# 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. + CPPFLAGS += -I. -fPIC -D_REENTRANT -Wall -O3 @@ -11,17 +27,9 @@ filters.o: ladspaplugin.h filters.h filters_if.o: ladspaplugin.h filters.h - -install: +install: all cp *.so /usr/lib/ladspa - -DIR := $(shell basename `pwd`) - -archive: clean - cd ..; /bin/rm -f $(DIR).tar.bz2; tar cvf $(DIR).tar $(DIR); bzip2 $(DIR).tar - - clean: /bin/rm -f *~ *.o *.so diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/FIL-plugins-0.0.1/exp2ap.cc new/FIL-plugins-0.3.0/exp2ap.cc --- old/FIL-plugins-0.0.1/exp2ap.cc 2003-12-01 21:18:18.000000000 +0100 +++ new/FIL-plugins-0.3.0/exp2ap.cc 2009-06-09 22:12:14.000000000 +0200 @@ -1,3 +1,22 @@ +/* + 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 <math.h> @@ -5,10 +24,9 @@ { int i; - i = (int)(floor (x)); + i = (int)(floorf (x)); x -= i; -// return ldexp (1 + x * (0.66 + 0.34 * x), i); - return ldexp (1 + x * (0.6930 + x * (0.2416 + x * (0.0517 + x * 0.0137))), i); + return ldexpf (1 + x * (0.6930f + x * (0.2416f + x * (0.0517f + x * 0.0137f))), i); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/FIL-plugins-0.0.1/filters.cc new/FIL-plugins-0.3.0/filters.cc --- old/FIL-plugins-0.0.1/filters.cc 2004-05-11 23:39:42.000000000 +0200 +++ new/FIL-plugins-0.3.0/filters.cc 2009-06-09 22:10:59.000000000 +0200 @@ -1,5 +1,5 @@ /* - Copyright (C) 2004 Fons Adriaensen + 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 @@ -46,7 +46,7 @@ int i, j, k; float *aip = _port [AIP]; float *aop = _port [AOP]; - float *p, sig [32]; + float *p, sig [48]; float t, g, d; float fgain; float sfreq [NSECT]; @@ -61,7 +61,7 @@ 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]) sgain [j] = exp2ap (0.1661 * _port [SECT + 4 * j + Paramsect::GAIN][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; } @@ -86,7 +86,7 @@ j = _fade; g = j / 16.0; p = 0; - if (_port [FILT][0]) + if (_port [FILT][0] > 0) { if (j == 16) p = sig; else ++j; @@ -113,5 +113,3 @@ } } - - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/FIL-plugins-0.0.1/filters.h new/FIL-plugins-0.3.0/filters.h --- old/FIL-plugins-0.0.1/filters.h 2004-05-11 23:38:20.000000000 +0200 +++ new/FIL-plugins-0.3.0/filters.h 2009-06-09 22:10:49.000000000 +0200 @@ -1,5 +1,5 @@ /* - Copyright (C) 2004 Fons Adriaensen + 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 @@ -32,44 +32,57 @@ void init (void) { - _f = 0.25; - _b = _g = 1.0; - _a = _s1 = _s2 = _z1 = _z2 = 0.0; + _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; - if (f < 0.5 * _f) f = 0.5 * _f; - else if (f > 2.0 * _f) f = 2.0 * _f; 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 = -cos (2 * M_PI * f); + _s1 = -cosf (6.283185f * f); d1 = (_s1 - s1) / k; + u2 = true; } - if (g < 0.5 * _g) g = 0.5 * _g; - else if (g > 2.0 * _g) g = 2.0 * _g; - a = _a; - da = 0; 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.5 * (g - 1.0); + _a = 0.5f * (g - 1.0f); da = (_a - a) / k; + u2 = true; } - if (b < 0.5 * _b) b = 0.5 * _b; - else if (b > 2.0 * _b) b = 2.0 * _b; - _b = b; - b *= 4 * f; - s2 = _s2; - _s2 = (1 + _a - b) / (1 + _a + b); - d2 = (_s2 - s2) / k; + 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--) { @@ -81,7 +94,7 @@ *sig++ -= a * (_z2 + s2 * y - x); y -= s1 * _z1; _z2 = _z1 + s1 * y; - _z1 = y + 1e-10; + _z1 = y + 1e-10f; } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/FIL-plugins-0.0.1/filters_if.cc new/FIL-plugins-0.3.0/filters_if.cc --- old/FIL-plugins-0.0.1/filters_if.cc 2004-05-09 15:34:10.000000000 +0200 +++ new/FIL-plugins-0.3.0/filters_if.cc 2009-06-09 22:11:09.000000000 +0200 @@ -1,5 +1,5 @@ /* - Copyright (C) 2004 Fons Adriaensen + 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 @@ -23,10 +23,10 @@ #include "filters.h" #define NMODS 1 -#define VERSION "0.0.1" +#define VERSION "0.3.0" -static const char* maker = "Fons Adriaensen <fons.adriaensen@alcatel.be>"; +static const char* maker = "Fons Adriaensen <fons@kokkinizita.net>"; static const char* copyr = "GPL"; @@ -103,6 +103,7 @@ LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL }; + static const char * const pname0 [Ladspa_Paramfilt::NPORT] = { "Input", @@ -127,27 +128,28 @@ "Gain 4" }; + static const LADSPA_PortRangeHint phint0 [Ladspa_Paramfilt::NPORT] = { { 0, 0, 0 }, { 0, 0, 0 }, - { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_INTEGER | LADSPA_HINT_TOGGLED, 0, 1 }, + { LADSPA_HINT_TOGGLED | LADSPA_HINT_DEFAULT_0, 0, 1 }, { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_DEFAULT_0, -20, 20 }, - { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_INTEGER | LADSPA_HINT_TOGGLED, 0, 1 }, - { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_LOGARITHMIC | LADSPA_HINT_DEFAULT_MIDDLE, 20, 2e3 }, - { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_LOGARITHMIC | LADSPA_HINT_DEFAULT_1, 0.125, 8 }, + { LADSPA_HINT_TOGGLED | LADSPA_HINT_DEFAULT_0, 0, 1 }, + { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_LOGARITHMIC | LADSPA_HINT_DEFAULT_MIDDLE, 2e1f, 2e3f }, + { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_LOGARITHMIC | LADSPA_HINT_DEFAULT_1, 0.125f, 8.0f }, { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_DEFAULT_0, -20, 20 }, - { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_INTEGER | LADSPA_HINT_TOGGLED, 0, 1 }, - { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_LOGARITHMIC | LADSPA_HINT_DEFAULT_MIDDLE, 40, 4e3 }, - { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_LOGARITHMIC | LADSPA_HINT_DEFAULT_1, 0.125, 8 }, + { LADSPA_HINT_TOGGLED | LADSPA_HINT_DEFAULT_0, 0, 1 }, + { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_LOGARITHMIC | LADSPA_HINT_DEFAULT_MIDDLE, 4e1f, 4e3f }, + { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_LOGARITHMIC | LADSPA_HINT_DEFAULT_1, 0.125f, 8.0f }, { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_DEFAULT_0, -20, 20 }, - { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_INTEGER | LADSPA_HINT_TOGGLED, 0, 1 }, - { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_LOGARITHMIC | LADSPA_HINT_DEFAULT_MIDDLE, 100, 10e3 }, - { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_LOGARITHMIC | LADSPA_HINT_DEFAULT_1, 0.125, 8 }, + { LADSPA_HINT_TOGGLED | LADSPA_HINT_DEFAULT_0, 0, 1 }, + { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_LOGARITHMIC | LADSPA_HINT_DEFAULT_MIDDLE, 1e2f, 1e4f }, + { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_LOGARITHMIC | LADSPA_HINT_DEFAULT_1, 0.125f, 8.0f }, { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_DEFAULT_0, -20, 20 }, - { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_INTEGER | LADSPA_HINT_TOGGLED, 0, 1 }, - { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_LOGARITHMIC | LADSPA_HINT_DEFAULT_MIDDLE, 200, 20e3 }, - { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_LOGARITHMIC | LADSPA_HINT_DEFAULT_1, 0.125, 8 }, + { LADSPA_HINT_TOGGLED | LADSPA_HINT_DEFAULT_0, 0, 1 }, + { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_LOGARITHMIC | LADSPA_HINT_DEFAULT_MIDDLE, 2e2f, 2e4f }, + { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_LOGARITHMIC | LADSPA_HINT_DEFAULT_1, 0.125f, 8.0f }, { LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_DEFAULT_0, -20, 20 } }; @@ -177,6 +179,7 @@ } }; + extern "C" const LADSPA_Descriptor *ladspa_descriptor (unsigned long i) { if (i >= NMODS) return 0; ++++++ MCP-plugins-0.3.0.tar.bz2 -> MCP-plugins-0.4.0.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCP-plugins-0.3.0/AUTHORS new/MCP-plugins-0.4.0/AUTHORS --- old/MCP-plugins-0.3.0/AUTHORS 2003-12-01 21:18:18.000000000 +0100 +++ new/MCP-plugins-0.4.0/AUTHORS 2007-08-27 18:27:12.000000000 +0200 @@ -1 +1 @@ -Fons Adriaensen <fons.adriaensen@alcatel.be> +Fons Adriaensen <fons@kokkinizita.net> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCP-plugins-0.3.0/Makefile new/MCP-plugins-0.4.0/Makefile --- old/MCP-plugins-0.3.0/Makefile 2004-03-12 21:56:29.000000000 +0100 +++ new/MCP-plugins-0.4.0/Makefile 2008-04-05 20:05:45.000000000 +0200 @@ -1,4 +1,21 @@ -CPPFLAGS += -I. -fPIC -D_REENTRANT -Wall -O4 +# 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. + + +CPPFLAGS += -I. -fPIC -D_REENTRANT -Wall -O3 all: mvclpf24.so mvchpf24.so cs_phaser.so cs_chorus.so @@ -32,14 +49,14 @@ cs_chorus_if.o: ladspaplugin.h cs_chorus.h -install: +install: all cp *.so /usr/lib/ladspa DIR := $(shell basename `pwd`) archive: clean - cd ..; /bin/rm -f $(DIR).tar.bz2; tar cvf $(DIR).tar $(DIR); bzip2 $(DIR).tar + cd ..; /bin/rm -f $(DIR).tar.bz2; tar cvjf $(DIR).tar.bz2 $(DIR) clean: /bin/rm -f *~ *.o *.so diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCP-plugins-0.3.0/README new/MCP-plugins-0.4.0/README --- old/MCP-plugins-0.3.0/README 2004-04-09 22:01:05.000000000 +0200 +++ new/MCP-plugins-0.4.0/README 2008-04-05 20:00:38.000000000 +0200 @@ -1,6 +1,6 @@ ----------------------------------------------------------------------------------- - Copyright (C) 2003 Fons Adriaensen + 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 @@ -20,6 +20,12 @@ -------------------------------------------- +cs_phaser.so -- version 0.4.0 - 5/4/2008 +-------------------------------------------- + +Code cleanup. + +-------------------------------------------- cs_phaser.so -- version 0.3.0 - 10/4/2004 -------------------------------------------- @@ -47,6 +53,15 @@ -------------------------------------------- +cs_chorus.so -- version 0.4.0 - 5/4/2008 +-------------------------------------------- + +Code cleanup and triple output version added. +The third one is as the second, but has three +separate outputs. Pan L,C,R for a nice stereo +effect. + +-------------------------------------------- cs_chorus.so -- version 0.3.0 - 10/4/2004 -------------------------------------------- -------------------------------------------- @@ -58,12 +73,19 @@ 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. -The two versions are functionally identical. The second one upsamples +The two plugins are functionally identical. The second one upsamples the input to the delay lines in an attempt to mitigate the errors produced by the linear interpolation at the output. If you hear any difference please let me know which one you prefer. + +-------------------------------------------- +mvclpf24.so -- version 0.4.0 - 5/4/2008 +-------------------------------------------- + +Code cleanup. + -------------------------------------------- mvclpf24.so -- version 0.3.0 - 10/4/2004 -------------------------------------------- @@ -160,6 +182,12 @@ -------------------------------------------- +mvclpf24.so -- version 0.4.0 - 5/4/2008 +-------------------------------------------- + +Code cleanup. + +-------------------------------------------- mvchpf24.so -- First release - 10/4/2004 -------------------------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCP-plugins-0.3.0/cs_chorus.cc new/MCP-plugins-0.4.0/cs_chorus.cc --- old/MCP-plugins-0.3.0/cs_chorus.cc 2003-12-06 22:27:49.000000000 +0100 +++ new/MCP-plugins-0.4.0/cs_chorus.cc 2008-04-05 20:02:00.000000000 +0200 @@ -1,5 +1,5 @@ /* - Copyright (C) 2003 Fons Adriaensen + 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 @@ -64,8 +64,8 @@ int j; float *p0, *p1; float t, x, y; - p0 = _port [0]; - p1 = _port [1]; + p0 = _port [INPUT]; + p1 = _port [OUTPUT]; wi = _wi; do @@ -74,33 +74,33 @@ { _gi = 64; - t = 402.12 * _port [3][0] / _fsam; + t = 402.12f * _port [FREQ1][0] / _fsam; x = _x1 - t * _y1; y = _y1 + t * _x1; - t = sqrt (x * x + y * y); + t = sqrtf (x * x + y * y); _x1 = x / t; _y1 = y / t; - t = 402.12 * _port [5][0] / _fsam; + t = 402.12f * _port [FREQ2][0] / _fsam; x = _x2 - t * _y2; y = _y2 + t * _x2; - t = sqrt (x * x + y * y); + t = sqrtf (x * x + y * y); _x2 = x / t; _y2 = y / t; - x = _port [4][0] * _x1 + _port [6][0] * _x2; - y = _port [4][0] * _y1 + _port [6][0] * _y2; + x = _port [TMOD1][0] * _x1 + _port [TMOD2][0] * _x2; + y = _port [TMOD1][0] * _y1 + _port [TMOD2][0] * _y2; _dr [0] = x; - _dr [1] = -0.500 * x + 0.866 * y; - _dr [2] = -0.500 * x - 0.866 * y; + _dr [1] = -0.500f * x + 0.866f * y; + _dr [2] = -0.500f * x - 0.866f * y; for (j = 0; j < 3; j++) { - t = _port [2][0] + _dr [j]; + t = _port [DELAY][0] + _dr [j]; if (t < 0) t = 0; if (t > 30) t = 30; - t *= _fsam / 1000.0; + t *= _fsam / 1000.0f; _dr [j] = (t - _ri [j]) / 64; } } @@ -118,11 +118,11 @@ x = wi - _ri [j]; _ri [j] += _dr [j]; if (x < 0) x += _size; - i = (int)(floor (x)); + i = (int)(floorf (x)); x -= i; y += (1 - x) * _line [i] + x * _line [i + 1]; } - y *= 0.333; + y *= 0.333f; if (add) *p1++ += y * _gain; else *p1++ = y; @@ -180,8 +180,8 @@ float *p0, *p1; float a, b, t, x, y; - p0 = _port [0]; - p1 = _port [1]; + p0 = _port [INPUT]; + p1 = _port [OUTPUT]; wi = _wi; a = _a; @@ -192,33 +192,33 @@ { _gi = 64; - t = 402.12 * _port [3][0] / _fsam; + t = 402.12f * _port [FREQ1][0] / _fsam; x = _x1 - t * _y1; y = _y1 + t * _x1; - t = sqrt (x * x + y * y); + t = sqrtf (x * x + y * y); _x1 = x / t; _y1 = y / t; - t = 402.12 * _port [5][0] / _fsam; + t = 402.12f * _port [FREQ2][0] / _fsam; x = _x2 - t * _y2; y = _y2 + t * _x2; - t = sqrt (x * x + y * y); + t = sqrtf (x * x + y * y); _x2 = x / t; _y2 = y / t; - x = _port [4][0] * _x1 + _port [6][0] * _x2; - y = _port [4][0] * _y1 + _port [6][0] * _y2; + x = _port [TMOD1][0] * _x1 + _port [TMOD2][0] * _x2; + y = _port [TMOD1][0] * _y1 + _port [TMOD2][0] * _y2; _dr [0] = x; - _dr [1] = -0.500 * x + 0.866 * y; - _dr [2] = -0.500 * x - 0.866 * y; + _dr [1] = -0.500f * x + 0.866f * y; + _dr [2] = -0.500f * x - 0.866f * y; for (j = 0; j < 3; j++) { - t = _port [2][0] + _dr [j]; + t = _port [DELAY][0] + _dr [j]; if (t < 0) t = 0; if (t > 30) t = 30; - t *= _fsam / 500.0; + t *= _fsam / 500.0f; _dr [j] = (t - _ri [j]) / 64; } } @@ -229,12 +229,12 @@ while (k--) { - x = *p0++ + 0.52 * a - 0.25 * b; - _line [++wi] = 0.5 * (x + b) + a; + x = *p0++ + 0.52f * a - 0.25f * b; + _line [++wi] = 0.5f * (x + b) + a; b = a; a = x; - x = 0.52 * a - 0.25 * b; - _line [++wi] = 0.5 * (x + b) + a; + x = 0.52f * a - 0.25f * b; + _line [++wi] = 0.5f * (x + b) + a; b = a; a = x; @@ -244,17 +244,159 @@ x = wi - _ri [j]; _ri [j] += _dr [j]; if (x < 0) x += _size; - i = (int)(floor (x)); + i = (int)(floorf (x)); x -= i; y += (1 - x) * _line [i] + x * _line [i + 1]; } - y *= 0.333; + 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 (unsigned long 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 (unsigned long port, LADSPA_Data *data) +{ + _port [port] = 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 (unsigned long 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; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCP-plugins-0.3.0/cs_chorus.h new/MCP-plugins-0.4.0/cs_chorus.h --- old/MCP-plugins-0.3.0/cs_chorus.h 2003-12-06 22:29:21.000000000 +0100 +++ new/MCP-plugins-0.4.0/cs_chorus.h 2008-04-05 20:02:09.000000000 +0200 @@ -1,6 +1,6 @@ /* - Copyright (C) 2003 Fons Adriaensen - + 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 @@ -27,7 +27,7 @@ { public: - enum { NPORT = 7 }; + enum { INPUT, OUTPUT, DELAY, FREQ1, TMOD1, FREQ2, TMOD2, NPORT }; Ladspa_CS_chorus1 (unsigned long fsam); virtual void setport (unsigned long port, LADSPA_Data *data); @@ -53,7 +53,7 @@ { public: - enum { NPORT = 7 }; + enum { INPUT, OUTPUT, DELAY, FREQ1, TMOD1, FREQ2, TMOD2, NPORT }; Ladspa_CS_chorus2 (unsigned long fsam); virtual void setport (unsigned long port, LADSPA_Data *data); @@ -75,4 +75,32 @@ float *_line; }; + +class Ladspa_CS_chorus3 : public LadspaPlugin +{ +public: + + enum { INPUT, OUTPUT1, OUTPUT2, OUTPUT3, DELAY, FREQ1, TMOD1, FREQ2, TMOD2, NPORT }; + + Ladspa_CS_chorus3 (unsigned long fsam); + virtual void setport (unsigned long port, LADSPA_Data *data); + virtual void active (bool act); + virtual void runproc (unsigned long 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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCP-plugins-0.3.0/cs_chorus_if.cc new/MCP-plugins-0.4.0/cs_chorus_if.cc --- old/MCP-plugins-0.3.0/cs_chorus_if.cc 2003-12-06 22:29:35.000000000 +0100 +++ new/MCP-plugins-0.4.0/cs_chorus_if.cc 2008-04-05 20:02:20.000000000 +0200 @@ -1,5 +1,5 @@ /* - Copyright (C) 2003 Fons Adriaensen + 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 @@ -22,11 +22,12 @@ #include "cs_chorus.h" -#define IDENT 1944 -#define NMODS 2 +#define NMODS 3 +#define VERSION "0.4.0" -static const char* maker = "Fons Adriaensen <fons.adriaensen@alcatel.be>"; -static const char* copyr = "(C) 2003 Fons Adriaensen - GNU General Public License version 2 applies"; + +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) @@ -86,7 +87,17 @@ } -static const LADSPA_PortDescriptor pdesc1 [Ladspa_CS_chorus1::NPORT] = +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, @@ -97,7 +108,7 @@ LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL }; -static const char * const pname1 [Ladspa_CS_chorus1::NPORT] = +static const char * const pname12 [Ladspa_CS_chorus1::NPORT] = { "Input", "Output", @@ -108,10 +119,50 @@ "Mod Amplitude 2 (ms)" }; -static const LADSPA_PortRangeHint phint1 [Ladspa_CS_chorus1::NPORT] = +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 }, @@ -123,16 +174,16 @@ static const LADSPA_Descriptor moddescr [NMODS] = { { - IDENT+0, + 1944, label1, LADSPA_PROPERTY_REALTIME | LADSPA_PROPERTY_HARD_RT_CAPABLE, name1, maker, copyr, Ladspa_CS_chorus1::NPORT, - pdesc1, - pname1, - phint1, + pdesc12, + pname12, + phint12, 0, instant1, pconnect, @@ -144,21 +195,42 @@ cleanup }, { - IDENT+1, + 1945, label2, LADSPA_PROPERTY_REALTIME | LADSPA_PROPERTY_HARD_RT_CAPABLE, name2, maker, copyr, - Ladspa_CS_chorus2::NPORT, - pdesc1, - pname1, - phint1, + 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, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCP-plugins-0.3.0/cs_phaser.cc new/MCP-plugins-0.4.0/cs_phaser.cc --- old/MCP-plugins-0.3.0/cs_phaser.cc 2004-03-10 00:27:30.000000000 +0100 +++ new/MCP-plugins-0.4.0/cs_phaser.cc 2008-04-05 20:02:27.000000000 +0200 @@ -1,6 +1,6 @@ /* - Copyright (C) 2003 Fons Adriaensen - + 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 @@ -56,13 +56,13 @@ p4 = _port [4] - 1; ns = (int)(floor (_port [6][0] + 0.5)); - g0 = exp2ap (0.1661 * _port [5][0]); + g0 = exp2ap (0.1661f * _port [5][0]); gf = _port [10][0]; gm = _port [11][0]; gi = 1 - fabs (gm); w = _w; - z = _z + 1e-10; + z = _z + 1e-10f; do { @@ -72,10 +72,10 @@ p4 += k; len -= k; - t = (exp2ap (_port [8][0] * *p3 + _port [7][0] + *p2 + 9.683) + _port [9][0] * *p4 * 1000) / _fsam; - if (t < 0.0) t = 0.0; - if (t > 1.5) t = 1.5; - t = (sin (t) - 1) / cos (t) + 1; + 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--) @@ -83,7 +83,7 @@ w += dw; x = g0 * *p0++; z = gf * z + x; - z = 4 * tanh (0.25 * z); + z = 4 * tanhf (0.25f * z); for (i = 0; i < ns; i++) { t = _c [i]; @@ -135,12 +135,12 @@ p1 = _port [1]; ns = (int)(floor (_port [3][0] + 0.5)); - g0 = exp2ap (0.1661 * _port [2][0]); + g0 = exp2ap (0.1661f * _port [2][0]); gf = _port [8][0]; gm = _port [9][0]; gi = 1 - fabs (gm); - z = _z + 1e-10; + z = _z + 1e-10f; w = _w; v = _v; @@ -151,14 +151,14 @@ _gi = DSUB; _p += 2 * DSUB * _port [5][0] / _fsam; if (_p > 1) _p -= 2; - x = 0.999 * _port [6][0]; + x = 0.999f * _port [6][0]; d = _p - x; - if (d < 0) t = 0.5 + d / (1 + x); - else t = 0.5 - d / (1 - x); - t = exp2ap (_port [7][0] * t + _port [4][0] + 9.683) / _fsam; - if (t < 0.0) t = 0.0; - if (t > 1.5) t = 1.5; - t = (sin (t) - 1) / cos (t) + 1; + 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; } @@ -169,7 +169,7 @@ { x = g0 * *p0++; z = gf * z + x; - z = 4 * tanh (0.25 * z); + z = 4 * tanhf (0.25f * z); for (i = 0; i < ns; i++) { t = _c [i]; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCP-plugins-0.3.0/cs_phaser.h new/MCP-plugins-0.4.0/cs_phaser.h --- old/MCP-plugins-0.3.0/cs_phaser.h 2003-12-06 22:30:26.000000000 +0100 +++ new/MCP-plugins-0.4.0/cs_phaser.h 2008-04-05 20:02:35.000000000 +0200 @@ -1,5 +1,5 @@ /* - Copyright (C) 2003 Fons Adriaensen + 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 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCP-plugins-0.3.0/cs_phaser_if.cc new/MCP-plugins-0.4.0/cs_phaser_if.cc --- old/MCP-plugins-0.3.0/cs_phaser_if.cc 2004-03-10 00:06:24.000000000 +0100 +++ new/MCP-plugins-0.4.0/cs_phaser_if.cc 2008-04-05 20:02:47.000000000 +0200 @@ -1,5 +1,5 @@ /* - Copyright (C) 2003 Fons Adriaensen + 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 @@ -22,11 +22,12 @@ #include "cs_phaser.h" -#define IDENT 1946 +#define VERSION "0.4.0" #define NMODS 2 -static const char* maker = "Fons Adriaensen <fons.adriaensen@alcatel.be>"; -static const char* copyr = "(C) 2003 Fons Adriaensen - GNU General Public License version 2 applies"; + +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) @@ -183,7 +184,7 @@ static const LADSPA_Descriptor moddescr [NMODS] = { { - IDENT+0, + 1946, label0, LADSPA_PROPERTY_REALTIME | LADSPA_PROPERTY_HARD_RT_CAPABLE, name0, @@ -204,7 +205,7 @@ cleanup }, { - IDENT+1, + 1947, label1, LADSPA_PROPERTY_REALTIME | LADSPA_PROPERTY_HARD_RT_CAPABLE, name1, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCP-plugins-0.3.0/exp2ap.cc new/MCP-plugins-0.4.0/exp2ap.cc --- old/MCP-plugins-0.3.0/exp2ap.cc 2003-12-06 22:30:51.000000000 +0100 +++ new/MCP-plugins-0.4.0/exp2ap.cc 2008-04-05 20:02:54.000000000 +0200 @@ -1,6 +1,6 @@ /* - Copyright (C) 2003 Fons Adriaensen - + 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 @@ -24,10 +24,9 @@ { int i; - i = (int)(floor (x)); + i = (int)(floorf (x)); x -= i; -// return ldexp (1 + x * (0.66 + 0.34 * x), i); - return ldexp (1 + x * (0.6930 + x * (0.2416 + x * (0.0517 + x * 0.0137))), i); + return ldexpf (1 + x * (0.6930f + x * (0.2416f + x * (0.0517f + x * 0.0137f))), i); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCP-plugins-0.3.0/ladspaplugin.h new/MCP-plugins-0.4.0/ladspaplugin.h --- old/MCP-plugins-0.3.0/ladspaplugin.h 2003-12-01 21:18:18.000000000 +0100 +++ new/MCP-plugins-0.4.0/ladspaplugin.h 2008-04-05 20:03:08.000000000 +0200 @@ -1,5 +1,5 @@ /* - Copyright (C) 2003 Fons Adriaensen + 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 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCP-plugins-0.3.0/mvchpf24.cc new/MCP-plugins-0.4.0/mvchpf24.cc --- old/MCP-plugins-0.3.0/mvchpf24.cc 2004-03-14 15:01:02.000000000 +0100 +++ new/MCP-plugins-0.4.0/mvchpf24.cc 2008-04-05 20:03:17.000000000 +0200 @@ -1,5 +1,5 @@ /* - Copyright (C) 2003 Fons Adriaensen + 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 @@ -49,8 +49,8 @@ p1 = _port [AOUT]; p2 = _port [AFREQ] - 1; p3 = _port [AFMOD] - 1; - g0 = exp2ap (0.1661 * _port [CINP][0]) / 4; - g1 = exp2ap (0.1661 * _port [COUT][0]) * 4; + g0 = exp2ap (0.1661f * _port [CINP][0]) / 4; + g1 = exp2ap (0.1661f * _port [COUT][0]) * 4; if (add) g1 *= _gain; c1 = _c1; @@ -67,7 +67,7 @@ p3 += k; len -= k; - t = _fsam / exp2ap (_port [CFMOD][0] * *p3 + *p2 + _port [CFREQ][0] + 9.2); + t = _fsam / exp2ap (_port [CFMOD][0] * *p3 + *p2 + _port [CFREQ][0] + 9.2f); if (t < 2) t = 2; dw = (t - w) / k; @@ -75,30 +75,30 @@ { w += dw; - x = y = *p0++ * g0 - 0.3 * x; + x = y = *p0++ * g0 - 0.3f * x; - d = x - c1 + 1e-10; + d = x - c1 + 1e-10f; t = d * d; d *= (1 + t) / (w + t); c1 += d; x -= c1; c1 += d; - d = x - c2 + 1e-10; + d = x - c2 + 1e-10f; t = d * d; d *= (1 + t) / (w + t); c2 += d; x -= c2; c2 += d; - d = x - c3 + 1e-10; + d = x - c3 + 1e-10f; t = d * d; d *= (1 + t) / (w + t); c3 += d; x -= c3; c3 += d; - d = x - c4 + 1e-10; + d = x - c4 + 1e-10f; t = d * d; d *= (1 + t) / (w + t); c4 += d; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCP-plugins-0.3.0/mvchpf24.h new/MCP-plugins-0.4.0/mvchpf24.h --- old/MCP-plugins-0.3.0/mvchpf24.h 2004-03-14 12:53:24.000000000 +0100 +++ new/MCP-plugins-0.4.0/mvchpf24.h 2008-04-05 20:03:27.000000000 +0200 @@ -1,5 +1,5 @@ /* - Copyright (C) 2003 Fons Adriaensen + 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 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCP-plugins-0.3.0/mvchpf24_if.cc new/MCP-plugins-0.4.0/mvchpf24_if.cc --- old/MCP-plugins-0.3.0/mvchpf24_if.cc 2004-04-09 22:01:41.000000000 +0200 +++ new/MCP-plugins-0.4.0/mvchpf24_if.cc 2008-04-05 20:03:35.000000000 +0200 @@ -1,5 +1,5 @@ /* - Copyright (C) 2003 Fons Adriaensen + 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 @@ -23,11 +23,11 @@ #include "mvchpf24.h" #define NMODS 1 -#define VERSION "0.3.0" +#define VERSION "0.4.0" -static const char* maker = "Fons Adriaensen <fons.adriaensen@skynet.be>"; -static const char* copyr = "(C) 2004 Fons Adriaensen, GNU General Public License Version 2 applies"; +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) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCP-plugins-0.3.0/mvclpf24.cc new/MCP-plugins-0.4.0/mvclpf24.cc --- old/MCP-plugins-0.3.0/mvclpf24.cc 2004-03-03 00:29:33.000000000 +0100 +++ new/MCP-plugins-0.4.0/mvclpf24.cc 2008-04-05 20:03:50.000000000 +0200 @@ -1,5 +1,5 @@ /* - Copyright (C) 2003 Fons Adriaensen + 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 @@ -44,16 +44,16 @@ float c1, c2, c3, c4, c5; float g0, g1, r, dr, w, dw, x, t; - p0 = _port [0]; - p1 = _port [1]; - p2 = _port [2] - 1; - p3 = _port [3] - 1; - p4 = _port [4] - 1; - g0 = exp2ap (0.1661 * _port [5][0]) / 4; - g1 = exp2ap (0.1661 * _port [10][0]) * 4; + 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-6; + c1 = _c1 + 1e-6f; c2 = _c2; c3 = _c3; c4 = _c4; @@ -69,16 +69,16 @@ p4 += k; len -= k; - t = exp2ap (_port [7][0] * *p3 + _port [6][0] + *p2 + 10.82) / _fsam; - if (t < 0.8) t *= 1 - 0.4 * t - 0.125 * t * t; + t = exp2ap (_port [C_FMODG][0] * *p3 + _port [C_FREQ][0] + *p2 + 10.82f) / _fsam; + if (t < 0.8f) t *= 1 - 0.4f * t - 0.125f * t * t; else { - t *= 0.6; - if (t > 0.92) t = 0.92; + t *= 0.6f; + if (t > 0.92f) t = 0.92f; } dw = (t - w) / k; - t = _port [9][0] * *p4 + _port [8][0]; + t = _port [C_RESOG][0] * *p4 + _port [C_RESO][0]; if (r > 1) r = 1; if (r < 0) r = 0; dr = (t - r) / k; @@ -87,16 +87,16 @@ { w += dw; r += dr; - x = -4.2 * r * c5 + *p0++ * g0 + 1e-10; - t = c1 / (1 + fabs (c1)); + x = -4.2 * r * c5 + *p0++ * g0 + 1e-10f; + t = c1 / (1 + fabsf (c1)); c1 += w * (x - t); - x = c1 / (1 + fabs (c1)); + 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.5 * (c4 - c5); + c5 += 0.5f * (c4 - c5); } } while (len); @@ -131,16 +131,16 @@ float c1, c2, c3, c4, c5; float g0, g1, r, dr, w, dw, x, t; - p0 = _port [0]; - p1 = _port [1]; - p2 = _port [2] - 1; - p3 = _port [3] - 1; - p4 = _port [4] - 1; - g0 = exp2ap (0.1661 * _port [5][0]) / 2; - g1 = exp2ap (0.1661 * _port [10][0]) * 2; + 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-6; + c1 = _c1 + 1e-6f; c2 = _c2; c3 = _c3; c4 = _c4; @@ -156,16 +156,16 @@ p4 += k; len -= k; - t = exp2ap (_port [7][0] * *p3 + _port [6][0] + *p2 + 10.71) / _fsam; - if (t < 0.8) t *= 1 - 0.4 * t - 0.125 * t * t; + t = exp2ap (_port [C_FMODG][0] * *p3 + _port [C_FREQ][0] + *p2 + 10.71f) / _fsam; + if (t < 0.8f) t *= 1 - 0.4f * t - 0.125f * t * t; else { - t *= 0.6; - if (t > 0.92) t = 0.92; + t *= 0.6f; + if (t > 0.92f) t = 0.92f; } dw = (t - w) / k; - t = _port [9][0] * *p4 + _port [8][0]; + t = _port [C_RESOG][0] * *p4 + _port [C_RESO][0]; if (t > 1) t = 1; if (t < 0) t = 0; dr = (t - r) / k; @@ -175,9 +175,9 @@ w += dw; r += dr; - x = -4.5 * r * c5 + *p0++ * g0 + 1e-10; -// x = tanh (x); - x /= sqrt (1 + x * x); + 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); @@ -185,7 +185,7 @@ if (add) *p1++ += g1 * (c4); else *p1++ = g1 * (c4); - c5 += 0.5 * (c4 - c5); + c5 += 0.5f * (c4 - c5); } } while (len); @@ -220,13 +220,13 @@ float c1, c2, c3, c4, c5; float g0, g1, r, dr, w, dw, x, t, d; - p0 = _port [0]; - p1 = _port [1]; - p2 = _port [2] - 1; - p3 = _port [3] - 1; - p4 = _port [4] - 1; - g0 = exp2ap (0.1661 * _port [5][0]) / 2; - g1 = exp2ap (0.1661 * _port [10][0]) * 2; + 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; @@ -245,16 +245,16 @@ p4 += k; len -= k; - t = exp2ap (_port [7][0] * *p3 + _port [6][0] + *p2 + 9.70) / _fsam; - if (t < 0.75) t *= 1.005 - t * (0.624 - t * (0.65 - t * 0.54)); + t = exp2ap (_port [C_FMODG][0] * *p3 + _port [C_FREQ][0] + *p2 + 9.70f) / _fsam; + if (t < 0.75f) t *= 1.005f - t * (0.624f - t * (0.65f - t * 0.54f)); else { - t *= 0.6748; - if (t > 0.82) t = 0.82; + t *= 0.6748f; + if (t > 0.82f) t = 0.82f; } dw = (t - w) / k; - t = _port [9][0] * *p4 + _port [8][0]; + t = _port [C_RESOG][0] * *p4 + _port [C_RESO][0]; if (t > 1) t = 1; if (t < 0) t = 0; dr = (t - r) / k; @@ -264,39 +264,39 @@ w += dw; r += dr; - x = *p0 * g0 - (4.3 - 0.2 * w) * r * c5 + 1e-10; -// x = tanh (x); - x /= sqrt (1 + x * x); + 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.77 * d; - c1 = x + 0.23 * d; + x = c1 + 0.77f * d; + c1 = x + 0.23f * d; d = w * (x - c2) / (1 + c2 * c2); - x = c2 + 0.77 * d; - c2 = x + 0.23 * d; + x = c2 + 0.77f * d; + c2 = x + 0.23f * d; d = w * (x - c3) / (1 + c3 * c3); - x = c3 + 0.77 * d; - c3 = x + 0.23 * d; + x = c3 + 0.77f * d; + c3 = x + 0.23f * d; d = w * (x - c4); - x = c4 + 0.77 * d; - c4 = x + 0.23 * d; - c5 += 0.85 * (c4 - c5); - - x = *p0++ * g0 -(4.3 - 0.2 * w) * r * c5; -// x = tanh (x); - x /= sqrt (1 + x * x); + 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.77 * d; - c1 = x + 0.23 * d; + x = c1 + 0.77f * d; + c1 = x + 0.23f * d; d = w * (x - c2) / (1 + c2 * c2); - x = c2 + 0.77 * d; - c2 = x + 0.23 * d; + x = c2 + 0.77f * d; + c2 = x + 0.23f * d; d = w * (x - c3) / (1 + c3 * c3); - x = c3 + 0.77 * d; - c3 = x + 0.23 * d; + x = c3 + 0.77f * d; + c3 = x + 0.23f * d; d = w * (x - c4); - x = c4 + 0.77 * d; - c4 = x + 0.23 * d; - c5 += 0.85 * (c4 - c5); + x = c4 + 0.77f * d; + c4 = x + 0.23f * d; + c5 += 0.85f * (c4 - c5); if (add) *p1++ += g1 * c4; else *p1++ = g1 * c4; @@ -333,17 +333,17 @@ float c1, c2, c3, c4, c5; float g0, g1, r, dr, w, dw, x, t, d, y; - p0 = _port [0]; - p1 = _port [1]; - p2 = _port [2] - 1; - p3 = _port [3] - 1; - p4 = _port [4] - 1; - g0 = exp2ap (0.1661 * _port [5][0]) / 2; - g1 = exp2ap (0.1661 * _port [11][0]) * 2; - op = (int)(floor (_port [10][0] + 0.5)); + 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-6; + c1 = _c1 + 1e-6f; c2 = _c2; c3 = _c3; c4 = _c4; @@ -359,16 +359,16 @@ p4 += k; len -= k; - t = exp2ap (_port [7][0] * *p3 + _port [6][0] + *p2 + 9.70) / _fsam; - if (t < 0.75) t *= 1.005 - t * (0.624 - t * (0.65 - t * 0.54)); + t = exp2ap (_port [C_FMODG][0] * *p3 + _port [C_FREQ][0] + *p2 + 9.70f) / _fsam; + if (t < 0.75f) t *= 1.005f - t * (0.624f - t * (0.65f - t * 0.54f)); else { - t *= 0.6748; - if (t > 0.82) t = 0.82; + t *= 0.6748f; + if (t > 0.82f) t = 0.82f; } dw = (t - w) / k; - t = _port [9][0] * *p4 + _port [8][0]; + t = _port [C_RESOG][0] * *p4 + _port [C_RESO][0]; if (t > 1) t = 1; if (t < 0) t = 0; dr = (t - r) / k; @@ -378,39 +378,39 @@ w += dw; r += dr; - x = *p0 * g0 - (4.3 - 0.2 * w) * r * c5 + 1e-10; -// x = tanh (x); - x /= sqrt (1 + x * x); + 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.77 * d; - c1 = x + 0.23 * d; + x = c1 + 0.77f * d; + c1 = x + 0.23f * d; d = w * (x - c2) / (1 + c2 * c2); - x = c2 + 0.77 * d; - c2 = x + 0.23 * d; + x = c2 + 0.77f * d; + c2 = x + 0.23f * d; d = w * (x - c3) / (1 + c3 * c3); - x = c3 + 0.77 * d; - c3 = x + 0.23 * d; + x = c3 + 0.77f * d; + c3 = x + 0.23f * d; d = w * (x - c4); - x = c4 + 0.77 * d; - c4 = x + 0.23 * d; - c5 += 0.85 * (c4 - c5); - - x = y = *p0++ * g0 -(4.3 - 0.2 * w) * r * c5; -// x = tanh (x); - x /= sqrt (1 + x * x); + 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.77 * d; - c1 = x + 0.23 * d; + x = c1 + 0.77f * d; + c1 = x + 0.23f * d; d = w * (x - c2) / (1 + c2 * c2); - x = c2 + 0.77 * d; - c2 = x + 0.23 * d; + x = c2 + 0.77f * d; + c2 = x + 0.23f * d; d = w * (x - c3) / (1 + c3 * c3); - x = c3 + 0.77 * d; - c3 = x + 0.23 * d; + x = c3 + 0.77f * d; + c3 = x + 0.23f * d; d = w * (x - c4); - x = c4 + 0.77 * d; - c4 = x + 0.23 * d; - c5 += 0.85 * (c4 - c5); + x = c4 + 0.77f * d; + c4 = x + 0.23f * d; + c5 += 0.85f * (c4 - c5); switch (op) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCP-plugins-0.3.0/mvclpf24.h new/MCP-plugins-0.4.0/mvclpf24.h --- old/MCP-plugins-0.3.0/mvclpf24.h 2004-03-09 20:52:02.000000000 +0100 +++ new/MCP-plugins-0.4.0/mvclpf24.h 2008-04-05 20:04:01.000000000 +0200 @@ -1,6 +1,6 @@ /* - Copyright (C) 2003 Fons Adriaensen - + 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 @@ -27,7 +27,8 @@ { public: - enum { NPORT = 11 }; + 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 (unsigned long fsam) : LadspaPlugin (fsam) {} virtual void setport (unsigned long port, LADSPA_Data *data); @@ -47,7 +48,8 @@ { public: - enum { NPORT = 11 }; + 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 (unsigned long fsam) : LadspaPlugin (fsam) {} virtual void setport (unsigned long port, LADSPA_Data *data); @@ -67,7 +69,8 @@ { public: - enum { NPORT = 11 }; + 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 (unsigned long fsam) : LadspaPlugin (fsam) {} virtual void setport (unsigned long port, LADSPA_Data *data); @@ -87,7 +90,9 @@ { public: - enum { NPORT = 12, NLABEL = 5 }; + 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 (unsigned long fsam) : LadspaPlugin (fsam) {} virtual void setport (unsigned long port, LADSPA_Data *data); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MCP-plugins-0.3.0/mvclpf24_if.cc new/MCP-plugins-0.4.0/mvclpf24_if.cc --- old/MCP-plugins-0.3.0/mvclpf24_if.cc 2004-04-09 21:51:11.000000000 +0200 +++ new/MCP-plugins-0.4.0/mvclpf24_if.cc 2008-04-05 20:04:09.000000000 +0200 @@ -1,5 +1,5 @@ /* - Copyright (C) 2003 Fons Adriaensen + 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 @@ -23,11 +23,11 @@ #include "mvclpf24.h" #define NMODS 4 -#define VERSION "0.3.0" +#define VERSION "0.4.0" -static const char* maker = "Fons Adriaensen <fons.adriaensen@alcatel.be>"; -static const char* copyr = "(C) 2003 Fons Adriaensen, GNU General Public License Version 2 applies"; +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) ++++++ caps_0.4.2.tar.bz2 -> caps_0.4.4.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/caps-0.4.2/Amp.h new/caps-0.4.4/Amp.h --- old/caps-0.4.2/Amp.h 2007-06-15 20:22:45.000000000 +0200 +++ new/caps-0.4.4/Amp.h 2009-07-28 18:38:03.000000000 +0200 @@ -1,7 +1,7 @@ /* Amp.h - Copyright 2002-7 Tim Goetze <tim@quitte.de> + Copyright 2002-9 Tim Goetze <tim@quitte.de> http://quitte.de/dsp/ @@ -310,6 +310,8 @@ cut = 2; supply = 0.; + + tone = -1; /* causes initialisation of the filter at first cycle */ } void run (int n) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/caps-0.4.2/CHANGES new/caps-0.4.4/CHANGES --- old/caps-0.4.2/CHANGES 2007-06-19 10:16:48.000000000 +0200 +++ new/caps-0.4.4/CHANGES 2009-07-29 01:48:15.000000000 +0200 @@ -1,3 +1,13 @@ +0.4.3 + * basics.h cleanup / comments + * minor Makefile cleanup + * comment cosmetics + * Eq and Eq2x2 per-band Q changed to 1.414 (= 1 octave) + * Eq lowest band default value fixed to read 0 + * Niclas' fix for the bessel function implemented + * uninitialised plugin states eliminated thanks to Damon + * linker options for OSX added to the Makefile + 0.4.2 * fixed the 'model' port index for AmpVTS in the RDF generator diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/caps-0.4.2/Cabinet-Models32.h new/caps-0.4.4/Cabinet-Models32.h --- old/caps-0.4.2/Cabinet-Models32.h 2005-12-05 19:00:55.000000000 +0100 +++ new/caps-0.4.4/Cabinet-Models32.h 2007-07-06 15:58:13.000000000 +0200 @@ -63,6 +63,18 @@ {0.0, 0.618938053184, 0.180052941443, -0.1028119852, -0.19233134457, -0.14303971742, -0.0450998045919, 0.0341843500162, 0.0465086637485, 0.0071435730282, -0.0461779135605, -0.059013077843, -0.0284397368519, 0.0187689538251, 0.0341298347311, 0.0244703904826, 0.00720524642447, 0.00991307420138, 0.018738094495, 0.0275442994126, 0.0299092523536, 0.0339721143791, 0.0270175082759, 0.0151058732685, -0.00751060215331, -0.0236467101096, -0.0272347092017, -0.00812409176413, 0.0141531255726, 0.0270163512016, 0.00208457244433, -0.0784208903527}, 0.1132 }, + { + 32, /* mesa */ + {0.462494284717, 0.393585742058, 0.303328992303, 0.181503108654, 0.0629173541037, -0.020681232006, -0.0571885284376, -0.0467796891544, -0.0276756897046, -0.00892844543715, 0.00204563746045, 0.0115134879366, 0.00106846505647, -0.0149439761237, -0.0330954690659, -0.0337794782369, -0.0276991983671, -0.0190072253549, -0.0324525139664, -0.0630355306227, -0.0999209480709, -0.111933999507, -0.110645947594, -0.092891889065, -0.0692697576821, -0.0450776510962, -0.0392851148349, -0.035324392499, -0.035403719608, -0.0376283525137, -0.0612971281858, -0.0900100571873}, + {0.0, 0.56035020932, 0.29343466934, 0.0772363317707, -0.0530744622425, -0.0885361452358, -0.0589180077997, -0.00257855932105, 0.0334935643243, 0.0442328268628, 0.0294583386742, 0.00717959220156, -0.0175320543891, -0.0208128084726, -0.00373790944406, 0.0334761867029, 0.0627006023834, 0.0700861323961, 0.0416727224516, -0.000637024095321, -0.0357094622237, -0.0404012923223, -0.0285442599547, -0.00354190734239, 0.0184796761008, 0.0306524756002, 0.0181509660649, -0.00687913029057, -0.0393242377083, -0.0550286859069, -0.0375235630652, 0.0471541139774}, + 0.2500 + }, + { + 32, /* pro_jr */ + {0.734249445521, 0.491537503216, 0.337459965314, 0.176462147927, 0.0276390917692, -0.0644515999868, -0.0972401016684, -0.0803985996088, -0.0428685363211, -0.0140919517701, -0.0337409328059, -0.0478897322188, -0.0362288411405, -0.0130597902066, -0.00582049410513, 0.0022469159791, -0.00964075940401, -0.0380828738621, -0.0763568061844, -0.089961400489, -0.0952731732008, -0.0895604973654, -0.101346765163, -0.119569610891, -0.128233125318, -0.109253322153, -0.0821678710293, -0.041620049917, -0.0245690004857, -0.0219634796685, -0.0419014341928, -0.0651369005252}, + {0.0, 0.663188793345, 0.270439727768, 0.0190336508265, -0.0946822703696, -0.0888520332756, -0.0267575060227, 0.03588910806, 0.0599594346375, 0.041850528867, -0.00632721029526, -0.0244115687714, -0.0103162286821, 0.0119858957112, 0.0197992179523, 0.0238625339809, 0.0142267453341, 0.00296440492823, -0.00543873217766, -0.00014858213959, -0.00196572770138, -0.00750279035903, -0.0243069229182, -0.0285801812939, -0.0100437887585, 0.0259127459737, 0.0475587872734, 0.0497287926166, 0.0189008750066, -0.0156259358581, -0.0395277285226, -0.0325403937133}, + 0.2500 + }, }; Model32 @@ -103,6 +115,18 @@ {0.0, 0.594136919296, 0.201493775156, -0.0716153113375, -0.180702317671, -0.160390621032, -0.0826806167453, 0.000697581661664, 0.0397029332137, 0.0299147550153, -0.0177304803895, -0.0570701545448, -0.0652412298089, -0.0298128518083, 0.0124560081161, 0.0355161884622, 0.0255626596849, 0.00762986123778, -0.00431800264305, 0.00420452150537, 0.0150803653129, 0.0291131391488, 0.0359312991789, 0.0364212054952, 0.0203516393338, 0.0022141464642, -0.0149317465975, -0.0121651677123, 0.00704936522966, 0.0353605810957, 0.0322793623201, -0.0307481566657}, 0.0996 }, + { + 32, /* mesa */ + {0.495930895017, 0.376476419856, 0.303586589503, 0.197845120631, 0.0899987258287, 0.00535662962566, -0.0475751298521, -0.0519576953746, -0.0376515865627, -0.0168652310379, -0.00508935920432, 0.00888673824726, 0.0109356809664, 0.00654236486877, -0.0122417367265, -0.0265484743045, -0.0339837870474, -0.0233241554396, -0.0127914848925, -0.00515836827508, -0.0209864779144, -0.0475368628257, -0.0782299905969, -0.0909360283527, -0.0983527406681, -0.0938199589393, -0.0898861541372, -0.0810532718198, -0.0815503996776, -0.0796236089322, -0.0749972587191, -0.0599151413182}, + {0.0, 0.534078389658, 0.294930996327, 0.0991032789063, -0.0272295349878, -0.0770236019127, -0.0705005212384, -0.0257307535864, 0.0146092582685, 0.0379865150974, 0.0359872042115, 0.0230902724993, -0.000725294921074, -0.0174606095957, -0.0236682462783, -0.00669570447944, 0.021362472642, 0.0512331674592, 0.0584309807453, 0.044407663655, 0.00900197651083, -0.0217065441135, -0.037007819832, -0.0257650758221, -0.00590170187955, 0.0194528583388, 0.0320489572473, 0.030386820278, 0.00581345215134, -0.02347217653, -0.0472400829369, -0.0430772235107}, + 0.2500 + }, + { + 32, /* pro_jr */ + {0.767221028694, 0.44461349725, 0.324943328323, 0.187583401624, 0.0585707039826, -0.036895934974, -0.0893306767021, -0.0935390488322, -0.0758668196298, -0.0408583447944, -0.0309741335777, -0.0417509830741, -0.0550681782871, -0.0417048932451, -0.0295194484972, -0.0177059350466, -0.0189517349534, -0.0180093708399, -0.0336546809637, -0.0511188019942, -0.0648908298083, -0.0619349722444, -0.058573104994, -0.0470621645996, -0.0597723312001, -0.0855574645731, -0.109611426273, -0.113648127167, -0.112000636381, -0.0909222239483, -0.0727424833493, -0.0362189061166}, + {0.0, 0.62970643913, 0.293410547935, 0.0578415012725, -0.0672697168081, -0.094466063484, -0.0596589574295, 0.000648321788151, 0.0432524054305, 0.0596811813862, 0.0366985835211, 0.0035102339371, -0.0156226319473, -0.00793362884142, 0.00010974226424, 0.00946937446156, 0.012432810986, 0.0166353982569, 0.00885441580212, 0.00176491241101, -0.00465797946213, -0.00706780418692, -0.0169292031721, -0.0217285491491, -0.0298358684941, -0.0214136482558, 0.00603804801211, 0.0432427970473, 0.0585065590431, 0.0472784452715, -0.00622503195681, -0.0778508047032}, + 0.2500 + }, }; Model32 @@ -143,6 +167,18 @@ {0.0, 0.51943795847, 0.326729354403, 0.149229797985, 0.0109767104297, -0.0732768493116, -0.111088974509, -0.110789539541, -0.0898934114003, -0.0564578047856, -0.0231004313356, 0.0069673688738, 0.0254240918116, 0.0337510299271, 0.0282514883492, 0.0147089116391, -0.00647743824673, -0.0269028751263, -0.0446349197143, -0.0510564142456, -0.0478791675617, -0.0324832722564, -0.0121393859238, 0.0104982033447, 0.0241412382054, 0.026038551433, 0.00994372364326, -0.0158545375622, -0.0436236854665, -0.0537883431888, -0.032574614307, 0.0387767610956}, 0.0666 }, + { + 32, /* mesa */ + {0.800744790951, 0.174351736281, 0.162047205857, 0.138794638546, 0.105850412073, 0.0723656260485, 0.0365740092219, 0.00431957094182, -0.0274260159266, -0.052813754463, -0.0747002681782, -0.0875980404567, -0.0959206315285, -0.0964326627017, -0.0951211930444, -0.0890916136798, -0.0839336477818, -0.0759587618493, -0.0699911420952, -0.0618103150195, -0.0562569921852, -0.0497246788081, -0.0474425366429, -0.045118852226, -0.0466084665482, -0.0466183009403, -0.048518031551, -0.0465434705359, -0.0436608634155, -0.0338725172886, -0.0202008830722, 0.0028064387038}, + {0.0, 0.348283848037, 0.278266186344, 0.208315992656, 0.142238507639, 0.0877418515218, 0.0426721771028, 0.0101211230173, -0.0142620082039, -0.0279206093939, -0.0353541175487, -0.0344380562925, -0.030780249931, -0.0230674032021, -0.016830370528, -0.00961683532214, -0.00530786189015, -0.000225073976316, 0.00276994164541, 0.00775476255757, 0.0114020240885, 0.0168731013913, 0.0203623771917, 0.0249313385656, 0.0267810408235, 0.0287888955038, 0.026286558388, 0.0210452426156, 0.00782753651909, -0.0119982689793, -0.0444362907999, -0.0880582917654}, + 0.2500 + }, + { + 32, /* pro_jr */ + {0.909835294941, 0.237116967883, 0.220493213781, 0.188296175986, 0.145804855731, 0.1035213914, 0.0593519550104, 0.018535542445, -0.0211984146917, -0.0519769598497, -0.0754321013216, -0.0869433378891, -0.0920887014799, -0.087865027182, -0.0792907797887, -0.0637463287733, -0.0482713945314, -0.0325419993651, -0.0236382913314, -0.0187673840883, -0.0211003792763, -0.0242608362201, -0.0299312006336, -0.032972160693, -0.038384284548, -0.0433373155719, -0.0522438990617, -0.0598215574684, -0.0680342990137, -0.0706075753658, -0.0696540637908, -0.0592163425206}, + {0.0, 0.437589362895, 0.316542061632, 0.204591087565, 0.109610647885, 0.0395709089276, -0.0101168883103, -0.0392507441308, -0.0536854447628, -0.0525994961208, -0.0429181531663, -0.0263178649123, -0.0108114446263, 0.00361113168474, 0.0124368978113, 0.0183164472387, 0.0173632458965, 0.0133080282174, 0.00451776800884, -0.0027292732446, -0.0084152300302, -0.00649797485834, 0.000343904158769, 0.0135853277076, 0.0260015642816, 0.0368350330248, 0.0397116093504, 0.035854103932, 0.0201173890247, -0.00598389310382, -0.0479894271495, -0.10412912505}, + 0.2500 + }, }; Model32 @@ -183,5 +219,17 @@ {0.0, 0.495552580909, 0.326384725738, 0.167649233033, 0.0373913746446, -0.049802990613, -0.0971841927371, -0.108389008817, -0.0971430950292, -0.0702481334571, -0.0402478232447, -0.00995144228925, 0.0120995492915, 0.0263638891687, 0.0284733804008, 0.0226883648689, 0.00733748451124, -0.0103570201666, -0.0304762029918, -0.0447374261541, -0.0534169560389, -0.0509721172171, -0.0411315716449, -0.0225994268992, -0.00306083571223, 0.0162408742504, 0.0258967736277, 0.0250750690024, 0.00862389563333, -0.0164131934788, -0.0455336929843, -0.0629205840552}, 0.0663 }, + { + 32, /* mesa */ + {0.816556812848, 0.150293117891, 0.141795487793, 0.124839522537, 0.099196755702, 0.0723627786971, 0.0428519140057, 0.0161310830227, -0.0110923701697, -0.034007587359, -0.0554568663798, -0.070468417213, -0.0823376819593, -0.0871844200317, -0.0898440433576, -0.0874713568897, -0.0851052646307, -0.0795934648554, -0.075427699709, -0.0687589148326, -0.0639930873009, -0.0572185996408, -0.0529180674694, -0.0475806410473, -0.0456514163291, -0.0429752541034, -0.0432519558816, -0.0416267292155, -0.0408422393067, -0.0352236824279, -0.0269876908459, -0.0103181623672}, + {0.0, 0.324884890574, 0.268628249933, 0.210962607294, 0.15379956812, 0.104238396719, 0.0608732030517, 0.0272239220101, -0.000475953058616, -0.019347999351, -0.0332735025431, -0.039418716712, -0.0418327023679, -0.0385575041649, -0.0342524288567, -0.0267537524134, -0.0202714386094, -0.0115967221036, -0.00421419915726, 0.0052675530631, 0.0133773574491, 0.0230906449798, 0.0303465968119, 0.0374618799867, 0.0402738707573, 0.0409671902591, 0.0352080031286, 0.0253938319794, 0.0070273986645, -0.0175302180141, -0.0528396401673, -0.0967034944448}, + 0.2500 + }, + { + 32, /* pro_jr */ + {0.925365759135, 0.205121186223, 0.193282167511, 0.170964672217, 0.139026712618, 0.10615970874, 0.0712170483592, 0.0387785989803, 0.00565122246474, -0.022529589284, -0.0474765753603, -0.0638195347354, -0.0750789855745, -0.0781013105481, -0.0774023301337, -0.0698851353181, -0.0601759362765, -0.0460666153988, -0.033417255906, -0.0207620686126, -0.0136627961657, -0.008873845834, -0.00924040700271, -0.00959897299234, -0.0122760927684, -0.0134131792383, -0.0169861222268, -0.0197237904964, -0.0247929394164, -0.0274056341581, -0.0290372582108, -0.0230858292646}, + {0.0, 0.384047660947, 0.296120799911, 0.212432468703, 0.136561707438, 0.0758675413252, 0.0277844248084, -0.00596868040294, -0.0302987351926, -0.0432929213814, -0.0490562834943, -0.0462652470517, -0.0403753213236, -0.030690892845, -0.022025662253, -0.0121577019191, -0.00457323646437, 0.00324370289428, 0.00777535572758, 0.0119010287281, 0.0130997070818, 0.0155933691883, 0.0177344547654, 0.023362610354, 0.028693981754, 0.0347549373256, 0.0352150834795, 0.0303066390313, 0.0145055938776, -0.0110543984149, -0.0508137742561, -0.102480420772}, + 0.2500 + }, }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/caps-0.4.2/Cabinet.cc new/caps-0.4.4/Cabinet.cc --- old/caps-0.4.2/Cabinet.cc 2007-06-16 20:37:48.000000000 +0200 +++ new/caps-0.4.4/Cabinet.cc 2007-07-06 15:50:07.000000000 +0200 @@ -205,9 +205,6 @@ void CabinetII::switch_model (int m) { - if (m < 0) m = 0; - else if (m > 5) m = 5; - model = m; n = models[m].n; @@ -276,7 +273,7 @@ }, { "model", INPUT | CONTROL, - {BOUNDED | INTEGER | DEFAULT_1, 0, 5} + {BOUNDED | INTEGER | DEFAULT_1, 0, 7} }, { "gain (dB)", INPUT | CONTROL, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/caps-0.4.2/Descriptor.h new/caps-0.4.4/Descriptor.h --- old/caps-0.4.2/Descriptor.h 2007-06-16 14:05:57.000000000 +0200 +++ new/caps-0.4.4/Descriptor.h 2009-07-28 18:38:03.000000000 +0200 @@ -1,7 +1,7 @@ /* Descriptor.h - Copyright 2004-6 Tim Goetze <tim@quitte.de> + Copyright 2004-9 Tim Goetze <tim@quitte.de> http://quitte.de/dsp/ @@ -11,7 +11,7 @@ Descriptor<P> expects P to declare some common methods, like init(), activate() etc, plus a static port_info[] and LADSPA_Data * ports[] - and adding_gain. + and adding_gain. (P should derive from Plugin, too.) */ /* @@ -48,8 +48,6 @@ : public LADSPA_Descriptor { public: - static int thishostsucks; - DescriptorStub() { PortCount = 0; @@ -85,10 +83,6 @@ : public DescriptorStub { public: - /* Tom Szilyagi reports that hosts exist which call activate() before - * connect_port(). Since CAPS' plugins expect ports to be valid we - * need a safeguard: at instantiation, each port is connected to the - * lower bound. */ LADSPA_PortRangeHint * ranges; public: @@ -100,7 +94,7 @@ PortCount = (sizeof (T::port_info) / sizeof (PortInfo)); /* unroll PortInfo members */ - char ** names = new char * [PortCount]; + const char ** names = new const char * [PortCount]; LADSPA_PortDescriptor * desc = new LADSPA_PortDescriptor [PortCount]; ranges = new LADSPA_PortRangeHint [PortCount]; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/caps-0.4.2/Eq.cc new/caps-0.4.4/Eq.cc --- old/caps-0.4.2/Eq.cc 2007-06-18 17:41:46.000000000 +0200 +++ new/caps-0.4.4/Eq.cc 2007-06-23 22:34:39.000000000 +0200 @@ -47,7 +47,7 @@ return g * adjust[i]; } -#define Q 1.2 +#define Q 1.414 void Eq::init() @@ -116,7 +116,7 @@ }, { "31 Hz", INPUT | CONTROL, - {BOUNDED | DEFAULT_LOW, -48, 24} + {BOUNDED | DEFAULT_0, -48, 24} }, { "63 Hz", INPUT | CONTROL, @@ -327,4 +327,9 @@ autogen(); } +/* //////////////////////////////////////////////////////////////////////// */ +/* + todo: parametric -- 20-400, 60-1k, 150-2.5k, 500-8k, 1k-20k + bandwidth 0-2 octaves + */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/caps-0.4.2/Makefile new/caps-0.4.4/Makefile --- old/caps-0.4.2/Makefile 2007-06-19 10:19:01.000000000 +0200 +++ new/caps-0.4.4/Makefile 2009-08-03 18:27:41.000000000 +0200 @@ -1,15 +1,21 @@ PREFIX = /usr/local CC = g++ -OPTS = -O2 -ffast-math -funroll-loops -Wall -fPIC -DPIC + +# only use -ffast-math if you're feeling mighty adventurous. (g++ issues) +OPTS = -O2 -funroll-loops -Wall -fPIC -DPIC #OPTS = -g -DDEBUG +_LDFLAGS = -nostartfiles -shared +STRIP = strip + -include defines.make CFLAGS = $(OPTS) $(_CFLAGS) +LDFLAGS = $(_LDFLAGS) $(CFLAGS) PLUG = caps -VERSION = 0.4.2 +VERSION = 0.4.4 SOURCES = $(wildcard *.cc) OBJECTS = $(SOURCES:.cc=.o) @@ -20,7 +26,7 @@ DEST = $(PREFIX)/lib/ladspa RDFDEST = $(PREFIX)/share/ladspa/rdf -# all systems go ############################################################## +# all systems go ------------------------------------------------------------- all: depend $(PLUG).so tags @@ -42,20 +48,20 @@ python tools/make-rdf.py > $(PLUG).rdf $(PLUG).so: $(OBJECTS) - $(CC) -nostartfiles $(CFLAGS) -shared -o $@ $(OBJECTS) + $(CC) $(LDFLAGS) -o $@ $(OBJECTS) .cc.s: $(CC) $(CFLAGS) -S $< .cc.o: depend - $(CC) $(CFLAGS) -I/usr/local/include -c $< + $(CC) $(CFLAGS) -c $< tags: $(SOURCES) $(HEADERS) @echo making tags @-if [ -x /usr/bin/ctags ]; then ctags $(SOURCES) $(HEADERS) ; fi install: all - strip $(PLUG).so + @$(STRIP) $(PLUG).so > /dev/null install -d $(DEST) install -m 644 $(PLUG).so $(DEST) install -d $(RDFDEST) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/caps-0.4.2/basics.h new/caps-0.4.4/basics.h --- old/caps-0.4.2/basics.h 2007-06-16 20:06:15.000000000 +0200 +++ new/caps-0.4.4/basics.h 2009-07-28 18:38:03.000000000 +0200 @@ -1,7 +1,7 @@ /* basics.h - Copyright 2004-5 Tim Goetze <tim@quitte.de> + Copyright 2004-9 Tim Goetze <tim@quitte.de> http://quitte.de/dsp/ @@ -32,7 +32,7 @@ #define _GNU_SOURCE 1 #define _USE_GNU 1 -/* gcc protects a lot of standard math calls. */ +/* unlocking some standard math calls. */ #define __USE_ISOC99 1 #define __USE_ISOC9X 1 #define _ISOC99_SOURCE 1 @@ -48,9 +48,9 @@ #include "ladspa.h" +/* reducing LADSPA_DEFINES_WITH_LOTS_OF_CHARACTERS_REALLY verbosity */ #define BOUNDED (LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE) #define INTEGER LADSPA_HINT_INTEGER -/* #define FS LADSPA_HINT_SAMPLE_RATE *//* deprecated */ #define LOG LADSPA_HINT_LOGARITHMIC #define TOGGLE LADSPA_HINT_TOGGLED @@ -74,6 +74,8 @@ #define TEN_TO_THE_SIXTH 1000000 #define MIN_GAIN .000001 /* -120 dB */ + +/* smallest non-denormal 32 bit IEEE float is 1.18�10-38 */ #define NOISE_FLOOR .00000000000005 /* -266 dB */ typedef __int8_t int8; @@ -86,7 +88,7 @@ typedef __uint64_t uint64; typedef struct { - char * name; + const char * name; LADSPA_PortDescriptor descriptor; LADSPA_PortRangeHint range; } PortInfo; @@ -140,7 +142,7 @@ return (float) random() / (float) RAND_MAX; } -/* for testing only. */ +/* NB: also true if 0 */ inline bool is_denormal (float & f) { @@ -148,7 +150,7 @@ return ((i & 0x7f800000) == 0); } -/* not sure if this double version is correct, actually ... */ +/* todo: not sure if this double version is correct, actually ... */ inline bool is_denormal (double & f) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/caps-0.4.2/caps.html new/caps-0.4.4/caps.html --- old/caps-0.4.2/caps.html 2007-06-19 10:19:45.000000000 +0200 +++ new/caps-0.4.4/caps.html 2009-11-09 02:37:48.000000000 +0100 @@ -134,7 +134,7 @@ <h2>The CAPS Audio Plugin Suite</h2> <table border=0 width=100% cellpadding=0 cellspacing=0> <tr> <td align=left width=20%> - <b>Release 0.4.1</b> + <b>Release 0.4.4</b> </td> <td rowspan=2 align=center> <a href=http://quitte.de/dsp/caps.html title="Yes, this page, only guaranteed fresh!">http://quitte.de/dsp/caps.html</a> @@ -145,7 +145,7 @@ </tr> <tr> <td align=left> - June 19, 2007 </td> + November 9, 2009 </td> <td align=right> <a href=mailto:tim@quitte.de?subject=CAPS>tim@quitte.de</a> </td> @@ -256,6 +256,14 @@ <a href=http://ccrma.stanford.edu/>CCRMA</a>. </p> <p> + Invaluable suggestions, bug hunting and fixing and + numerous patient reminders + of the sorry state of affairs + have been graciously + provided by (among others and in no particular order) + Sampo Savolainen, Damon Chaplin, Paul Winkler and Niclas Wretström. + </p> + <p> All of CAPS is <a href=COPYING>free software</a> and distributed in source code. </p> @@ -321,15 +329,16 @@ </p> <pre align=left> -$ tar xvfz caps_0.4.1.tar.gz -$ cd caps-0.4.1 +$ tar xvfz caps_0.4.4.tar.gz +$ cd caps-0.4.4 $ ./configure.py $ make $ su # make install</pre> <p> - (The <tt>configure.py</tt> step is optional but recommended.) + The <tt>configure.py</tt> step is optional on Linux but recommended + for optimum performance. </p> <p> You should now be able use the plugins from the collection @@ -349,15 +358,20 @@ <a href=http://www.debian.org>downgrade now</a>? </p> + <h5>OSX</h5> <p> - PPC and other non-x86 users may have to edit the - Makefile. - CAPS should compile on OSX but I haven't been able to test it. + <tt>configure.py</tt> should detect an OSX build and prepare the + relevant flags for Apple's different-thinking <tt>ld</tt> + implementation. + Mind you, this is untested by me and + not guaranteed to actually work. If it does, please + tell me. Thanks! </p> <h5>Troubleshooting</h5> <p> - With no external dependencies, compiling CAPS should rarely fail. If it + With no external dependencies, compiling CAPS + should rarely fail on a Linux box. If it does on your machine, please send the output of the <tt>make</tt> command so we can try and fix the problem. </p> @@ -409,6 +423,10 @@ for your life, but the sonic experience may differ from what is advertised. </p> + <p> + Usage at sample rates of 176 kHz or higher may cause problems with some + plugins. We recommend not exceeding 100 kHz for all applications. + </p> <h5>Realtime Use</h5> <p> @@ -461,6 +479,20 @@ <li> Processing blocks larger than 2<sup>31</sup> - 1 aren't supported. </li> + <li> + Old <tt>jack-rack</tt> host versions have some crazy ideas about the + default control parameters of the CAPS plugins – they're all + over the place. + </li> + <li> + Sample rates in excess of 100 kHz may cause some plugins to develop + problems. + </li> + <li> + The <a href=#White>White</a> plugin + actually produces a slightly purplish signal despite the rather + boastful claims of signal purity made elsewhere. + </li> </ul> <br> @@ -1050,7 +1082,7 @@ and <a href=#SweepVFII>SweepVFII</a> units, the difference being that the filter is hard-wired for bandpass operation and the band centre frequency is modulated by an envelope-following circuit. - In short, an effect commonly estimated and known as an automatic wah, + In short, an effect commonly known and esteemed as an automatic wah, or AutoWah. Probably most useful with instruments allowing fine control over dynamics at all times. </p> @@ -1431,12 +1463,22 @@ </ul> <p> You can fetch the data sheet compilation - <a href=http://quitte.de/dsp/caps-0.4.1.pdf>from the CAPS homepage</a>. + <a href=http://quitte.de/dsp/caps-0.4.4.pdf>from the CAPS homepage</a>. </p> <a name=Changelog><h4>Changelog</h4></a> <pre> +0.4.3 + * basics.h cleanup / comments + * minor Makefile cleanup + * comment cosmetics + * Eq and Eq2x2 per-band Q changed to 1.414 (= 1 octave) + * Eq lowest band default value fixed to read 0 + * Niclas' fix for the bessel function implemented + * uninitialised plugin states eliminated thanks to Damon + * linker options for OSX added to the Makefile + 0.4.2 * fixed the 'model' port index for AmpVTS in the RDF generator @@ -1642,7 +1684,7 @@ <br> <div class=foot> - tim@<a href=http://quitte.de/>quitte.de</a>, June 19 2007. + tim@<a href=http://quitte.de/>quitte.de</a>, November 9 2009. </div> </center> </body> </html> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/caps-0.4.2/caps.rdf new/caps-0.4.4/caps.rdf --- old/caps-0.4.2/caps.rdf 2007-06-19 09:58:23.000000000 +0200 +++ new/caps-0.4.4/caps.rdf 2007-07-06 16:05:49.000000000 +0200 @@ -60,13 +60,23 @@ <ladspa:hasPoint> <ladspa:Point rdf:value="4" - ladspa:hasLabel="Wing 68" /> + ladspa:hasLabel="Little Wing 68" /> </ladspa:hasPoint> <ladspa:hasPoint> <ladspa:Point rdf:value="5" ladspa:hasLabel="Martial" /> </ladspa:hasPoint> + <ladspa:hasPoint> + <ladspa:Point + rdf:value="6" + ladspa:hasLabel="Mesa" /> + </ladspa:hasPoint> + <ladspa:hasPoint> + <ladspa:Point + rdf:value="7" + ladspa:hasLabel="Pro Jr" /> + </ladspa:hasPoint> </ladspa:Scale> </ladspa:hasScale> </ladspa:InputControlPort> @@ -245,13 +255,23 @@ <ladspa:hasPoint> <ladspa:Point rdf:value="4" - ladspa:hasLabel="Wing 68" /> + ladspa:hasLabel="Little Wing 68" /> </ladspa:hasPoint> <ladspa:hasPoint> <ladspa:Point rdf:value="5" ladspa:hasLabel="Martial" /> </ladspa:hasPoint> + <ladspa:hasPoint> + <ladspa:Point + rdf:value="6" + ladspa:hasLabel="Mesa" /> + </ladspa:hasPoint> + <ladspa:hasPoint> + <ladspa:Point + rdf:value="7" + ladspa:hasLabel="Pro Jr" /> + </ladspa:hasPoint> </ladspa:Scale> </ladspa:hasScale> </ladspa:InputControlPort> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/caps-0.4.2/configure.py new/caps-0.4.4/configure.py --- old/caps-0.4.2/configure.py 2007-06-17 13:59:08.000000000 +0200 +++ new/caps-0.4.4/configure.py 2009-08-03 18:27:49.000000000 +0200 @@ -2,6 +2,7 @@ import os CFLAGS = [] +OSX_LDFLAGS = "-bundle -undefined suppress -flat_namespace" def we_have_sse(): try: return 'sse' in open ('/proc/cpuinfo').read().split() @@ -10,10 +11,17 @@ try: return 'ssse3' in open ('/proc/cpuinfo').read().split() except: return 0 +def we_think_so_different_dude(): + try: return 'Darwin' == os.popen ('uname -s').read().strip() + except: return 0 + def store(): f = open ('defines.make', 'w') print >> f, "_CFLAGS=" + ' '.join (CFLAGS) - + if we_think_so_different_dude(): + print >> f, "_LDFLAGS=", OSX_LDFLAGS + print >> f, "STRIP = echo" + if __name__ == '__main__': if we_have_sse(): CFLAGS += ('-msse', '-mfpmath=sse') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/caps-0.4.2/dsp/BiQuad.h new/caps-0.4.4/dsp/BiQuad.h --- old/caps-0.4.2/dsp/BiQuad.h 2007-06-16 20:23:38.000000000 +0200 +++ new/caps-0.4.4/dsp/BiQuad.h 2007-06-19 14:29:27.000000000 +0200 @@ -1,11 +1,11 @@ /* dsp/BiQuad.h - Copyright 2003-4 Tim Goetze <tim@quitte.de> + Copyright 2003-7 Tim Goetze <tim@quitte.de> http://quitte.de/dsp/ - bi-quad implementation. + Bi-quad IIR filter. */ /* @@ -42,6 +42,7 @@ BiQuad() { + /* initialize to unity */ a[0] = 1; a[1] = a[2] = b[0] = b[1] = b[2] = 0; @@ -92,8 +93,9 @@ return r; } - /* additional methods for using the biquad to filter an - * upsampled signal with 0 padding */ + /* Following are additional methods for using the biquad to filter an + * upsampled signal with 0 padding -- some terms reduce to 0 in this + * case */ inline d_sample process_0_1() { register int z = h; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/caps-0.4.2/dsp/OnePole.h new/caps-0.4.4/dsp/OnePole.h --- old/caps-0.4.2/dsp/OnePole.h 2007-06-16 20:23:38.000000000 +0200 +++ new/caps-0.4.4/dsp/OnePole.h 2007-06-19 18:02:31.000000000 +0200 @@ -1,7 +1,7 @@ /* dsp/OnePole.h - Copyright 2003-4 Tim Goetze <tim@quitte.de> + Copyright 2003-7 Tim Goetze <tim@quitte.de> http://quitte.de/dsp/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/caps-0.4.2/dsp/RMS.h new/caps-0.4.4/dsp/RMS.h --- old/caps-0.4.2/dsp/RMS.h 2007-06-12 22:42:53.000000000 +0200 +++ new/caps-0.4.4/dsp/RMS.h 2007-12-29 00:20:16.000000000 +0100 @@ -32,9 +32,11 @@ class RMS { - public: + protected: d_sample buffer[64]; int write; + + public: double sum; RMS() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/caps-0.4.2/dsp/ToneStack.h new/caps-0.4.4/dsp/ToneStack.h --- old/caps-0.4.2/dsp/ToneStack.h 2007-06-17 20:27:10.000000000 +0200 +++ new/caps-0.4.4/dsp/ToneStack.h 2009-07-28 18:38:03.000000000 +0200 @@ -1,7 +1,7 @@ /* ToneStack.h - Copyright 2006-7 + Copyright 2006-9 David Yeh <dtyeh@ccrma.stanford.edu> (implementation) Tim Goetze <tim@quitte.de> (cosmetics) @@ -83,6 +83,7 @@ ToneStack() { + model = -1; setparams (presets[0]); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/caps-0.4.2/dsp/windows.h new/caps-0.4.4/dsp/windows.h --- old/caps-0.4.2/dsp/windows.h 2005-09-27 21:47:04.000000000 +0200 +++ new/caps-0.4.4/dsp/windows.h 2009-07-28 18:38:03.000000000 +0200 @@ -1,7 +1,7 @@ /* dsp/windows.h - Copyright 2004 Tim Goetze <tim@quitte.de> + Copyright 2004-9 Tim Goetze <tim@quitte.de> http://quitte.de/dsp/ @@ -148,12 +148,12 @@ double k = besseli ((beta * sqrt (1 - pow ((2 * i / (n - 1)), 2)))) / bb; /* can you spell hack */ - if (!finite (k)) + if (!finite (k) || isnan(k)) k = 0; F (s[si], k); } - /* assymetrical hack: sort out first value! + /* asymmetrical hack: sort out first value! win[0] = win[len-1]; */ } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/caps-0.4.2/interface.cc new/caps-0.4.4/interface.cc --- old/caps-0.4.2/interface.cc 2007-06-17 13:07:16.000000000 +0200 +++ new/caps-0.4.4/interface.cc 2009-07-28 18:38:03.000000000 +0200 @@ -1,7 +1,7 @@ /* interface.cc - Copyright 2004-7 Tim Goetze <tim@quitte.de> + Copyright 2004-9 Tim Goetze <tim@quitte.de> http://quitte.de/dsp/ ++++++ ladspa.dif ++++++ --- /var/tmp/diff_new_pack.RKtF0t/_old 2010-04-03 00:20:44.000000000 +0200 +++ /var/tmp/diff_new_pack.RKtF0t/_new 2010-04-03 00:20:44.000000000 +0200 @@ -1,6 +1,8 @@ ---- ladspa_sdk/src/makefile -+++ ladspa_sdk/src/makefile 2002/05/07 10:59:53 -@@ -28,6 +28,9 @@ +Index: ladspa_sdk/src/makefile +=================================================================== +--- ladspa_sdk/src/makefile.orig ++++ ladspa_sdk/src/makefile +@@ -27,6 +27,9 @@ PROGRAMS = ../bin/analyseplugin \ ../bin/listplugins CC = cc CPP = c++ @@ -10,18 +12,20 @@ ############################################################################### # -@@ -59,7 +62,7 @@ - play /tmp/test.wav +@@ -59,7 +62,7 @@ test: /tmp/test.wav ../snd/noise.wav alw + @echo Test complete. install: targets -- -mkdirhier $(INSTALL_PLUGINS_DIR) \ -+ -$(MKDIRHIER) $(INSTALL_PLUGINS_DIR) \ - $(INSTALL_INCLUDE_DIR) \ - $(INSTALL_BINARY_DIR) +- -mkdirhier $(INSTALL_PLUGINS_DIR) ++ -$(MKDIRHIER) $(INSTALL_PLUGINS_DIR) + -mkdirhier $(INSTALL_INCLUDE_DIR) + -mkdirhier $(INSTALL_BINARY_DIR) cp ../plugins/* $(INSTALL_PLUGINS_DIR) ---- ladspa_sdk/src/plugins/amp.c -+++ ladspa_sdk/src/plugins/amp.c 2002/05/07 12:17:35 -@@ -152,8 +152,8 @@ +Index: ladspa_sdk/src/plugins/amp.c +=================================================================== +--- ladspa_sdk/src/plugins/amp.c.orig ++++ ladspa_sdk/src/plugins/amp.c +@@ -152,8 +152,8 @@ LADSPA_Descriptor * g_psStereoDescriptor /* _init() is called automatically when the plugin library is first loaded. */ @@ -32,7 +36,7 @@ char ** pcPortNames; LADSPA_PortDescriptor * piPortDescriptors; -@@ -333,8 +333,8 @@ +@@ -335,8 +335,8 @@ deleteDescriptor(LADSPA_Descriptor * psD /*****************************************************************************/ /* _fini() is called automatically when the library is unloaded. */ @@ -43,9 +47,11 @@ deleteDescriptor(g_psMonoDescriptor); deleteDescriptor(g_psStereoDescriptor); } ---- ladspa_sdk/src/plugins/delay.c -+++ ladspa_sdk/src/plugins/delay.c 2002/05/07 12:17:09 -@@ -228,8 +228,8 @@ +Index: ladspa_sdk/src/plugins/delay.c +=================================================================== +--- ladspa_sdk/src/plugins/delay.c.orig ++++ ladspa_sdk/src/plugins/delay.c +@@ -228,8 +228,8 @@ LADSPA_Descriptor * g_psDescriptor = NUL /* _init() is called automatically when the plugin library is first loaded. */ @@ -56,7 +62,7 @@ char ** pcPortNames; LADSPA_PortDescriptor * piPortDescriptors; -@@ -318,8 +318,8 @@ +@@ -322,8 +322,8 @@ _init() { /*****************************************************************************/ /* _fini() is called automatically when the library is unloaded. */ @@ -67,9 +73,11 @@ long lIndex; if (g_psDescriptor) { free((char *)g_psDescriptor->Label); ---- ladspa_sdk/src/plugins/filter.c -+++ ladspa_sdk/src/plugins/filter.c 2002/05/07 12:17:53 -@@ -252,8 +252,8 @@ +Index: ladspa_sdk/src/plugins/filter.c +=================================================================== +--- ladspa_sdk/src/plugins/filter.c.orig ++++ ladspa_sdk/src/plugins/filter.c +@@ -252,8 +252,8 @@ LADSPA_Descriptor * g_psHPFDescriptor = /* _init() is called automatically when the plugin library is first loaded. */ @@ -80,7 +88,7 @@ char ** pcPortNames; LADSPA_PortDescriptor * piPortDescriptors; -@@ -429,8 +429,8 @@ +@@ -431,8 +431,8 @@ deleteDescriptor(LADSPA_Descriptor * psD /*****************************************************************************/ /* _fini() is called automatically when the library is unloaded. */ @@ -91,9 +99,11 @@ deleteDescriptor(g_psLPFDescriptor); deleteDescriptor(g_psHPFDescriptor); } ---- ladspa_sdk/src/plugins/noise.c -+++ ladspa_sdk/src/plugins/noise.c 2002/05/07 12:18:09 -@@ -142,8 +142,8 @@ +Index: ladspa_sdk/src/plugins/noise.c +=================================================================== +--- ladspa_sdk/src/plugins/noise.c.orig ++++ ladspa_sdk/src/plugins/noise.c +@@ -142,8 +142,8 @@ LADSPA_Descriptor * g_psDescriptor; /* _init() is called automatically when the plugin library is first loaded. */ @@ -104,7 +114,7 @@ char ** pcPortNames; LADSPA_PortDescriptor * piPortDescriptors; -@@ -217,8 +217,8 @@ +@@ -219,8 +219,8 @@ _init() { /*****************************************************************************/ /* _fini() is called automatically when the library is unloaded. */ ++++++ ladspa_sdk_1.12.tar.bz2 -> ladspa_sdk_1.13.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ladspa_sdk/doc/changes.html new/ladspa_sdk/doc/changes.html --- old/ladspa_sdk/doc/changes.html 2002-08-07 23:26:26.000000000 +0200 +++ new/ladspa_sdk/doc/changes.html 2007-11-06 12:01:27.000000000 +0100 @@ -94,9 +94,27 @@ <LI>Remove memory leak in search code.</LI> +</UL> + <H2>Version 1.12 - 7 Aug 2002</H2> <UL> <LI>Update for LADSPA v1.1 (default values and 1.0f=0dB).</LI> </UL> + +<H2>Version 1.13 - 6 Nov 2007</H2> +<UL> + +<LI>Fix compile error in sine.cpp (GCC4).</LI> + +<LI>Fix typo in text output by analyseplugin.</LI> + +<LI>Extra usage text in analyseplugin and applyplugin.</LI> + +<LI>Replace strdup() with localStrdup() in sine.cpp to avoid +malloc/new mismatch.</LI> + +<LI>Remove "local" part from install directories.</LI> + +</UL> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ladspa_sdk/doc/overview.html new/ladspa_sdk/doc/overview.html --- old/ladspa_sdk/doc/overview.html 2002-08-07 23:26:26.000000000 +0200 +++ new/ladspa_sdk/doc/overview.html 2007-11-06 11:00:17.000000000 +0100 @@ -1,4 +1,4 @@ -<H1>LADSPA SDK v1.12 Overview</H1> +<H1>LADSPA SDK v1.13 Overview</H1> <P>There is a large number of synthesis packages in use or development on the Linux platform at this time. The Linux Audio Developer's Simple diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ladspa_sdk/src/analyseplugin.c new/ladspa_sdk/src/analyseplugin.c --- old/ladspa_sdk/src/analyseplugin.c 2002-07-06 19:50:39.000000000 +0200 +++ new/ladspa_sdk/src/analyseplugin.c 2007-11-06 11:52:55.000000000 +0100 @@ -121,7 +121,7 @@ printf("Yes\n"); else printf("No\n"); - printf("Has deativate() Function: "); + printf("Has deactivate() Function: "); if (psDescriptor->deactivate != NULL) printf("Yes\n"); else @@ -391,7 +391,9 @@ "Usage:\tanalyseplugin [flags] <LADSPA plugin file name> " "[<plugin label>].\n" "Flags:" - "\t-l\tProduce a summary list rather than a verbose report.\n"); + "-l Produce a summary list rather than a verbose report.\n" + "Note that the LADSPA_PATH environment variable is used " + "to help find plugins.\n"); return(1); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ladspa_sdk/src/applyplugin.c new/ladspa_sdk/src/applyplugin.c --- old/ladspa_sdk/src/applyplugin.c 2002-05-18 19:01:36.000000000 +0200 +++ new/ladspa_sdk/src/applyplugin.c 2007-11-06 11:52:56.000000000 +0100 @@ -798,11 +798,13 @@ "\t[<LADSPA plugin file name> <plugin label> " "<Control1> <Control2>...]...\n" "Flags:" - "\t-s<seconds>\tAdd seconds of silence after end of input file.\n" + "\t-s<seconds> Add seconds of silence after end of input file.\n" "\n" "To find out what control values are needed by a plugin, " "use the\n" - "\"analyseplugin\" program and check for control input ports.\n"); + "\"analyseplugin\" program and check for control input ports.\n" + "Note that the LADSPA_PATH environment variable is used " + "to help find plugins.\n"); return(1); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ladspa_sdk/src/makefile new/ladspa_sdk/src/makefile --- old/ladspa_sdk/src/makefile 2002-07-06 19:34:20.000000000 +0200 +++ new/ladspa_sdk/src/makefile 2007-11-06 11:42:45.000000000 +0100 @@ -1,13 +1,12 @@ ############################################################################### # -# INSTALLATION DIRECTORIES +# Installation DIRECTORIES # -# Change these if you want to install somewhere else. In particularly -# you may wish to remove the middle "local/" part of each entry. +# Change these if you want to install somewhere else. -INSTALL_PLUGINS_DIR = /usr/local/lib/ladspa/ +INSTALL_PLUGINS_DIR = /usr/lib/ladspa/ INSTALL_INCLUDE_DIR = /usr/include/ -INSTALL_BINARY_DIR = /usr/local/bin/ +INSTALL_BINARY_DIR = /usr/bin/ ############################################################################### # @@ -51,17 +50,18 @@ @echo --------------------------------------------- @echo First listen to the white noise input signal: @echo --------------------------------------------- - play ../snd/noise.wav + -sndfile-play ../snd/noise.wav @echo ------------------------- @echo Compare to plugin output. @echo ------------------------- @echo Should be a noise band around 6000Hz, repeated quietly after 1s. - play /tmp/test.wav + -sndfile-play /tmp/test.wav + @echo Test complete. install: targets - -mkdirhier $(INSTALL_PLUGINS_DIR) \ - $(INSTALL_INCLUDE_DIR) \ - $(INSTALL_BINARY_DIR) + -mkdirhier $(INSTALL_PLUGINS_DIR) + -mkdirhier $(INSTALL_INCLUDE_DIR) + -mkdirhier $(INSTALL_BINARY_DIR) cp ../plugins/* $(INSTALL_PLUGINS_DIR) cp ladspa.h $(INSTALL_INCLUDE_DIR) cp ../bin/* $(INSTALL_BINARY_DIR) @@ -74,7 +74,7 @@ echo ; ../bin/analyseplugin -l ../plugins/sine.so ; echo ../bin/analyseplugin ../plugins/amp.so ../bin/analyseplugin ../plugins/noise.so - time ../bin/applyplugin -s 1 \ + ../bin/applyplugin -s 1 \ ../snd/noise.wav /tmp/test.wav \ ../plugins/filter.so lpf 500 \ ../plugins/filter.so lpf 500 \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ladspa_sdk/src/plugins/sine.cpp new/ladspa_sdk/src/plugins/sine.cpp --- old/ladspa_sdk/src/plugins/sine.cpp 2002-07-06 19:23:17.000000000 +0200 +++ new/ladspa_sdk/src/plugins/sine.cpp 2007-11-06 11:13:34.000000000 +0100 @@ -42,6 +42,15 @@ /*****************************************************************************/ +inline char * +localStrdup(const char * input) { + char * output = new char[strlen(input) + 1]; + strcpy(output, input); + return output; +} + +/*****************************************************************************/ + void initialise_sine_table() { if (g_pfSineTable == NULL) { @@ -92,99 +101,139 @@ } friend LADSPA_Handle instantiateSineOscillator(const LADSPA_Descriptor *, - unsigned long SampleRate) { - return new SineOscillator(SampleRate); - } - + unsigned long SampleRate); friend void connectPortToSineOscillator(LADSPA_Handle Instance, unsigned long Port, - LADSPA_Data * DataLocation) { - switch (Port) { - case OSC_FREQUENCY: - ((SineOscillator *)Instance)->m_pfFrequency = DataLocation; - break; - case OSC_AMPLITUDE: - ((SineOscillator *)Instance)->m_pfAmplitude = DataLocation; - break; - case OSC_OUTPUT: - ((SineOscillator *)Instance)->m_pfOutput = DataLocation; - break; - } - } + LADSPA_Data * DataLocation); + friend void activateSineOscillator(void * pvHandle); + friend void runSineOscillator_FreqAudio_AmpAudio(LADSPA_Handle Instance, + unsigned long SampleCount); + friend void runSineOscillator_FreqAudio_AmpCtrl(LADSPA_Handle Instance, + unsigned long SampleCount); + friend void runSineOscillator_FreqCtrl_AmpAudio(LADSPA_Handle Instance, + unsigned long SampleCount); + friend void runSineOscillator_FreqCtrl_AmpCtrl(LADSPA_Handle Instance, + unsigned long SampleCount); + friend void cleanupSineOscillator(void *pvHandle); - friend void activateSineOscillator(void * pvHandle) { - ((SineOscillator *)pvHandle)->m_lPhase = 0; - } +}; - friend void runSineOscillator_FreqAudio_AmpAudio(LADSPA_Handle Instance, - unsigned long SampleCount) { - SineOscillator * poSineOscillator = (SineOscillator *)Instance; - for (unsigned long lIndex = 0; lIndex < SampleCount; lIndex++) { - /* Extract frequency at this point to guarantee inplace - support. */ - LADSPA_Data fFrequency - = (poSineOscillator->m_pfFrequency[lIndex]); - poSineOscillator->m_pfOutput[lIndex] - = (g_pfSineTable[poSineOscillator->m_lPhase >> SINE_TABLE_SHIFT] - * poSineOscillator->m_pfAmplitude[lIndex]); - poSineOscillator->setPhaseStepFromFrequency(fFrequency); - poSineOscillator->m_lPhase - += poSineOscillator->m_lPhaseStep; - } +/*****************************************************************************/ + +LADSPA_Handle +instantiateSineOscillator(const LADSPA_Descriptor *, + unsigned long SampleRate) { + return new SineOscillator(SampleRate); +} + +/*****************************************************************************/ + +void +connectPortToSineOscillator(LADSPA_Handle Instance, + unsigned long Port, + LADSPA_Data * DataLocation) { + switch (Port) { + case OSC_FREQUENCY: + ((SineOscillator *)Instance)->m_pfFrequency = DataLocation; + break; + case OSC_AMPLITUDE: + ((SineOscillator *)Instance)->m_pfAmplitude = DataLocation; + break; + case OSC_OUTPUT: + ((SineOscillator *)Instance)->m_pfOutput = DataLocation; + break; } +} - friend void runSineOscillator_FreqAudio_AmpCtrl(LADSPA_Handle Instance, - unsigned long SampleCount) { - SineOscillator * poSineOscillator = (SineOscillator *)Instance; - LADSPA_Data fAmplitude = *(poSineOscillator->m_pfAmplitude); - for (unsigned long lIndex = 0; lIndex < SampleCount; lIndex++) { - /* Extract frequency at this point to guarantee inplace - support. */ - LADSPA_Data fFrequency - = (poSineOscillator->m_pfFrequency[lIndex]); - poSineOscillator->m_pfOutput[lIndex] - = (g_pfSineTable[poSineOscillator->m_lPhase >> SINE_TABLE_SHIFT] - * fAmplitude); - poSineOscillator->setPhaseStepFromFrequency(fFrequency); - poSineOscillator->m_lPhase - += poSineOscillator->m_lPhaseStep; - } +/*****************************************************************************/ + +void +activateSineOscillator(void * pvHandle) { + ((SineOscillator *)pvHandle)->m_lPhase = 0; +} + +/*****************************************************************************/ + +void +runSineOscillator_FreqAudio_AmpAudio(LADSPA_Handle Instance, + unsigned long SampleCount) { + SineOscillator * poSineOscillator = (SineOscillator *)Instance; + for (unsigned long lIndex = 0; lIndex < SampleCount; lIndex++) { + /* Extract frequency at this point to guarantee inplace + support. */ + LADSPA_Data fFrequency + = (poSineOscillator->m_pfFrequency[lIndex]); + poSineOscillator->m_pfOutput[lIndex] + = (g_pfSineTable[poSineOscillator->m_lPhase >> SINE_TABLE_SHIFT] + * poSineOscillator->m_pfAmplitude[lIndex]); + poSineOscillator->setPhaseStepFromFrequency(fFrequency); + poSineOscillator->m_lPhase + += poSineOscillator->m_lPhaseStep; } +} - friend void runSineOscillator_FreqCtrl_AmpAudio(LADSPA_Handle Instance, - unsigned long SampleCount) { - SineOscillator * poSineOscillator = (SineOscillator *)Instance; - poSineOscillator->setPhaseStepFromFrequency - (*(poSineOscillator->m_pfFrequency)); - for (unsigned long lIndex = 0; lIndex < SampleCount; lIndex++) { - poSineOscillator->m_pfOutput[lIndex] - = (g_pfSineTable[poSineOscillator->m_lPhase >> SINE_TABLE_SHIFT] - * poSineOscillator->m_pfAmplitude[lIndex]); - poSineOscillator->m_lPhase - += poSineOscillator->m_lPhaseStep; - } +/*****************************************************************************/ + +void +runSineOscillator_FreqAudio_AmpCtrl(LADSPA_Handle Instance, + unsigned long SampleCount) { + SineOscillator * poSineOscillator = (SineOscillator *)Instance; + LADSPA_Data fAmplitude = *(poSineOscillator->m_pfAmplitude); + for (unsigned long lIndex = 0; lIndex < SampleCount; lIndex++) { + /* Extract frequency at this point to guarantee inplace + support. */ + LADSPA_Data fFrequency + = (poSineOscillator->m_pfFrequency[lIndex]); + poSineOscillator->m_pfOutput[lIndex] + = (g_pfSineTable[poSineOscillator->m_lPhase >> SINE_TABLE_SHIFT] + * fAmplitude); + poSineOscillator->setPhaseStepFromFrequency(fFrequency); + poSineOscillator->m_lPhase + += poSineOscillator->m_lPhaseStep; } +} - friend void runSineOscillator_FreqCtrl_AmpCtrl(LADSPA_Handle Instance, - unsigned long SampleCount) { - SineOscillator * poSineOscillator = (SineOscillator *)Instance; - LADSPA_Data fAmplitude = *(poSineOscillator->m_pfAmplitude); - poSineOscillator->setPhaseStepFromFrequency - (*(poSineOscillator->m_pfFrequency)); - for (unsigned long lIndex = 0; lIndex < SampleCount; lIndex++) { - poSineOscillator->m_pfOutput[lIndex] - = (g_pfSineTable[poSineOscillator->m_lPhase >> SINE_TABLE_SHIFT] - * fAmplitude); - poSineOscillator->m_lPhase - += poSineOscillator->m_lPhaseStep; - } +/*****************************************************************************/ + +void +runSineOscillator_FreqCtrl_AmpAudio(LADSPA_Handle Instance, + unsigned long SampleCount) { + SineOscillator * poSineOscillator = (SineOscillator *)Instance; + poSineOscillator->setPhaseStepFromFrequency + (*(poSineOscillator->m_pfFrequency)); + for (unsigned long lIndex = 0; lIndex < SampleCount; lIndex++) { + poSineOscillator->m_pfOutput[lIndex] + = (g_pfSineTable[poSineOscillator->m_lPhase >> SINE_TABLE_SHIFT] + * poSineOscillator->m_pfAmplitude[lIndex]); + poSineOscillator->m_lPhase + += poSineOscillator->m_lPhaseStep; } +} - friend void cleanupSineOscillator(void *pvHandle) { - delete (SineOscillator *)pvHandle; +/*****************************************************************************/ + +void +runSineOscillator_FreqCtrl_AmpCtrl(LADSPA_Handle Instance, + unsigned long SampleCount) { + SineOscillator * poSineOscillator = (SineOscillator *)Instance; + LADSPA_Data fAmplitude = *(poSineOscillator->m_pfAmplitude); + poSineOscillator->setPhaseStepFromFrequency + (*(poSineOscillator->m_pfFrequency)); + for (unsigned long lIndex = 0; lIndex < SampleCount; lIndex++) { + poSineOscillator->m_pfOutput[lIndex] + = (g_pfSineTable[poSineOscillator->m_lPhase >> SINE_TABLE_SHIFT] + * fAmplitude); + poSineOscillator->m_lPhase + += poSineOscillator->m_lPhaseStep; } +} -}; +/*****************************************************************************/ + +void +cleanupSineOscillator(void *pvHandle) { + delete (SineOscillator *)pvHandle; +} /*****************************************************************************/ @@ -219,9 +268,9 @@ g_psDescriptors[lPluginIndex]->Properties = LADSPA_PROPERTY_HARD_RT_CAPABLE; g_psDescriptors[lPluginIndex]->Maker - = strdup("Richard Furse (LADSPA example plugins)"); + = localStrdup("Richard Furse (LADSPA example plugins)"); g_psDescriptors[lPluginIndex]->Copyright - = strdup("None"); + = localStrdup("None"); g_psDescriptors[lPluginIndex]->PortCount = 3; piPortDescriptors @@ -235,11 +284,11 @@ g_psDescriptors[lPluginIndex]->PortNames = (const char **)pcPortNames; pcPortNames[OSC_FREQUENCY] - = strdup("Frequency (Hz)"); + = localStrdup("Frequency (Hz)"); pcPortNames[OSC_AMPLITUDE] - = strdup("Amplitude"); + = localStrdup("Amplitude"); pcPortNames[OSC_OUTPUT] - = strdup("Output"); + = localStrdup("Output"); psPortRangeHints = new LADSPA_PortRangeHint[3]; g_psDescriptors[lPluginIndex]->PortRangeHints @@ -280,9 +329,9 @@ switch (lPluginIndex) { case 0: g_psDescriptors[lPluginIndex]->Label - = strdup("sine_faaa"); + = localStrdup("sine_faaa"); g_psDescriptors[lPluginIndex]->Name - = strdup("Sine Oscillator (Freq:audio, Amp:audio)"); + = localStrdup("Sine Oscillator (Freq:audio, Amp:audio)"); piPortDescriptors[OSC_FREQUENCY] = LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO; piPortDescriptors[OSC_AMPLITUDE] @@ -292,9 +341,9 @@ break; case 1: g_psDescriptors[lPluginIndex]->Label - = strdup("sine_faac"); + = localStrdup("sine_faac"); g_psDescriptors[lPluginIndex]->Name - = strdup("Sine Oscillator (Freq:audio, Amp:control)"); + = localStrdup("Sine Oscillator (Freq:audio, Amp:control)"); piPortDescriptors[OSC_FREQUENCY] = LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO; piPortDescriptors[OSC_AMPLITUDE] @@ -304,9 +353,9 @@ break; case 2: g_psDescriptors[lPluginIndex]->Label - = strdup("sine_fcaa"); + = localStrdup("sine_fcaa"); g_psDescriptors[lPluginIndex]->Name - = strdup("Sine Oscillator (Freq:control, Amp:audio)"); + = localStrdup("Sine Oscillator (Freq:control, Amp:audio)"); piPortDescriptors[OSC_FREQUENCY] = LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL; piPortDescriptors[OSC_AMPLITUDE] @@ -316,9 +365,9 @@ break; case 3: g_psDescriptors[lPluginIndex]->Label - = strdup("sine_fcac"); + = localStrdup("sine_fcac"); g_psDescriptors[lPluginIndex]->Name - = strdup("Sine Oscillator (Freq:control, Amp:control)"); + = localStrdup("Sine Oscillator (Freq:control, Amp:control)"); piPortDescriptors[OSC_FREQUENCY] = LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL; piPortDescriptors[OSC_AMPLITUDE] ++++++ pvoc_0.1.10.tar.bz2 -> pvoc_0.1.12.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pvoc-0.1.10/Descriptor.h new/pvoc-0.1.12/Descriptor.h --- old/pvoc-0.1.10/Descriptor.h 2004-03-19 14:05:53.000000000 +0100 +++ new/pvoc-0.1.12/Descriptor.h 2008-01-15 11:19:06.000000000 +0100 @@ -1,7 +1,7 @@ /* Descriptor.h - Copyright 2004 Tim Goetze <tim@quitte.de> + Copyright 2004-6 Tim Goetze <tim@quitte.de> http://quitte.de/dsp/ @@ -11,16 +11,11 @@ Descriptor<P> expects P to declare some common methods, like init(), activate() etc, plus a static port_info[] and LADSPA_Data * ports[] - and of course 'adding_gain'. - - maintaining both port_info[] and ports[] is a bit of a bitch, but, - hey, "you only do it once (tm)" .. and then you do it over and over - again. particularly bothersome is also the necessary unrolling of our - PortInfo array to fit into LADSPA_Descriptor's inconsequential way of - port data structuring, which results in quite a bit of memory holding - duplicated data. oh well. + and adding_gain. + */ /* + 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 @@ -35,12 +30,13 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA or point your web browser to http://www.gnu.org. + */ #ifndef _DESCRIPTOR_H_ #define _DESCRIPTOR_H_ -/* common stub for Descriptor makes it possible to delete without special- +/* common stub for Descriptor makes it possible to delete() without special- * casing for every plugin class. */ class DescriptorStub @@ -52,7 +48,7 @@ PortCount = 0; } - virtual ~DescriptorStub() + ~DescriptorStub() { if (PortCount) { @@ -71,19 +67,19 @@ /* tom szilyagi reports that hosts exist which call activate() before * connect_port(). since caps' plugins expect ports to be valid we * need a safeguard: at instantiation, each port is connected to the - * lower bound. When (If?) LADSPA default values are ever fixed, connecting - * to the default will be preferred. */ + * lower bound. */ LADSPA_PortRangeHint * ranges; public: - Descriptor(); + Descriptor() {setup();} + void setup(); void autogen() { - PortCount = (sizeof (T::port_info) / sizeof (::PortInfo)); + PortCount = (sizeof (T::port_info) / sizeof (PortInfo)); /* unroll PortInfo members */ - char ** names = new char * [PortCount]; + const char ** names = new const char * [PortCount]; LADSPA_PortDescriptor * desc = new LADSPA_PortDescriptor [PortCount]; ranges = new LADSPA_PortRangeHint [PortCount]; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pvoc-0.1.10/Makefile new/pvoc-0.1.12/Makefile --- old/pvoc-0.1.10/Makefile 2004-04-18 01:10:30.000000000 +0200 +++ new/pvoc-0.1.12/Makefile 2008-01-15 11:59:12.000000000 +0100 @@ -1,6 +1,6 @@ PREFIX = /usr/local -OPTS = -O6 -ffast-math -funroll-loops -Wall +OPTS = -O6 -ffast-math -funroll-loops -Wall -fPIC CC = g++ @@ -11,7 +11,7 @@ UTILDEST = $(PREFIX)/bin MAN1DEST = $(PREFIX)/man/man1 -VERSION = 0.1.10 +VERSION = 0.1.12 PVOCSRC = pvoc.cc PLUGSRC = interface.cc Plugins.cc diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pvoc-0.1.10/Plugins.cc new/pvoc-0.1.12/Plugins.cc --- old/pvoc-0.1.10/Plugins.cc 2004-03-25 02:16:55.000000000 +0100 +++ new/pvoc-0.1.12/Plugins.cc 2007-07-18 15:04:32.000000000 +0200 @@ -1,7 +1,7 @@ /* Plugins.cc - Copyright 2004 Tim Goetze <tim@quitte.de> + Copyright 2004-7 Tim Goetze <tim@quitte.de> Copyright 2001-2 Richard Dobson, Trevor Wishart http://quitte.de/dsp/ @@ -177,7 +177,8 @@ } }; -Descriptor<Exaggerate>::Descriptor<Exaggerate>() +template <> void +Descriptor<Exaggerate>::setup() { UniqueID = 1791; Label = "Exaggerate"; @@ -345,7 +346,8 @@ } }; -Descriptor<Transpose>::Descriptor<Transpose>() +template <> void +Descriptor<Transpose>::setup() { UniqueID = 1792; Label = "Transpose"; @@ -496,7 +498,8 @@ } }; -Descriptor<Accumulate>::Descriptor<Accumulate>() +template <> void +Descriptor<Accumulate>::setup() { UniqueID = 1793; Label = "Accumulate"; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pvoc-0.1.10/basics.h new/pvoc-0.1.12/basics.h --- old/pvoc-0.1.10/basics.h 2004-03-24 21:03:20.000000000 +0100 +++ new/pvoc-0.1.12/basics.h 2008-01-11 00:56:06.000000000 +0100 @@ -87,7 +87,7 @@ typedef __uint64_t uint64; typedef struct { - char * name; + const char * name; LADSPA_PortDescriptor descriptor; LADSPA_PortRangeHint range; } PortInfo; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pvoc-0.1.10/pvoc.html new/pvoc-0.1.12/pvoc.html --- old/pvoc-0.1.10/pvoc.html 2004-04-18 01:11:41.000000000 +0200 +++ new/pvoc-0.1.12/pvoc.html 2008-01-15 11:59:15.000000000 +0100 @@ -1,31 +1,29 @@ <html> <head> - <title>pvoc - quitte</title> + <title>pvoc</title> <style type=text/css> body, table { font-family: Helvetica, Tahoma, Geneva, sans-serif; } - pre, tt, code { - font-family: LucidaTypewriter, Courier, monospace; - } - h1, h2 { padding-top: 2pt; padding-bottom: 2pt; border-bottom: solid 1px black; - border-top: solid 1px black; - background-color: #eeeeee; - text-align: center; + sborder-top: solid 1px black; + sbackground-color: #eeeeee; + stext-align: center; } h3 { + width: 70%; border-bottom: solid 1px #cccccc; margin-top: 24pt; } h4 { - border-bottom: solid 1px #dddddd; + width: 70%; + border-bottom: dotted 1px #dddddd; } a { @@ -112,7 +110,21 @@ color: #ff0000; } - </style> + + h3 {margin-top: 18em;} + h4 {font-size: 11pt; padding-top: 2em;} + h5 {font-size: medium; margin-bottom: .5em;} + p {max-width: 42em;} + body {margin: 18px;} + p#foot {border-top: solid 1px black;} + h3 {font-size: 14pt; border-bottom: solid 1px black;} + h4 {color: #aa0000; border-bottom: solid 1px black;} + h4 {margin-top: 21px;margin-bottom: 0px;} + ul {max-width: 36em; margin-bottom: 1em;} + ul#plugs {margin-top: 1em; font-size:80%;} + li.bg {font-size: large;} + li {margin-bottom: .4em;} + table {padding-bottom:1em; border-bottom: solid 1px black;margin-bottom: 12px;} </style> </head> <body> @@ -122,7 +134,7 @@ <h2>pvoc</h2> <table border=0 width=100% cellpadding=0 cellspacing=0> <tr> <td align=left width=20%> - <b>Release 0.1.10</b> + <b>Release 0.1.12</b> </td> <td rowspan=2 align=center> <a href=http://quitte.de/dsp/pvoc.html>http://quitte.de/dsp/pvoc.html</a> @@ -133,7 +145,7 @@ </tr> <tr> <td align=left> - April 18 2004 </td> + January 15 2008 </td> <td align=right> <a href=mailto:tim@quitte.de?subject=pvoc>tim@quitte.de</a> </td> @@ -210,7 +222,7 @@ <p> This software package is © Copyright 1981-2004 Regents of the University of California, - 2001-2 Richard Dobson, 2004 Tim Goetze. + 2001-2 Richard Dobson, 2004-8 Tim Goetze. It is distributed under the <a href=COPYING>GNU General Public License</a>. @@ -227,7 +239,7 @@ <p> Download the latest release - from <a href=http://quitte.de/dsp/pvoc.html>the pvoc homepage</a>. + <a href=pvoc_0.1.12.tar.gz>here, it is pvoc_0.1.12.tar.gz (42 kB)</a>. </p> <br> @@ -250,8 +262,8 @@ </p> <pre align=left> -$ tar xvfz pvoc_0.1.10.tar.gz -$ cd pvoc-0.1.10 +$ tar xvfz pvoc_0.1.12.tar.gz +$ cd pvoc-0.1.12 $ make # make install</pre> @@ -401,7 +413,7 @@ </p> <pre style="background-color:#f7f7f7;padding-left:24pt;"> -stretch(1) Sound Data Time Stretching stretch(1) +stretch(1) Sound Data Time Stretching stretch(1) @@ -416,27 +428,24 @@ DESCRIPTION - The stretch utility allows you to lengthen or shorten the - duration of an audio data stream without affecting the - pitch of the sampled data. It employs phase-vocoding to - achieve the effect, usually leading to better results than - time-domain techniques. Input audio data can be composed - of multiple channels, in which case output also is. - - Both output and input can be '-', indicating that signal - data is to be read from stdin or written to stdout respec- - tively (You can also omit the file names for the same - effect, starting with output). In either case, the sample - format is signed 16-bit little-endian (aka CD format). - - For physical file access, the utility makes use of the - sndfile library. The tool tries to guess the intended out- - put file format from the filename extension; in addition, - you can specify the output bit depth (quantization) with - the -b (--bits) parameter. + The stretch utility allows you to lengthen or shorten the duration of + an audio data stream without affecting the pitch of the sampled data. + It employs phase-vocoding to achieve the effect, usually leading to + better results than time-domain techniques. Input audio data can be + composed of multiple channels, in which case output also is. + + Both output and input can be '-', indicating that signal data is to be + read from stdin or written to stdout respectively (You can also omit + the file names for the same effect, starting with output). In either + case, the sample format is signed 16-bit little-endian (aka CD format). + + For physical file access, the utility makes use of the sndfile library. + The tool tries to guess the intended output file format from the file- + name extension; in addition, you can specify the output bit depth + (quantization) with the -b (--bits) parameter. - The tool is not capable of directly replacing the contents - of the input file. + The tool is not capable of directly replacing the contents of the input + file. OPTIONS @@ -444,23 +453,22 @@ stretch -t 1.5 infile.wav outfile.wav - This example stretches infile.wav to 150 % duration and - writes the result to outfile.wav. + This example stretches infile.wav to 150 % duration and writes the + result to outfile.wav. Most useful options: -t, --times <stretch factor> - sets the ratio by which the duration of the sound - signal is scaled. Extreme values can cause audible - artefacts in the output signal, usually perceived - as cyclic amplitude modulation. To achieve an exact - time expansion/compression ratio, the product of - this and the -o (--overlap) parameter needs to be - an integer value. + sets the ratio by which the duration of the sound signal is + scaled. Extreme values can cause audible artefacts in the out- + put signal, usually perceived as cyclic amplitude modulation. To + achieve an exact time expansion/compression ratio, the product + of this and the -o (--overlap) parameter needs to be an integer + value. -a, --amplify <factor> - sets the linear amplification factor for the output - signal. The default value is 1.0 . + sets the linear amplification factor for the output signal. The + default value is 1.0 . -q, --quiet makes the utility be silent about what it does. @@ -468,26 +476,24 @@ Processing control options: -f, --fft <DFT length> - sets the length of the DFT (discrete Fourier trans- - form), which should be a power of two for best - results. Odd values may cause the utility to throw - up. Larger DFT sizes imply better frequency resolu- - tion at the cost of increased computational demand. - The default value is 1024 samples. + sets the length of the DFT (discrete Fourier transform), which + should be a power of two for best results. Odd values may cause + the utility to throw up. Larger DFT sizes imply better frequency + resolution at the cost of increased computational demand. The + default value is 1024 samples. -o, --overlap <overlap> - controls the interval at which recomposition of the - signal takes place. Smaller values imply a smoother - result in exchange for increased computational - demand. The default value is 128 samples. + controls the interval at which recomposition of the signal takes + place. Smaller values imply a smoother result in exchange for + increased computational demand. The default value is 128 sam- + ples. Piped input signal options: - If signal input is from stdin, the default assumption - about the data format (other than the aforementioned - 16-bit signed little-endian convention) is two-channel - audio at 44.1 kHz sample rate. The following options over- - ride these: + If signal input is from stdin, the default assumption about the data + format (other than the aforementioned 16-bit signed little-endian con- + vention) is two-channel audio at 44.1 kHz sample rate. The following + options override these: -c, --channels <channel count> no surprises: 1 is mono, 2 stereo etc. @@ -498,67 +504,68 @@ Output bit depth: -b, --bits <quantization> - sets the output bit depth (only for physical file - output). 8, 16 or 24 for signed integers, 32 or 64 - for floating point. The default is 16-bit. (Inter- - nal precision is 32 bit floating-point.) + sets the output bit depth (only for physical file output). 8, + 16 or 24 for signed integers, 32 or 64 for floating point. The + default is 16-bit. (Internal precision is 32 bit floating- + point.) -l, --limit - this option causes the utility to clip the output - signal to stay within the output quantization or - the [-1,+1] range if output is in floating-point - format. The use of this flag is highly recommended - when output is in integer sample format (--bits - less than 32 or stdout output). + this option causes the utility to clip the output signal to stay + within the output quantization or the [-1,+1] range if output is + in floating-point format. The use of this flag is highly recom- + mended when output is in integer sample format (--bits less than + 32 or stdout output). Information options: -h, --help - prints version information and a list of supported - file formats/extensions, then quits. + prints version information and a list of supported file for- + mats/extensions, then quits. -v, --version prints version information, then quits. EXAMPLES - A few example invocations of the utility, all assuming - source data is in CD format (signed 16-bit samples, - stereo, 44.1 kHz): + A few example invocations of the utility, all assuming source data is + in CD format (signed 16-bit samples, stereo, 44.1 kHz): stretch -o 100 -t 1.2 cdda.wav | aplay -fcd - stretches cdda.wav to exactly 120 %, piping the output to - the aplay program for immediate playback. + stretches cdda.wav to exactly 120 %, piping the output to the aplay + program for immediate playback. cat file.ogg | oggdec - | stretch -t.8 | aplay -fcd - plays back an ogg stream, accelerated to 80 % duration. + plays back an ogg stream, accelerated to 80 % duration. If you prefer + mp3, an equivalent incantation is: + + madplay -o raw:- file.mp3 | stretch -t.8 | aplay -f cd + BUGS - Lousy command line parsing and error feedback. Lots of - combinations of output file formats and quantization - untested, as is the operation on big-endian systems. - Phase vocoding chews a lot of CPU cycles. + Lousy command line parsing and error feedback. Lots of combinations of + output file formats and quantization untested, as is the operation on + big-endian systems. Phase vocoding chews a lot of CPU cycles. AUTHORS - The original phase vocoder implementation was done by Mark - Dolson at UCSD, part of the CARL suite, skillfully con- - verted to streaming operation by Richard Dobson. + The original phase vocoder implementation was done by Mark Dolson at + UCSD, part of the CARL suite, skillfully converted to streaming opera- + tion by Richard Dobson. - The stretch tool and this manual page were written by Tim - Goetze <tim@quitte.de>. + The stretch tool and this manual page were written by Tim Goetze + <tim@quitte.de>. HOMEPAGE - The latest version of this tool can be obtained from + The latest version of this tool can be obtained from http://quitte.de/dsp/pvoc.html . - March 25, 2004 stretch(1) + March 25, 2004 stretch(1) </pre> <a name=Appendix><h3>Appendix</h3></a> @@ -566,6 +573,9 @@ <a name=Changelog><h4>Changelog</h4></a> <pre> +0.1.11 + * added g++-4 compliant Descriptor<> constructor decoration + 0.1.10 * ladspa.h included in tarball @@ -618,7 +628,7 @@ <br> <div class=foot> - tim@<a href=http://quitte.de/>quitte.de</a>, April 18 2004. + tim@<a href=http://quitte.de/>quitte.de</a>, January 15 2008. </div> </center> </body> </html> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pvoc-0.1.10/stretch.1 new/pvoc-0.1.12/stretch.1 --- old/pvoc-0.1.10/stretch.1 2004-03-26 13:35:03.000000000 +0100 +++ new/pvoc-0.1.12/stretch.1 2008-01-15 11:35:23.000000000 +0100 @@ -121,7 +121,11 @@ .TP cat file.ogg | oggdec - | stretch -t.8 | aplay -fcd .P -plays back an \fIogg\fP stream, accelerated to 80 % duration. +plays back an \fIogg\fP stream, accelerated to 80 % duration. If +you prefer \fImp3\fP, an equivalent incantation is: +.TP + madplay -o raw:- file.mp3 | stretch -t.8 | aplay -f cd +.P .SH "BUGS" Lousy command line parsing and error feedback. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pvoc-0.1.10/stretch.cc new/pvoc-0.1.12/stretch.cc --- old/pvoc-0.1.10/stretch.cc 2004-03-26 13:31:11.000000000 +0100 +++ new/pvoc-0.1.12/stretch.cc 2008-01-15 11:27:22.000000000 +0100 @@ -46,7 +46,7 @@ static char error [400]; static void -die (char * fmt, ...) +die (const char * fmt, ...) { va_list list; @@ -88,7 +88,7 @@ /* /////////////////////////////////////////////////////////////////////// */ -static struct {char * ext; int fmt;} +static struct {const char * ext; int fmt;} formats[] = { {"aif", SF_FORMAT_AIFF }, {"wav", SF_FORMAT_WAV }, ++++++ swh-configure-2.65.patch ++++++ Index: swh-plugins-0.4.15/configure =================================================================== --- swh-plugins-0.4.15.orig/configure +++ swh-plugins-0.4.15/configure @@ -767,6 +767,7 @@ GMSGFMT MSGFMT GETTEXT_MACRO_VERSION USE_NLS +MKINSTALLDIRS CPP OTOOL64 OTOOL @@ -11223,6 +11224,17 @@ fi ALL_LINGUAS="en_GB" + MKINSTALLDIRS= + if test -n "$ac_aux_dir"; then + case "$ac_aux_dir" in + /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;; + *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;; + esac + fi + if test -z "$MKINSTALLDIRS"; then + MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 $as_echo_n "checking whether NLS is requested... " >&6; } # Check whether --enable-nls was given. ++++++ swh-configure.patch ++++++ Index: swh-plugins-0.4.15/configure =================================================================== --- swh-plugins-0.4.15.orig/configure +++ swh-plugins-0.4.15/configure @@ -811,6 +811,7 @@ GMSGFMT MSGFMT GETTEXT_MACRO_VERSION USE_NLS +MKINSTALLDIRS CPP OTOOL64 OTOOL @@ -12121,6 +12122,17 @@ fi ALL_LINGUAS="en_GB" + MKINSTALLDIRS= + if test -n "$ac_aux_dir"; then + case "$ac_aux_dir" in + /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;; + *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;; + esac + fi + if test -z "$MKINSTALLDIRS"; then + MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" + fi + { $as_echo "$as_me:$LINENO: checking whether NLS is requested" >&5 $as_echo_n "checking whether NLS is requested... " >&6; } # Check whether --enable-nls was given. ++++++ swh-libblo.dif ++++++ Index: swh-plugins-0.4.15/configure.in =================================================================== --- swh-plugins-0.4.15.orig/configure.in +++ swh-plugins-0.4.15/configure.in @@ -49,6 +50,7 @@ AC_PROG_LIBTOOL AC_LANG_C AC_PROG_CC +AM_PROG_CC_C_O AC_REQUIRE_CPP ALL_LINGUAS="en_GB" AM_GNU_GETTEXT([external]) ++++++ tap-plugins-0.7.0.tar.bz2 -> tap-plugins-0.7.1.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tap-plugins-0.7.0/CREDITS new/tap-plugins-0.7.1/CREDITS --- old/tap-plugins-0.7.0/CREDITS 2004-08-17 14:34:43.000000000 +0200 +++ new/tap-plugins-0.7.1/CREDITS 2009-08-17 13:10:57.000000000 +0200 @@ -49,6 +49,15 @@ with the CPU runaway problems in TAP Reverberator, by reporting the problem and trying out my solutions. +Maarten Maathuis <madman2003@gmail.com> contributed the Bauer +stereophonic-to-binaural DSP plugin. NOTE: this plugin only existed in +CVS between releases 0.7.0 and 0.7.1; it has been agreed to be removed +from TAP-plugins and released separately. + +Damon Chaplin <damon@karuna.eclipse.co.uk> tracked down issues that +caused problems on 64-bit machines, found uninitialised variables via +Valgrind, and also pinned down long lurking denormal issues. Thanks! + And, of course, special thanks to the Ardour [http://ardour.org] and JACK [http://jackit.sf.net] development teams for their tireless diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tap-plugins-0.7.0/Makefile new/tap-plugins-0.7.1/Makefile --- old/tap-plugins-0.7.0/Makefile 2004-08-17 14:34:43.000000000 +0200 +++ new/tap-plugins-0.7.1/Makefile 2009-08-17 13:10:57.000000000 +0200 @@ -1,4 +1,4 @@ -# Copyright (C) 2004 Tom Szilagyi +# Copyright (C) 2004-2009 Tom Szilagyi # # 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 @@ -14,7 +14,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # -# $Id: Makefile,v 1.16 2004/08/13 18:34:31 tszilagyi Exp $ +# $Id: Makefile,v 1.17 2006/11/26 19:42:44 tszilagyi Exp $ ##################################################################### @@ -156,5 +156,5 @@ clean: -rm -f `find . -name "*.so"` -rm -f `find . -name "*.o"` - -rm -f `find .. -name "*~"` + -rm -f `find . -name "*~"` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tap-plugins-0.7.0/tap_echo.c new/tap-plugins-0.7.1/tap_echo.c --- old/tap-plugins-0.7.0/tap_echo.c 2004-08-17 14:34:43.000000000 +0200 +++ new/tap-plugins-0.7.1/tap_echo.c 2009-08-17 13:10:57.000000000 +0200 @@ -15,7 +15,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: tap_echo.c,v 1.6 2004/08/05 16:18:44 tszilagyi Exp $ + $Id: tap_echo.c,v 1.7 2004/12/06 09:32:41 tszilagyi Exp $ */ @@ -103,6 +103,24 @@ if ((ptr = malloc(sizeof(Echo))) != NULL) { ((Echo *)ptr)->sample_rate = SampleRate; ((Echo *)ptr)->run_adding_gain = 1.0f; + + /* allocate memory for ringbuffers and related dynamic vars */ + if ((((Echo *)ptr)->ringbuffer_L = + calloc(MAX_DELAY * ((Echo *)ptr)->sample_rate / 1000, + sizeof(LADSPA_Data))) == NULL) + exit(1); + if ((((Echo *)ptr)->ringbuffer_R = + calloc(MAX_DELAY * ((Echo *)ptr)->sample_rate / 1000, + sizeof(LADSPA_Data))) == NULL) + exit(1); + if ((((Echo *)ptr)->buffer_pos_L = calloc(1, sizeof(unsigned long))) == NULL) + exit(1); + if ((((Echo *)ptr)->buffer_pos_R = calloc(1, sizeof(unsigned long))) == NULL) + exit(1); + + *(((Echo *)ptr)->buffer_pos_L) = 0; + *(((Echo *)ptr)->buffer_pos_R) = 0; + return ptr; } @@ -114,45 +132,19 @@ void activate_Echo(LADSPA_Handle Instance) { - Echo * ptr; - - ptr = (Echo *)Instance; + Echo * ptr = (Echo *)Instance; + int i; ptr->mpx_out_L = 0; ptr->mpx_out_R = 0; - /* allocate memory for ringbuffers and related dynamic vars */ - if ((ptr->ringbuffer_L = - calloc(MAX_DELAY * ptr->sample_rate / 1000, - sizeof(LADSPA_Data))) == NULL) - exit(1); - if ((ptr->ringbuffer_R = - calloc(MAX_DELAY * ptr->sample_rate / 1000, - sizeof(LADSPA_Data))) == NULL) - exit(1); - if ((ptr->buffer_pos_L = calloc(1, sizeof(unsigned long))) == NULL) - exit(1); - if ((ptr->buffer_pos_R = calloc(1, sizeof(unsigned long))) == NULL) - exit(1); - *(ptr->buffer_pos_L) = 0; - *(ptr->buffer_pos_R) = 0; -} - - -/* deactivate a plugin instance */ -void -deactivate_Echo(LADSPA_Handle Instance) { - - Echo * ptr; + *(ptr->buffer_pos_R) = 0; - ptr = (Echo *)Instance; - - /* free memory allocated for ringbuffers & co. in activate_Echo() */ - free(ptr->ringbuffer_L); - free(ptr->ringbuffer_R); - free(ptr->buffer_pos_L); - free(ptr->buffer_pos_R); + for (i = 0; i < MAX_DELAY * ptr->sample_rate / 1000; i++) { + ptr->ringbuffer_L[i] = 0.0f; + ptr->ringbuffer_R[i] = 0.0f; + } } @@ -428,6 +420,13 @@ void cleanup_Echo(LADSPA_Handle Instance) { + Echo * ptr = (Echo *)Instance; + + free(ptr->ringbuffer_L); + free(ptr->ringbuffer_R); + free(ptr->buffer_pos_L); + free(ptr->buffer_pos_R); + free(Instance); } @@ -584,7 +583,7 @@ stereo_descriptor->run = run_Echo; stereo_descriptor->run_adding = run_adding_gain_Echo; stereo_descriptor->set_run_adding_gain = set_run_adding_gain; - stereo_descriptor->deactivate = deactivate_Echo; + stereo_descriptor->deactivate = NULL; stereo_descriptor->cleanup = cleanup_Echo; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tap-plugins-0.7.0/tap_eq.c new/tap-plugins-0.7.1/tap_eq.c --- old/tap-plugins-0.7.0/tap_eq.c 2004-08-17 14:34:43.000000000 +0200 +++ new/tap-plugins-0.7.1/tap_eq.c 2009-08-17 13:10:57.000000000 +0200 @@ -15,7 +15,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: tap_eq.c,v 1.6 2004/04/18 19:56:56 tszilagyi Exp $ + $Id: tap_eq.c,v 1.7 2006/08/09 12:03:24 tszilagyi Exp $ */ @@ -224,6 +224,8 @@ float fs; fs = s_rate; + + memset(ptr, 0, sizeof(eq)); filters = calloc(8, sizeof(biquad)); @@ -231,6 +233,30 @@ ptr->fs = fs; ptr->run_adding_gain = 1.0f; + ptr->old_ch0f = 100.0f; + ptr->old_ch0g = 0; + + ptr->old_ch1f = 200.0f; + ptr->old_ch1g = 0; + + ptr->old_ch2f = 400.0f; + ptr->old_ch2g = 0; + + ptr->old_ch3f = 1000.0f; + ptr->old_ch3g = 0; + + ptr->old_ch4f = 3000.0f; + ptr->old_ch4g = 0; + + ptr->old_ch5f = 6000.0f; + ptr->old_ch5g = 0; + + ptr->old_ch6f = 12000.0f; + ptr->old_ch6g = 0; + + ptr->old_ch7f = 15000.0f; + ptr->old_ch7g = 0; + eq_set_params(&filters[0], 100.0f, 0.0f, BWIDTH, fs); eq_set_params(&filters[1], 200.0f, 0.0f, BWIDTH, fs); eq_set_params(&filters[2], 400.0f, 0.0f, BWIDTH, fs); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tap-plugins-0.7.0/tap_eqbw.c new/tap-plugins-0.7.1/tap_eqbw.c --- old/tap-plugins-0.7.0/tap_eqbw.c 2004-08-17 14:34:43.000000000 +0200 +++ new/tap-plugins-0.7.1/tap_eqbw.c 2009-08-17 13:10:57.000000000 +0200 @@ -15,7 +15,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: tap_eqbw.c,v 1.4 2004/04/18 19:56:56 tszilagyi Exp $ + $Id: tap_eqbw.c,v 1.5 2006/08/09 12:03:24 tszilagyi Exp $ */ @@ -271,12 +271,46 @@ fs = s_rate; + memset(ptr, 0, sizeof(eq)); + filters = calloc(8, sizeof(biquad)); ptr->filters = filters; ptr->fs = fs; ptr->run_adding_gain = 1.0f; + ptr->old_ch0f = 100.0f; + ptr->old_ch0g = 0.0f; + ptr->old_ch0b = BWIDTH; + + ptr->old_ch1f = 200.0f; + ptr->old_ch1g = 0.0f; + ptr->old_ch1b = BWIDTH; + + ptr->old_ch2f = 400.0f; + ptr->old_ch2g = 0.0f; + ptr->old_ch2b = BWIDTH; + + ptr->old_ch3f = 1000.0f; + ptr->old_ch3g = 0.0f; + ptr->old_ch3b = BWIDTH; + + ptr->old_ch4f = 3000.0f; + ptr->old_ch4g = 0.0f; + ptr->old_ch4b = BWIDTH; + + ptr->old_ch5f = 6000.0f; + ptr->old_ch5g = 0.0f; + ptr->old_ch5b = BWIDTH; + + ptr->old_ch6f = 12000.0f; + ptr->old_ch6g = 0.0f; + ptr->old_ch6b = BWIDTH; + + ptr->old_ch7f = 15000.0f; + ptr->old_ch7g = 0.0f; + ptr->old_ch7b = BWIDTH; + eq_set_params(&filters[0], 100.0f, 0.0f, BWIDTH, fs); eq_set_params(&filters[1], 200.0f, 0.0f, BWIDTH, fs); eq_set_params(&filters[2], 400.0f, 0.0f, BWIDTH, fs); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tap-plugins-0.7.0/tap_reverb.h new/tap-plugins-0.7.1/tap_reverb.h --- old/tap-plugins-0.7.0/tap_reverb.h 2004-08-17 14:34:43.000000000 +0200 +++ new/tap-plugins-0.7.1/tap_reverb.h 2009-08-17 13:10:57.000000000 +0200 @@ -17,6 +17,11 @@ $Id: tap_reverb.h,v 1.10 2004/06/14 16:43:55 tszilagyi Exp $ */ +#ifndef _ISOC99_SOURCE +#define _ISOC99_SOURCE +#endif + +#include <stdint.h> @@ -117,7 +122,6 @@ #define db2lin(x) ((x) > -90.0f ? powf(10.0f, (x) * 0.05f) : 0.0f) #define ABS(x) (x)>0.0f?(x):-1.0f*(x) #define LN_2_2 0.34657359f -#define FLUSH_TO_ZERO(x) (((*(unsigned int*)&(x))&0x7f800000)==0)?0.0f:(x) #define LIMIT(v,l,u) ((v)<(l)?(l):((v)>(u)?(u):(v))) #define BIQUAD_TYPE float @@ -195,19 +199,23 @@ rev_t biquad_run(biquad *f, rev_t x) { - rev_t y; + union { + rev_t y; + uint32_t y_int; + } u; - y = f->b0 * x + f->b1 * f->x1 + f->b2 * f->x2 - + f->a1 * f->y1 + f->a2 * f->y2; + u.y = f->b0 * x + f->b1 * f->x1 + f->b2 * f->x2 + + f->a1 * f->y1 + f->a2 * f->y2; #ifdef REVERB_CALC_FLOAT - y = FLUSH_TO_ZERO(y); + if ((u.y_int & 0x7f800000) == 0) + u.y = 0.0f; #endif f->x2 = f->x1; f->x1 = x; f->y2 = f->y1; - f->y1 = y; + f->y1 = u.y; - return y; + return u.y; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tap-plugins-0.7.0/tap_sigmoid.c new/tap-plugins-0.7.1/tap_sigmoid.c --- old/tap-plugins-0.7.0/tap_sigmoid.c 2004-08-17 14:34:43.000000000 +0200 +++ new/tap-plugins-0.7.1/tap_sigmoid.c 2009-08-17 13:10:57.000000000 +0200 @@ -15,7 +15,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: tap_sigmoid.c,v 1.1 2004/08/02 18:14:50 tszilagyi Exp $ + $Id: tap_sigmoid.c,v 1.3 2005/08/30 11:19:14 tszilagyi Exp $ */ @@ -40,9 +40,12 @@ #define OUTPUT 3 /* Total number of ports */ +#define PORTCOUNT_MONO 4 -#define PORTCOUNT_MONO 4 +/* The closer this is to 1.0, the slower the input parameter + interpolation will be. */ +#define INTERP 0.99f /* The structure used to hold port connection information and state */ @@ -53,12 +56,14 @@ LADSPA_Data * input; LADSPA_Data * output; + LADSPA_Data pregain_i; + LADSPA_Data postgain_i; + unsigned long sample_rate; LADSPA_Data run_adding_gain; } Sigmoid; - /* Construct a new plugin instance. */ LADSPA_Handle instantiate_Sigmoid(const LADSPA_Descriptor * Descriptor, @@ -76,9 +81,6 @@ } - - - /* Connect a port to a data location. */ void connect_port_Sigmoid(LADSPA_Handle Instance, @@ -90,9 +92,11 @@ switch (Port) { case PREGAIN: ptr->pregain = DataLocation; + ptr->pregain_i = db2lin(LIMIT(*DataLocation,-90.0f,20.0f)); break; case POSTGAIN: ptr->postgain = DataLocation; + ptr->postgain_i = db2lin(LIMIT(*DataLocation,-90.0f,20.0f)); break; case INPUT: ptr->input = DataLocation; @@ -104,7 +108,6 @@ } - void run_Sigmoid(LADSPA_Handle Instance, unsigned long SampleCount) { @@ -114,6 +117,8 @@ LADSPA_Data * output = ptr->output; LADSPA_Data pregain = db2lin(LIMIT(*(ptr->pregain),-90.0f,20.0f)); LADSPA_Data postgain = db2lin(LIMIT(*(ptr->postgain),-90.0f,20.0f)); + LADSPA_Data pregain_i = ptr->pregain_i; + LADSPA_Data postgain_i = ptr->postgain_i; unsigned long sample_index; unsigned long sample_count = SampleCount; @@ -121,19 +126,39 @@ LADSPA_Data in = 0.0f; LADSPA_Data out = 0.0f; + if ((pregain_i != pregain) || (postgain_i != postgain)) { + + for (sample_index = 0; sample_index < sample_count; sample_index++) { + + pregain_i = pregain_i * INTERP + pregain * (1.0f - INTERP); + postgain_i = postgain_i * INTERP + postgain * (1.0f - INTERP); + + in = *(input++) * pregain_i; + + out = 2.0f / (1.0f + exp(-5.0*in)) - 1.0f; + + *(output++) = out * postgain_i; + } + + ptr->pregain_i = pregain_i; + ptr->postgain_i = postgain_i; - for (sample_index = 0; sample_index < sample_count; sample_index++) { + } else { + for (sample_index = 0; sample_index < sample_count; sample_index++) { - in = *(input++) * pregain; + in = *(input++) * pregain_i; - out = 2.0f / (1.0f + exp(-5.0*in)) - 1.0f; + out = 2.0f / (1.0f + exp(-5.0*in)) - 1.0f; - *(output++) = out * postgain; + *(output++) = out * postgain_i; + } + + ptr->pregain_i = pregain_i; + ptr->postgain_i = postgain_i; } } - void set_run_adding_gain_Sigmoid(LADSPA_Handle Instance, LADSPA_Data gain) { @@ -143,7 +168,6 @@ } - void run_adding_Sigmoid(LADSPA_Handle Instance, unsigned long SampleCount) { @@ -153,6 +177,8 @@ LADSPA_Data * output = ptr->output; LADSPA_Data pregain = db2lin(LIMIT(*(ptr->pregain),-90.0f,20.0f)); LADSPA_Data postgain = db2lin(LIMIT(*(ptr->postgain),-90.0f,20.0f)); + LADSPA_Data pregain_i = ptr->pregain_i; + LADSPA_Data postgain_i = ptr->postgain_i; unsigned long sample_index; unsigned long sample_count = SampleCount; @@ -161,17 +187,34 @@ LADSPA_Data out = 0.0f; - for (sample_index = 0; sample_index < sample_count; sample_index++) { + if ((pregain_i != pregain) || (postgain_i != postgain)) { + + for (sample_index = 0; sample_index < sample_count; sample_index++) { - in = *(input++) * pregain; + pregain_i = pregain_i * INTERP + pregain * (1.0f - INTERP); + postgain_i = postgain_i * INTERP + postgain * (1.0f - INTERP); + + in = *(input++) * pregain_i; - out = 2.0f / (1.0f + exp(-5.0*in)) - 1.0f; + out = 2.0f / (1.0f + exp(-5.0*in)) - 1.0f; - *(output++) += out * postgain * ptr->run_adding_gain; - } -} + *(output++) = out * postgain_i * ptr->run_adding_gain; + } + ptr->pregain_i = pregain_i; + ptr->postgain_i = postgain_i; + } else { + for (sample_index = 0; sample_index < sample_count; sample_index++) { + + in = *(input++) * pregain_i; + + out = 2.0f / (1.0f + exp(-5.0*in)) - 1.0f; + + *(output++) = out * postgain_i * ptr->run_adding_gain; + } + } +} /* Throw away a Sigmoid effect instance. */ @@ -182,11 +225,9 @@ } - LADSPA_Descriptor * mono_descriptor = NULL; - /* _init() is called automatically when the plugin library is first loaded. */ void diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tap-plugins-0.7.0/tap_utils.h new/tap-plugins-0.7.1/tap_utils.h --- old/tap-plugins-0.7.0/tap_utils.h 2004-08-17 14:34:43.000000000 +0200 +++ new/tap-plugins-0.7.1/tap_utils.h 2009-08-17 13:10:57.000000000 +0200 @@ -17,7 +17,11 @@ $Id: tap_utils.h,v 1.5 2004/02/21 17:33:36 tszilagyi Exp $ */ +#ifndef _ISOC99_SOURCE +#define _ISOC99_SOURCE +#endif +#include <stdint.h> #ifndef M_PI #define M_PI 3.14159265358979323846264338327 @@ -92,7 +96,6 @@ #define LN_2_2 0.34657359f -#define FLUSH_TO_ZERO(x) (((*(unsigned int*)&(x))&0x7f800000)==0)?0.0f:(x) #define LIMIT(v,l,u) ((v)<(l)?(l):((v)>(u)?(u):(v))) #define BIQUAD_TYPE float @@ -246,15 +249,19 @@ bq_t biquad_run(biquad *f, bq_t x) { - bq_t y; + union { + bq_t y; + uint32_t y_int; + } u; - y = f->b0 * x + f->b1 * f->x1 + f->b2 * f->x2 - + f->a1 * f->y1 + f->a2 * f->y2; - y = FLUSH_TO_ZERO(y); + u.y = f->b0 * x + f->b1 * f->x1 + f->b2 * f->x2 + + f->a1 * f->y1 + f->a2 * f->y2; + if ((u.y_int & 0x7f800000) == 0) + u.y = 0.0f; f->x2 = f->x1; f->x1 = x; f->y2 = f->y1; - f->y1 = y; + f->y1 = u.y; - return y; + return u.y; } ++++++ tap-type-punning-fix.dif ++++++ --- /var/tmp/diff_new_pack.RKtF0t/_old 2010-04-03 00:20:44.000000000 +0200 +++ /var/tmp/diff_new_pack.RKtF0t/_new 2010-04-03 00:20:44.000000000 +0200 @@ -1,16 +1,17 @@ ---- tap_utils.h-dist 2004-03-05 15:44:58.000000000 +0100 +Index: tap-plugins-0.7.1/tap_utils.h +=================================================================== +--- tap_utils.h +++ tap_utils.h 2004-03-05 15:45:53.000000000 +0100 -@@ -92,7 +92,14 @@ +@@ -95,6 +95,14 @@ for any bugs or malfunction. */ #define LN_2_2 0.34657359f --#define FLUSH_TO_ZERO(x) (((*(unsigned int*)&(x))&0x7f800000)==0)?0.0f:(x) +static inline float FLUSH_TO_ZERO(float fv) { + union { + float f; + int i; -+ } v; -+ v.f = fv; ++ } v; ++ v.f = fv; + return (v.i & 0x7f800000) == 0 ?0.0f : fv; +} #define LIMIT(v,l,u) ((v)<(l)?(l):((v)>(u)?(u):(v))) ++++++ vocoder-ladspa-0.2.tar.bz2 -> vocoder-ladspa-0.3.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vocoder-0.2/README new/vocoder-0.3/README --- old/vocoder-0.2/README 2002-09-20 20:08:21.000000000 +0200 +++ new/vocoder-0.3/README 2004-04-27 20:29:37.000000000 +0200 @@ -1,4 +1,7 @@ -LADSPA Vocoder Plugin Release v0.2 +LADSPA Vocoder Plugin Release v0.3 + +Whats new for v0.3: +You can now change the vocoder bands in real time. Whats new for v0.2: Uhh, nothing really, mostly just a documentation update :) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vocoder-0.2/vocoder.c new/vocoder-0.3/vocoder.c --- old/vocoder-0.2/vocoder.c 2002-09-21 02:23:30.000000000 +0200 +++ new/vocoder-0.3/vocoder.c 2004-04-27 20:28:59.000000000 +0200 @@ -1,8 +1,12 @@ /* vocoder.c - Version 0.2 + Version 0.3 LADSPA Unique ID: 1441 + Version 0.3 + Added support for changing bands in real time 2003-12-09 + + Version 0.2 Adapted to LADSPA by Josh Green <jgreen@users.sourceforge.net> 15.6.2001 (for the LinuxTag 2001!) @@ -181,24 +185,24 @@ unsigned long SampleCount) { VocoderInstance *vocoder = (VocoderInstance *)Instance; - int i, j; + int i, j, numbands; float a; LADSPA_Data x, c; - j = (int)(*vocoder->ctrlBandCount); - if (j < 1 || j > MAX_BANDS) j = MAX_BANDS; + numbands = (int)(*vocoder->ctrlBandCount); + if (numbands < 1 || numbands > MAX_BANDS) numbands = MAX_BANDS; /* initialize bandpass information if num_bands control has changed, or on first run */ - if (vocoder->num_bands != j) + if (vocoder->num_bands != numbands) { - vocoder->num_bands = j; + vocoder->num_bands = numbands; - for(i=0; i < j; i++) + for(i=0; i < numbands; i++) { memset(&vocoder->bands_formant[i], 0, sizeof(struct bandpass)); - a = 16.0 * i/(double)j; // stretch existing bands + a = 16.0 * i/(double)numbands; // stretch existing bands if (a < 4.0) vocoder->bands_formant[i].freq = 150 + 420 * a / 4.0; @@ -221,6 +225,12 @@ CLAMP (*vocoder->ctrlBandLevels[i], 0.0, 1.0); } } + else /* get current values of band level controls */ + { + for (i = 0; i < numbands; i++) + vocoder->bands_out[i].level = CLAMP (*vocoder->ctrlBandLevels[i], + 0.0, 1.0); + } for (i=0; i < SampleCount; i++) { @@ -230,7 +240,7 @@ vocoder->portFormant[i], vocoder); vocoder->portOutput[i] = 0.0; - for (j=0; j < vocoder->num_bands; j++) + for (j=0; j < numbands; j++) { vocoder->bands_out[j].oldval = vocoder->bands_out[j].oldval + (fabs (vocoder->bands_formant[j].y) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@Hilbert.suse.de