The Shœstring Foundation Weblog
https://pestilenz.org/~bauerm/shoestring
Miscellaneous ByproductsenDissonance in b-Smooth
https://pestilenz.org/~bauerm/shoestring/2012/03/08#b-smooth
<p>
Inspired by Adi Shamir's <a href="http://www.infosecsys.com/image-files/twinkle.pdf">TWINKLE</a> optical
device for finding smooth numbers, which works at GHz, I wrote an audio device for finding smooth
numbers, which works at low kHz. In absence of a good, screeching acronym, I'd call it
<a href="http://pestilenz.org/~bauerm/sound.c"><strong>Dysphony in b-Smooth</strong></a>.
</p>
<p>
The idea is to convert the smaller prime factors of numbers into sound. The code does this
by keeping <code>n</code> counters, each of which is increased modulo its individual prime.
At the moment, these are the first 1000 primes. After every increment the counters
that contain a zero are collected and a sine wave is constructed from the associated
frequencies (<code>index*(2000/n) + 40 </code> Hz) at an amplitude proportional to
the logarithm of the prime (so that the frequent divisors 2,3,5,etc have a low impact).
Each sound lasts a small fraction of a second. If a loud noise is audible, it is
the representation of a number with many different and/or larger prime factors.
</p>
<p>
The scientific value of this is approaching zero from the left, but it was a nice
exercise to have the computer produce sound after my last attempts in 1987 on
an Atari ST.
</p>