entertaining maths and audio question
#1
entertaining maths and audio question
A bloke I know has come up with the obvious, so obvious that I didn't think of it, idea that using digital audio every possible sound, song, performance etc. of say 1 minute duration could be generated because the number of combinations of bits is finite.
So, somewhere in there is the exact sound you'd make singing Hey Jude with the Beatles as your backing band, to a 16 bit 48kHz resolution.
While I agree with the concept my problem is more a practical one in that I believe the number of possible combinations is as near infinite as to make no difference in the practical world. My take on the whole thing is as follows, could anyone with a background in probability and that sort of maths please correct me, or just laugh at me, if I'm wrong:
There are 16 bits per sample giving 2^16 different sample combinations which = 65536 discrete samples.
There are 48000 samples per second.
There are 60 seconds in our 1 minute audio item.
My conclusion is that the total number of possible one minute songs you can have is the factorial of 65536*48000*60 or 188743680000!
Clearly the result of this is going to be a very, very big number, there are only 10^81 atoms in the universe remember :-)
Anyone have any thoughts on this or think that my maths is dodgy? I'm certainly not into maths and know nothing at all about probability and all that stuff so I need lots of help here.
Despite the practical angle it is an amazing concept that, in theory, you could design a digital box that would contain every possible recording of every possible sound and combination of sounds in the universe. What will I listen to tonight? Oh, I'll just have that recording of me singing with Jimi Hendrix at Woodstock :-)
So, somewhere in there is the exact sound you'd make singing Hey Jude with the Beatles as your backing band, to a 16 bit 48kHz resolution.
While I agree with the concept my problem is more a practical one in that I believe the number of possible combinations is as near infinite as to make no difference in the practical world. My take on the whole thing is as follows, could anyone with a background in probability and that sort of maths please correct me, or just laugh at me, if I'm wrong:
There are 16 bits per sample giving 2^16 different sample combinations which = 65536 discrete samples.
There are 48000 samples per second.
There are 60 seconds in our 1 minute audio item.
My conclusion is that the total number of possible one minute songs you can have is the factorial of 65536*48000*60 or 188743680000!
Clearly the result of this is going to be a very, very big number, there are only 10^81 atoms in the universe remember :-)
Anyone have any thoughts on this or think that my maths is dodgy? I'm certainly not into maths and know nothing at all about probability and all that stuff so I need lots of help here.
Despite the practical angle it is an amazing concept that, in theory, you could design a digital box that would contain every possible recording of every possible sound and combination of sounds in the universe. What will I listen to tonight? Oh, I'll just have that recording of me singing with Jimi Hendrix at Woodstock :-)
#2
Scooby Regular
iTrader: (1)
the reason for using higher resolution is the ear can actually hear more than 20k you do hear the difference running 88.2k (easy conversion to normal cd) on the top end around the cymbals etc.. but for every day listening it would be hard to tell, as for radio all there extra compression negates any improvement.
Mark..
Mark..
#4
Scooby Regular
Join Date: Apr 2004
Location: Cardiff
Posts: 1,928
Likes: 0
Received 0 Likes
on
0 Posts
im pretty sure the number of bits is right but youd need a very intelligent computer to make ANY SONG. the 65.536 samples i think are volume levels which when joining them together makes a sound of certain frequency. things to bear in mind. quantisation distortion i.e. the fact that there are not infinite volume levels and the level is rounded up or down. even though sampling rate must be double the frequency of the highest frequency sound, (ny-quist rate (spelling!!!)) so about 20KHz for a cd player. There could only be 2 volume levels for say a cymbol at 20KHz that needs far more to be accurately re created. hence new formats SACD and the DVD equivalent. think SACD is 24 bit (16,777,216 levels) and 190ish KHz and DVD is 96KHz although i may be wrong on that one.
#5
Your mates theory is correct, and your practical reasonong is correct. It is easier to look at letters instead of sound as the number of permutations are far far less. (We did this in aplied maths at university, but that was too many pints ago for me to remember it)
Basically you are looking for a computer program to write shakespeare sonnets. Every sonnet is 14 lines long and each line has on average 40 letters. (560 letters in total)
Ignoring spaces and punctuation, you can see that the number of permutations is much smaller that for that of the music. You only need 26 ^ 540 combinations of letters to ensure that every shakespeare sonnet has been recreated. (You will also have the first 540 letters of every book or piece of text ever written.) Unfortunately at that time the university didn't have a computer powerful enough to calculate 25^540, so we looked at recreating the first line (40 letters). There are 397,131,118,389,636,000,000,000,000,000,000,000,00 0,000,000,000,000,000,000 combinations of letters in a 40 letter sequence.
That will take a pentium 4 approx 7407614796714790000000000000000000000000 years to calculate. Looking at the difference between the info required for 40 samples of 26 letters, and the info required for 2880000 samples of 65000 sounds you can see that it will take you mate a very very very long time to come up with a number 1
btw - Terry Pratchett covers this in one of the books about the science of the discworld
Basically you are looking for a computer program to write shakespeare sonnets. Every sonnet is 14 lines long and each line has on average 40 letters. (560 letters in total)
Ignoring spaces and punctuation, you can see that the number of permutations is much smaller that for that of the music. You only need 26 ^ 540 combinations of letters to ensure that every shakespeare sonnet has been recreated. (You will also have the first 540 letters of every book or piece of text ever written.) Unfortunately at that time the university didn't have a computer powerful enough to calculate 25^540, so we looked at recreating the first line (40 letters). There are 397,131,118,389,636,000,000,000,000,000,000,000,00 0,000,000,000,000,000,000 combinations of letters in a 40 letter sequence.
That will take a pentium 4 approx 7407614796714790000000000000000000000000 years to calculate. Looking at the difference between the info required for 40 samples of 26 letters, and the info required for 2880000 samples of 65000 sounds you can see that it will take you mate a very very very long time to come up with a number 1
btw - Terry Pratchett covers this in one of the books about the science of the discworld
#6
Thanks for confirming my maths Fast Bloke, I'm an audio engineer and not a maths head and so often get mixed up with this stuff.
I have found that the Windows Calculator can actually do the factorial calculations quite quickly and it actually does the (26*540)! in a few seconds giving an answer of 1.0290668042405299417701672405211e+52134
I've no idea why it is so fast but as you point out it hardly matters as any of the answers are going to be so huge as to be practically infinite. It is a novel idea though that it is possible to create a recording of you and I singing Bohemian Rapsody with the Rolling Stones and Eric Clapton on guitar! That was one of my better performances :-)
I have found that the Windows Calculator can actually do the factorial calculations quite quickly and it actually does the (26*540)! in a few seconds giving an answer of 1.0290668042405299417701672405211e+52134
I've no idea why it is so fast but as you point out it hardly matters as any of the answers are going to be so huge as to be practically infinite. It is a novel idea though that it is possible to create a recording of you and I singing Bohemian Rapsody with the Rolling Stones and Eric Clapton on guitar! That was one of my better performances :-)
#7
Scooby Regular
Join Date: Dec 2003
Location: Farnborough, Hants
Posts: 917
Likes: 0
Received 0 Likes
on
0 Posts
Originally Posted by fast bloke
Your mates theory is correct, and your practical reasonong is correct. It is easier to look at letters instead of sound as the number of permutations are far far less. (We did this in aplied maths at university, but that was too many pints ago for me to remember it)
Basically you are looking for a computer program to write shakespeare sonnets. Every sonnet is 14 lines long and each line has on average 40 letters. (560 letters in total)
Ignoring spaces and punctuation, you can see that the number of permutations is much smaller that for that of the music. You only need 26 ^ 540 combinations of letters to ensure that every shakespeare sonnet has been recreated. (You will also have the first 540 letters of every book or piece of text ever written.) Unfortunately at that time the university didn't have a computer powerful enough to calculate 25^540, so we looked at recreating the first line (40 letters). There are 397,131,118,389,636,000,000,000,000,000,000,000,00 0,000,000,000,000,000,000 combinations of letters in a 40 letter sequence.
That will take a pentium 4 approx 7407614796714790000000000000000000000000 years to calculate. Looking at the difference between the info required for 40 samples of 26 letters, and the info required for 2880000 samples of 65000 sounds you can see that it will take you mate a very very very long time to come up with a number 1
btw - Terry Pratchett covers this in one of the books about the science of the discworld
Basically you are looking for a computer program to write shakespeare sonnets. Every sonnet is 14 lines long and each line has on average 40 letters. (560 letters in total)
Ignoring spaces and punctuation, you can see that the number of permutations is much smaller that for that of the music. You only need 26 ^ 540 combinations of letters to ensure that every shakespeare sonnet has been recreated. (You will also have the first 540 letters of every book or piece of text ever written.) Unfortunately at that time the university didn't have a computer powerful enough to calculate 25^540, so we looked at recreating the first line (40 letters). There are 397,131,118,389,636,000,000,000,000,000,000,000,00 0,000,000,000,000,000,000 combinations of letters in a 40 letter sequence.
That will take a pentium 4 approx 7407614796714790000000000000000000000000 years to calculate. Looking at the difference between the info required for 40 samples of 26 letters, and the info required for 2880000 samples of 65000 sounds you can see that it will take you mate a very very very long time to come up with a number 1
btw - Terry Pratchett covers this in one of the books about the science of the discworld
Trending Topics
#8
Scooby Regular
Join Date: Aug 2001
Location: Warrington
Posts: 4,554
Likes: 0
Received 0 Likes
on
0 Posts
Dissenting voice
Sorry hedgehog but I don't believe that your maths is correct.
As fast bloke said the number of letters combinations in a 40 letter sequence = 26^40 = 397,131,118,389,636 x 10^42. Must be much less than the sum you're looking at which cannot therefore be 188743680000 (1.9 x 10^11).
To cover all possible combinations your sum should be 65536^(48000*60) = infinity.
As stated the difficulty would be finding the time to listen to and catalogue all the samples. How would you know that there wasn't a slightly better sample with one digit moved by one point
As fast bloke said the number of letters combinations in a 40 letter sequence = 26^40 = 397,131,118,389,636 x 10^42. Must be much less than the sum you're looking at which cannot therefore be 188743680000 (1.9 x 10^11).
To cover all possible combinations your sum should be 65536^(48000*60) = infinity.
As stated the difficulty would be finding the time to listen to and catalogue all the samples. How would you know that there wasn't a slightly better sample with one digit moved by one point
#10
Scooby Regular
iTrader: (2)
Join Date: Mar 2001
Location: Swilling coffee at my lab bench
Posts: 9,096
Likes: 0
Received 0 Likes
on
0 Posts
The problem with this isn't really the number of possible recordings at all. It's that the information you have to supply in order to choose one of them is no less than the total of the information you get out when you play the recording.
Suppose you have a shelf full of CDs - a few hundred, perhaps. You choose one based on its title (say, 20 characters or so), and get back 600MB worth of music. You get out more information than you put in.
Now suppose that every possible 1 minute recording were burned to a separate CD, and that all those discs were numbered and placed on a shelf. It would have to be a very big shelf, of course, but we can always use a single CD-RW and re-use it rather than burning all the discs upfront. The physical size of the library, therefore, isn't a problem.
Disc no. 0000....0000 is already a piece of music that has actually been performed in concerts - it's the opening bars to 'four minutes, 33 seconds', which consists of the orchestra playing no notes at all for that duration. Already you have a worthwhile disc - although you could save some electricity by just turning off the hi-fi instead.
The real problem comes when you want to call out a disc of something more interesting. You have to specify it by number and - crucially - that number describes exactly the sound recorded on the disc. The amount of information you get back by playing the disc is no more than you specified when you chose which disc to play. You want to hear yourself playing guitar alongside Van Halen? No problem. But, there will also be every possible disc of you sounding absolutely terrible.
In fact the box that Hedgehog refers to is just a PC. You want to listen to disc no. 6238746287...587349? Just type that number (the WHOLE number!) into a text editor, parse that number into a series of bytes and save it as a .WAV file. However, it's virtually guaranteed that any number you choose will result in white noise and nothing more. You really want a much more sophisticated device which sorts through the virtual CD library picking out recognisable notes, harmony, rhythm and other characteristics which are pleasing to the ear. The machine needs to not only check for structure (which is easy), but also to make value judgements as to what would be pleasing to the ear.
Interestingly, you can narrow down the selection dramatically by choosing audio clips shorter than a minute and stringing more of them together. Use 30 second clips and you reduce the number of CDs in this virtual library by a factor of billions - yet you only need search twice to get your 1 minute clip. So, taking this to its logical conclusion, you only need a library of 65,536 discs, provided you don't mind making up your music from a lot of samples each 1/44100 sec long
Suppose you have a shelf full of CDs - a few hundred, perhaps. You choose one based on its title (say, 20 characters or so), and get back 600MB worth of music. You get out more information than you put in.
Now suppose that every possible 1 minute recording were burned to a separate CD, and that all those discs were numbered and placed on a shelf. It would have to be a very big shelf, of course, but we can always use a single CD-RW and re-use it rather than burning all the discs upfront. The physical size of the library, therefore, isn't a problem.
Disc no. 0000....0000 is already a piece of music that has actually been performed in concerts - it's the opening bars to 'four minutes, 33 seconds', which consists of the orchestra playing no notes at all for that duration. Already you have a worthwhile disc - although you could save some electricity by just turning off the hi-fi instead.
The real problem comes when you want to call out a disc of something more interesting. You have to specify it by number and - crucially - that number describes exactly the sound recorded on the disc. The amount of information you get back by playing the disc is no more than you specified when you chose which disc to play. You want to hear yourself playing guitar alongside Van Halen? No problem. But, there will also be every possible disc of you sounding absolutely terrible.
In fact the box that Hedgehog refers to is just a PC. You want to listen to disc no. 6238746287...587349? Just type that number (the WHOLE number!) into a text editor, parse that number into a series of bytes and save it as a .WAV file. However, it's virtually guaranteed that any number you choose will result in white noise and nothing more. You really want a much more sophisticated device which sorts through the virtual CD library picking out recognisable notes, harmony, rhythm and other characteristics which are pleasing to the ear. The machine needs to not only check for structure (which is easy), but also to make value judgements as to what would be pleasing to the ear.
Interestingly, you can narrow down the selection dramatically by choosing audio clips shorter than a minute and stringing more of them together. Use 30 second clips and you reduce the number of CDs in this virtual library by a factor of billions - yet you only need search twice to get your 1 minute clip. So, taking this to its logical conclusion, you only need a library of 65,536 discs, provided you don't mind making up your music from a lot of samples each 1/44100 sec long
Thread
Thread Starter
Forum
Replies
Last Post
Brzoza
Engine Management and ECU Remapping
1
02 October 2015 05:26 PM