For example, here's the Lorenz system implemented both using the recursive composition operator and the letrec environment:
// Lorenz system; ref: https://ijpam.eu/contents/2013-83-1/9/9.pdf // arguments are: initial conditions for x, y, z; a, b, r, dt // coeffcients. // Try process = lorenz(1.2, 1.3, 1.6, 10, 8/3, 28, .005); for a strange // attractor (way out of the -1-to-1 range) lorenz(x0, y0, z0, a, b, r, dt) = iterate ~ ( _, _, _) with { iterate(x, y, z) = x1+a*(y1-x1)*dt, y1+(r*x1-y1-x1*z1)*dt, z1+(x1*y1-b*z1)*dt with { x1 = x+x0-x0'; y1 = y+y0-y0'; z1 = z+z0-z0'; }; }; import("stdfaust.lib"); lorenz(x0, y0, z0, a, b, r, dt) = x, y, z letrec { 'x = x+a*(y-x)*dt+(x0-x0'); 'y = y+(r*x-y-x*z)*dt+(y0-y0'); 'z = z+(x*y-b*z)*dt+(z0-z0'); }; process = lorenz; Best, Dario On Mon, 27 Apr 2020 at 14:19, pierre duchemolle via Faudiostream-users < [email protected]> wrote: > Hello, > > I am currently experimenting with a few interesting chaotic oscillators. > > — Is there a place I can find some examples by any chance ? > > — How would you create such a recursive chain : > > One = A : B : Two : @(1); > Two = C : D : One : @(1); > process = One; > > For instance, the online FaustIDE gives me the error: > ERROR : after 400 evaluation steps, the compiler has detected an endless > evaluation cycle of 16 steps. > > Isn't a one sample delay, @(1), at the end of each chain enough to create > time ? > > > Thank you very much !! > > O. > > ---------------------- > Olivier Pasquet > www.opasquet.fr > _______________________________________________ > Faudiostream-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/faudiostream-users >
_______________________________________________ Faudiostream-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/faudiostream-users
