Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!uunet!mcsun!corton!chorus!opera!mir From: mir@opera.chorus.fr (Adam Mirowski) Newsgroups: comp.sys.ibm.pc.hardware Subject: Re: Analog-to-Digital Sound-to-Data pc board? Message-ID: <7764@chorus.fr> Date: 7 Feb 91 11:35:21 GMT References: <15917@milton.u.washington.edu> <1991Feb6.145754.11445@d.cs.okstate.edu> Sender: mir@chorus.fr Reply-To: mir@opera.chorus.fr (Adam Mirowski) Organization: Chorus systemes, Saint Quentin en Yvelines, France Lines: 46 In article <1991Feb6.145754.11445@d.cs.okstate.edu>, ong@d.cs.okstate.edu (ONG ENG TENG) writes: %% The Sound Blaster has a digital sampling 8-bit analog input. To record %% voice, you only have to buy a regular microphone with -70 dB or better %% (i.e. -69, -68,...). It samples from 4kHz to 12kHz. If you want lower %% frequency, simply ignore those in between. Example to get 1kHz sampling %% rate data simply sample at 4kHz and use only 1 value out of each 4. %% The card comes with both menu-driven and line-command programs to %% record voice. The voice file generated has a 32-byte header followed %% by the data in raw format. There are two things I think are wrong here: First: before undersampling a sampled signal you have to put it through a (digital) filter, to cut higher frequencies. Or you will get the same effect as sampling an analog signal without respecting the Shannon rule (sampling frequency must be twice as high as the highest frequency component of the input signal). Of course, in the example, if the original signal had an under-500Hz spectrum, it would be not necessary. Second: To make a correct .VOC file (SB standard sample file), you really need to put a null byte at the end. Without this null byte, the playing utility won't end properly. Also, if John Siemion needs frequencies like 12543, 12501, etc. SB will definitely not work, because the sampling frequency should be at least 24-25 KHz then. Secondary question: why isn't SB able to sample at a higher frequency? :-) Another thought: does John need to SAMPLE a signal or to MEASURE its instantaneous frequncy? Because in the latter case, you should do something like series of FFT on the sample before getting the frequency. That is a lot of computation. Maybe a simple circuitry build around a PLL loop at 12KHz could provide an error voltage "proportional" to the difference in frequency between the input signal and 12KHz. You could then sample this voltage with an SB or a simpler board. There are several one-chip PLL implementations. Of course, all that is only good if your input signal is really around some fixed frequency. -- Adam Mirowski, mir@chorus.fr (FRANCE), tel. +33 (1) 30-64-82-00 or 74 Chorus systemes, 6, av.Gustave Eiffel, 78182 Saint-Quentin-en-Yvelines CEDEX