aboutsummaryrefslogtreecommitdiffstats
path: root/src/reverbs.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2014-05-05 09:46:40 +0000
committerDavid Robillard <d@drobilla.net>2014-05-05 09:46:40 +0000
commitb519cf2151fa3cff0a40646248c855f74c6b7baa (patch)
tree6cb62cce4ec82b7415d9eab1859253f2aa24d5ad /src/reverbs.h
parentecc24d68b726c5822f009b8efd09c69c0d3305eb (diff)
downloadfomp.lv2-b519cf2151fa3cff0a40646248c855f74c6b7baa.tar.gz
fomp.lv2-b519cf2151fa3cff0a40646248c855f74c6b7baa.tar.bz2
fomp.lv2-b519cf2151fa3cff0a40646248c855f74c6b7baa.zip
Add Zita reverb (stereo and ambisonic variant).
git-svn-id: http://svn.drobilla.net/lad/trunk/plugins/fomp.lv2@5395 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/reverbs.h')
-rw-r--r--src/reverbs.h134
1 files changed, 134 insertions, 0 deletions
diff --git a/src/reverbs.h b/src/reverbs.h
new file mode 100644
index 0000000..2650856
--- /dev/null
+++ b/src/reverbs.h
@@ -0,0 +1,134 @@
+// -----------------------------------------------------------------------
+//
+// Copyright (C) 2003-2014 Fons Adriaensen <fons@linuxaudio.org>
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//
+// -----------------------------------------------------------------------
+
+
+#ifndef __REVERBS_H
+#define __REVERBS_H
+
+#include "ladspaplugin.h"
+#include "zreverb.h"
+
+
+// -----------------------------------------------------------------------
+
+
+class Ladspa_zita_reverb : public LadspaPlugin
+{
+public:
+
+ enum
+ {
+ A_INPL,
+ A_INPR,
+ A_OUTL,
+ A_OUTR,
+ C_DELAY,
+ C_XOVER,
+ C_RTLOW,
+ C_RTMID,
+ C_FDAMP,
+ C_FREQ1,
+ C_GAIN1,
+ C_FREQ2,
+ C_GAIN2,
+ C_OPMIX,
+ NPORT
+ };
+
+ Ladspa_zita_reverb (SampleRate fsam) : LadspaPlugin (fsam)
+ {
+ _zreverb = new Zreverb ();
+ _zreverb->init (fsam, false);
+ _nprep = 0;
+ }
+ virtual void setport (PortIndex port, PortData *data);
+ virtual void active (bool act);
+ virtual void runproc (SampleCount len, bool add);
+ virtual ~Ladspa_zita_reverb (void)
+ {
+ delete _zreverb;
+ }
+
+private:
+
+ enum { FRAGM = 2048 };
+
+ float *_port [NPORT];
+ Zreverb *_zreverb;
+ unsigned long _nprep;
+};
+
+
+// -----------------------------------------------------------------------
+
+
+class Ladspa_zita_reverb_amb : public LadspaPlugin
+{
+public:
+
+ enum
+ {
+ A_INPL,
+ A_INPR,
+ A_OUTW,
+ A_OUTX,
+ A_OUTY,
+ A_OUTZ,
+ C_DELAY,
+ C_XOVER,
+ C_RTLOW,
+ C_RTMID,
+ C_FDAMP,
+ C_FREQ1,
+ C_GAIN1,
+ C_FREQ2,
+ C_GAIN2,
+ C_RGXYZ,
+ NPORT
+ };
+
+ Ladspa_zita_reverb_amb (unsigned long fsam) : LadspaPlugin (fsam)
+ {
+ _zreverb = new Zreverb ();
+ _zreverb->init (fsam, true);
+ _nprep = 0;
+ }
+ virtual void setport (PortIndex port, PortData *data);
+ virtual void active (bool act);
+ virtual void runproc (SampleCount len, bool add);
+ virtual ~Ladspa_zita_reverb_amb (void)
+ {
+ delete _zreverb;
+ }
+
+private:
+
+ enum { FRAGM = 2048 };
+
+ float *_port [NPORT];
+ Zreverb *_zreverb;
+ unsigned long _nprep;
+};
+
+
+// -----------------------------------------------------------------------
+
+
+#endif