• Complex / differential equations calculated by PD

Hey I have been reading a lot about chaos equations and the like recently. I found interesting analog chaos computers and have seen some chaos equations that can be fed an input such as an oscillator or audio stream and output a very interesting and complex output.

Anyway I am a little lacking in the differential calculus skills and I am having troubles inputting equations with t) type things into an fexpr~ or expr~. I did see the lorenz attractor example in the help for expr~, but if someone could help me figure out how to get from a differential equation to an expr~ or fexpr~ that calculates it that would be awesome. Or maybe I just need to get some calculus books.

the page below has some examples of the types of equations I am talking about.
http://www.viewsfromscience.com/documents/webpages/chaos.html

Thanks

• Posts 25 | Views 22801
• Making a patch with chaos theory seems difficult, because complex numbers are construced of both a real number and an imaginary number: c = a + bi, where c is the complex number, a is the real number and bi is the imaginary number. b is a real number that is multiplied with i and i is the square root of -1. For calculation tjeck wiki: http://en.wikipedia.org/wiki/Complex_number ...

It is also difficult for me to describe a discrete case, since I haven't worked with waveshaping by the use of complex numbers, but I know fourier analysis and transformation (PD has objects for these) is based on complex numbers.

Maybe i can fix a patch that calculates complex number, but I don't know what for. It would be fun to make one so I'll try.

I'm sorry that I can't help more, but complex numbers is a complex matter, but I'll think of what i can do for sure!

• This is iteration on real numbers:

http://puredata.hurleur.com/sujet-4825-infinity-series

• Complex numbers in Pd isn't really that difficult. You just have to know when you're using them, since there isn't a complex type. All you really have to do is treat the real and imaginary part as a two element list and apply the appropriate arithmetic for complex numbers. And, of course, it makes things easier if you just treat real numbers as complex numbers with a 0 imaginary part.

Anyway, if it makes things easier, I've attached a set of complex math abstractions I originally made for designing filters and calculating their frequency response, which requires complex numbers. They currently rely on [cartopol] and [poltocar] from cyclone, but they could easily be made without them.

http://www.pdpatchrepo.info/hurleur/complex_math.mmb.zip

• So I added some different ways of scaling the number from a 0 to 1 range to a frequency range. Some of them sound cool, but they don't really change the fact that the high end of the frequency range seems more prevalent than the low end. I came up with the idea based on the 1 volt per octave idea in analogue modulars, if you had a linear frequency response most of the knob range would be high piercing sounds, but with a 1 volt per octave range you get way more range in the bottom end.

I think the reason this patch sounds higher pitched though is just because the higher frequencies of filtered noise seem louder. Maybe using pink noise or having the volume scale down as the pitch scales up would fix this. I didn't have time to try those out yet.

thanks for the iteration info JensChr I will research that some.

http://www.pdpatchrepo.info/hurleur/chaosFilteredNoise2.pd

• @noizehack said:

So I added some different ways of scaling

The linear inverse and log scaling do help indeed for the case of filtered noise.

I also considered skipping points of too heavy emphasis. [cyclone/Histo] can make a histogram of the scaled output and it is easy to identify the region.

@JensChr said:

complex numbers is a complex matter

Attached is a patch which does complex integration at control rate. It is similar to what [cpole~] does at signal rate. The impulse response is a resonator/oscillator, depending on the radius setting. It's formula is like a regular (leaky) integrator:

y[n] = x[n] + r * y[n-1]

But input x and output y are implemented as complex numbers.

Now compare with the logistic map equation:

y[n] = x[n] + lambda * y[n-1] * (1-y[n-1])

Here (1-y[n-1]) is the non-linear aspect. A similar non-linear component should make a chaos generator for the complex case. But what exactly? JensChr, it must be in your paper, please help us out.

Katja

http://www.pdpatchrepo.info/hurleur/complex_integrator.pd.zip

• There is by the way this chaos library of Pd classes by Ben Bogart and Michael McGonagle. The library is about fractals. An entry point for help is flatspace/readme-fractals.pd.

The actual calculations are done within the c objects, so in order to know how they are done you need to read the through the source code. Using the library would be very instructive as well, of course.

Katja.

• I don't see how I missed this. Here is a patch that has the mandelbrot in an expr.
It is an old patch and I have actually changed some things since then you can more recent see videos on my youtube page.

I have been into chaos and sound for quite sometime.
I like mapping the orbits directly to sound as well as generating notes with the orbits. The patch in the link is the generate notes from orbits kind.

The patch was inspired by Elaine Walker's max patch in her thesis on chaos melody maker. It is a good read if you are interested in fractals and music.
http://www.ziaspace.com/elaine/chaos/

• Thanks for sharing your patch and the pointer to Elaine's thesis. Together, they are very informative. I found it impossible to find an interesting fractal 'by hand' though. Everytime when a pattern sounds interesting, it's flying to the stars and reset, being not part of the Mandelbrot set. The logistic map function is much easier to handle, like Elaine mentioned in her thesis.

Katja

• http://www.geocities.ws/billy_stiltner/music/pd/manit.pd is an abstraction that accepts as input:

a bang to perform an iteration

a bang to restart orbit

k,l(real and imag of C)

boundary ie. 4 if the escape boundary has a radius of 2

and numits - 0=free running

outputs are:

itnum(resets to 0 on escape or numits reached)

x,y(real and imag of Z)

xesc,yesc(real and imag of Zescape) only when an orbit escapes boundary

a bang when an orbit escapes

a bang when an orbit reaches numits

to put x or y to notes use this expr

[expr ((\$f1 + 4) / 8 * \$f2) + \$ f3]

f1 = x or y(make one expr ezch for x and y)
\$f2 = scale factor (this stretches or compresses the range of notes)
\$f3 = offset(this transposes the notes up or down a step)

output is a note number which can feed a mtof or table lookup for nonstandard tunings.

You could also use the old scaling algorithm.

This implementation uses abs( in the boundary check to get rid of some of the flying off to space notes)

One of these days I should make an example and help file. Curently the only patches I have using this have way too many other patches and tangled messes of wires to submit as an example.

Posts 25 | Views 22801
Internal error.

Oops! Looks like something went wrong!