Jump to content

Converting the Mandelbrot set into sound


Fluke

Recommended Posts

  • Members

 

I'm currently working on a program to do this myself. However, the only language i know and have is QBasic, which is terribly and unnecessarily slow for this kind of operation. For those who are curious, this is my current solution, it would take hours or possibly days to complete as it is now though, and still probably give a disappointing result.


So does anyone have a suggestion for a freeware version of BASIC i should try instead, that is compatible with the same expressions and calculates at full speed?


OPEN "c:_" + STR$(INT(TIMER / 10)) + ".raw" FOR OUTPUT AS #1


SCREEN 12

LINE (0, 0)-(640, 480), 1, BF

FOR m = 511 TO 1 STEP -.0003

l = 32766

FOR n = 41 TO 256 STEP .2

p = (m - 420) / 200

q = (n - 256) / 200

x = 0

y = 0

FOR i = 1 TO 80

u = x * x - y * y + p: v = 2 * x * y + q: IF u * u + v * v > 4 GOTO E

x = u: y = v: NEXT i

PSET (m, n), 15

l = l + 1

E:

NEXT n

PSET (m, 1), 15

PRINT #1, CHR$(INT(l / 256)); CHR$(l MOD 256);

NEXT m

 

 

If you don't care about realtime, and are willing to work with files, I would suggest Octave. It's free, and has a good deal of MATLAB's functionality. So much faster and easier to test things in. Unfortunately, unlike matlab, there is no functionality to translate into C code which you can then compile.

 

-D

Link to comment
Share on other sites

  • Members

wooo hoo! Reminds me of the guy who "musicalized" the DNA sequence of the HIV genome and then played it at the same time as a sequence he got from a T cell; he assigned notes to the ACTG bases; music of the genes!

 

Course he made the HIV low and ominous and the T cell light and high, and he remarked how the "T cell just ends! While the HIV plods on..." very symbolic...but only because he picked a shorter DNA piece from the T cell which has like 100,000 fold more bases than the little HIV virus...

 

Make music, skip the pretense, we're all maggot meat in ~80yrs anyway..

Link to comment
Share on other sites

  • Members

Also, do not disregard Visual Basic, especially Visual Basic .NET for coding purposes.

That's because - thank Bill - VB.NET is a refreshing and huge difference from the immense shitheap VB6 could be :D.

 

(ASP Classic, the horror, the horror)

Link to comment
Share on other sites

  • Members

Well, i've managed to make a more efficient version ,but the result is rather disapponting. I guess it's basically just noise, though it has some interesting structural properties. For those who still want to hear it, i uploaded a brief resulting file here, along with one of the Julia set for -1.

 

http://rapidshare.com/files/133586839/mandel.zip.html

Link to comment
Share on other sites

  • 1 month later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...