3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Predictive* digital music synthesizer (Pandora's Box #2)

Step 12Gray Code, another Musical Number counting method

Gray Code, another Musical Number counting method
Gray code is one of many alternate methods of counting in binary,
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 StepDownload PDFView All StepsNext Step »

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
59
Followers
12
Author:VIRON
I'm a figment of my own imagination. ---- To Win the war on Terra Means to END the WORLD. How about a nice game of Chess? ---- I'm chilling, but forgive me for sometimes believing I invented everythi...
more »