LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 07-14-2016, 06:03 PM   #1
Ulysses_
Senior Member
 
Registered: Jul 2009
Posts: 1,303

Rep: Reputation: 57
How accurately can a sound frequency be generated or measured?


Need a very accurate sound waveform at 2345.6 Hz. Any noise or distortion leading to harmonics is ok, it is just the baseline frequency that has to be accurate, to less than 1 Hz.

Can a regular sound device be this accurate? How accurate can they be? +/- 0.1 Hz?

Can a regular sound device capture a sound like this coming from another computer, and measure its frequency with an accuracy as high as 0.1 Hz? How accurate can this measurement be?
 
Old 07-14-2016, 06:13 PM   #2
Ulysses_
Senior Member
 
Registered: Jul 2009
Posts: 1,303

Original Poster
Rep: Reputation: 57
Alternatively, can a cpu make a LED flash 2345.6 times a second with a frequency accuracy as high as 0.1 Hz or better? Maybe the electrical signal that feeds the LED can then go to an amplifier.
 
Old 07-14-2016, 06:52 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,020

Rep: Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630
Note, try to use edit instead of adding to post. Takes the question out of zero replies.

.1 hz isn't too precise or difficult if the golden or tested value can be used. Your problem is you don't have a calibrated source.

Running an LED may be possible they they don't have sharp cut on and cut off specs, they'd run more like a rlc circuit.


Many musical devices can produce tones and at some frequency, many can also read the frequency. What exactly do you want with this odd frequency?
 
Old 07-14-2016, 07:13 PM   #4
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,665

Rep: Reputation: Disabled
I just used Audacity to generate 2345.6 Hz tone. Have you tried Audacity?
 
Old 07-14-2016, 07:30 PM   #5
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
Accurate sounds can be generated as long as the sampling rate is above the nyquist limit for the given frequency. For 2345.6Hz, that would be around 5000 Hz. Standard audio generators use samples rates around 33KHz, and some go higher.

https://en.wikipedia.org/wiki/Nyquist_frequency
 
Old 07-14-2016, 07:38 PM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,784

Rep: Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937
Depends on what you mean by a regular sound device? As stated 0.1 Hz is not that precise by today standards so it should be possible with average equipment. What are you trying to accomplish?
 
Old 07-14-2016, 07:53 PM   #7
Ulysses_
Senior Member
 
Registered: Jul 2009
Posts: 1,303

Original Poster
Rep: Reputation: 57
Could sample 128k times a second which is a much better precision but how do we know the sampling is really exactly 128k times a second?

Don't the crystal clocks of the sound cards have a variation? How much is that variation compared to an atomic clock say, at an ntp server?
 
Old 07-14-2016, 08:01 PM   #8
Ulysses_
Senior Member
 
Registered: Jul 2009
Posts: 1,303

Original Poster
Rep: Reputation: 57
By the way that frequency is just an example. I want to build a Rife machine out of a laptop and a stereo. And a couple of electrodes made of copper, covered in napkins wet with salt water.

A Rife machine kills specific microbes by passing a current through the body at a specific frequency for each microbe. An accuracy better than 0.25 Hz is given in the specs of some such machines. The most basic machines cost $800.

Last edited by Ulysses_; 07-14-2016 at 08:04 PM.
 
Old 07-14-2016, 08:04 PM   #9
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,020

Rep: Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630
Any computer or musical device could be off. Without any calibration you can't tell. If you need it to be calibrated then you have to take it to a service or compare it to a nationally known calibration source. If this needs to be precise then you'll need to get some reference or a device that has calibration stamp on it.



I kind of doubt you'd need a clock reference that is off one beat every three years. I used to use a clock like that for very precise times.

Last edited by jefro; 07-14-2016 at 08:23 PM.
 
Old 07-14-2016, 08:13 PM   #10
Ulysses_
Senior Member
 
Registered: Jul 2009
Posts: 1,303

Original Poster
Rep: Reputation: 57
Surely these things are quantifiable. Like error = 1 second per hour. That would be 1/3600, but I want 1/23456 or better, so not good enough.
 
Old 07-14-2016, 08:23 PM   #11
Ulysses_
Senior Member
 
Registered: Jul 2009
Posts: 1,303

Original Poster
Rep: Reputation: 57
Maybe the error can be discovered by capturing one hour's worth of this sound from the microphone of another computer and then writing a program to count the number of peaks in that file.
 
Old 07-14-2016, 08:24 PM   #12
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,020

Rep: Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630
Still no reference.

Still using clock in computer.

What is this for anyway?

I suspect that 90% of the computers that you may have access to are good enough. Computers have fixed many of the older issues.

Last edited by jefro; 07-14-2016 at 08:25 PM.
 
Old 07-14-2016, 08:27 PM   #13
Ulysses_
Senior Member
 
Registered: Jul 2009
Posts: 1,303

Original Poster
Rep: Reputation: 57
Rife machine as I wrote above. If the capture is started and stopped based on the cmos clock, then don't we know for sure it lasts one hour? To a reasonably high precision (or the cmos clock would be useless).

Last edited by Ulysses_; 07-14-2016 at 08:28 PM.
 
Old 07-14-2016, 08:51 PM   #14
Ulysses_
Senior Member
 
Registered: Jul 2009
Posts: 1,303

Original Poster
Rep: Reputation: 57
Got another idea. Have two computers play the same frequency and capture from a microphone. If the capture file has a constant amplitude on a graph, the frequencies are very close and the error negligible. If they go out of phase every 10 seconds resulting in zero amplitude, the error is 1/10 Hz.
 
Old 07-14-2016, 09:13 PM   #15
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,784

Rep: Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937
Just been reading up on Rife machines. What are you going to use for an output transducer? Impedance might be a problem and you could destroy your stereo.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
128 bits key generated when 1024 was generated(centos 6.5)using openssl SarahGurung Linux - Security 3 07-29-2014 07:03 AM
How to route all Flash-generated sound to the USB headset only when it is plugged in? bgoodr Linux - Software 0 08-05-2012 01:46 PM
LXer: How Can Linux Market Share Be Accurately Measured? LXer Syndicated Linux News 0 10-26-2007 11:12 PM
how can i create a simple frequency spectrum from a sound playing like in XMMS dipumurti Programming 1 05-07-2004 05:36 AM
How to let the sound card to produce sound of certain frequency? flyingwalter Programming 0 10-16-2002 02:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 01:18 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration