From 0ed7a8b68dd73e2b0473b8127aeca99f3bac9061 Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Wed, 1 Apr 2009 21:13:09 +0000 Subject: cleaned up grill externals - replaced with svn:externals to svn.grrrr.org/ext/trunk/ svn path=/trunk/; revision=10951 --- externals/grill/fftease/src/ether~.cpp | 87 ---------------------------------- 1 file changed, 87 deletions(-) delete mode 100644 externals/grill/fftease/src/ether~.cpp (limited to 'externals/grill/fftease/src/ether~.cpp') diff --git a/externals/grill/fftease/src/ether~.cpp b/externals/grill/fftease/src/ether~.cpp deleted file mode 100644 index 6e4d3810..00000000 --- a/externals/grill/fftease/src/ether~.cpp +++ /dev/null @@ -1,87 +0,0 @@ -/* - -FFTease - A set of Live Spectral Processors -Originally written by Eric Lyon and Christopher Penrose for the Max/MSP platform - -Copyright (c)Thomas Grill (xovo@gmx.net) -For information on usage and redistribution, and for a DISCLAIMER OF ALL -WARRANTIES, see the file, "license.txt," in this distribution. - -*/ - -#include "main.h" -#include - -class ether: - public fftease -{ - FLEXT_HEADER_S(ether,fftease,setup) - -public: - ether(I argc,const t_atom *argv); - -protected: - - virtual V Transform(I n,S *const *in); - - BL _qual,_invert; - F _threshMult; - -private: - static V setup(t_classid c); - - - FLEXT_ATTRVAR_B(_invert) - FLEXT_ATTRVAR_F(_threshMult) -}; - -FLEXT_LIB_DSP_V("ether~",ether) - - -V ether::setup(t_classid c) -{ - FLEXT_CADDATTR_VAR1(c,"invert",_invert); - FLEXT_CADDATTR_VAR1(c,"index",_threshMult); -} - - -ether::ether(I argc,const t_atom *argv): - fftease(2,F_STEREO|F_BITSHUFFLE), - _qual(false),_invert(false),_threshMult(0) -{ - /* parse and set object's options given */ - if(argc >= 1) { - if(CanbeBool(argv[0])) - _qual = GetABool(argv[0]); - else - post("%s - Quality must be a boolean value - set to %0i",thisName(),_qual?1:0); - } - - Mult(_qual?4:2); - if(_qual) _flags |= F_BALANCED; - - AddInSignal("Messages and input signal"); - AddInSignal("Reference signal"); - AddOutSignal("Transformed signal"); -} - - -V ether::Transform(I _N,S *const *) -{ - const BL inv = _invert; - const F threshMult = _threshMult?_threshMult:1; - - for (I i = 0; i <= _N; i += 2) { - F &1 = _channel1[i]; - F &phase1 = _channel1[i+1]; - - F &2 = _channel2[i]; - F &phase2 = _channel2[i+1]; - - // use simple threshold for inverse compositing - - if(inv?(amp1 > amp2*threshMult):(amp1 < amp2*threshMult) ) amp1 = amp2; - if (phase1 == 0. ) phase1 = phase2; - } -} - -- cgit v1.2.1