Csound Csound-dev Csound-tekno Search About

Re: [Csnd] A little aleatoric experiment using the mandel opcode

Date2022-10-15 03:58
FromScott Daughtrey
SubjectRe: [Csnd] A little aleatoric experiment using the mandel opcode
@Matthew I finally got around to checking out your links. Very interesting, but admittedly the math involved is well beyond my ability to comprehend at the moment. Being primarily a musician with very little secondary school education I can only look at your experiments with a certain detached bewilderment, although I do think they're pretty cool. The video/audio combo of the zoomed fractal was nice.

Being primarily a musician, my interest is currently geared more towards experimenting with different ways to randomize notes and parameters as I learn to use Csound. I can see the appeal of atonal music, not suggesting that's where your interests lie, but I'm largely focused on making generative but still "accesible" music and soundscapes, for lack of a better description. 

It's interesting to see (as discussed a fair bit in Chapter 1 D. Random of the FLOSS manual) how different methods like gauss, betarand, triangular etc. seem to skew probabilities in different ways. 

I noticed in your blog Listening longer to the Mandelbrot Set you wrote: "There turned out to be a huge dynamic range in the signal: the quiet bits were very much quieter than the loud bits".

I don't know if it's directly related, perhaps it's the way the Mandelbrot equation works, but this seems to be similiar to the results from the mandel opcode output, largely skewed to the min and max ranges in relation to the kmaxIter value. So if set it to 1000 it seems to return many values at or near 1000 and a smattering between say 0 and 20, if set to 21 then quite a few 21's etc.  I've played with the X and Y values but typically get similiar results. Or just a bunch of maxIter and nothing else.

I don't know if you followed the other links from earlier but Michael Gogins posted a link in the github forum to a piece you might find interesting, to do with the Mandelbrot orbit. The thread is here: 

https://github.com/csound/manual/issues/525

and you can find the csd here:

https://github.com/gogins/michael.gogins.studio/blob/master/music/mandelbrot_orbit.csd

Your pages are also quite interesting, I very much enjoy building patches in virtual modular software but simply can't afford the real hardware versions right now.

Cheers and greetings from a fellow Canadian.

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2022-10-16 17:01
Frommskala@ANSUZ.SOOKE.BC.CA
SubjectRe: [Csnd] A little aleatoric experiment using the mandel opcode
On Sat, 15 Oct 2022, Scott Daughtrey wrote:

> I don't know if it's directly related, perhaps it's the way the
> Mandelbrot equation works, but this seems to be similiar to the results
> from the mandel opcode output, largely skewed to the min and max ranges
> in relation to the kmaxIter value. So if set it to 1000 it seems to
> return many values at or near 1000 and a smattering between say 0 and
> 20, if set to 21 then quite a few 21's etc.  I've played with the X and
> Y values but typically get similiar results. Or just a bunch of maxIter
> and nothing else.

I think this comes about because the mandel opcode is basically sampling
the colour index of individual pixels from an image like a frame in my
video.  The images are computed by taking a starting value, repeatedly
applying the z <- z^2+c formula, and seeing what happens.  Depending on
where you start, the value may escape to infinity, getting bigger and
bigger forever; it may hang around near zero for a while and then escape;
or it may get stuck and never escape.  The "never escape" case corresponds
to the black "snowman" shape you see in the middle of many Mandelbrot set
images.  The colours, and the opcode output, come from counting how many
iterations it takes to determine whether the starting point is headed for
eventual escape:  few iterations for points far from the body of the set,
more iterations near the edge, and the maximum allowed for points actually
inside the set, which will never escape.

So... if you're using random numbers, or some kind of smooth waveform, to
generate inputs to the mandel opcode, the output is going to be kmaxiter
pretty often (corresponding to starting points that hit the interior of
the set) and quite small pretty often (corresponding to starting points
outside the set and relatively far from the boundary).  The output will
only be relatively large but not maximum, when the starting point happens
to be outside the set and close to the boundary, which is not a common
situation unless you are deliberately aiming for it.

I wouldn't expect that to be directly related to the high dynamic range I
got in my edge-tracing experiment because those were slicing the set in a
very different direction, but since they both come from the Mandelbrot set
there's certainly at least a small connection.  I think the bigger reason
I was getting high dynamic range is related to what's visible in the
motion in the second half of the video:  the speed of the motion is very
non-uniform when I don't deliberately distort it.  It spends a lot of time
stopped almost dead near the tips of tendrils, and then it zooms rapidly
past valleys.  There's a large difference in speed between the fastest and
slowest parts, and that implies a large difference in amplitude between
the loudest and softest parts of the audio.

-- 
Matthew Skala
mskala@ansuz.sooke.bc.ca                 People before tribes.
https://ansuz.sooke.bc.ca/

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here