PI 24k - A browser of circular constant

pi24k_v0.03.hex

Description

You can see 24,576 digits of circular constant.
You may enjoy the mysterious melody and perform of light generated from the digit sequence. :crazy_face:
Screen shot

Operation

  • Left-Right: Scroll / adjust the auto-scrolling speed
  • Up: Toggle LED flashing ON / OFF
  • Down: Toggle sound ON / OFF
  • B button: Toggle auto-scrolling ON / OFF

Download

Download HEX file.
Or check out souce code and build the project in ‘pi24k’ folder.

Supplement

The digits are mapped to tones based on this movie. :notes:
Also, they are mapped to colors with my subjectivity. :art:
mapping
You can modify these mappings by editing soundFigure and/or ledValues in “data.h”.

12 Likes

I am so happy to see ideas like this!! Nice entry!

Quality, like always I am impressed.

Nice one … I am not sure what I will do with it but I find it fascinating.

@Vampirics
The generated melody sounds like actual contemporary music. :headphones: It’s very curious.

@bateske
Thank you. :smile:

@filmote
Actually I am not sure what I will do, either… :thinking:

@obono did you know Bailey–Borwein–Plouffe formula that allows to compute nth digit of pi without computing the preceding digits? I wonder if it could be used to allow inspection of many more digits, though am not sure about base 10 (EDIT: looks like base 10 not possible).

@drummyfish
Thank you for your information!
I’m sorry that I can’t understand the algorithm completely. It’s too difficult… :woozy_face:

1 Like

I can’t understand the algorithm at all so don’t feel bad.

2 Likes

It’ll be useless as you can’t compute decimal digits, only hexadecimal (i.e. also binary). Anyway, other algorithms could be used to calculate the digits at runtime instead of storing them.

I think the Bailey–Borwein–Plouffe formula works like this (though I’ve now found a faster formula):

The equation tells you pi is a (infinite) sum of various numbers of powers of 16 (which appear as reciprocal, that means the digits come after the decimal point) – i.e. it consists of hexadecimal digits going on forever. k tells you the specific digit, so by substituting k for whatever you get the specific digit, without having to know the previous digits (they don’t appear anywhere in the equation). E.g. k = 0 gives you 1/160 = 1 (whole units) and the number in the rounded brackets will get you 47/15 = 3.1333, which tells you there are 3 whole units in pi, i.e. pi starts with 3 (which is the same in decimal as well as hexadecimal). Substituting 1 should give you the next digit after the decimal point (not sure if it’s called decimal point if it’s hexadecimal number :confused:) etc.

It ought to be ‘hexadecimal point’, but that’s unlikely to be used in common parlance because few people count in hexadecimal.

(The Mayans used a base-20/vigesimal counting sysytem and the Babylonians used base-60/sexagesimal, but as far as I’m aware no humans have naturally used base-16 for counting.)

Even when humans deal with hexadecimal, they’ll usually either convert to decimal for the sake of doing arithmetic, or rely on a computer to do the arithmetic for them.

If in doubt, use ‘radix point’ because it’s correct for any base.
(Something I picked up when writing ‘A Fixed Point Primer’.)

1 Like

I understand the twenty (fingers and toes) but a base-60 system says you and your two friends need to be at the bar to count up the cost of the round you just bought. Actually, that at least means you are not drinking alone.

1 Like

I like this project because it opens up nice discussions and possibilities of taking it further. For example more irrational constants could be added besides pi (then they would have to be computed at runtime in order to have enough memory), and you could compare how their music sound, and switch between bases. Maybe you could add computation of primes or other integer sequences also. Perhaps the numbers could also be visualized in some way.

e24k.hex

3 Likes