[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sc-dev] noise special request
> can i request Latoocarfian and Rossler noise for sc3 please? they are
> both really useful i think, having enjoyed them in sc2.
the diff for the latoocarfian is attached ... i posted it to the list a
few monthes ago ...
also Lance Putnam implemented lots of chaotic attractors for
supercollider (afaik not in cvs) ... anyway, if you're on linux, you can
possibly use jack to connect to pd to get a rossler ...
regards ... tim
--
mailto:TimBlechmann@xxxxxx ICQ: 96771783
http://www.mokabar.tk
After one look at this planet any visitor from outer space
would say "I want to see the manager."
William S. Burroughs
*** NoiseUGens.cpp.~1.16.~ Tue Feb 10 19:31:31 2004
--- NoiseUGens.cpp Mon Jul 19 22:27:51 2004
***************
*** 152,155 ****
--- 152,161 ----
};
+ struct Latoocarfian : public Unit
+ {
+ float m_x,m_y;
+ };
+
+
//////////////////////////////////////////////////////////////////////////////////////////////////
***************
*** 229,232 ****
--- 235,241 ----
void RandID_next(RandID *unit, int inNumSamples);
void RandID_Ctor(RandID *unit);
+
+ void Latoocarfian_next(Latoocarfian *unit, int inNumSamples);
+ void Latoocarfian_Ctor(Latoocarfian *unit);
}
***************
*** 1086,1089 ****
--- 1095,1133 ----
////////////////////////////////////////////////////////////////////////////////////////////////////////
+ void Latoocarfian_next(Latoocarfian *unit, int inNumSamples)
+ {
+ float *out = ZOUT(0);
+
+ float a = ZIN0(0);
+ float b = ZIN0(1);
+ float c = ZIN0(2);
+ float d = ZIN0(3);
+
+ float x = unit->m_x;
+ float y = unit->m_y;
+
+ LOOP(inNumSamples,
+ float x_new=sin(y*b)+c*sin(x*b);
+ float y_new=sin(x*a)+d*sin(y*a);
+ ZXP(out)=x=x_new;
+ y=y_new;
+ );
+
+ unit->m_x=x;
+ unit->m_y=y;
+ };
+
+ void Latoocarfian_Ctor(Latoocarfian *unit)
+ {
+ SETCALC(Latoocarfian_next);
+
+ unit->m_x=1.f;
+ unit->m_y=1.f;
+
+ Latoocarfian_next(unit, 1);
+ };
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////////////
+
void load(InterfaceTable *inTable)
{
***************
*** 1116,1119 ****
--- 1160,1164 ----
DefineSimpleUnit(RandSeed);
DefineSimpleUnit(RandID);
+ DefineSimpleUnit(Latoocarfian);
}