Posts Tagged ‘matlab’

More automata music.

Sunday, October 11th, 2009

I’ve been kept busy by Schrödinger, Fourier and Dirac lately, but I had some free time finally and put together a more refined way to derive musical (or so) structures out of one dimensional cellular automata system. Partly inspired by the excelent lectures on early finnish experimental electronic music scene at the local media art museum (see http://mansedanse.com/events_fi.html).

The algorithm quantizes the chromatic scale down to any arbitrary scale and picks up two notes to be played. This produces a more music-like result than the total chaos of applying the whole automata state straight to the chromatic scale.. though I’m not saying that it can’t produce interesting results.

http://www.punainen.org/~biotek/cell0011.mp3

http://www.punainen.org/~biotek/cell0012.mp3

Here is the MATLAB code responsible for these, keep in mind though that the quantizer code was written in the middle of the night (I think you can tell) so there are probably some glitches to it.

http://www.punainen.org/~biotek/automata1.m

Further adventures in quantum land.

Wednesday, June 3rd, 2009

Studying wave equation discretization has personally led me to understand and appreciate the physics which rely heavily on this mathematics, namely electrodynamics and field theories. I think this sort of ‘visual intuition’ is a important part of learning when dealing with dynamics which can be extremely complicated and complex, at least it has been exactly that  for me. Studying the computability of these equations has definetly paved some way in these theoretically dense subjects.

I recently made few basic computer models of the Schrödinger wave equation with MATLAB for computational physics course work.

Here is a two dimensional version of the discretisized time-dependent wave equation calculated using a clever leapfrog integration algorithm scheme by Visscher.

Things start to get visually more interesting when integrating the time-dependant equation in three dimensions.

Here is another run with a slightly different value for the momentum of the wavepacket.

Unfortunately MATLAB seriously lacks in the volumetric plotting department so we’ll have to do with phong shaded isosurfaces instead of a more appropriate voxel based plot. Don’t worry, this will not end up forming black holes and destroying Vulcan.