I've stumbled upon this node
many many times in my search of interesting takes on music synthesis
and the like and finally I'm writing the solution thats occured to me. ferrouslepidoptera
's node, while very interesting and insightful, made many generalizations, which were mostly noted throughout their node. First off, i'd like to give props
to them for tackling such a large problem reasonably
. Now exit all reasonability and enter this node.
These generalizations are:
1.) Melodies are no longer than 32 1/32 notes
2.) Notes are always multiples of 1/32
3.) Timbre does not change musical melody
4.) Differing volumes do not change musical melody
5.) There is no pitch sliding/modulation/just intonation/etc
With this said, I propose a much simpler solution. A PCM audio file of 44100 hz and 16 bits can (watch me make a generalization here) reproduce any sound audible to the human ear. This means that if we take a 16-bit number (0 to 65535) 44,100 times a second, we can reproduce any 'melody' for that second, matching any timbre, amplitude, chording, just intonation, etc. So if we make a generalization that no melody lasts more than a second, we find that there are only:
(65535^44100 - 65535) different sounds that can be reproduced in 1 second. (minus 65535, because there are that many combinations where every number is the same, producing silence).
Using some trivial mathematics, the result is:
And keep in mind, that result is only mono. Stereo would be the square of that number. Note: We could probably divide this number by 16 (2^4) as our ear could probably not perceive the difference in speaker position of 16/65535 or 1/4095 of the speaker's maximum aplitude.
Now, as for the musical qualities of the afformentioned 'melodies'? Who am I to dictate what arbitrary set of 16-bit integers speaks directly to the soul of an individual? Some combination of each of those seconds creates your favorite song, your most hated song, and yes, even that overuse of power chords and distortion you created in your basement. To me, this is really interesting. No matter what you say, or how you say it, or how you play your instrument, or what it sounds like when you blink or click your mouse, for one second it is simply 1 of the possible 2.96958 *(10^215,529) seconds of sound.
Well, there you have it folks. Nothing more to see here. Move along. As for me? I'm back to hex editing .wav files and rewriting Beethovens's 5th using Csound.