Board index › Products › Audio Codec Shield

Chaos Programs on the Audio Codec Shield!

7 posts · 12804 views

Chaos Programs on the Audio Codec Shield!

by diydsp » Tue Jan 03, 2012 03:23 UTC
Hey everyone!

guest and I were hacking on the Audio Codec Shield tonight and we made a program that makes the Lorentz attractor!!! It has X and Y outputs. You can listen to them or watch them on a scope!!!

Here's the .pde file that does it! lorentz.zip (1.2 KiB)

Have fun! Turn on some trance music while its running ;)

Or better yet, download the program yourself and change the constants! The main numbers to change are a, b and c. In the first iteration, we used the classic values 10, 28, 8/3, but there are other ones out there to try. Try looking up "lorenz attractor values" to get some other ones to try.

Here's a short video of in which the time constant, which is controlled by one of the knobs on the Audio Codec Shield, is turned up slowly, speeding up the iteration rate of the strange attractor:
http://www.youtube.com/watch?v=wDoZRnf--B0

IMG_1232.jpg

Re: Chaos Programs on the Audio Codec Shield!

by mcanulty » Fri Jan 13, 2012 06:22 UTC
Nice!

Re: Chaos Programs on the Audio Codec Shield!

by loss1234 » Mon Apr 02, 2012 03:52 UTC
was this made for maple or arduino?

it isnt running properly under arduino 1.0

Re: Chaos Programs on the Audio Codec Shield!

by loss1234 » Mon Apr 02, 2012 04:00 UTC
Ok

i went through and checked every variable name, changed the interuppt names, etc.....it compiles but nothing comes out of the outputs on arduino.

PLEASE re-post this for arduino

i think many of us dont have a maple

Re: Chaos Programs on the Audio Codec Shield!

by guest » Mon Apr 02, 2012 06:14 UTC
this cant run on arduino
it only has fixed point math

Re: Chaos Programs on the Audio Codec Shield!

by loss1234 » Mon Apr 02, 2012 15:22 UTC
ouch

that was one of the reasons i bought the shield

I have been able to get other chaos programs to run on arduino

(the video game shield comes with some great chaos programs and i am pretty sure the only processor it uses is the arduino)

Re: Chaos Programs on the Audio Codec Shield!

by guest » Mon Apr 02, 2012 20:11 UTC
some chaos programs can probably run on the arduino
but i only helped write that one
and dont really understand its inner workings

i know its using floating point
so that wont work
you can try redoing it and scaling all the factors up to 16b values
and see if it runs

for example
a = 12500
b = 32500
c = 3000
dt = 1 + mod0_value >> 8

although it looks like it might have a few too many multiplies