/* Copyright (C) 2011 Nasca Octavian Paul Author: Nasca Octavian Paul This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. 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 (version 2) for more details. You should have received a copy of the GNU General Public License (version 2) along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #pragma once #include "FreeEdit.h" #include "globals.h" #include "../JuceLibraryCode/JuceHeader.h" class AP{//allpass public: AP(REALTYPE a_=0.5){ in1=in2=out1=out2=0.0; set(a_); }; REALTYPE process(REALTYPE in){ REALTYPE out=a*(in+out2)-in2; in2=in1;in1=in; out2=out1;out1=out; return out; }; REALTYPE set(REALTYPE a_){ a=a_*a_; return a; }; private: REALTYPE in1,in2,out1,out2; REALTYPE a; }; class Hilbert{ public: Hilbert(){ for (int i=0;i