Step 12Gray Code, another Musical Number counting method
usually the one which walks around unit cubes and hypercubes of
any number of dimensions, these dimensions being the powers of
the digits in a musical number.
The most common gray code is translated back and forth by the
integer formula G = N XOR N/2 (N = G XOR G/2).
Working with 0.123 type numbers in gray code is not convenient,
and the number 0.123 (123...) converted to gray code is not very
musical sounding to me. But it does seem to be useful for grouping
musical numbers together in an order. Recent experimental calculations
show that skipping numbers and converting them to gray code will
generate all the musical numbers, at least short ones. For example,
counting to 16 using even numbers and converting those even numbers
to gray code will generate all 6 4-bit "Musical Numbers".
Number,Even?,Gray,Musical?
0000,yes,0000,no
0001,no,0001,no
0010,yes,0011,YES
0011,no,0010,no
0100,yes,0110,YES
0101,no,0111,no
0110,yes,0101,YES
0111,no,0100,no
1000,yes,1100,YES
1001,no,1101,no
1010,yes,1111,no
1011,no,1110,no
1100,yes,1010,YES
1101,no,1011,no
1110,yes,1001,YES
1111,no,1000,no
A "Secret" loosed: Musical numbers in Binary are permutations of a square wave,
(combinations of an equal amount zeroes and ones)
where for every zero there is a corresponding one. (Average bit = 0.5)
The stream equivalent of Binary Musical Numbers include Delta and PWM.
Gray codes may be a good method for locating Musical Numbers faster,
but they do not reject Noise and Silent Numbers. Images included on this
instructable page:
Gray code converter for Bending the champ counter,
The gray code "cube walk",
The tesseract hypercube (all dimensional hypercubes can be walked in gray code),
(Look for the 8 regular cubes which are the sides of the tesseract!)
It appears that hypercubes can be rotated so that all the Musical Numbers
"Appear to align in a straight line between the "poles" between 0 and "all ones".
Summary of this lesson: No matter how "big" a number is,
you can always find a way to calculate or count to it.
The Gray code example is given for small numbers,
but a million digits or dimensions are no big deal (or won't be in the near future!).
| « Previous Step | Download PDFView All Steps | Next Step » |
![]() |
Add Comment
|




















































