Notices
Non Scooby Related Anything Non-Scooby related

entertaining maths and audio question

Thread Tools
 
Search this Thread
 
Old 07 June 2004, 12:48 AM
  #1  
hedgehog
Scooby Regular
Thread Starter
 
hedgehog's Avatar
 
Join Date: Apr 2003
Posts: 1,985
Likes: 0
Received 0 Likes on 0 Posts
Smile 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 :-)
Old 07 June 2004, 01:22 AM
  #2  
Power Junkie
Scooby Regular
iTrader: (1)
 
Power Junkie's Avatar
 
Join Date: Mar 2003
Location: Aberdeen
Posts: 5,584
Received 6 Likes on 5 Posts
Default

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..
Old 07 June 2004, 07:04 AM
  #3  
J4CKO
Scooby Regular
iTrader: (1)
 
J4CKO's Avatar
 
Join Date: Jan 2003
Posts: 19,384
Likes: 0
Received 1 Like on 1 Post
Default

Infinite improbability drive.......

For MP3 players.
Old 07 June 2004, 08:53 AM
  #4  
mike1210
Scooby Regular
 
mike1210's Avatar
 
Join Date: Apr 2004
Location: Cardiff
Posts: 1,928
Likes: 0
Received 0 Likes on 0 Posts
Lightbulb

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.
Old 07 June 2004, 09:32 AM
  #5  
fast bloke
Scooby Regular
 
fast bloke's Avatar
 
Join Date: Nov 2000
Posts: 26,619
Likes: 0
Received 0 Likes on 0 Posts
Default

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
Old 07 June 2004, 09:48 AM
  #6  
hedgehog
Scooby Regular
Thread Starter
 
hedgehog's Avatar
 
Join Date: Apr 2003
Posts: 1,985
Likes: 0
Received 0 Likes on 0 Posts
Default

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 :-)
Old 07 June 2004, 12:59 PM
  #7  
WRXPete
Scooby Regular
 
WRXPete's Avatar
 
Join Date: Dec 2003
Location: Farnborough, Hants
Posts: 917
Likes: 0
Received 0 Likes on 0 Posts
Default

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
Is that a pentium 4 with or without HT technology...
Old 07 June 2004, 01:38 PM
  #8  
speedking
Scooby Regular
 
speedking's Avatar
 
Join Date: Aug 2001
Location: Warrington
Posts: 4,554
Likes: 0
Received 0 Likes on 0 Posts
Lightbulb 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
Old 07 June 2004, 04:01 PM
  #9  
Carl2
Scooby Regular
 
Carl2's Avatar
 
Join Date: Mar 2003
Location: North Yorks.
Posts: 782
Likes: 0
Received 0 Likes on 0 Posts
Default

Personally, I think we should just stick to the room full of monkeys theory
Old 07 June 2004, 07:24 PM
  #10  
AndyC_772
Scooby Regular
iTrader: (2)
 
AndyC_772's Avatar
 
Join Date: Mar 2001
Location: Swilling coffee at my lab bench
Posts: 9,096
Likes: 0
Received 0 Likes on 0 Posts
Default

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
Old 07 June 2004, 07:36 PM
  #11  
scoobyboy
Scooby Regular
 
scoobyboy's Avatar
 
Join Date: Nov 2001
Location: uk
Posts: 3,409
Likes: 0
Received 0 Likes on 0 Posts
Default

huh!
Old 07 June 2004, 07:38 PM
  #12  
AndyC_772
Scooby Regular
iTrader: (2)
 
AndyC_772's Avatar
 
Join Date: Mar 2001
Location: Swilling coffee at my lab bench
Posts: 9,096
Likes: 0
Received 0 Likes on 0 Posts
Default

Originally Posted by scoobyboy
huh!
Actually that probably is a more sensible amount of thought to give the problem...
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
JimBowen
ICE
5
02 July 2023 01:54 PM
KAS35RSTI
Subaru
27
04 November 2021 07:12 PM
slimwiltaz
General Technical
20
09 October 2015 07:40 PM
IanG1983
Wheels, Tyres & Brakes
2
06 October 2015 03:08 PM
Brzoza
Engine Management and ECU Remapping
1
02 October 2015 05:26 PM



Quick Reply: entertaining maths and audio question



All times are GMT +1. The time now is 02:47 AM.