Press here to hear the Brown noise. Press again and noice go away. Not bad ;)
You know Brown noise the Brownian noise the Brownian motion A random walk.
Here some hints how I make it
Say: 2D-plane
|A|B|C|D|...
1|1A||1B||4C|...
2|2A||2B||4C|...
3|3A||3B||4C|...
4|4A||4B||4C|...
. .
. .
. .
Matrix if yuo will
How presentate this in 1D dimensional sound buffer?
Let another dimension be in higer tenth power
1000 2000 3000...
1001 2001 3001...
1002 2002 3003...
.
.
.
It depends the size of matrix how get square area walker to wadel around.
basic steps can be:
var steps=[1,-1, 1000, -1000, 999,-999, 1001, -1001];
in 999 999 square where there is 999 step-blocs y is over thousand and x 0-999
At the edges it is different, you want it stay, inside think most careful
the edges:
if((positionnow)%1000==0)
Here if you kive it the normal steps; here being the left edge -1000
0
1000
2000
.
.
.
(The matrix is another way up here) you step out the bounds if dice
roll on steps -999, -1 or 999, so here
walk need to be the different:var stepsonedge1=[1,2, 1000, -1000, 1002,-1002, 1001, -1001];
I make them edges, to be scarry to that random walker so it take
two teps opposite direction,
out of them if it is about walk thru them edges.
First I thought maybe it teleport on edges the walker back to
its original position 500,
but then I decide: "Why not this way." .
Strange it come this good, that sound, that definitely is the Brownian noise,
not all the seeds, if it souds snapping
or pounding: Reload the page!
the real head scratcher. Here! Is that,
there is geometrically 2 between -1 and 1, or is there?
The Real paradox!? It makes your head spin.
And the dice is js normal vanilla:
function getRandomInt(max) {
return Math.floor(Math.random() * max);
}
--that silent blep* sound comes when sound buffer loop-around back in beginig.