Hello, In a post in this group I read that sample numbers in a wave file are equivalent to voltage that is gotten from amicrophone. Suppose that we want to extract instantaneous amplitude (in meters) and frequency (in Hz) of a voice using these sample numbers.Is it possible? if yes,how? Thanks.
converting samples to frequencies
Started by ●March 27, 2006
Reply by ●March 27, 20062006-03-27
Foolad wrote:> Hello, > In a post in this group I read that sample numbers in a wave file are > equivalent to voltage that is gotten from amicrophone. Suppose that we > want to extract instantaneous amplitude (in meters) and frequency (in > Hz) of a voice using these sample numbers.Is it possible? if yes,how? > Thanks. >Given that the amplitudes are in volts, translating for pressure, I don't think you're going to get a length out. You cannot look at a single sample and know frequency. To extract frequency information you have to look at a set of samples and analyze. This is usually done using fast fourier transforms, however any digital fourier transform will do. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Posting from Google? See http://cfaj.freeshell.org/google/
Reply by ●March 27, 20062006-03-27
Foolad wrote:> Hello, > In a post in this group I read that sample numbers in a wave file are > equivalent to voltage that is gotten from amicrophone. Suppose that we > want to extract instantaneous amplitude (in meters) and frequency (in > Hz) of a voice using these sample numbers.Is it possible? if yes,how?What do you mean by frequency? Something a human would report hearing if the file were played? Something a bat or whale or other animal might hear? Or something in spectral energy represented by the numbers in the wave file? Which do you choose if they are all completely different? IMHO. YMMV. -- rhn A.T nicholson d.0.t C-o-M
Reply by ●March 27, 20062006-03-27
"Ron N." <rhnlogic@yahoo.com> writes:> What do you mean by frequency?What do you mean by "mean"? -- % Randy Yates % "Midnight, on the water... %% Fuquay-Varina, NC % I saw... the ocean's daughter." %%% 919-577-9882 % 'Can't Get It Out Of My Head' %%%% <yates@ieee.org> % *El Dorado*, Electric Light Orchestra http://home.earthlink.net/~yatescr
Reply by ●March 27, 20062006-03-27
Randy Yates wrote:> "Ron N." <rhnlogic@yahoo.com> writes: > > >>What do you mean by frequency? > > > What do you mean by "mean"?Ooh. That's mean. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Posting from Google? See http://cfaj.freeshell.org/google/
Reply by ●March 27, 20062006-03-27
"Foolad" <fooladgh@gmail.com> wrote in message news:1143496108.965724.91000@z34g2000cwc.googlegroups.com...> Hello, > In a post in this group I read that sample numbers in a wave file are > equivalent to voltage that is gotten from amicrophone. Suppose that we > want to extract instantaneous amplitude (in meters) and frequency (in > Hz) of a voice using these sample numbers.Is it possible? if yes,how? > Thanks. >You have some discrepancies here that need to be resolved. You can measure an ocean wave's amplitude in meters. Sound pressure levels are generally transduced with a microphone. When that happens, the wave goes from sound pressure level to voltage levels (or current levels) and the actual displacement of the transducer is unseen and unmeasured. So, "meters" doesn't generally apply in the case of microphones. Transmitting transducer (speaker) design might well consider deflection though. But, OK, "sample numbers in a wave file". By this I assume you mean there is an ordered set of sample values in a file and I will further assume for simplicity and because of how things are most often done that the ordered samples were taken at regular intervals so they are equally spaced in time. Now we should have resolved the terminology........ A sequence of samples of amplitude taken over time can be analyzed for frequency content using the Discrete Fourier Transform or implemented with a Fast Fourier Transform (FFT). That's one step in spectral estimation and yields a set of amplitudes as a function of frequency. The longer the time record, the better the resolution. The shorter the time record, the worse the resolution and the more "instantaneous" the result. Take a look at "spectral estimation" methods - Google. Fred
Reply by ●March 27, 20062006-03-27
Tim Wescott <tim@seemywebsite.com> writes:> Randy Yates wrote: >> "Ron N." <rhnlogic@yahoo.com> writes: >> >>> What do you mean by frequency? >> What do you mean by "mean"? > > Ooh. That's mean.Yeah, maybe a bit too much. I just hate getting THAT abstract, you know what I mean? :) I mean, frequency is a fairly well-defined concept, isn't it? Maybe we all need to dig a ditch for a day to come back to reality. Or do a hardware design. -- % Randy Yates % "Ticket to the moon, flight leaves here today %% Fuquay-Varina, NC % from Satellite 2" %%% 919-577-9882 % 'Ticket To The Moon' %%%% <yates@ieee.org> % *Time*, Electric Light Orchestra http://home.earthlink.net/~yatescr
Reply by ●March 27, 20062006-03-27
Fred Marshall wrote:> A sequence of samples of amplitude taken over time can be analyzed for > frequency content using the Discrete Fourier Transform or implemented with a > Fast Fourier Transform (FFT). > That's one step in spectral estimation and yields a set of amplitudes as a > function of frequency. > The longer the time record, the better the resolution. ...Really? So if you wanted a more precise measure of the vibrato frequency excursion of a violin solo around sample 8634576 of a sonata, you would FFT a time record of the whole movement to get better frequency resolution? rhetorically, & IMHO. YMMV. -- rhn A.T nicholson d.0.t C-o-M
Reply by ●March 27, 20062006-03-27
Randy Yates wrote:> Tim Wescott <tim@seemywebsite.com> writes: > > >>Randy Yates wrote: >> >>>"Ron N." <rhnlogic@yahoo.com> writes: >>> >>> >>>>What do you mean by frequency? >>> >>>What do you mean by "mean"? >> >>Ooh. That's mean. > > > Yeah, maybe a bit too much. I just hate getting > THAT abstract, you know what I mean? :) I mean, > frequency is a fairly well-defined concept, isn't > it? > > Maybe we all need to dig a ditch for a day to come > back to reality. Or do a hardware design.Instead of "What do you mean by frequency?", I was tempted to write "What do you mean?" I can't see why Ron N.'s distinctions matter. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by ●March 28, 20062006-03-28
"Ron N." <rhnlogic@yahoo.com> wrote in message news:1143503306.293215.105900@t31g2000cwb.googlegroups.com...> Fred Marshall wrote: >> A sequence of samples of amplitude taken over time can be analyzed for >> frequency content using the Discrete Fourier Transform or implemented >> with a >> Fast Fourier Transform (FFT). >> That's one step in spectral estimation and yields a set of amplitudes as >> a >> function of frequency. >> The longer the time record, the better the resolution. ... > > Really? So if you wanted a more precise measure of the vibrato > frequency excursion of a violin solo around sample 8634576 > of a sonata, you would FFT a time record of the whole movement > to get better frequency resolution?yawn.... yes really. I'm getting a bit tired of seeing posts asking a general question about a practical situation and then seeing all sorts of nearly OT smart responses about infinite SNR cases, etc. Obviously analyzing the entire movement yields pretty meaningless averages. And, why should we get into a discussion about joint time-frequency resolution really? That's a topic left to different applications like joint range-Doppler resolution in active sonar or radar. It seems more useful to point out that resolution of a general signal depends on the record length and let the customer decide how much time is enough / too much for the application and the actual SNR. So, I didn't say that 8634577 samples were too many (or too few). That's an application detail. Fred






