| ▲ | Show HN: Playing Piano with Prime Numbers(nabraj.com) |
| 8 points by coffeecoders 6 days ago | 5 comments |
| I decided to turn prime numbers into a mini piano and see what kind of music they could make. Inspired by: https://news.ycombinator.com/item?id=44888548 Github: https://github.com/neberej/prime-piano |
|
| ▲ | vunderba 6 days ago | parent | next [-] |
| Nice job. Related, I remember seeing an attempt at mapping primes to minor scales a few years back. https://www.youtube.com/watch?v=duVyBVNX3D8 |
| |
| ▲ | coffeecoders 6 days ago | parent [-] | | Very cool. Primes have such an irregular yet structured distribution, and mapping them to pitches is a clever way to make that hidden pattern audible. | | |
| ▲ | recursive 3 days ago | parent [-] | | I don't think there's any insight available here. I doubt anyone could distinguish this from an RNG fed into the same algorithm without memorizing. |
|
|
|
| ▲ | drankl 6 days ago | parent | prev [-] |
| I wonder how it sounds if you map the primes straight onto Hz instead of piano scales. |
| |
| ▲ | coffeecoders 6 days ago | parent [-] | | It won't be a musical scale if mapped directly to Hz (maybe sine wave mapping?). For example, prime 2 → 2 Hz (inaudible), 101 → 101 Hz (deep bass), 1009 → ~1 kHz (bright tone). Right now the app just maps primes to MIDI notes so they sit nicely on a piano. |
|