Update of /cvsroot/pure-data/externals/sc4pd/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24095/source
Modified Files: BrownNoise.cpp ClipNoise.cpp Crackle.cpp Decay.cpp Decay2.cpp DelayUnit.cpp DelayUnit.hpp Dust.cpp Dust2.cpp ExpRand.cpp GrayNoise.cpp Hasher.cpp IRand.cpp Impulse.cpp Integrator.cpp LFClipNoise.cpp LFNoise0.cpp LFNoise1.cpp LFNoise2.cpp LFPulse.cpp LFSaw.cpp Lag.cpp Lag2.cpp Lag3.cpp Latoocarfian.cpp LinCong.cpp LinExp.cpp LinRand.cpp Logistic.cpp MantissaMask.cpp Median.cpp NRand.cpp PinkNoise.cpp PitchShift.cpp Rand.cpp TExpRand.cpp TIRand.cpp TRand.cpp WhiteNoise.cpp absdif.cpp amclip.cpp difsqr.cpp excess.cpp hypot.cpp main.cpp ring1.cpp ring2.cpp ring3.cpp ring4.cpp sc4pd.hpp scaleneg.cpp sqrdif.cpp sqrsum.cpp sumsqr.cpp Log Message: sc4pd_dsp class and other changes
Index: main.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/sc4pd/source/main.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** main.cpp 6 Aug 2004 08:34:42 -0000 1.20 --- main.cpp 7 Aug 2004 14:01:31 -0000 1.21 *************** *** 63,67 **** " DelayL~, DelayC~, CombN~, CombL~, CombC~, AllpassN~, " "AllpassL~,\n" ! " AllpassC~, PitchShift~" "\n" ); --- 63,67 ---- " DelayL~, DelayC~, CombN~, CombL~, CombC~, AllpassN~, " "AllpassL~,\n" ! " AllpassC~, PitchShift~, Resonz~, OnePole(~)" "\n" ); *************** *** 229,232 **** --- 229,239 ----
FLEXT_DSP_SETUP(AllpassC_ar); + + FLEXT_DSP_SETUP(PitchShift_ar); + + FLEXT_DSP_SETUP(Resonz_ar); + + FLEXT_DSP_SETUP(OnePole_ar); + FLEXT_SETUP(OnePole_kr); }
Index: BrownNoise.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/sc4pd/source/BrownNoise.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** BrownNoise.cpp 2 Aug 2004 19:18:22 -0000 1.3 --- BrownNoise.cpp 7 Aug 2004 14:01:31 -0000 1.4 *************** *** 41,47 ****
class BrownNoise_ar: ! public flext_dsp { ! FLEXT_HEADER(BrownNoise_ar,flext_dsp);
public: --- 41,47 ----
class BrownNoise_ar: ! public sc4pd_dsp { ! FLEXT_HEADER(BrownNoise_ar,sc4pd_dsp);
public:
Index: Latoocarfian.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/sc4pd/source/Latoocarfian.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Latoocarfian.cpp 2 Aug 2004 19:18:22 -0000 1.3 --- Latoocarfian.cpp 7 Aug 2004 14:01:31 -0000 1.4 *************** *** 42,48 ****
class Latoocarfian_ar: ! public flext_dsp { ! FLEXT_HEADER(Latoocarfian_ar,flext_dsp);
public: --- 42,48 ----
class Latoocarfian_ar: ! public sc4pd_dsp { ! FLEXT_HEADER(Latoocarfian_ar,sc4pd_dsp);
public:
Index: Dust2.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/sc4pd/source/Dust2.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Dust2.cpp 2 Aug 2004 19:18:22 -0000 1.4 --- Dust2.cpp 7 Aug 2004 14:01:31 -0000 1.5 *************** *** 41,47 ****
class Dust2_ar: ! public flext_dsp { ! FLEXT_HEADER(Dust2_ar,flext_dsp);
public: --- 41,47 ----
class Dust2_ar: ! public sc4pd_dsp { ! FLEXT_HEADER(Dust2_ar,sc4pd_dsp);
public:
Index: Rand.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/sc4pd/source/Rand.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Rand.cpp 2 Aug 2004 19:18:22 -0000 1.3 --- Rand.cpp 7 Aug 2004 14:01:31 -0000 1.4 *************** *** 42,48 ****
class Rand_ar: ! public flext_dsp { ! FLEXT_HEADER(Rand_ar,flext_dsp);
public: --- 42,48 ----
class Rand_ar: ! public sc4pd_dsp { ! FLEXT_HEADER(Rand_ar,sc4pd_dsp);
public:
Index: LFNoise0.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/sc4pd/source/LFNoise0.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** LFNoise0.cpp 2 Aug 2004 19:18:22 -0000 1.3 --- LFNoise0.cpp 7 Aug 2004 14:01:31 -0000 1.4 *************** *** 42,48 ****
class LFNoise0_ar: ! public flext_dsp { ! FLEXT_HEADER(LFNoise0_ar,flext_dsp);
public: --- 42,48 ----
class LFNoise0_ar: ! public sc4pd_dsp { ! FLEXT_HEADER(LFNoise0_ar,sc4pd_dsp);
public:
Index: Lag.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/sc4pd/source/Lag.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Lag.cpp 2 Aug 2004 21:13:50 -0000 1.1 --- Lag.cpp 7 Aug 2004 14:01:31 -0000 1.2 *************** *** 41,47 ****
class Lag_ar ! :public flext_dsp { ! FLEXT_HEADER(Lag_ar,flext_dsp);
public: --- 41,47 ----
class Lag_ar ! :public sc4pd_dsp { ! FLEXT_HEADER(Lag_ar,sc4pd_dsp);
public:
Index: LinCong.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/sc4pd/source/LinCong.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** LinCong.cpp 2 Aug 2004 19:18:22 -0000 1.2 --- LinCong.cpp 7 Aug 2004 14:01:31 -0000 1.3 *************** *** 42,48 ****
class LinCong_ar: ! public flext_dsp { ! FLEXT_HEADER(LinCong_ar,flext_dsp);
public: --- 42,48 ----
class LinCong_ar: ! public sc4pd_dsp { ! FLEXT_HEADER(LinCong_ar,sc4pd_dsp);
public:
Index: Crackle.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/sc4pd/source/Crackle.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Crackle.cpp 2 Aug 2004 19:18:22 -0000 1.3 --- Crackle.cpp 7 Aug 2004 14:01:31 -0000 1.4 *************** *** 41,47 ****
class Crackle_ar: ! public flext_dsp { ! FLEXT_HEADER(Crackle_ar,flext_dsp);
public: --- 41,47 ----
class Crackle_ar: ! public sc4pd_dsp { ! FLEXT_HEADER(Crackle_ar,sc4pd_dsp);
public:
Index: ring1.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/sc4pd/source/ring1.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ring1.cpp 2 Aug 2004 20:13:59 -0000 1.2 --- ring1.cpp 7 Aug 2004 14:01:31 -0000 1.3 *************** *** 47,53 ****
class ring1_ar ! :public flext_dsp { ! FLEXT_HEADER(ring1_ar,flext_dsp);
public: --- 47,53 ----
class ring1_ar ! :public sc4pd_dsp { ! FLEXT_HEADER(ring1_ar,sc4pd_dsp);
public:
Index: WhiteNoise.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/sc4pd/source/WhiteNoise.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** WhiteNoise.cpp 2 Aug 2004 19:18:22 -0000 1.3 --- WhiteNoise.cpp 7 Aug 2004 14:01:31 -0000 1.4 *************** *** 42,48 ****
class WhiteNoise_ar: ! public flext_dsp { ! FLEXT_HEADER(WhiteNoise_ar,flext_dsp);
public: --- 42,48 ----
class WhiteNoise_ar: ! public sc4pd_dsp { ! FLEXT_HEADER(WhiteNoise_ar,sc4pd_dsp);
public:
Index: MantissaMask.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/sc4pd/source/MantissaMask.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MantissaMask.cpp 2 Aug 2004 19:18:22 -0000 1.2 --- MantissaMask.cpp 7 Aug 2004 14:01:31 -0000 1.3 *************** *** 36,47 **** */
! #include "support.hpp"
/* ------------------------ MantissaMask~ -----------------------------*/
class MantissaMask_ar ! :public flext_dsp { ! FLEXT_HEADER(MantissaMask_ar,flext_dsp);
public: --- 36,47 ---- */
! #include "sc4pd.hpp"
/* ------------------------ MantissaMask~ -----------------------------*/
class MantissaMask_ar ! :public sc4pd_dsp { ! FLEXT_HEADER(MantissaMask_ar,sc4pd_dsp);
public:
Index: Decay.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/sc4pd/source/Decay.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Decay.cpp 2 Aug 2004 20:13:59 -0000 1.3 --- Decay.cpp 7 Aug 2004 14:01:31 -0000 1.4 *************** *** 42,48 ****
class Decay_ar ! :public flext_dsp { ! FLEXT_HEADER(Decay_ar,flext_dsp);
public: --- 42,48 ----
class Decay_ar ! :public sc4pd_dsp { ! FLEXT_HEADER(Decay_ar,sc4pd_dsp);
public:
Index: Dust.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/sc4pd/source/Dust.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Dust.cpp 2 Aug 2004 19:18:22 -0000 1.4 --- Dust.cpp 7 Aug 2004 14:01:31 -0000 1.5 *************** *** 40,46 ****
class Dust_ar: ! public flext_dsp { ! FLEXT_HEADER(Dust_ar,flext_dsp);
public: --- 40,46 ----
class Dust_ar: ! public sc4pd_dsp { ! FLEXT_HEADER(Dust_ar,sc4pd_dsp);
public:
Index: TExpRand.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/sc4pd/source/TExpRand.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TExpRand.cpp 2 Aug 2004 19:18:22 -0000 1.3 --- TExpRand.cpp 7 Aug 2004 14:01:31 -0000 1.4 *************** *** 42,48 ****
class TExpRand_ar: ! public flext_dsp { ! FLEXT_HEADER(TExpRand_ar,flext_dsp);
public: --- 42,48 ----
class TExpRand_ar: ! public sc4pd_dsp { ! FLEXT_HEADER(TExpRand_ar,sc4pd_dsp);
public:
Index: LinRand.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/sc4pd/source/LinRand.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** LinRand.cpp 2 Aug 2004 19:18:22 -0000 1.2 --- LinRand.cpp 7 Aug 2004 14:01:31 -0000 1.3 *************** *** 42,48 ****
class LinRand_ar: ! public flext_dsp { ! FLEXT_HEADER(LinRand_ar,flext_dsp);
public: --- 42,48 ----
class LinRand_ar: ! public sc4pd_dsp { ! FLEXT_HEADER(LinRand_ar,sc4pd_dsp);
public:
Index: LFSaw.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/sc4pd/source/LFSaw.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** LFSaw.cpp 2 Aug 2004 19:18:22 -0000 1.2 --- LFSaw.cpp 7 Aug 2004 14:01:31 -0000 1.3 *************** *** 42,48 ****
class LFSaw_ar: ! public flext_dsp { ! FLEXT_HEADER(LFSaw_ar,flext_dsp);
public: --- 42,48 ----
class LFSaw_ar: ! public sc4pd_dsp { ! FLEXT_HEADER(LFSaw_ar,sc4pd_dsp);
public:
Index: ClipNoise.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/sc4pd/source/ClipNoise.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ClipNoise.cpp 2 Aug 2004 19:18:22 -0000 1.4 --- ClipNoise.cpp 7 Aug 2004 14:01:31 -0000 1.5 *************** *** 42,48 ****
class ClipNoise_ar: ! public flext_dsp { ! FLEXT_HEADER(ClipNoise_ar,flext_dsp);
public: --- 42,48 ----
class ClipNoise_ar: ! public sc4pd_dsp { ! FLEXT_HEADER(ClipNoise_ar,sc4pd_dsp);
public:
Index: DelayUnit.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/sc4pd/source/DelayUnit.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DelayUnit.cpp 4 Aug 2004 16:43:26 -0000 1.3 --- DelayUnit.cpp 7 Aug 2004 14:01:31 -0000 1.4 *************** *** 31,40 **** SuperCollider by James McCartney http://www.audiosynth.com - Coded while listening to:
*/
! #include "sc4pd.hpp" #include "DelayUnit.hpp"
--- 31,40 ---- SuperCollider by James McCartney http://www.audiosynth.com
+ Coded while listening to:
*/
! // #include "sc4pd.hpp" #include "DelayUnit.hpp"
Index: ring4.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/sc4pd/source/ring4.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ring4.cpp 2 Aug 2004 19:18:22 -0000 1.2 --- ring4.cpp 7 Aug 2004 14:01:31 -0000 1.3 *************** *** 48,54 ****
class ring4_ar ! :public flext_dsp { ! FLEXT_HEADER(ring4_ar,flext_dsp);
public: --- 48,54 ----
class ring4_ar ! :public sc4pd_dsp { ! FLEXT_HEADER(ring4_ar,sc4pd_dsp);
public:
Index: sumsqr.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/sc4pd/source/sumsqr.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** sumsqr.cpp 2 Aug 2004 19:18:22 -0000 1.2 --- sumsqr.cpp 7 Aug 2004 14:01:31 -0000 1.3 *************** *** 48,54 ****
class sumsqr_ar ! :public flext_dsp { ! FLEXT_HEADER(sumsqr_ar,flext_dsp);
public: --- 48,54 ----
class sumsqr_ar ! :public sc4pd_dsp { ! FLEXT_HEADER(sumsqr_ar,sc4pd_dsp);
public:
Index: hypot.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/sc4pd/source/hypot.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** hypot.cpp 2 Aug 2004 19:18:22 -0000 1.2 --- hypot.cpp 7 Aug 2004 14:01:31 -0000 1.3 *************** *** 42,48 ****
class hypot_ar ! :public flext_dsp { ! FLEXT_HEADER(hypot_ar,flext_dsp);
public: --- 42,48 ----
class hypot_ar ! :public sc4pd_dsp { ! FLEXT_HEADER(hypot_ar,sc4pd_dsp);
public:
Index: PitchShift.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/sc4pd/source/PitchShift.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PitchShift.cpp 6 Aug 2004 08:34:42 -0000 1.1 --- PitchShift.cpp 7 Aug 2004 14:01:31 -0000 1.2 *************** *** 32,36 **** http://www.audiosynth.com
! Coded while listening to:
*/ --- 32,36 ---- http://www.audiosynth.com
! Coded while listening to: Bernhard Lang: Differenz / Wiederholung 2
*/ *************** *** 41,47 ****
class PitchShift_ar ! :public flext_dsp { ! FLEXT_HEADER(PitchShift_ar,flext_dsp);
public: --- 41,47 ----
class PitchShift_ar ! :public sc4pd_dsp { ! FLEXT_HEADER(PitchShift_ar,sc4pd_dsp);
public: *************** *** 56,64 **** virtual void m_dsp(int n, t_sample *const *in, t_sample *const *out);
- void m_set_windowsize(float f) - { - m_windowsize = f; - } - void m_set_pitchratio (float f) { --- 56,59 ---- *************** *** 77,81 ****
private: ! float m_windowsize, m_pitchratio,m_pitchdispersion,m_timedispersion; RGen rgen;
--- 72,76 ----
private: ! float m_windowsize,m_pitchratio,m_pitchdispersion,m_timedispersion; RGen rgen;
*************** *** 94,98 **** DEFSIGFUN(m_signal_z);
- FLEXT_CALLBACK_F(m_set_windowsize); FLEXT_CALLBACK_F(m_set_pitchratio); FLEXT_CALLBACK_F(m_set_pitchdispersion); --- 89,92 ---- *************** *** 104,108 **** PitchShift_ar::PitchShift_ar(int argc,t_atom * argv) { - FLEXT_ADDMETHOD_(0,"windowSize",m_set_windowsize); FLEXT_ADDMETHOD_(0,"pitchRatio",m_set_pitchratio); FLEXT_ADDMETHOD_(0,"pitchDispersion",m_set_pitchdispersion); --- 98,101 ---- *************** *** 116,119 **** --- 109,113 ---- return; } + m_windowsize = sc_getfloatarg(Args,0); m_pitchratio = sc_getfloatarg(Args,1); *************** *** 133,138 ****
long delaybufsize; ! float /* *out, *in,*/ *dlybuf; ! float winsize, pchratio; float fdelaylen, slope; long framesize, last; --- 127,132 ----
long delaybufsize; ! float *dlybuf; ! float pchratio; float fdelaylen, slope; long framesize, last; *************** *** 141,147 **** //in = ZIN(0); pchratio = m_pitchratio; - winsize = m_windowsize; ! delaybufsize = (long)ceil(winsize * SAMPLERATE * 3.f + 3.f); fdelaylen = delaybufsize - 3;
--- 135,140 ---- //in = ZIN(0); pchratio = m_pitchratio; ! delaybufsize = (long)ceil(m_windowsize * SAMPLERATE * 3.f + 3.f); fdelaylen = delaybufsize - 3;
*************** *** 160,164 **** m_mask = last = (delaybufsize - 1); ! m_framesize = framesize = ((long)(winsize * SAMPLERATE) + 2) & ~3; m_slope = slope = 2.f / framesize; m_stage = 3; --- 153,157 ---- m_mask = last = (delaybufsize - 1); ! m_framesize = framesize = ((long)(m_windowsize * SAMPLERATE) + 2) & ~3; m_slope = slope = 2.f / framesize; m_stage = 3; *************** *** 198,202 **** float dsamp4, dsamp4_slope, ramp4, ramp4_slope; float fdelaylen, d1, d2, frac, slope, samp_slope, startpos, ! winsize, pchdisp, timedisp; long remain, nsmps, idelaylen, irdphase, irdphaseb, iwrphase; long mask, idsamp; --- 191,195 ---- float dsamp4, dsamp4_slope, ramp4, ramp4_slope; float fdelaylen, d1, d2, frac, slope, samp_slope, startpos, ! pchdisp, timedisp; long remain, nsmps, idelaylen, irdphase, irdphaseb, iwrphase; long mask, idsamp; *************** *** 209,216 ****
pchratio = m_pitchratio; - winsize = m_windowsize; pchdisp = m_pitchdispersion; timedisp = m_timedispersion; ! timedisp = sc_clip(timedisp, 0.f, winsize) * SAMPLERATE; dlybuf = m_dlybuf; --- 202,208 ----
pchratio = m_pitchratio; pchdisp = m_pitchdispersion; timedisp = m_timedispersion; ! timedisp = sc_clip(timedisp, 0.f, m_windowsize) * SAMPLERATE; dlybuf = m_dlybuf; *************** *** 467,471 **** float dsamp4, dsamp4_slope, ramp4, ramp4_slope; float fdelaylen, d1, d2, frac, slope, samp_slope, startpos, ! winsize, pchdisp, timedisp; long remain, nsmps, idelaylen, irdphase, irdphaseb, iwrphase, mask, idsamp; long counter, stage, framesize; --- 459,463 ---- float dsamp4, dsamp4_slope, ramp4, ramp4_slope; float fdelaylen, d1, d2, frac, slope, samp_slope, startpos, ! pchdisp, timedisp; long remain, nsmps, idelaylen, irdphase, irdphaseb, iwrphase, mask, idsamp; long counter, stage, framesize; *************** *** 477,485 ****
pchratio = m_pitchratio; - winsize = m_windowsize; pchdisp = m_pitchdispersion; timedisp = m_timedispersion;
! timedisp = sc_clip(timedisp, 0.f, winsize) * SAMPLERATE;
dlybuf = m_dlybuf; --- 469,476 ----
pchratio = m_pitchratio; pchdisp = m_pitchdispersion; timedisp = m_timedispersion;
! timedisp = sc_clip(timedisp, 0.f, m_windowsize) * SAMPLERATE;
dlybuf = m_dlybuf; *************** *** 636,638 ****
! /* todo: does a control rate PitchShift make sense? */ --- 627,629 ----
! /* a control rate PitchShift doesn't make sense */
Index: ring2.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/sc4pd/source/ring2.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ring2.cpp 2 Aug 2004 19:18:22 -0000 1.2 --- ring2.cpp 7 Aug 2004 14:01:31 -0000 1.3 *************** *** 47,53 ****
class ring2_ar ! :public flext_dsp { ! FLEXT_HEADER(ring2_ar,flext_dsp);
public: --- 47,53 ----
class ring2_ar ! :public sc4pd_dsp { ! FLEXT_HEADER(ring2_ar,sc4pd_dsp);
public:
Index: Median.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/sc4pd/source/Median.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Median.cpp 2 Aug 2004 19:18:22 -0000 1.2 --- Median.cpp 7 Aug 2004 14:01:31 -0000 1.3 *************** *** 108,114 ****
class Median_ar ! :public flext_dsp { ! FLEXT_HEADER(Median_ar,flext_dsp);
public: --- 108,114 ----
class Median_ar ! :public sc4pd_dsp { ! FLEXT_HEADER(Median_ar,sc4pd_dsp);
public: *************** *** 167,173 ****
class Median_kr ! :public flext_dsp { ! FLEXT_HEADER(Median_kr,flext_dsp);
public: --- 167,173 ----
class Median_kr ! :public sc4pd_dsp { ! FLEXT_HEADER(Median_kr,sc4pd_dsp);
public:
Index: Lag2.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/sc4pd/source/Lag2.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Lag2.cpp 3 Aug 2004 09:56:19 -0000 1.1 --- Lag2.cpp 7 Aug 2004 14:01:31 -0000 1.2 *************** *** 41,47 ****
class Lag2_ar ! :public flext_dsp { ! FLEXT_HEADER(Lag2_ar,flext_dsp);
public: --- 41,47 ----
class Lag2_ar ! :public sc4pd_dsp { ! FLEXT_HEADER(Lag2_ar,sc4pd_dsp);
public:
Index: Lag3.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/sc4pd/source/Lag3.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Lag3.cpp 3 Aug 2004 09:56:19 -0000 1.1 --- Lag3.cpp 7 Aug 2004 14:01:31 -0000 1.2 *************** *** 41,47 ****
class Lag3_ar ! :public flext_dsp { ! FLEXT_HEADER(Lag3_ar,flext_dsp);
public: --- 41,47 ----
class Lag3_ar ! :public sc4pd_dsp { ! FLEXT_HEADER(Lag3_ar,sc4pd_dsp);
public:
Index: GrayNoise.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/sc4pd/source/GrayNoise.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** GrayNoise.cpp 2 Aug 2004 19:18:22 -0000 1.3 --- GrayNoise.cpp 7 Aug 2004 14:01:31 -0000 1.4 *************** *** 41,47 ****
class GrayNoise_ar: ! public flext_dsp { ! FLEXT_HEADER(GrayNoise_ar,flext_dsp);
public: --- 41,47 ----
class GrayNoise_ar: ! public sc4pd_dsp { ! FLEXT_HEADER(GrayNoise_ar,sc4pd_dsp);
public:
Index: Integrator.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/sc4pd/source/Integrator.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Integrator.cpp 2 Aug 2004 19:18:22 -0000 1.2 --- Integrator.cpp 7 Aug 2004 14:01:31 -0000 1.3 *************** *** 41,47 ****
class Integrator_ar ! :public flext_dsp { ! FLEXT_HEADER(Integrator_ar,flext_dsp);
public: --- 41,47 ----
class Integrator_ar ! :public sc4pd_dsp { ! FLEXT_HEADER(Integrator_ar,sc4pd_dsp);
public:
Index: ExpRand.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/sc4pd/source/ExpRand.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ExpRand.cpp 2 Aug 2004 19:18:22 -0000 1.3 --- ExpRand.cpp 7 Aug 2004 14:01:31 -0000 1.4 *************** *** 41,47 ****
class ExpRand_ar: ! public flext_dsp { ! FLEXT_HEADER(ExpRand_ar,flext_dsp);
public: --- 41,47 ----
class ExpRand_ar: ! public sc4pd_dsp { ! FLEXT_HEADER(ExpRand_ar,sc4pd_dsp);
public:
Index: LFNoise2.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/sc4pd/source/LFNoise2.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** LFNoise2.cpp 2 Aug 2004 19:18:22 -0000 1.2 --- LFNoise2.cpp 7 Aug 2004 14:01:31 -0000 1.3 *************** *** 42,48 ****
class LFNoise2_ar: ! public flext_dsp { ! FLEXT_HEADER(LFNoise2_ar,flext_dsp);
public: --- 42,48 ----
class LFNoise2_ar: ! public sc4pd_dsp { ! FLEXT_HEADER(LFNoise2_ar,sc4pd_dsp);
public:
Index: LFClipNoise.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/sc4pd/source/LFClipNoise.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** LFClipNoise.cpp 2 Aug 2004 19:18:22 -0000 1.3 --- LFClipNoise.cpp 7 Aug 2004 14:01:31 -0000 1.4 *************** *** 42,48 ****
class LFClipNoise_ar: ! public flext_dsp { ! FLEXT_HEADER(LFClipNoise_ar,flext_dsp);
public: --- 42,48 ----
class LFClipNoise_ar: ! public sc4pd_dsp { ! FLEXT_HEADER(LFClipNoise_ar,sc4pd_dsp);
public:
Index: ring3.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/sc4pd/source/ring3.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ring3.cpp 2 Aug 2004 19:18:22 -0000 1.2 --- ring3.cpp 7 Aug 2004 14:01:31 -0000 1.3 *************** *** 47,53 ****
class ring3_ar ! :public flext_dsp { ! FLEXT_HEADER(ring3_ar,flext_dsp);
public: --- 47,53 ----
class ring3_ar ! :public sc4pd_dsp { ! FLEXT_HEADER(ring3_ar,sc4pd_dsp);
public:
Index: amclip.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/sc4pd/source/amclip.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** amclip.cpp 2 Aug 2004 19:18:22 -0000 1.2 --- amclip.cpp 7 Aug 2004 14:01:31 -0000 1.3 *************** *** 42,48 ****
class amclip_ar ! :public flext_dsp { ! FLEXT_HEADER(amclip_ar,flext_dsp);
public: --- 42,48 ----
class amclip_ar ! :public sc4pd_dsp { ! FLEXT_HEADER(amclip_ar,sc4pd_dsp);
public:
Index: LFNoise1.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/sc4pd/source/LFNoise1.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** LFNoise1.cpp 2 Aug 2004 19:18:22 -0000 1.2 --- LFNoise1.cpp 7 Aug 2004 14:01:31 -0000 1.3 *************** *** 42,48 ****
class LFNoise1_ar: ! public flext_dsp { ! FLEXT_HEADER(LFNoise1_ar,flext_dsp);
public: --- 42,48 ----
class LFNoise1_ar: ! public sc4pd_dsp { ! FLEXT_HEADER(LFNoise1_ar,sc4pd_dsp);
public:
Index: IRand.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/sc4pd/source/IRand.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** IRand.cpp 2 Aug 2004 19:18:22 -0000 1.3 --- IRand.cpp 7 Aug 2004 14:01:31 -0000 1.4 *************** *** 41,47 ****
class IRand_ar: ! public flext_dsp { ! FLEXT_HEADER(IRand_ar,flext_dsp);
public: --- 41,47 ----
class IRand_ar: ! public sc4pd_dsp { ! FLEXT_HEADER(IRand_ar,sc4pd_dsp);
public:
Index: Logistic.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/sc4pd/source/Logistic.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Logistic.cpp 2 Aug 2004 19:18:22 -0000 1.2 --- Logistic.cpp 7 Aug 2004 14:01:31 -0000 1.3 *************** *** 42,48 ****
class Logistic_ar: ! public flext_dsp { ! FLEXT_HEADER(Logistic_ar,flext_dsp);
public: --- 42,48 ----
class Logistic_ar: ! public sc4pd_dsp { ! FLEXT_HEADER(Logistic_ar,sc4pd_dsp);
public:
Index: sqrdif.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/sc4pd/source/sqrdif.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** sqrdif.cpp 2 Aug 2004 19:18:22 -0000 1.2 --- sqrdif.cpp 7 Aug 2004 14:01:31 -0000 1.3 *************** *** 49,55 ****
class sqrdif_ar ! :public flext_dsp { ! FLEXT_HEADER(sqrdif_ar,flext_dsp);
public: --- 49,55 ----
class sqrdif_ar ! :public sc4pd_dsp { ! FLEXT_HEADER(sqrdif_ar,sc4pd_dsp);
public:
Index: Impulse.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/sc4pd/source/Impulse.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Impulse.cpp 2 Aug 2004 19:18:22 -0000 1.2 --- Impulse.cpp 7 Aug 2004 14:01:31 -0000 1.3 *************** *** 42,48 ****
class Impulse_ar: ! public flext_dsp { ! FLEXT_HEADER(Impulse_ar,flext_dsp);
public: --- 42,48 ----
class Impulse_ar: ! public sc4pd_dsp { ! FLEXT_HEADER(Impulse_ar,sc4pd_dsp);
public:
Index: Hasher.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/sc4pd/source/Hasher.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Hasher.cpp 2 Aug 2004 19:18:22 -0000 1.2 --- Hasher.cpp 7 Aug 2004 14:01:31 -0000 1.3 *************** *** 36,47 **** */
! #include "support.hpp"
/* ------------------------ Hasher~ -----------------------------------*/
class Hasher_ar ! :public flext_dsp { ! FLEXT_HEADER(Hasher_ar,flext_dsp);
public: --- 36,47 ---- */
! #include "sc4pd.hpp"
/* ------------------------ Hasher~ -----------------------------------*/
class Hasher_ar ! :public sc4pd_dsp { ! FLEXT_HEADER(Hasher_ar,sc4pd_dsp);
public:
Index: LFPulse.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/sc4pd/source/LFPulse.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** LFPulse.cpp 2 Aug 2004 19:18:22 -0000 1.2 --- LFPulse.cpp 7 Aug 2004 14:01:31 -0000 1.3 *************** *** 42,48 ****
class LFPulse_ar: ! public flext_dsp { ! FLEXT_HEADER(LFPulse_ar,flext_dsp);
public: --- 42,48 ----
class LFPulse_ar: ! public sc4pd_dsp { ! FLEXT_HEADER(LFPulse_ar,sc4pd_dsp);
public:
Index: sqrsum.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/sc4pd/source/sqrsum.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** sqrsum.cpp 2 Aug 2004 19:18:22 -0000 1.2 --- sqrsum.cpp 7 Aug 2004 14:01:31 -0000 1.3 *************** *** 49,55 ****
class sqrsum_ar ! :public flext_dsp { ! FLEXT_HEADER(sqrsum_ar,flext_dsp);
public: --- 49,55 ----
class sqrsum_ar ! :public sc4pd_dsp { ! FLEXT_HEADER(sqrsum_ar,sc4pd_dsp);
public:
Index: PinkNoise.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/sc4pd/source/PinkNoise.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PinkNoise.cpp 2 Aug 2004 19:18:22 -0000 1.3 --- PinkNoise.cpp 7 Aug 2004 14:01:31 -0000 1.4 *************** *** 41,47 ****
class PinkNoise_ar: ! public flext_dsp { ! FLEXT_HEADER(PinkNoise_ar,flext_dsp);
public: --- 41,47 ----
class PinkNoise_ar: ! public sc4pd_dsp { ! FLEXT_HEADER(PinkNoise_ar,sc4pd_dsp);
public:
Index: absdif.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/sc4pd/source/absdif.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** absdif.cpp 2 Aug 2004 19:18:22 -0000 1.2 --- absdif.cpp 7 Aug 2004 14:01:31 -0000 1.3 *************** *** 49,55 ****
class absdif_ar ! :public flext_dsp { ! FLEXT_HEADER(absdif_ar,flext_dsp);
public: --- 49,55 ----
class absdif_ar ! :public sc4pd_dsp { ! FLEXT_HEADER(absdif_ar,sc4pd_dsp);
public:
Index: NRand.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/sc4pd/source/NRand.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** NRand.cpp 2 Aug 2004 19:18:22 -0000 1.2 --- NRand.cpp 7 Aug 2004 14:01:31 -0000 1.3 *************** *** 42,48 ****
class NRand_ar: ! public flext_dsp { ! FLEXT_HEADER(NRand_ar,flext_dsp);
public: --- 42,48 ----
class NRand_ar: ! public sc4pd_dsp { ! FLEXT_HEADER(NRand_ar,sc4pd_dsp);
public:
Index: TIRand.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/sc4pd/source/TIRand.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TIRand.cpp 2 Aug 2004 19:18:22 -0000 1.3 --- TIRand.cpp 7 Aug 2004 14:01:31 -0000 1.4 *************** *** 42,48 ****
class TIRand_ar: ! public flext_dsp { ! FLEXT_HEADER(TIRand_ar,flext_dsp);
public: --- 42,48 ----
class TIRand_ar: ! public sc4pd_dsp { ! FLEXT_HEADER(TIRand_ar,sc4pd_dsp);
public:
Index: sc4pd.hpp =================================================================== RCS file: /cvsroot/pure-data/externals/sc4pd/source/sc4pd.hpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** sc4pd.hpp 3 Aug 2004 09:56:19 -0000 1.3 --- sc4pd.hpp 7 Aug 2004 14:01:31 -0000 1.4 *************** *** 36,40 ****
#ifndef _SC4PD_HPP - #define _SC$PD_HPP
#include <flext.h> --- 36,39 ---- *************** *** 64,69 **** #define BUFLENGTH Blocksize()
- - /* to make sure the behaviour is consistent: */
--- 63,66 ---- *************** *** 73,77 **** --- 70,128 ----
+ class sc4pd_dsp + : public flext_dsp + { + FLEXT_HEADER(sc4pd_dsp,flext_dsp);
+ /* some initialisation functions, adapted from SC_Rate.cpp*/ + + inline float sc_sampledur() + { + return 1 / Samplerate(); + } + + inline float sc_radianspersample() + { + return twopi / Samplerate(); + } + + inline float sc_bufduration() + { + return Blocksize() / Samplerate(); + } + + inline float sc_bufrate() + { + return 1 / sc_bufduration(); + } + + inline float sc_slopefactor() + { + return 1 / Blocksize(); + } + + inline float sc_filterloops() + { + return Blocksize() / 3; + } + + inline float sc_filterremain() + { + return Blocksize() % 3; + } + + inline float sc_filterslope() + { + float f = sc_filterloops(); + if (f == 0) + return 0; + else + return 1. / f; + } + + }; + + + #define _SC$PD_HPP #endif
Index: scaleneg.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/sc4pd/source/scaleneg.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** scaleneg.cpp 2 Aug 2004 19:18:22 -0000 1.2 --- scaleneg.cpp 7 Aug 2004 14:01:31 -0000 1.3 *************** *** 42,48 ****
class scaleneg_ar ! :public flext_dsp { ! FLEXT_HEADER(scaleneg_ar,flext_dsp);
public: --- 42,48 ----
class scaleneg_ar ! :public sc4pd_dsp { ! FLEXT_HEADER(scaleneg_ar,sc4pd_dsp);
public:
Index: DelayUnit.hpp =================================================================== RCS file: /cvsroot/pure-data/externals/sc4pd/source/DelayUnit.hpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** DelayUnit.hpp 3 Aug 2004 17:51:51 -0000 1.2 --- DelayUnit.hpp 7 Aug 2004 14:01:31 -0000 1.3 *************** *** 38,44 **** #include "sc4pd.hpp"
! class DelayUnit_ar : public flext_dsp { ! FLEXT_HEADER(DelayUnit_ar, flext_dsp); public: /* functions */ --- 38,46 ---- #include "sc4pd.hpp"
! class DelayUnit_ar ! : public sc4pd_dsp { ! FLEXT_HEADER(DelayUnit_ar,sc4pd_dsp); ! public: /* functions */
Index: LinExp.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/sc4pd/source/LinExp.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** LinExp.cpp 3 Aug 2004 09:56:19 -0000 1.1 --- LinExp.cpp 7 Aug 2004 14:01:31 -0000 1.2 *************** *** 43,49 ****
class LinExp_ar ! :public flext_dsp { ! FLEXT_HEADER(LinExp_ar,flext_dsp);
public: --- 43,49 ----
class LinExp_ar ! :public sc4pd_dsp { ! FLEXT_HEADER(LinExp_ar,sc4pd_dsp);
public:
Index: difsqr.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/sc4pd/source/difsqr.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** difsqr.cpp 2 Aug 2004 19:18:22 -0000 1.2 --- difsqr.cpp 7 Aug 2004 14:01:31 -0000 1.3 *************** *** 48,54 ****
class difsqr_ar ! :public flext_dsp { ! FLEXT_HEADER(difsqr_ar,flext_dsp);
public: --- 48,54 ----
class difsqr_ar ! :public sc4pd_dsp { ! FLEXT_HEADER(difsqr_ar,sc4pd_dsp);
public:
Index: Decay2.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/sc4pd/source/Decay2.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Decay2.cpp 2 Aug 2004 21:13:50 -0000 1.2 --- Decay2.cpp 7 Aug 2004 14:01:31 -0000 1.3 *************** *** 42,48 ****
class Decay2_ar ! :public flext_dsp { ! FLEXT_HEADER(Decay2_ar,flext_dsp);
public: --- 42,48 ----
class Decay2_ar ! :public sc4pd_dsp { ! FLEXT_HEADER(Decay2_ar,sc4pd_dsp);
public:
Index: excess.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/sc4pd/source/excess.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** excess.cpp 2 Aug 2004 19:18:22 -0000 1.2 --- excess.cpp 7 Aug 2004 14:01:31 -0000 1.3 *************** *** 41,47 ****
class excess_ar ! :public flext_dsp { ! FLEXT_HEADER(excess_ar,flext_dsp);
public: --- 41,47 ----
class excess_ar ! :public sc4pd_dsp { ! FLEXT_HEADER(excess_ar,sc4pd_dsp);
public:
Index: TRand.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/sc4pd/source/TRand.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TRand.cpp 2 Aug 2004 19:18:22 -0000 1.3 --- TRand.cpp 7 Aug 2004 14:01:31 -0000 1.4 *************** *** 42,48 ****
class TRand_ar: ! public flext_dsp { ! FLEXT_HEADER(TRand_ar,flext_dsp);
public: --- 42,48 ----
class TRand_ar: ! public sc4pd_dsp { ! FLEXT_HEADER(TRand_ar,sc4pd_dsp);
public: