Update of /cvsroot/pure-data/externals/sc4pd/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30877/source
Modified Files: main.cpp Added Files: absdif.cpp amclip.cpp difsqr.cpp excess.cpp hypot.cpp ring1.cpp ring1.cpp~ ring2.cpp ring2.cpp~ ring3.cpp ring3.cpp~ ring4.cpp ring4.cpp~ scaleneg.cpp sqrdif.cpp sqrdif.cpp~ sqrsum.cpp sqrsum.cpp~ sumsqr.cpp Log Message: Binary Operators
Index: main.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/sc4pd/source/main.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** main.cpp 23 Jul 2004 10:01:56 -0000 1.9 --- main.cpp 30 Jul 2004 21:27:07 -0000 1.10 *************** *** 59,63 **** "LinRand(~), NRand(~), ExpRand(~), LFClipNoise(~),\n" " LFNoise0(~), LFNoise1(~), LFNoise2(~), Logistic(~), " ! "Latoocarfian(~), LinCong(~)\n");
//initialize objects --- 59,68 ---- "LinRand(~), NRand(~), ExpRand(~), LFClipNoise(~),\n" " LFNoise0(~), LFNoise1(~), LFNoise2(~), Logistic(~), " ! "Latoocarfian(~),\n" ! " LinCong(~), amclip(~), scaleneg(~), excess(~), hypot(~), " ! "ring1(~),\n" ! " ring2(~), ring3(~), ring4(~), difsqr(~), sumsqr(~)\n" ! "sqrdif(~), sqrsum(~),\n" ! " absdif(~)");
//initialize objects *************** *** 141,144 **** --- 146,188 ---- FLEXT_DSP_SETUP(LinCong_ar); FLEXT_SETUP(LinCong_kr); + + FLEXT_DSP_SETUP(amclip_ar); + FLEXT_SETUP(amclip_kr); + + FLEXT_DSP_SETUP(scaleneg_ar); + FLEXT_SETUP(scaleneg_kr); + + FLEXT_DSP_SETUP(excess_ar); + FLEXT_SETUP(excess_kr); + + FLEXT_DSP_SETUP(hypot_ar); + FLEXT_SETUP(hypot_kr); + + FLEXT_DSP_SETUP(ring1_ar); + FLEXT_SETUP(ring1_kr); + + FLEXT_DSP_SETUP(ring2_ar); + FLEXT_SETUP(ring2_kr); + + FLEXT_DSP_SETUP(ring3_ar); + FLEXT_SETUP(ring3_kr); + + FLEXT_DSP_SETUP(ring4_ar); + FLEXT_SETUP(ring4_kr); + + FLEXT_DSP_SETUP(difsqr_ar); + FLEXT_SETUP(difsqr_kr); + + FLEXT_DSP_SETUP(sumsqr_ar); + FLEXT_SETUP(sumsqr_kr); + + FLEXT_DSP_SETUP(sqrsum_ar); + FLEXT_SETUP(sqrsum_kr); + + FLEXT_DSP_SETUP(sqrdif_ar); + FLEXT_SETUP(sqrdif_kr); + + FLEXT_DSP_SETUP(absdif_ar); + FLEXT_SETUP(absdif_kr); }
--- NEW FILE: ring1.cpp~ --- /* sc4pd excess, excess~
Copyright (c) 2004 Tim Blechmann.
This code is derived from: SuperCollider real time audio synthesis system Copyright (c) 2002 James McCartney. All rights reserved. http://www.audiosynth.com
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Based on: PureData by Miller Puckette and others. http://www.crca.ucsd.edu/~msp/software.html FLEXT by Thomas Grill http://www.parasitaere-kapazitaeten.net/ext SuperCollider by James McCartney http://www.audiosynth.com
Coded while listening to: Keith Rowe & Toshimaru Nakamura: Weather Sky
*/
#include <flext.h> #include "SC_PlugIn.h"
#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 406) #error You need at least FLEXT version 0.4.6 #endif
/* ------------------------ excess~ -----------------------------*/
class excess_ar :public flext_dsp { FLEXT_HEADER(excess_ar,flext_dsp);
public: excess_ar(int argc,t_atom * argv);
protected: virtual void m_signal(int n, t_sample *const *in, t_sample *const *out);
private:
};
FLEXT_LIB_DSP_V("excess~",excess_ar);
excess_ar::excess_ar(int argc,t_atom * argv) { AddInSignal(); AddInSignal(); AddOutSignal(); }
void excess_ar::m_signal(int n, t_sample *const *in, t_sample *const *out) { t_sample *nout = *out; t_sample *nin1 = *in; t_sample *nin2 = *(in+1);
for (int i = 0; i!= n;++i) { if( *nin2 > 0) (*(nout)++) = sc_excess( (*(nin1)++), (*(nin2)++) ); } }
/* ------------------------ excess ------------------------------*/
class excess_kr :public flext_base { FLEXT_HEADER(excess_kr,flext_base);
public: excess_kr(int argc,t_atom * argv);
protected: void m_perform(float f); void m_set(float f);
private: float b; FLEXT_CALLBACK_F(m_perform); FLEXT_CALLBACK_F(m_set); };
FLEXT_LIB_V("excess",excess_kr);
excess_kr::excess_kr(int argc,t_atom * argv) :b(0) {
AddInFloat(); AddInFloat(); AddOutFloat();
FLEXT_ADDMETHOD(0,m_perform); FLEXT_ADDMETHOD(1,m_set); }
void excess_kr::m_perform(float f) { ToOutFloat(0,sc_excess(f,b)); }
void excess_kr::m_set(float f) { b=f; }
--- NEW FILE: ring1.cpp --- /* sc4pd ring1, ring1~
Copyright (c) 2004 Tim Blechmann.
This code is derived from: SuperCollider real time audio synthesis system Copyright (c) 2002 James McCartney. All rights reserved. http://www.audiosynth.com
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Based on: PureData by Miller Puckette and others. http://www.crca.ucsd.edu/~msp/software.html FLEXT by Thomas Grill http://www.parasitaere-kapazitaeten.net/ext SuperCollider by James McCartney http://www.audiosynth.com
Coded while listening to: Evan Parker & Keith Rowe: Dark Rags
*/
#include <flext.h> #include "SC_PlugIn.h"
#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 406) #error You need at least FLEXT version 0.4.6 #endif
inline float sc_ring1 (float a, float b) { return a*b+a; }
/* ------------------------ ring1~ -----------------------------*/
class ring1_ar :public flext_dsp { FLEXT_HEADER(ring1_ar,flext_dsp);
public: ring1_ar(int argc,t_atom * argv);
protected: virtual void m_signal(int n, t_sample *const *in, t_sample *const *out);
private:
};
FLEXT_LIB_DSP_V("ring1~",ring1_ar);
ring1_ar::ring1_ar(int argc,t_atom * argv) { AddInSignal(); AddInSignal(); AddOutSignal(); }
void ring1_ar::m_signal(int n, t_sample *const *in, t_sample *const *out) { t_sample *nout = *out; t_sample *nin1 = *in; t_sample *nin2 = *(in+1);
for (int i = 0; i!= n;++i) { if( *nin2 > 0) (*(nout)++) = sc_ring1( (*(nin1)++), (*(nin2)++) ); } }
/* ------------------------ ring1 ------------------------------*/
class ring1_kr :public flext_base { FLEXT_HEADER(ring1_kr,flext_base);
public: ring1_kr(int argc,t_atom * argv);
protected: void m_perform(float f); void m_set(float f);
private: float b; FLEXT_CALLBACK_F(m_perform); FLEXT_CALLBACK_F(m_set); };
FLEXT_LIB_V("ring1",ring1_kr);
ring1_kr::ring1_kr(int argc,t_atom * argv) :b(0) {
AddInFloat(); AddInFloat(); AddOutFloat();
FLEXT_ADDMETHOD(0,m_perform); FLEXT_ADDMETHOD(1,m_set); }
void ring1_kr::m_perform(float f) { ToOutFloat(0,sc_ring1(f,b)); }
void ring1_kr::m_set(float f) { b=f; }
--- NEW FILE: ring4.cpp --- /* sc4pd ring4, ring4~
Copyright (c) 2004 Tim Blechmann.
This code is derived from: SuperCollider real time audio synthesis system Copyright (c) 2002 James McCartney. All rights reserved. http://www.audiosynth.com
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Based on: PureData by Miller Puckette and others. http://www.crca.ucsd.edu/~msp/software.html FLEXT by Thomas Grill http://www.parasitaere-kapazitaeten.net/ext SuperCollider by James McCartney http://www.audiosynth.com
Coded while listening to: Evan Parker & Keith Rowe: Dark Rags
*/
#include <flext.h> #include "SC_PlugIn.h"
#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 406) #error You need at least FLEXT version 0.4.6 #endif
inline float sc_ring4 (float a, float b) { return (a*a*b)-(a*b*b); }
/* ------------------------ ring4~ -----------------------------*/
class ring4_ar :public flext_dsp { FLEXT_HEADER(ring4_ar,flext_dsp);
public: ring4_ar(int argc,t_atom * argv);
protected: virtual void m_signal(int n, t_sample *const *in, t_sample *const *out);
private:
};
FLEXT_LIB_DSP_V("ring4~",ring4_ar);
ring4_ar::ring4_ar(int argc,t_atom * argv) { AddInSignal(); AddInSignal(); AddOutSignal(); }
void ring4_ar::m_signal(int n, t_sample *const *in, t_sample *const *out) { t_sample *nout = *out; t_sample *nin1 = *in; t_sample *nin2 = *(in+1);
for (int i = 0; i!= n;++i) { if( *nin2 > 0) (*(nout)++) = sc_ring4( (*(nin1)++), (*(nin2)++) ); } }
/* ------------------------ ring4 ------------------------------*/
class ring4_kr :public flext_base { FLEXT_HEADER(ring4_kr,flext_base);
public: ring4_kr(int argc,t_atom * argv);
protected: void m_perform(float f); void m_set(float f);
private: float b; FLEXT_CALLBACK_F(m_perform); FLEXT_CALLBACK_F(m_set); };
FLEXT_LIB_V("ring4",ring4_kr);
ring4_kr::ring4_kr(int argc,t_atom * argv) :b(0) {
AddInFloat(); AddInFloat(); AddOutFloat();
FLEXT_ADDMETHOD(0,m_perform); FLEXT_ADDMETHOD(1,m_set); }
void ring4_kr::m_perform(float f) { ToOutFloat(0,sc_ring4(f,b)); }
void ring4_kr::m_set(float f) { b=f; }
--- NEW FILE: sumsqr.cpp --- /* sc4pd sumsqr, sumsqr~
Copyright (c) 2004 Tim Blechmann.
This code is derived from: SuperCollider real time audio synthesis system Copyright (c) 2002 James McCartney. All rights reserved. http://www.audiosynth.com
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Based on: PureData by Miller Puckette and others. http://www.crca.ucsd.edu/~msp/software.html FLEXT by Thomas Grill http://www.parasitaere-kapazitaeten.net/ext SuperCollider by James McCartney http://www.audiosynth.com
Coded while listening to: Evan Parker & Keith Rowe: Dark Rags
*/
#include <flext.h> #include "SC_PlugIn.h"
#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 406) #error You need at least FLEXT version 0.4.6 #endif
inline float sc_sumsqr (float a, float b) { return a*a+b*b; }
/* ------------------------ sumsqr~ -----------------------------*/
class sumsqr_ar :public flext_dsp { FLEXT_HEADER(sumsqr_ar,flext_dsp);
public: sumsqr_ar(int argc,t_atom * argv);
protected: virtual void m_signal(int n, t_sample *const *in, t_sample *const *out);
private:
};
FLEXT_LIB_DSP_V("sumsqr~",sumsqr_ar);
sumsqr_ar::sumsqr_ar(int argc,t_atom * argv) { AddInSignal(); AddInSignal(); AddOutSignal(); }
void sumsqr_ar::m_signal(int n, t_sample *const *in, t_sample *const *out) { t_sample *nout = *out; t_sample *nin1 = *in; t_sample *nin2 = *(in+1);
for (int i = 0; i!= n;++i) { if( *nin2 > 0) (*(nout)++) = sc_sumsqr( (*(nin1)++), (*(nin2)++) ); } }
/* ------------------------ sumsqr ------------------------------*/
class sumsqr_kr :public flext_base { FLEXT_HEADER(sumsqr_kr,flext_base);
public: sumsqr_kr(int argc,t_atom * argv);
protected: void m_perform(float f); void m_set(float f);
private: float b; FLEXT_CALLBACK_F(m_perform); FLEXT_CALLBACK_F(m_set); };
FLEXT_LIB_V("sumsqr",sumsqr_kr);
sumsqr_kr::sumsqr_kr(int argc,t_atom * argv) :b(0) {
AddInFloat(); AddInFloat(); AddOutFloat();
FLEXT_ADDMETHOD(0,m_perform); FLEXT_ADDMETHOD(1,m_set); }
void sumsqr_kr::m_perform(float f) { ToOutFloat(0,sc_sumsqr(f,b)); }
void sumsqr_kr::m_set(float f) { b=f; }
--- NEW FILE: sqrsum.cpp~ --- /* sc4pd sqrdif, sqrdif~
Copyright (c) 2004 Tim Blechmann.
This code is derived from: SuperCollider real time audio synthesis system Copyright (c) 2002 James McCartney. All rights reserved. http://www.audiosynth.com
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Based on: PureData by Miller Puckette and others. http://www.crca.ucsd.edu/~msp/software.html FLEXT by Thomas Grill http://www.parasitaere-kapazitaeten.net/ext SuperCollider by James McCartney http://www.audiosynth.com
Coded while listening to: Evan Parker & Keith Rowe: Dark Rags
*/
#include <flext.h> #include "SC_PlugIn.h"
#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 406) #error You need at least FLEXT version 0.4.6 #endif
inline float sc_sqrdif (float a, float b) { float f=a-b; return f*f; }
/* ------------------------ sqrdif~ -----------------------------*/
class sqrdif_ar :public flext_dsp { FLEXT_HEADER(sqrdif_ar,flext_dsp);
public: sqrdif_ar(int argc,t_atom * argv);
protected: virtual void m_signal(int n, t_sample *const *in, t_sample *const *out);
private:
};
FLEXT_LIB_DSP_V("sqrdif~",sqrdif_ar);
sqrdif_ar::sqrdif_ar(int argc,t_atom * argv) { AddInSignal(); AddInSignal(); AddOutSignal(); }
void sqrdif_ar::m_signal(int n, t_sample *const *in, t_sample *const *out) { t_sample *nout = *out; t_sample *nin1 = *in; t_sample *nin2 = *(in+1);
for (int i = 0; i!= n;++i) { if( *nin2 > 0) (*(nout)++) = sc_sqrdif( (*(nin1)++), (*(nin2)++) ); } }
/* ------------------------ sqrdif ------------------------------*/
class sqrdif_kr :public flext_base { FLEXT_HEADER(sqrdif_kr,flext_base);
public: sqrdif_kr(int argc,t_atom * argv);
protected: void m_perform(float f); void m_set(float f);
private: float b; FLEXT_CALLBACK_F(m_perform); FLEXT_CALLBACK_F(m_set); };
FLEXT_LIB_V("sqrdif",sqrdif_kr);
sqrdif_kr::sqrdif_kr(int argc,t_atom * argv) :b(0) {
AddInFloat(); AddInFloat(); AddOutFloat();
FLEXT_ADDMETHOD(0,m_perform); FLEXT_ADDMETHOD(1,m_set); }
void sqrdif_kr::m_perform(float f) { ToOutFloat(0,sc_sqrdif(f,b)); }
void sqrdif_kr::m_set(float f) { b=f; }
--- NEW FILE: ring2.cpp --- /* sc4pd ring2, ring2~
Copyright (c) 2004 Tim Blechmann.
This code is derived from: SuperCollider real time audio synthesis system Copyright (c) 2002 James McCartney. All rights reserved. http://www.audiosynth.com
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Based on: PureData by Miller Puckette and others. http://www.crca.ucsd.edu/~msp/software.html FLEXT by Thomas Grill http://www.parasitaere-kapazitaeten.net/ext SuperCollider by James McCartney http://www.audiosynth.com
Coded while listening to: Evan Parker & Keith Rowe: Dark Rags
*/
#include <flext.h> #include "SC_PlugIn.h"
#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 406) #error You need at least FLEXT version 0.4.6 #endif
inline float sc_ring2 (float a, float b) { return a*b+a+b; }
/* ------------------------ ring2~ -----------------------------*/
class ring2_ar :public flext_dsp { FLEXT_HEADER(ring2_ar,flext_dsp);
public: ring2_ar(int argc,t_atom * argv);
protected: virtual void m_signal(int n, t_sample *const *in, t_sample *const *out);
private:
};
FLEXT_LIB_DSP_V("ring2~",ring2_ar);
ring2_ar::ring2_ar(int argc,t_atom * argv) { AddInSignal(); AddInSignal(); AddOutSignal(); }
void ring2_ar::m_signal(int n, t_sample *const *in, t_sample *const *out) { t_sample *nout = *out; t_sample *nin1 = *in; t_sample *nin2 = *(in+1);
for (int i = 0; i!= n;++i) { if( *nin2 > 0) (*(nout)++) = sc_ring2( (*(nin1)++), (*(nin2)++) ); } }
/* ------------------------ ring2 ------------------------------*/
class ring2_kr :public flext_base { FLEXT_HEADER(ring2_kr,flext_base);
public: ring2_kr(int argc,t_atom * argv);
protected: void m_perform(float f); void m_set(float f);
private: float b; FLEXT_CALLBACK_F(m_perform); FLEXT_CALLBACK_F(m_set); };
FLEXT_LIB_V("ring2",ring2_kr);
ring2_kr::ring2_kr(int argc,t_atom * argv) :b(0) {
AddInFloat(); AddInFloat(); AddOutFloat();
FLEXT_ADDMETHOD(0,m_perform); FLEXT_ADDMETHOD(1,m_set); }
void ring2_kr::m_perform(float f) { ToOutFloat(0,sc_ring2(f,b)); }
void ring2_kr::m_set(float f) { b=f; }
--- NEW FILE: ring4.cpp~ --- /* sc4pd ring3, ring3~
Copyright (c) 2004 Tim Blechmann.
This code is derived from: SuperCollider real time audio synthesis system Copyright (c) 2002 James McCartney. All rights reserved. http://www.audiosynth.com
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Based on: PureData by Miller Puckette and others. http://www.crca.ucsd.edu/~msp/software.html FLEXT by Thomas Grill http://www.parasitaere-kapazitaeten.net/ext SuperCollider by James McCartney http://www.audiosynth.com
Coded while listening to: Evan Parker & Keith Rowe: Dark Rags
*/
#include <flext.h> #include "SC_PlugIn.h"
#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 406) #error You need at least FLEXT version 0.4.6 #endif
inline float sc_ring3 (float a, float b) { return a*a*b; }
/* ------------------------ ring3~ -----------------------------*/
class ring3_ar :public flext_dsp { FLEXT_HEADER(ring3_ar,flext_dsp);
public: ring3_ar(int argc,t_atom * argv);
protected: virtual void m_signal(int n, t_sample *const *in, t_sample *const *out);
private:
};
FLEXT_LIB_DSP_V("ring3~",ring3_ar);
ring3_ar::ring3_ar(int argc,t_atom * argv) { AddInSignal(); AddInSignal(); AddOutSignal(); }
void ring3_ar::m_signal(int n, t_sample *const *in, t_sample *const *out) { t_sample *nout = *out; t_sample *nin1 = *in; t_sample *nin2 = *(in+1);
for (int i = 0; i!= n;++i) { if( *nin2 > 0) (*(nout)++) = sc_ring3( (*(nin1)++), (*(nin2)++) ); } }
/* ------------------------ ring3 ------------------------------*/
class ring3_kr :public flext_base { FLEXT_HEADER(ring3_kr,flext_base);
public: ring3_kr(int argc,t_atom * argv);
protected: void m_perform(float f); void m_set(float f);
private: float b; FLEXT_CALLBACK_F(m_perform); FLEXT_CALLBACK_F(m_set); };
FLEXT_LIB_V("ring3",ring3_kr);
ring3_kr::ring3_kr(int argc,t_atom * argv) :b(0) {
AddInFloat(); AddInFloat(); AddOutFloat();
FLEXT_ADDMETHOD(0,m_perform); FLEXT_ADDMETHOD(1,m_set); }
void ring3_kr::m_perform(float f) { ToOutFloat(0,sc_ring3(f,b)); }
void ring3_kr::m_set(float f) { b=f; }
--- NEW FILE: hypot.cpp --- /* sc4pd hypot, hypot~
Copyright (c) 2004 Tim Blechmann.
This code is derived from: SuperCollider real time audio synthesis system Copyright (c) 2002 James McCartney. All rights reserved. http://www.audiosynth.com
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Based on: PureData by Miller Puckette and others. http://www.crca.ucsd.edu/~msp/software.html FLEXT by Thomas Grill http://www.parasitaere-kapazitaeten.net/ext SuperCollider by James McCartney http://www.audiosynth.com
Coded while listening to: Keith Rowe & Toshimaru Nakamura: Weather Sky
*/
#include <flext.h> #include "SC_PlugIn.h"
#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 406) #error You need at least FLEXT version 0.4.6 #endif
/* ------------------------ hypot~ -----------------------------*/
class hypot_ar :public flext_dsp { FLEXT_HEADER(hypot_ar,flext_dsp);
public: hypot_ar(int argc,t_atom * argv);
protected: virtual void m_signal(int n, t_sample *const *in, t_sample *const *out);
private:
};
FLEXT_LIB_DSP_V("hypot~",hypot_ar);
hypot_ar::hypot_ar(int argc,t_atom * argv) { AddInSignal(); AddInSignal(); AddOutSignal(); }
void hypot_ar::m_signal(int n, t_sample *const *in, t_sample *const *out) { t_sample *nout = *out; t_sample *nin1 = *in; t_sample *nin2 = *(in+1);
for (int i = 0; i!= n;++i) { if( *nin2 > 0) (*(nout)++) = hypot( (*(nin1)++), (*(nin2)++) ); } }
/* ------------------------ hypot ------------------------------*/
class hypot_kr :public flext_base { FLEXT_HEADER(hypot_kr,flext_base);
public: hypot_kr(int argc,t_atom * argv);
protected: void m_perform(float f); void m_set(float f);
private: float b; FLEXT_CALLBACK_F(m_perform); FLEXT_CALLBACK_F(m_set); };
FLEXT_LIB_V("hypot",hypot_kr);
hypot_kr::hypot_kr(int argc,t_atom * argv) :b(0) {
AddInFloat(); AddInFloat(); AddOutFloat();
FLEXT_ADDMETHOD(0,m_perform); FLEXT_ADDMETHOD(1,m_set); }
void hypot_kr::m_perform(float f) { ToOutFloat(0,hypot(f,b)); }
void hypot_kr::m_set(float f) { b=f; }
--- NEW FILE: amclip.cpp --- /* sc4pd amclip, amclip(~)
Copyright (c) 2004 Tim Blechmann.
This code is derived from: SuperCollider real time audio synthesis system Copyright (c) 2002 James McCartney. All rights reserved. http://www.audiosynth.com
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Based on: PureData by Miller Puckette and others. http://www.crca.ucsd.edu/~msp/software.html FLEXT by Thomas Grill http://www.parasitaere-kapazitaeten.net/ext SuperCollider by James McCartney http://www.audiosynth.com
Coded while listening to: Keith Rowe & Toshimaru Nakamura: Weather Sky
*/
#include <flext.h> #include "SC_PlugIn.h"
#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 406) #error You need at least FLEXT version 0.4.6 #endif
/* ------------------------ amclip~ -----------------------------*/
class amclip_ar :public flext_dsp { FLEXT_HEADER(amclip_ar,flext_dsp);
public: amclip_ar(int argc,t_atom * argv);
protected: virtual void m_signal(int n, t_sample *const *in, t_sample *const *out);
private:
};
FLEXT_LIB_DSP_V("amclip~",amclip_ar);
amclip_ar::amclip_ar(int argc,t_atom * argv) { AddInSignal(); AddInSignal(); AddOutSignal(); }
void amclip_ar::m_signal(int n, t_sample *const *in, t_sample *const *out) { t_sample *nout = *out; t_sample *nin1 = *in; t_sample *nin2 = *(in+1);
for (int i = 0; i!= n;++i) { if( *nin2 > 0) (*(nout)++) = sc_amclip( (*(nin1)++), (*(nin2)++) ); } }
/* ------------------------ amclip ------------------------------*/
class amclip_kr :public flext_base { FLEXT_HEADER(amclip_kr,flext_base);
public: amclip_kr(int argc,t_atom * argv);
protected: void m_perform(float f); void m_set(float f);
private: float b; FLEXT_CALLBACK_F(m_perform); FLEXT_CALLBACK_F(m_set); };
FLEXT_LIB_V("amclip",amclip_kr);
amclip_kr::amclip_kr(int argc,t_atom * argv) :b(0) {
AddInFloat(); AddInFloat(); AddOutFloat();
FLEXT_ADDMETHOD(0,m_perform); FLEXT_ADDMETHOD(1,m_set); }
void amclip_kr::m_perform(float f) { ToOutFloat(0,f*b); }
void amclip_kr::m_set(float f) { if (f>0) b=f; else b=0; }
--- NEW FILE: sqrdif.cpp --- /* sc4pd sqrdif, sqrdif~
Copyright (c) 2004 Tim Blechmann.
This code is derived from: SuperCollider real time audio synthesis system Copyright (c) 2002 James McCartney. All rights reserved. http://www.audiosynth.com
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Based on: PureData by Miller Puckette and others. http://www.crca.ucsd.edu/~msp/software.html FLEXT by Thomas Grill http://www.parasitaere-kapazitaeten.net/ext SuperCollider by James McCartney http://www.audiosynth.com
Coded while listening to: Evan Parker & Keith Rowe: Dark Rags
*/
#include <flext.h> #include "SC_PlugIn.h"
#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 406) #error You need at least FLEXT version 0.4.6 #endif
inline float sc_sqrdif (float a, float b) { float f=a-b; return f*f; }
/* ------------------------ sqrdif~ -----------------------------*/
class sqrdif_ar :public flext_dsp { FLEXT_HEADER(sqrdif_ar,flext_dsp);
public: sqrdif_ar(int argc,t_atom * argv);
protected: virtual void m_signal(int n, t_sample *const *in, t_sample *const *out);
private:
};
FLEXT_LIB_DSP_V("sqrdif~",sqrdif_ar);
sqrdif_ar::sqrdif_ar(int argc,t_atom * argv) { AddInSignal(); AddInSignal(); AddOutSignal(); }
void sqrdif_ar::m_signal(int n, t_sample *const *in, t_sample *const *out) { t_sample *nout = *out; t_sample *nin1 = *in; t_sample *nin2 = *(in+1);
for (int i = 0; i!= n;++i) { if( *nin2 > 0) (*(nout)++) = sc_sqrdif( (*(nin1)++), (*(nin2)++) ); } }
/* ------------------------ sqrdif ------------------------------*/
class sqrdif_kr :public flext_base { FLEXT_HEADER(sqrdif_kr,flext_base);
public: sqrdif_kr(int argc,t_atom * argv);
protected: void m_perform(float f); void m_set(float f);
private: float b; FLEXT_CALLBACK_F(m_perform); FLEXT_CALLBACK_F(m_set); };
FLEXT_LIB_V("sqrdif",sqrdif_kr);
sqrdif_kr::sqrdif_kr(int argc,t_atom * argv) :b(0) {
AddInFloat(); AddInFloat(); AddOutFloat();
FLEXT_ADDMETHOD(0,m_perform); FLEXT_ADDMETHOD(1,m_set); }
void sqrdif_kr::m_perform(float f) { ToOutFloat(0,sc_sqrdif(f,b)); }
void sqrdif_kr::m_set(float f) { b=f; }
--- NEW FILE: ring3.cpp~ --- /* sc4pd ring2, ring2~
Copyright (c) 2004 Tim Blechmann.
This code is derived from: SuperCollider real time audio synthesis system Copyright (c) 2002 James McCartney. All rights reserved. http://www.audiosynth.com
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Based on: PureData by Miller Puckette and others. http://www.crca.ucsd.edu/~msp/software.html FLEXT by Thomas Grill http://www.parasitaere-kapazitaeten.net/ext SuperCollider by James McCartney http://www.audiosynth.com
Coded while listening to: Evan Parker & Keith Rowe: Dark Rags
*/
#include <flext.h> #include "SC_PlugIn.h"
#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 406) #error You need at least FLEXT version 0.4.6 #endif
inline float sc_ring2 (float a, float b) { return a*b+a+b; }
/* ------------------------ ring2~ -----------------------------*/
class ring2_ar :public flext_dsp { FLEXT_HEADER(ring2_ar,flext_dsp);
public: ring2_ar(int argc,t_atom * argv);
protected: virtual void m_signal(int n, t_sample *const *in, t_sample *const *out);
private:
};
FLEXT_LIB_DSP_V("ring2~",ring2_ar);
ring2_ar::ring2_ar(int argc,t_atom * argv) { AddInSignal(); AddInSignal(); AddOutSignal(); }
void ring2_ar::m_signal(int n, t_sample *const *in, t_sample *const *out) { t_sample *nout = *out; t_sample *nin1 = *in; t_sample *nin2 = *(in+1);
for (int i = 0; i!= n;++i) { if( *nin2 > 0) (*(nout)++) = sc_ring2( (*(nin1)++), (*(nin2)++) ); } }
/* ------------------------ ring2 ------------------------------*/
class ring2_kr :public flext_base { FLEXT_HEADER(ring2_kr,flext_base);
public: ring2_kr(int argc,t_atom * argv);
protected: void m_perform(float f); void m_set(float f);
private: float b; FLEXT_CALLBACK_F(m_perform); FLEXT_CALLBACK_F(m_set); };
FLEXT_LIB_V("ring2",ring2_kr);
ring2_kr::ring2_kr(int argc,t_atom * argv) :b(0) {
AddInFloat(); AddInFloat(); AddOutFloat();
FLEXT_ADDMETHOD(0,m_perform); FLEXT_ADDMETHOD(1,m_set); }
void ring2_kr::m_perform(float f) { ToOutFloat(0,sc_ring2(f,b)); }
void ring2_kr::m_set(float f) { b=f; }
--- NEW FILE: sqrsum.cpp --- /* sc4pd sqrsum, sqrsum~
Copyright (c) 2004 Tim Blechmann.
This code is derived from: SuperCollider real time audio synthesis system Copyright (c) 2002 James McCartney. All rights reserved. http://www.audiosynth.com
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Based on: PureData by Miller Puckette and others. http://www.crca.ucsd.edu/~msp/software.html FLEXT by Thomas Grill http://www.parasitaere-kapazitaeten.net/ext SuperCollider by James McCartney http://www.audiosynth.com
Coded while listening to: Evan Parker & Keith Rowe: Dark Rags
*/
#include <flext.h> #include "SC_PlugIn.h"
#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 406) #error You need at least FLEXT version 0.4.6 #endif
inline float sc_sqrsum (float a, float b) { float f=a+b; return f*f; }
/* ------------------------ sqrsum~ -----------------------------*/
class sqrsum_ar :public flext_dsp { FLEXT_HEADER(sqrsum_ar,flext_dsp);
public: sqrsum_ar(int argc,t_atom * argv);
protected: virtual void m_signal(int n, t_sample *const *in, t_sample *const *out);
private:
};
FLEXT_LIB_DSP_V("sqrsum~",sqrsum_ar);
sqrsum_ar::sqrsum_ar(int argc,t_atom * argv) { AddInSignal(); AddInSignal(); AddOutSignal(); }
void sqrsum_ar::m_signal(int n, t_sample *const *in, t_sample *const *out) { t_sample *nout = *out; t_sample *nin1 = *in; t_sample *nin2 = *(in+1);
for (int i = 0; i!= n;++i) { if( *nin2 > 0) (*(nout)++) = sc_sqrsum( (*(nin1)++), (*(nin2)++) ); } }
/* ------------------------ sqrsum ------------------------------*/
class sqrsum_kr :public flext_base { FLEXT_HEADER(sqrsum_kr,flext_base);
public: sqrsum_kr(int argc,t_atom * argv);
protected: void m_perform(float f); void m_set(float f);
private: float b; FLEXT_CALLBACK_F(m_perform); FLEXT_CALLBACK_F(m_set); };
FLEXT_LIB_V("sqrsum",sqrsum_kr);
sqrsum_kr::sqrsum_kr(int argc,t_atom * argv) :b(0) {
AddInFloat(); AddInFloat(); AddOutFloat();
FLEXT_ADDMETHOD(0,m_perform); FLEXT_ADDMETHOD(1,m_set); }
void sqrsum_kr::m_perform(float f) { ToOutFloat(0,sc_sqrsum(f,b)); }
void sqrsum_kr::m_set(float f) { b=f; }
--- NEW FILE: absdif.cpp --- /* sc4pd absdif, absdif~
Copyright (c) 2004 Tim Blechmann.
This code is derived from: SuperCollider real time audio synthesis system Copyright (c) 2002 James McCartney. All rights reserved. http://www.audiosynth.com
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Based on: PureData by Miller Puckette and others. http://www.crca.ucsd.edu/~msp/software.html FLEXT by Thomas Grill http://www.parasitaere-kapazitaeten.net/ext SuperCollider by James McCartney http://www.audiosynth.com
Coded while listening to: Evan Parker & Keith Rowe: Dark Rags
*/
#include <flext.h> #include "SC_PlugIn.h"
#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 406) #error You need at least FLEXT version 0.4.6 #endif
inline float sc_absdif (float a, float b) { float f=a-b; return fabsf(f); }
/* ------------------------ absdif~ -----------------------------*/
class absdif_ar :public flext_dsp { FLEXT_HEADER(absdif_ar,flext_dsp);
public: absdif_ar(int argc,t_atom * argv);
protected: virtual void m_signal(int n, t_sample *const *in, t_sample *const *out);
private:
};
FLEXT_LIB_DSP_V("absdif~",absdif_ar);
absdif_ar::absdif_ar(int argc,t_atom * argv) { AddInSignal(); AddInSignal(); AddOutSignal(); }
void absdif_ar::m_signal(int n, t_sample *const *in, t_sample *const *out) { t_sample *nout = *out; t_sample *nin1 = *in; t_sample *nin2 = *(in+1);
for (int i = 0; i!= n;++i) { if( *nin2 > 0) (*(nout)++) = sc_absdif( (*(nin1)++), (*(nin2)++) ); } }
/* ------------------------ absdif ------------------------------*/
class absdif_kr :public flext_base { FLEXT_HEADER(absdif_kr,flext_base);
public: absdif_kr(int argc,t_atom * argv);
protected: void m_perform(float f); void m_set(float f);
private: float b; FLEXT_CALLBACK_F(m_perform); FLEXT_CALLBACK_F(m_set); };
FLEXT_LIB_V("absdif",absdif_kr);
absdif_kr::absdif_kr(int argc,t_atom * argv) :b(0) {
AddInFloat(); AddInFloat(); AddOutFloat();
FLEXT_ADDMETHOD(0,m_perform); FLEXT_ADDMETHOD(1,m_set); }
void absdif_kr::m_perform(float f) { ToOutFloat(0,sc_absdif(f,b)); }
void absdif_kr::m_set(float f) { b=f; }
--- NEW FILE: ring2.cpp~ --- /* sc4pd ring1, ring1~
Copyright (c) 2004 Tim Blechmann.
This code is derived from: SuperCollider real time audio synthesis system Copyright (c) 2002 James McCartney. All rights reserved. http://www.audiosynth.com
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Based on: PureData by Miller Puckette and others. http://www.crca.ucsd.edu/~msp/software.html FLEXT by Thomas Grill http://www.parasitaere-kapazitaeten.net/ext SuperCollider by James McCartney http://www.audiosynth.com
Coded while listening to: Evan Parker & Keith Rowe: Dark Rags
*/
#include <flext.h> #include "SC_PlugIn.h"
#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 406) #error You need at least FLEXT version 0.4.6 #endif
inline float sc_ring1 (float a, float b) { return a*b+a; }
/* ------------------------ ring1~ -----------------------------*/
class ring1_ar :public flext_dsp { FLEXT_HEADER(ring1_ar,flext_dsp);
public: ring1_ar(int argc,t_atom * argv);
protected: virtual void m_signal(int n, t_sample *const *in, t_sample *const *out);
private:
};
FLEXT_LIB_DSP_V("ring1~",ring1_ar);
ring1_ar::ring1_ar(int argc,t_atom * argv) { AddInSignal(); AddInSignal(); AddOutSignal(); }
void ring1_ar::m_signal(int n, t_sample *const *in, t_sample *const *out) { t_sample *nout = *out; t_sample *nin1 = *in; t_sample *nin2 = *(in+1);
for (int i = 0; i!= n;++i) { if( *nin2 > 0) (*(nout)++) = sc_ring1( (*(nin1)++), (*(nin2)++) ); } }
/* ------------------------ ring1 ------------------------------*/
class ring1_kr :public flext_base { FLEXT_HEADER(ring1_kr,flext_base);
public: ring1_kr(int argc,t_atom * argv);
protected: void m_perform(float f); void m_set(float f);
private: float b; FLEXT_CALLBACK_F(m_perform); FLEXT_CALLBACK_F(m_set); };
FLEXT_LIB_V("ring1",ring1_kr);
ring1_kr::ring1_kr(int argc,t_atom * argv) :b(0) {
AddInFloat(); AddInFloat(); AddOutFloat();
FLEXT_ADDMETHOD(0,m_perform); FLEXT_ADDMETHOD(1,m_set); }
void ring1_kr::m_perform(float f) { ToOutFloat(0,sc_ring1(f,b)); }
void ring1_kr::m_set(float f) { b=f; }
--- NEW FILE: scaleneg.cpp --- /* sc4pd scaleneg, scaleneg(~)
Copyright (c) 2004 Tim Blechmann.
This code is derived from: SuperCollider real time audio synthesis system Copyright (c) 2002 James McCartney. All rights reserved. http://www.audiosynth.com
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Based on: PureData by Miller Puckette and others. http://www.crca.ucsd.edu/~msp/software.html FLEXT by Thomas Grill http://www.parasitaere-kapazitaeten.net/ext SuperCollider by James McCartney http://www.audiosynth.com
Coded while listening to: Keith Rowe & Toshimaru Nakamura: Weather Sky
*/
#include <flext.h> #include "SC_PlugIn.h"
#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 406) #error You need at least FLEXT version 0.4.6 #endif
/* ------------------------ scaleneg~ -----------------------------*/
class scaleneg_ar :public flext_dsp { FLEXT_HEADER(scaleneg_ar,flext_dsp);
public: scaleneg_ar(int argc,t_atom * argv);
protected: virtual void m_signal(int n, t_sample *const *in, t_sample *const *out);
private:
};
FLEXT_LIB_DSP_V("scaleneg~",scaleneg_ar);
scaleneg_ar::scaleneg_ar(int argc,t_atom * argv) { AddInSignal(); AddInSignal(); AddOutSignal(); }
void scaleneg_ar::m_signal(int n, t_sample *const *in, t_sample *const *out) { t_sample *nout = *out; t_sample *nin1 = *in; t_sample *nin2 = *(in+1);
for (int i = 0; i!= n;++i) { if( *nin2 > 0) (*(nout)++) = sc_scaleneg( (*(nin1)++), (*(nin2)++) ); } }
/* ------------------------ scaleneg ------------------------------*/
class scaleneg_kr :public flext_base { FLEXT_HEADER(scaleneg_kr,flext_base);
public: scaleneg_kr(int argc,t_atom * argv);
protected: void m_perform(float f); void m_set(float f);
private: float b; FLEXT_CALLBACK_F(m_perform); FLEXT_CALLBACK_F(m_set); };
FLEXT_LIB_V("scaleneg",scaleneg_kr);
scaleneg_kr::scaleneg_kr(int argc,t_atom * argv) :b(0) {
AddInFloat(); AddInFloat(); AddOutFloat();
FLEXT_ADDMETHOD(0,m_perform); FLEXT_ADDMETHOD(1,m_set); }
void scaleneg_kr::m_perform(float f) { ToOutFloat(0,sc_scaleneg(f,b)); }
void scaleneg_kr::m_set(float f) { b=f; }
--- NEW FILE: difsqr.cpp --- /* sc4pd difsqr, difsqr~
Copyright (c) 2004 Tim Blechmann.
This code is derived from: SuperCollider real time audio synthesis system Copyright (c) 2002 James McCartney. All rights reserved. http://www.audiosynth.com
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Based on: PureData by Miller Puckette and others. http://www.crca.ucsd.edu/~msp/software.html FLEXT by Thomas Grill http://www.parasitaere-kapazitaeten.net/ext SuperCollider by James McCartney http://www.audiosynth.com
Coded while listening to: Evan Parker & Keith Rowe: Dark Rags
*/
#include <flext.h> #include "SC_PlugIn.h"
#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 406) #error You need at least FLEXT version 0.4.6 #endif
inline float sc_difsqr (float a, float b) { return a*a-b*b; }
/* ------------------------ difsqr~ -----------------------------*/
class difsqr_ar :public flext_dsp { FLEXT_HEADER(difsqr_ar,flext_dsp);
public: difsqr_ar(int argc,t_atom * argv);
protected: virtual void m_signal(int n, t_sample *const *in, t_sample *const *out);
private:
};
FLEXT_LIB_DSP_V("difsqr~",difsqr_ar);
difsqr_ar::difsqr_ar(int argc,t_atom * argv) { AddInSignal(); AddInSignal(); AddOutSignal(); }
void difsqr_ar::m_signal(int n, t_sample *const *in, t_sample *const *out) { t_sample *nout = *out; t_sample *nin1 = *in; t_sample *nin2 = *(in+1);
for (int i = 0; i!= n;++i) { if( *nin2 > 0) (*(nout)++) = sc_difsqr( (*(nin1)++), (*(nin2)++) ); } }
/* ------------------------ difsqr ------------------------------*/
class difsqr_kr :public flext_base { FLEXT_HEADER(difsqr_kr,flext_base);
public: difsqr_kr(int argc,t_atom * argv);
protected: void m_perform(float f); void m_set(float f);
private: float b; FLEXT_CALLBACK_F(m_perform); FLEXT_CALLBACK_F(m_set); };
FLEXT_LIB_V("difsqr",difsqr_kr);
difsqr_kr::difsqr_kr(int argc,t_atom * argv) :b(0) {
AddInFloat(); AddInFloat(); AddOutFloat();
FLEXT_ADDMETHOD(0,m_perform); FLEXT_ADDMETHOD(1,m_set); }
void difsqr_kr::m_perform(float f) { ToOutFloat(0,sc_difsqr(f,b)); }
void difsqr_kr::m_set(float f) { b=f; }
--- NEW FILE: sqrdif.cpp~ --- /* sc4pd sqrdif, sqrdif~
Copyright (c) 2004 Tim Blechmann.
This code is derived from: SuperCollider real time audio synthesis system Copyright (c) 2002 James McCartney. All rights reserved. http://www.audiosynth.com
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Based on: PureData by Miller Puckette and others. http://www.crca.ucsd.edu/~msp/software.html FLEXT by Thomas Grill http://www.parasitaere-kapazitaeten.net/ext SuperCollider by James McCartney http://www.audiosynth.com
Coded while listening to: Evan Parker & Keith Rowe: Dark Rags
*/
#include <flext.h> #include "SC_PlugIn.h"
#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 406) #error You need at least FLEXT version 0.4.6 #endif
inline float sc_sqrdif (float a, float b) { return a*a+b*b; }
/* ------------------------ sqrdif~ -----------------------------*/
class sqrdif_ar :public flext_dsp { FLEXT_HEADER(sqrdif_ar,flext_dsp);
public: sqrdif_ar(int argc,t_atom * argv);
protected: virtual void m_signal(int n, t_sample *const *in, t_sample *const *out);
private:
};
FLEXT_LIB_DSP_V("sqrdif~",sqrdif_ar);
sqrdif_ar::sqrdif_ar(int argc,t_atom * argv) { AddInSignal(); AddInSignal(); AddOutSignal(); }
void sqrdif_ar::m_signal(int n, t_sample *const *in, t_sample *const *out) { t_sample *nout = *out; t_sample *nin1 = *in; t_sample *nin2 = *(in+1);
for (int i = 0; i!= n;++i) { if( *nin2 > 0) (*(nout)++) = sc_sqrdif( (*(nin1)++), (*(nin2)++) ); } }
/* ------------------------ sqrdif ------------------------------*/
class sqrdif_kr :public flext_base { FLEXT_HEADER(sqrdif_kr,flext_base);
public: sqrdif_kr(int argc,t_atom * argv);
protected: void m_perform(float f); void m_set(float f);
private: float b; FLEXT_CALLBACK_F(m_perform); FLEXT_CALLBACK_F(m_set); };
FLEXT_LIB_V("sqrdif",sqrdif_kr);
sqrdif_kr::sqrdif_kr(int argc,t_atom * argv) :b(0) {
AddInFloat(); AddInFloat(); AddOutFloat();
FLEXT_ADDMETHOD(0,m_perform); FLEXT_ADDMETHOD(1,m_set); }
void sqrdif_kr::m_perform(float f) { ToOutFloat(0,sc_sqrdif(f,b)); }
void sqrdif_kr::m_set(float f) { b=f; }
--- NEW FILE: excess.cpp --- /* sc4pd excess, excess~
Copyright (c) 2004 Tim Blechmann.
This code is derived from: SuperCollider real time audio synthesis system Copyright (c) 2002 James McCartney. All rights reserved. http://www.audiosynth.com
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Based on: PureData by Miller Puckette and others. http://www.crca.ucsd.edu/~msp/software.html FLEXT by Thomas Grill http://www.parasitaere-kapazitaeten.net/ext SuperCollider by James McCartney http://www.audiosynth.com
Coded while listening to: Keith Rowe & Toshimaru Nakamura: Weather Sky
*/
#include <flext.h> #include "SC_PlugIn.h"
#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 406) #error You need at least FLEXT version 0.4.6 #endif
/* ------------------------ excess~ -----------------------------*/
class excess_ar :public flext_dsp { FLEXT_HEADER(excess_ar,flext_dsp);
public: excess_ar(int argc,t_atom * argv);
protected: virtual void m_signal(int n, t_sample *const *in, t_sample *const *out);
private:
};
FLEXT_LIB_DSP_V("excess~",excess_ar);
excess_ar::excess_ar(int argc,t_atom * argv) { AddInSignal(); AddInSignal(); AddOutSignal(); }
void excess_ar::m_signal(int n, t_sample *const *in, t_sample *const *out) { t_sample *nout = *out; t_sample *nin1 = *in; t_sample *nin2 = *(in+1);
for (int i = 0; i!= n;++i) { if( *nin2 > 0) (*(nout)++) = sc_excess( (*(nin1)++), (*(nin2)++) ); } }
/* ------------------------ excess ------------------------------*/
class excess_kr :public flext_base { FLEXT_HEADER(excess_kr,flext_base);
public: excess_kr(int argc,t_atom * argv);
protected: void m_perform(float f); void m_set(float f);
private: float b; FLEXT_CALLBACK_F(m_perform); FLEXT_CALLBACK_F(m_set); };
FLEXT_LIB_V("excess",excess_kr);
excess_kr::excess_kr(int argc,t_atom * argv) :b(0) {
AddInFloat(); AddInFloat(); AddOutFloat();
FLEXT_ADDMETHOD(0,m_perform); FLEXT_ADDMETHOD(1,m_set); }
void excess_kr::m_perform(float f) { ToOutFloat(0,sc_excess(f,b)); }
void excess_kr::m_set(float f) { b=f; }
--- NEW FILE: ring3.cpp --- /* sc4pd ring3, ring3~
Copyright (c) 2004 Tim Blechmann.
This code is derived from: SuperCollider real time audio synthesis system Copyright (c) 2002 James McCartney. All rights reserved. http://www.audiosynth.com
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Based on: PureData by Miller Puckette and others. http://www.crca.ucsd.edu/~msp/software.html FLEXT by Thomas Grill http://www.parasitaere-kapazitaeten.net/ext SuperCollider by James McCartney http://www.audiosynth.com
Coded while listening to: Evan Parker & Keith Rowe: Dark Rags
*/
#include <flext.h> #include "SC_PlugIn.h"
#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 406) #error You need at least FLEXT version 0.4.6 #endif
inline float sc_ring3 (float a, float b) { return a*a*b; }
/* ------------------------ ring3~ -----------------------------*/
class ring3_ar :public flext_dsp { FLEXT_HEADER(ring3_ar,flext_dsp);
public: ring3_ar(int argc,t_atom * argv);
protected: virtual void m_signal(int n, t_sample *const *in, t_sample *const *out);
private:
};
FLEXT_LIB_DSP_V("ring3~",ring3_ar);
ring3_ar::ring3_ar(int argc,t_atom * argv) { AddInSignal(); AddInSignal(); AddOutSignal(); }
void ring3_ar::m_signal(int n, t_sample *const *in, t_sample *const *out) { t_sample *nout = *out; t_sample *nin1 = *in; t_sample *nin2 = *(in+1);
for (int i = 0; i!= n;++i) { if( *nin2 > 0) (*(nout)++) = sc_ring3( (*(nin1)++), (*(nin2)++) ); } }
/* ------------------------ ring3 ------------------------------*/
class ring3_kr :public flext_base { FLEXT_HEADER(ring3_kr,flext_base);
public: ring3_kr(int argc,t_atom * argv);
protected: void m_perform(float f); void m_set(float f);
private: float b; FLEXT_CALLBACK_F(m_perform); FLEXT_CALLBACK_F(m_set); };
FLEXT_LIB_V("ring3",ring3_kr);
ring3_kr::ring3_kr(int argc,t_atom * argv) :b(0) {
AddInFloat(); AddInFloat(); AddOutFloat();
FLEXT_ADDMETHOD(0,m_perform); FLEXT_ADDMETHOD(1,m_set); }
void ring3_kr::m_perform(float f) { ToOutFloat(0,sc_ring3(f,b)); }
void ring3_kr::m_set(float f) { b=f; }