True Random Number Generator

Please support our C++ advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: Apr 2009
Posts: 39
Reputation: kelechi96 is an unknown quantity at this point 
Solved Threads: 0
kelechi96 kelechi96 is offline Offline
Light Poster

True Random Number Generator

 
0
  #1
Apr 26th, 2009
Ok so I want to create some code which can generate a random number from a
1. Music file
2. A microphone

PLEASE is their anyway i can do this
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 1,968
Reputation: tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute 
Solved Threads: 214
tux4life's Avatar
tux4life tux4life is offline Offline
Posting Virtuoso

Re: True Random Number Generator

 
0
  #2
Apr 26th, 2009
You'll have to use the rand function, look here for some information about it ...

Edit:: A remark on the title of this thread: A computer will never be able to generate real random numbers
Last edited by tux4life; Apr 26th, 2009 at 11:42 am.
"Never argue with idiots, they just drag you down to their level and then beat you with experience."
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,358
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1464
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Still Learning

Re: True Random Number Generator

 
0
  #3
Apr 26th, 2009
I never knew music files could generate random numbers
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 1,968
Reputation: tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute 
Solved Threads: 214
tux4life's Avatar
tux4life tux4life is offline Offline
Posting Virtuoso

Re: True Random Number Generator

 
0
  #4
Apr 26th, 2009
Originally Posted by Ancient Dragon View Post
> I never knew music files could generate random numbers
> Lol , I thought he wanted to generate a random number for the filename of a music file ...

> Anyways: kelechi, could you please reformulate your question in a way we can understand it ?
Last edited by tux4life; Apr 26th, 2009 at 11:48 am.
"Never argue with idiots, they just drag you down to their level and then beat you with experience."
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 476
Reputation: nucleon has a spectacular aura about nucleon has a spectacular aura about 
Solved Threads: 91
nucleon's Avatar
nucleon nucleon is offline Offline
Posting Pro in Training

Re: True Random Number Generator

 
0
  #5
Apr 26th, 2009
When Knuth talks about random numbers he mentions a CD of random numbers called "Black and White Noise" which is a mixture of deterministically sampled rap music combined with white noise.
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 39
Reputation: kelechi96 is an unknown quantity at this point 
Solved Threads: 0
kelechi96 kelechi96 is offline Offline
Light Poster

Re: True Random Number Generator

 
0
  #6
Apr 26th, 2009
What i mean is to take sound from my microphone and turn it into a number
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 792
Reputation: siddhant3s has much to be proud of siddhant3s has much to be proud of siddhant3s has much to be proud of siddhant3s has much to be proud of siddhant3s has much to be proud of siddhant3s has much to be proud of siddhant3s has much to be proud of siddhant3s has much to be proud of siddhant3s has much to be proud of siddhant3s has much to be proud of 
Solved Threads: 135
siddhant3s's Avatar
siddhant3s siddhant3s is offline Offline
Master Poster

Re: True Random Number Generator

 
0
  #7
Apr 26th, 2009
Well, you may record the sound to a file. Then use some hashing algorithm ( like md5sum) to calculate the hash number of that file.
Each different type of sound will give you different files. And if two files are different, their md5sum hash will of course be different.
Siddhant Sanyam
(Not posting much)
Migrate to Standard C++ :When to tell your C++ Code is Non-Standard.
Please Read before posting: How To Ask Questions The Smart Way
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 2,001
Reputation: ArkM has much to be proud of ArkM has much to be proud of ArkM has much to be proud of ArkM has much to be proud of ArkM has much to be proud of ArkM has much to be proud of ArkM has much to be proud of ArkM has much to be proud of ArkM has much to be proud of 
Solved Threads: 343
ArkM's Avatar
ArkM ArkM is offline Offline
Postaholic

Re: True Random Number Generator

 
0
  #8
Apr 26th, 2009
Originally Posted by kelechi96 View Post
Ok so I want to create some code which can generate a random number from a
1. Music file
2. A microphone
PLEASE is their anyway i can do this
It's possible but you need non-trivial theory and lots of experiments. As usually results of these works were a very protected (sometimes patented or/and top secret) know-how(s)...
It's the other story why...
The key point is: what's (and why) a distribution of your home-made generated sequence? If you don't know the answer then it's not a true random number generator...
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 3,813
Reputation: VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute 
Solved Threads: 501
Featured Poster
VernonDozier VernonDozier is offline Offline
Senior Poster

Re: True Random Number Generator

 
0
  #9
Apr 26th, 2009
Originally Posted by kelechi96 View Post
What i mean is to take sound from my microphone and turn it into a number
A number based on what? Frequency? Decibels? Much more detail is needed.
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 39
Reputation: kelechi96 is an unknown quantity at this point 
Solved Threads: 0
kelechi96 kelechi96 is offline Offline
Light Poster

Re: True Random Number Generator

 
0
  #10
Apr 27th, 2009
Frequency based please thanks for all you awnsers so far heres an idea if i retrive sounds from the microphone and then return that value as my number how do i do this
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC