From b519cf2151fa3cff0a40646248c855f74c6b7baa Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 5 May 2014 09:46:40 +0000 Subject: 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 --- src/reverbs.h | 134 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 src/reverbs.h (limited to 'src/reverbs.h') 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 +// +// 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 -- cgit v1.2.1