diff options
author | Tim Blechmann <timblech@users.sourceforge.net> | 2004-07-14 18:29:52 +0000 |
---|---|---|
committer | IOhannes m zmölnig <zmoelnig@iem.at> | 2015-10-14 15:11:54 +0200 |
commit | c51398d4fcc43ac9d72888191d65f44609f7eb5f (patch) | |
tree | 3f7f5e7fdff78218ee6417a07e555096a82dd1a4 /sc4pd | |
parent | d0ae3caca5828675335d3b19ab5dd987e7369b23 (diff) |
update & bugfix
svn path=/trunk/externals/tb/; revision=1859
Diffstat (limited to 'sc4pd')
-rw-r--r-- | sc4pd/source/Dust.cpp | 4 | ||||
-rw-r--r-- | sc4pd/source/Dust2.cpp | 4 | ||||
-rw-r--r-- | sc4pd/source/main.cpp | 10 | ||||
-rw-r--r-- | sc4pd/source/support.hpp | 16 |
4 files changed, 26 insertions, 8 deletions
diff --git a/sc4pd/source/Dust.cpp b/sc4pd/source/Dust.cpp index 19b6312..58decd8 100644 --- a/sc4pd/source/Dust.cpp +++ b/sc4pd/source/Dust.cpp @@ -128,7 +128,7 @@ public: protected: void m_set(float f); Timer Dust_timer; - void m_doit(); + void m_doit(void*); private: float m_density, m_scale; @@ -171,7 +171,7 @@ void Dust_kr::m_set(float f) Dust_timer.Delay(mtbt * 0.002 * rgen.frand()); } -void Dust_kr::m_doit() +void Dust_kr::m_doit(void*) { ToOutFloat(0,rgen.frand()); diff --git a/sc4pd/source/Dust2.cpp b/sc4pd/source/Dust2.cpp index a8cbbc3..ef41d9a 100644 --- a/sc4pd/source/Dust2.cpp +++ b/sc4pd/source/Dust2.cpp @@ -129,7 +129,7 @@ public: protected: void m_set(float f); Timer Dust2_timer; - void m_doit(); + void m_doit(void*); private: float m_density, m_scale; @@ -172,7 +172,7 @@ void Dust2_kr::m_set(float f) Dust2_timer.Delay(mtbt * 0.002 * rgen.frand()); } -void Dust2_kr::m_doit() +void Dust2_kr::m_doit(void*) { ToOutFloat(0,2*rgen.frand() - 1 ); diff --git a/sc4pd/source/main.cpp b/sc4pd/source/main.cpp index d7b187b..d9198db 100644 --- a/sc4pd/source/main.cpp +++ b/sc4pd/source/main.cpp @@ -49,9 +49,9 @@ void sc4pd_library_setup() post("version "SC4PD_VERSION); post("compiled on "__DATE__); post("contains: Dust(~), MantissaMask(~), Hasher(~), Median(~), " - "BrownNoise(~),"); - post(" ClipNoise(~), GrayNoise(~), Dust2(~), WhiteNoise(~), " - "PinkNoise(~)\n"); + "BrownNoise(~),\n" + " ClipNoise(~), GrayNoise(~), Dust2(~), WhiteNoise(~), " + "PinkNoise(~), \n Crackle(~), Rand(~)\n"); //initialize objects FLEXT_DSP_SETUP(Dust_ar); @@ -86,6 +86,10 @@ void sc4pd_library_setup() FLEXT_DSP_SETUP(Crackle_ar); FLEXT_SETUP(Crackle_kr); + + FLEXT_DSP_SETUP(Rand_ar); + FLEXT_SETUP(Rand_kr); + } FLEXT_LIB_SETUP(sc4pd,sc4pd_library_setup); diff --git a/sc4pd/source/support.hpp b/sc4pd/source/support.hpp index 8456f4d..b6d67a8 100644 --- a/sc4pd/source/support.hpp +++ b/sc4pd/source/support.hpp @@ -60,12 +60,26 @@ inline bool sc_add (flext::AtomList a) inline float sc_getfloatarg (flext::AtomList a,int i) { - if (a.Count() >0 || a.Count() <i) + if (a.Count() > 0 && a.Count() > i) return flext::GetAFloat(a[i]); else return 0; } +inline bool sc_ar(flext::AtomList a) +{ + for (int i = 0; i!=a.Count();++i) + { + if ( flext::IsSymbol(a[i]) ) + { + const char * teststring; + teststring = flext::GetString(a[i]); + if((strcmp(teststring,"ar"))==0) + return true; + } + } + return false; +} // macros to put rgen state in registers #define RGET \ |