Introduction: Predictive* Digital Music Synthesizer (Pandora's Box #2)

About: 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 everything.

(*)Originally this was "preemptive", because I heard a rumor that someone else
had announced it. However "it" (theirs) was more of a data mining scheme in my opinion
than an automatic sound generator. This is "predictive" because it reads and sounds
THE NUMBER which is PROVEN to contain ALL possible SOUNDS in a usable way.

Someone claimed to have invented one in 1971, before PC's were powerful enough.
I responded by saying there were no PC's not even Altairs in 1971, but with 1971
technology I would have used the following 1971 technology with MY METHOD.

The Pandora's Box instructable now includes info about a Singing Calculator Number,
which is from the sequential digits of the number that is the subject of this instructable,
and a planned simple device for feeding that number into a speaker to get music.

NO PROGRAMMABLE CHIP IS NEEDED.
This sounds different than my other Pandora's Box which needs a programmable chip,
but when the schematic is done for this, so will be the uncomputerized original P Box.

Step 1: More Info, What Is Needed?

I have reduced and minimalized this so that a small handful of
nice cheap 4040 and 4051 chips may be all you need.
(and battery, wire, solder, iron, speaker, breadboard, etc.)

HEADACHE WARNING: MATH AHEAD (Only "math heads" need to know.)

At this point the simplest musical calculator using "normal numbers" will use a brute force
method that pulls digits out of thin air using a binary counter, which is not considered a
computer, although it calculates all possible combinations starting with zero. Normal numbers
contain all other numbers, and the ones which can be made by counting contain them all
in order. And this is interesting because files and numbers are both the same thing, strings
of bits. This is well demonstrated in the simplest way I can imagine, in that number which
will play as the calculator song.

We say that Pi has an infinite number of digits, and that the digits are arranged "randomly"
in such a way that it contains an equal number of each number, so it is called Normal
(mathematically speaking). If I was making a Pi player, it would sound like the hiss of
static on a radio, because that is the sound of random. No one says that counting is
random, and a number made by ordinary counting will not skip a number, so we can
be sure that any number can be found in sorted order in it's place, leaving no doubt,
as someone could doubt that Pi has a certain number in it if they looked all over it
and never found what they were looking for.

The number "zero point one two three..." is the simplest demo of the musical number
concept, not necessarily the most practical one. Most understandable. I really feel
like I have to condescend and KISS about my most incredible inventions so people
because of responses like this:
Digg my "Holodeck"

The original Pandora's Box instructable had constraints, so that it's output would
never sound like static. This one does not have noise-avoiding constraints, except
that as another demo it is not designed to go so far into the calculation that we
will lose the sense of the pattern in the sound which is the process of counting.

It is very important to imagine that the number one need not be the first sound.
If this particular method of making sound were advanced far enough, then
the number one could actually represent the first song on the popularity chart!
I hope to get deeper into enumeration in future "musical number theory" instructables.
My more current enumeration research actually involves effective skipping of white noise,
so just think, out of all the possible numbers (sound files), what portion of them are noise? (!) .

It is important to realize that the musical number explored in this instructable is
not the only one, and this is not the only method I have invented or will invent
of generating digital sounds. Many are not yet impressed with my 3D projection
system or writing style, but at least I've included older projects which may be
reason to anticipate more and better in the future.

There may be inconsistent flow in the development of this prematurely published
instructable. I provide a link to what part of the Musical Number sounds like as
output by the device I'm now making for you to make.

Some 2^(2^(17)) digits of The Number (compressed into mp3)
Listen carefully for beats, voice like sounds (woo!) , bells ... some imagination maybe required!

I'm expecting the finished circuit to consist of a few logic chips, (no uC or uP)
so you'll need a soldering iron, a speaker, and chips which I haven't chosen yet.

You may feel free to experiment with the calculation and playing of numbers as
sound files while I work on making this instructable project.

Calculated BINARY numbers sound much louder as RAW or PCM
when the letter O is used instead of the number zero when stored as text.
(Otherwise you may not hear it at all.)
All your base are belong to you! (Haha. Use whatever base you want. Also,
I recommend using only the alphabet for bases 11 thru 26, or Hexadecimal will be distorted.)

The number that sings about the calculator is in ASCII (see Pandora's Box)
because it used to be in BCD, but that is not a standard (net playable) format.

I know you all laugh at my videos but I will probably demo LOTS of unique sound artifacts.

Step 2: Please Stand by While I Make the Demo Circuit and Other Stuff.

Sorry, but this is for all of us. This is public domain.
I apologize for the premature publication but I feel I must announce
this project before the RIAA (possibly) very shortly tries to own it. OK, OK, now!

Oh what a mess.
Well , the main reason it's a mess is because of the way they made the chips.
It's going to be hard to draw the schematic, but meanwhile I'll be very simple about it.

Now why would you want to build this?
You can hear what it sounds like with the mp3 on the previous step.
It doesn't need to be messy, and it's very bendable.

In fact, if I break the rules and use a programmable chip, and remove some of these,
we can play the "calcul8" song and as much other music as can fit on an
i-Pod, and it MIGHT even sound as good or better than mp3's. I won't claim that
anymore until I demo something like that.

Step 3: More Theory on Musical Numbers

HEADACHE WARNING: MATH AHEAD.
You might want to skip this step for now unless you really want or need to know.

The number being explored (zero point one two three four five six ...) is normal.
Normality is actually NOT optimal for musical numbers, and in fact by avoiding
normality, a lot of white noise can be excluded. And it's convenient to put the
white noise beside another trash bin which I call the set of impossible sounds.
The impossible sounds are playable, but have been known to damage certain
kinds of speakers. I think I have a picture, which I will post if I find it.

WHOA! Damaging speakers? If you have seen the calcul8.txt file in a sound
editor, the off-centerness has something to do with it. ...9999999999... is a Very-
Bad number because it could heat up the speaker and push the cone out!
And you might not notice, because it might just be quiet and start smoking.
Don't hook up any of my Pandora's Boxes to your really expensive audio
gear. Transistor radio speakers like the ones in my Magnet Phone instructable
won't mind the 9's as much, especially since they are used with cheap amps.

Since I'm still talking about using human numbers which can be seen in The Number,
I'll mention this other fact about The Number:

It is not only normal, but it has an average digit of 4.5.
4.5 is the middle of the numbers 01234.56789 .
The Number (I'm calling it that because sooner or later most of what I write about
it gets removed from search engines, and since I've noticed that, it doesn't hurt
to be paranoid, whatever the reason is for why that happens.)
The Number (this is what the math whizzes will object to) offers not much in the
way of advantages as a data source, except that it doesn't need the enormous
amount of memory that would be able to store it.
The Number seems to require even bigger numbers to access all of the data
in it, but only at first, and then it seems to require ones of similar or slightly
smaller size. In other words:
THE MATH FOR USING THE NUMBER AS DIRECTED
APPEARS TO WASTE IMAGINARY MEMORY.
As long as the memory is imaginary, maybe we don't have to care.

Wait! What's imaginary memory? An example is the multiplication table.
I'm not just talking about what was memorized in elementary school,
but the infinite plane of all numbers multiplied together. A computer
does not have to store that anywhere, nor could it, to retrieve the
answer to a multiplication.

Neither does The Number need to be stored anywhere.

Neither does it need a decimal point. Only whole-number math is
necessary to access it.

Now let's go back to throwing away the noise in The Number.
I'm going to work with this number as long as it takes to teach the theory.

MUSICAL NUMBERS SHOULD NOT BE NORMAL.
MUSICAL NUMBERS IN "THE NUMBER" SHOULD HAVE MORE 4's and 5's.

If you found, tried, played, looked at the "calcul8" number mentioned elsewhere,
you would have noticed that it has a lot of 4's and 5's, and is Not Normal, and
probably has an average digit of 4.5 unless it's been modified or corrupted.

I shouldn't do this just yet, but there is a smaller, more musical number with
all the music in it than The Number, which is much more likely when a long
number is pulled out of it, will have an average digit of 4.5, and will have
much less white noise. Imagine how many numbers are removed from The
Number (as if it were made by counting, which is unnecessary, just easy and slow)
and how many numbers don't have an average digit of 4.5. MOST DON'T!

I shouldn't go beyond The Number just yet because it's probably still blowing
your minds that this number is infinite, and contains all possible sounds near
the beginning of it. And that counting is the slow way but math is the fast way
to find and pull sound out of it.

How slow is counting to a musical number you recognize as a song?
The fastest computer couldn't have done it if it started at the beginning of time!

How fast is the math? Quite reasonable. Some multiple of the time it takes
to do a memory test. No musical number will ever be bigger than if you
filled your memory with ONES, as I think I explained earlier.

Unfortunately, the project this instructable is or will be about building is
going to start with counting because it's easy. But I hope it will not
disappoint. I will try to stretch it a little with some interesting circuit bending,
or alternative enumeration of the sound.

Enumeration: The order in which all these sounds are sorted.
There's a first sound, a second sound, a third sound...
and we can change WHO'S ON FIRST!

I may hear new things too. I expect to be surprised by any new alternative enumerations.
And we're still just watching Sesame Street and learning to count ... SOUNDS!

Still makeing... sorry for the delay... and that "my brain is about to explode" feeling.
(Nope, now it's done, now to "explain away" the big mess!)

Step 4: SIMPLE OUTLINE OF THE CIRCUIT

This basically is supposed to show how the circuit simply counts
and the rest of it just reads out the digits of each number into an amplifier,
before the next number is counted. And what's under the mess of wires on my board.

Each number is a sound, just like Calcul8.txt (pocket.wav) is a number and also a song!

Step 5: Helpful Chip Pinouts

Here I simplified the pinouts of the chips so when anyone makes this
(including myself before I made it) they can have something to look
at and not get confused by the mixed-up pinouts.

These chips can run on from 3 to 9 volts, not only 5 volts.
It's recommended that each one has a 0.1 uF capacitor across the power
(even if I don't include it in the schematic).

I'm having minor trouble with the schematic(s) at the moment, but no worries.
I might just do it by hand.

Besides that, what I will soon add is some comments on the circuit bending potential
of this circuit, and I hope I get around to video-demonstrating all the other circuits I have
made that pull digital sound and interesting noise out of thin air, or subspace, if you will.

Subspace? Ok, like fractals. How much memory would it take to hold the whole
Mandelbrot Set? Infinite. Although number "zero point one two three - infinity" is an infinite
fractal, only a finite amount on the small end is needed for all the free audiovisual stuff.

Step 6: Finishing Up?

You might be able to build it now without my schematic,
but if not, don't worry, I'm drawing it now, and working
on my video demo. This one will be made on the old junk,
the cool analogs, because I know Movie Maker is just a
silly pain in the butt. I don't buy stuff I MAKE it!

One thing remarkable about this current "1971-tech" demo
that this instructable is going to show you how to Make is
that it seems to generate ALL THE BEATS, if not all the tunes!

Getting the tunes involves some weird math, but not too weird,
because "zero point one two three infinity" is simple arithmetic
that just requires a calculator with a million digits.

It would take billions and billions of years to hear every sound,
but any one can be downloaded from "the multiplication table"
faster than the speed of light!

THIS IS MY IP. NO ONE EVER DID THIS THIS WAY BEFORE.
As I said before in P-Box #1 and again, IT'S "FREE"!

What am I showing you? In Kindergarten terms, you just learned
to count, and therein is the sum of all human knowledge!

Sorry for the delay on the full schematic and video; I hope it's short.
Maybe I'll drop a few ACME Looney Tunes products on the RIAA in my demo video.

Step 7: Breadboard Schematic

For a few hours this looked ridiculous without the schematic.
It's a rough one, still being checked at this time.

Check back every once in a while for updates.

Teaser: Gray Code enumeration: It moves along the edge of a cube of
dimensions equal in number to the number of bits. To bend this into
gray code without programming, you would need 32 XOR gates.

Perhaps you would prefer the PIC code, as in the original P-Box...
This has too many wires!

QUICK BENDS:
If you build this and get tired of how it sounds, I recommend mixing up the
"blue" wires on the 4040 next to the 555.
The 4051 wire order isn't as noticeably significant.
Removing one or two "green" wires from the last 4051 maybe interesting,
which I did backwards by building the circuit with power on it.
And of course, turn the playing speed knob.
The "green" wire on the left 4040 pin 1 is a reset trigger that "never" resets.
So move that reset wire to other pins and expect major changes in the sound.
I'm concerned about the 555 going too slow, but IF that happens
(making only low pitched sounds at all speeds)
try changing the 555's capacitor from 1nF (0.001uF) to 100pF.
The 555 was not tested in the circuit, I used a 4060 instead.
It will work though. Like in my hypnosis glasses instructable.

One advantage of this no-brain "mess" circuit is the convenient bending possibilities.

The following is the last sound I created on a PC immediately before that PC was
wedged in the keyboard (remote controlled) by an illegal DRM hack and rendered
useless, and is the first STEREO one generated by a process which could be
emulated by a circuit with 4 times as many of these chips; and although the
sound is open-ended (cut off at the end), it shows more synth-like qualities
than many of my other "Music-Ex-Nihilo" (P-Box) experiments.
Last PC generated, First Stereo P-Box sound from 10/2005
It's equivalent to output of a hardware bend, with diagonal orthogonal counting on 3 axis.
It also was done with a 256 bit counter. Remember, the counters are experimental only,
and impractical, since it will take forever to get to any serious music. That sound filled up
my hard drive needlessly, and reached the "convenient" limits of the PC to do this stuff.
(But more chips in the pattern below could have done it!)

A few million bits requires some obscure simple arithmetic (a Pythagorean Mystery)
to make all songs. There is a solution, which I will publish as P-Box #3 when it is made
understandable. Understand this, that THE NUMBER is only the simplest to understand
number that is useful for this purpose. Numbers can be defined for any similarly
special and amazing purpose, and as I mentioned before, the simple obvious
number is not ideal but easy to understand...I HOPE.

This is the schematic drawn from the breadboard on Step 2.
I mentioned before it's limited to 32 bits, unless you add more chips.
Twice as many chips gives 64 bits.
Eight times as many gives 256 bits. If you got the chips, the sky's the limit.

Step 8: What's Next?

No time for secrets if you can learn them.
I owe ya all a schematic replacing the code to P-Box #1,
and the code to replace all the wires in P-Box #2,
and whatever P-Box #3 will look like.
And more bends, perhaps a drawing of a good bending panel.

Another bend: any available sound effect boxes added to the audio output.
Note:Delays or echoes are equivalent to the audiovisualized XOR2.MOV link on P-box #1.

P-Box #3 involves a number that excludes impossible sounds and requires less
"imaginary memory". Notice the imaginary memory in the schematic in step 7,
whereby gigabytes are pulled out of nothing. There is an intangible ROM (imagine it
as an invisible disc made of nothing) being played. The sound format is slightly
foreign to PC's, after all, if a text number can sing (calcul8.txt or pocket.wav),
but your OS doesn't recognize it as playable in spite of it's simplicity, well, this
is what challenges me. Calcul8.txt and Pocket.wav play better and equally well
on raw electronics or logic which is not programmed to reject ANY data!

Time to "take an aspirin" again. (Joke, not medical advice. HARD STUFF AHEAD.)

I want to show you something weird, related to artificial intelligence.
I say it's related to artificial intelligence because I've already pondered whether
such numbers can play tic-tac-toe, checkers, and chess. One number apparently
can play all three. It can play a perfect game if such perfect games exist, and
even without being aware of which game it's playing. This hasn't been done, but
sufficiently simulated that it's known to be cleverly cheatable... you can steal it's
game-pieces and it will not notice even though it still may win. Putting extra queens
on the board may or may not produce unpredictable results. I'd expect a "new game"
response or a "blank board response", not ambiguous ones. An example of an
ambiguous response to an impossible board would be all pieces changing to queens,
or the whole board being filled with them.
Perhaps the "gameboard number" has already been calculated, as THE Method for
electronic games. Again there are other numbers,
less recogniable than "zero point one two three" with similar (musical) or different uses.
It IS artificial Intelligence!

Once it was common to use binary to decimal converter chips, but there was an odd
possibility: The binary input could go up to 16 but the decimal output had no
sensible response to anything 10 and above. I call this AMBIGUITY. Look at
what happens on the readout when the binary input exceeds 9.

Similar anomalies result when an artificial intelligence (neural net) is taught
more than it can learn, and is quizzed on something... I've seen them make stuff up!
I don't know about you, but if I see a sign, and it's in a language I haven't learned,
and the letters don't look familiar, my mind is definitely not silent; it reads the
sign and I hear a strange noise in my thoughts! (Certainly not what's written.)
So, look what a certain binary to decimal converter chip (7447 or 7448) does
when it is given a number that it can not display! It tries anyway! This unexpected
info is a BAD example of how BAD info can come from no where!
It doesn't know or care that it can't produce the numbers 10 through 15.
The output was not designed, and definitely not explained in the manual.

In the musical number theory, we actually do expect USEFUL information
to come from no where, in ways never before designed. Imagine that your
computer came with 1 gigabyte of RAM but some was partly defective, so
you removed it, and are waiting for a replacement. But you have a program
that requires 1 gigabyte of RAM and doesn't check to see if it's there. That's
unlikely to happen nowadays but in the past AMBIGUOUS results have been
obtained from missing memory. Perhaps I'll demonstrate in my next video. But,
The nothing from which musical number theory pulls it's output is not this kind
of illogic. It is as I said, like a big giant imaginary multiplication table, full of answers,
but the answers are not written, until the question is asked; they just exist, made of nothing.

There is nothing that can be computed tomorrow that can't be computed today!
Am I beating the dead horse?
THE NUMBER already has in it what you will record tomorrow.

Again, look at the illogical output of the binary to decimal chip.
I'd have either made 11 look like 11 at least, or included hex AbCdEF.
But the chip was NOT designed to make what it makes, as if no one would
ever count higher than 9. This example is interestingly AMBIGUOUS, but useless!
Information from no where, but useless info. No, this is not what we do!

Step 9: What's Next , Continued.

Again, this is the plan for the near future.
1.Tie up loose ends, by adding more hardware and software alternative equivalents.
(There are many ways to make the sounds)
2.Make a documentary and tutorial video of this technology.
3.Continue the P-Box "series" and hope enough people understand the "lessons".
(This involves simplifying the weird synthesizing processes to a reasonably makeable level.)
4.Lead up to a simple useful makeable All-Music-Box and other similar instruments.
5.Explore other uses for These Things. There are very many more hard to believe uses.
6.Miscellaneous arts and works.

No hints now about the future "Boxes",
except (and also because) they get progressively better and more advanced,
but not much bigger.

Step 10: ORIGINAL PANDORA'S BOX CIRCUIT

This one has been struck twice by anomalies, and now is in an unbelievable condition.
One difference: I used a 1.842000 crystal.

UPDATE: ***It has just been found that there is an error in this schematic,
and pins 9 and 10 (upper right pair) are reverse connected on both 4040's. ***

Step 11: A Demonstration of a Musical Number From THE NUMBER.

This Musical Number describes the process of it's own creation!
-Look at the number in a word processor to verify that it's only "just a number".
-To hear the sound of this Musical Number, it must be imported as RAW 8bit unsigned mono pcm
into a sound editor at the well chosen rate of 8000 samples per second. This was decided long
before PC's had sound, when programs were stored on compact cassettes and 5 inch
floppies. While playing, the sound must be turned up due to the inappropriate hardware.
-This is the only sound represented by Musical Numbers thus far which is for the purpose
of showing that any given or any future sound can be calculated by simple arithmetic,
which sounds like a song which you may be familiar with. Since Musical Numbers are not
a standard sound format, this will not sound as good on a PC as on logical hardware, such
as circuits made with chips in the schematics already given, so listen with higher volume.
-Fact: "human" Musical Numbers were invented on an Atari 400 and used to give human
(non-robotic) voices to devices used by blind people, after several years of being a
human voice synthesizer novelty.



Step 12: 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!).

Step 13: How to Count Only Musical Numbers

This is in english but for the purpose of making an algorithm in any program language
or for making a circuit.

First, an example:
The 20 six-bit Binary Musical Numbers in 2 columns.
000111 100011
001011 100101
001101 100110
001110 101001
010011 101010
010101 101100
010110 110001
011001 110010
011010 110100
011100 111000

Notice that binary can count to 63 with 6 bits, but only 20 are "musical",
(by my definition , or physically sound-like). The ratio of musical to total
numbers decreases incredibly as the number of bits goes up. Therefore
they are very countable. Not infinite. In fact, each has a double that
sounds exactly the same all bits different in the other column (which
need not be in another column, just to save 10 lines).

Notice that at the beginning, the count has all the ones on the right,
and ends with the ones on the left. It just so happens that the number
of Musical Numbers for any number of bits is equal to the number in
the middle of the row of Pascal's triangle whose row number is the
number of bits. This is a fascinating unique science.

Ok, one rule for counting this way in binary is:

00001111

Start on the RIGHT and go LEFT until you find 01.
Change that 01 to 10, and push any other 1's you've passed all the way to the right. Stop.
You now have the next musical number.

Do it again and again until all the 1's are on the left side.

11110000

If you are using a circuit, you may bend it by mixing up the bits before and
unmixing them after each count, as simply as "not wiring the bits in the right order".
In a program, you might have a SWAP instruction, or an arbitrary lookup table.
Why? To make really weird counting patterns that sound different.

Another Secret :
TO AVOID COUNTING, You can calculate any sound instantly by remembering
it as a polynomial, and having "the calculator" evalulate it, and then,
Use the combinatorics function "N Choose R". THIS WORKS IN ALL BASES.

What's the trillionth sound that fits in 4 megabytes? Bam!
Boo! (-The ghost of "napster"!)

It's raining ACME anvils, pianos, and dynamite somewhere now, what a beautiful noise!