This is very well explained, but not all that novel. Brian Eno used to generate long soundscapes like this, using loops of mutually prime lengths of time. Edit: See also - http://en.wikipedia.org/wiki/Ambient_1:_Music_for_Airports http://en.wikipedia.org/wiki/Generative_music
Using prime numbers to make better backgrounds
21–30 of 57 posts
Re: Using prime numbers to make better backgrounds
#22This is very well explained, but not all that novel. Brian Eno used to generate long soundscapes like this, using loops of mutually prime lengths of time. Edit: See also - http://en.wikipedia.org/wiki/Ambient_1:_Music_for_Airports http://en.wikipedia.org/wiki/Generative_music
Re: Using prime numbers to make better backgrounds
#23This is very well explained, but not all that novel. Brian Eno used to generate long soundscapes like this, using loops of mutually prime lengths of time. Edit: See also - http://en.wikipedia.org/wiki/Ambient_1:_Music_for_Airports http://en.wikipedia.org/wiki/Generative_music
It also is the core of "method ringing", a kind of bell ringing from the 17th century and persisting today. Imagine some folks clanging away at 10 bells in a church tower for hours on end, never repeating, and never developing a melody. Each person is operating a single bell and repeating their pattern with a unique period. http://en.wikipedia.org/wiki/Change_ringing
Re: Using prime numbers to make better backgrounds
#24Cool, but these numbers don't have to be primes. They just have to be coprimes (like (8,9)). The least common multiple of two coprimes 'a' and 'b' is a*b. http://en.wikipedia.org/wiki/Coprime
In the cicada example the point is that one predator would evolve to align its boom cycle so that it had a common divisor with the cycle of the cicada.
Since the predator's cycle is variable, it is evolutionarily optimal if the cicada only comes out every prime number of years.
Re: Using prime numbers to make better backgrounds
#25Re: Using prime numbers to make better backgrounds
#26A fairly pedestrian example that I whipped up: http://web.njit.edu/~md224/backgroundtest.html (Firefox 4 only!)
Re: Using prime numbers to make better backgrounds
#27Earlier quoted context omitted.
It also is the core of "method ringing", a kind of bell ringing from the 17th century and persisting today. Imagine some folks clanging away at 10 bells in a church tower for hours on end, never repeating, and never developing a melody. Each person is operating a single bell and repeating their pattern with a unique period. http://en.wikipedia.org/wiki/Change_ringing
Hah, that trumps my example by 200 years. Well done.
The bells are hung in such a way that they naturally want to swing with equal periods, so you don't have to disturb one too much to make it ring one place earlier or later in the cycle. (A bell is never moved by more than two places.)
I don't see any reason why a peal of bells couldn't be set up to produce the effect jws described, but it wouldn't be at all the same thing as change ringing.
Re: Using prime numbers to make better backgrounds
#28Re: Using prime numbers to make better backgrounds
#29They're also useful for reverb effects, in very much the same way. See http://www.npr.org/2010/08/03/128935865/queens-brian-may-roc... (under "On The 'Stomp-Stomp-Clap' Section Of 'We Will Rock You'") Also, I think the technique will work as long as the numbers are relatively prime, which may be a bit easier to design around.
Re: Using prime numbers to make better backgrounds
#30This is the perfect Hacker News article. I learned something new and mathematically-interesting about the natural world, the author came up with a clever hack to enliven backgrounds, and we learn how to apply that to improve our own designs.
pquerna's recent post about OpenSSL memory in node (and elsewhere) is another that comes to mind. http://news.ycombinator.com/item?id=2411144
keep 'em coming I say!