Sound & Music

Moderators: Sephiroth
Number of threads: 611
Number of posts: 1220

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Complex Sinusoidal Waves Posted by widebluecorn on 28 Mar 2004 at 10:35 AM
This message was edited by widebluecorn at 2004-3-28 10:35:58

This is quite a stupid question, but here it is anyway.

I have a sinusoidal output of a system, that is read (sampled) into the computer using a DSP chip. I was wondering how to seperate the wave into its real and imaginary parts. Is this even possible?

(I am using C code for this application)

Appreciate any help.

WBC.


Report
Re: Complex Sinusoidal Waves Posted by Jonathan on 28 Mar 2004 at 12:02 PM
: This is quite a stupid question, but here it is anyway.
:
: I have a sinusoidal output of a system, that is read (sampled) into the computer using a DSP chip. I was wondering how to seperate the wave into its real and imaginary parts. Is this even possible?
:
: (I am using C code for this application)
:
: Appreciate any help.
:
To my understanding, the real part is the amplitude (which is essentially what your set of values represent). The imaginary part is related to the frequency and phase. E.G.

Ae^i(wt + p) = Acos(wt + p) + iAsin(wt + p)

If you can work out the period of the waveform (looking for sign changes, maybe some interpolation) you can find w by:-

w = T / (2 * Pi)

The distance from the start of the set of samples to the first time the waveform passes through 0, then looking at the sign after that will tell you something about p.

If you know w, t and p then I'd guess that sin(wt + p) will give you your imaginary component.

Don't quote me on any of that, I hope this gives you some kind of idea (and that I've been reasonably accurate).

Jonathan

###
for(74,117,115,116){$::a.=chr};(($_.='qwertyui')&&
(tr/yuiqwert/her anot/))for($::b);for($::c){$_.=$^X;
/(p.{2}l)/;$_=$1}$::b=~/(..)$/;print("$::a$::b $::c hack$1.");

Report
Re: Complex Sinusoidal Waves Posted by widebluecorn on 28 Mar 2004 at 3:55 PM
Cool thanks, i think i get it now.

Appreciate the help.

WBC



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.