ScoobyNet.com - Subaru Enthusiast Forum

ScoobyNet.com - Subaru Enthusiast Forum (https://www.scoobynet.com/)
-   Non Scooby Related (https://www.scoobynet.com/non-scooby-related-4/)
-   -   entertaining maths and audio question (https://www.scoobynet.com/non-scooby-related-4/333972-entertaining-maths-and-audio-question.html)

hedgehog 07 June 2004 12:48 AM

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 :-)

Power Junkie 07 June 2004 01:22 AM

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..

J4CKO 07 June 2004 07:04 AM

Infinite improbability drive.......

For MP3 players.

mike1210 07 June 2004 08:53 AM

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.

fast bloke 07 June 2004 09:32 AM

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 :D


btw - Terry Pratchett covers this in one of the books about the science of the discworld

hedgehog 07 June 2004 09:48 AM

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 :-)

WRXPete 07 June 2004 12:59 PM


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 :D


btw - Terry Pratchett covers this in one of the books about the science of the discworld

Is that a pentium 4 with or without HT technology...:)

speedking 07 June 2004 01:38 PM

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:D

Carl2 07 June 2004 04:01 PM

Personally, I think we should just stick to the room full of monkeys theory:p

AndyC_772 07 June 2004 07:24 PM

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 :)

scoobyboy 07 June 2004 07:36 PM

huh!

AndyC_772 07 June 2004 07:38 PM


Originally Posted by scoobyboy
huh!

Actually that probably is a more sensible amount of thought to give the problem... ;)


All times are GMT +1. The time now is 03:53 PM.


© 2024 MH Sub I, LLC dba Internet Brands