Re: [LAD] Determining Phase

From: Gabriel M. Beddingfield <gabrbedd@email-addr-hidden>
Date: Sat Jun 25 2011 - 21:55:05 EEST

On Saturday, June 25, 2011 09:23:29 am
pshirkey@email-addr-hidden wrote:
> Hi,
>
> Can anyone point me to a simple code example for how to
> determine the phase at a specific time in a waveform?
>
> ex. if I have a sample that is 5 seconds long and want to
> know the phase at 2.5 seconds
>
> I'm open to code in any language or a scripted example if
> such a tool exists. If there is an ui which has that
> feature I am also interested.

Do you mean... for a very simple sine wave?

Assuming yes:

  p = asin( x / A )

Where:

  A is the amplitude of the sine wave
  x is the value of the sample (-A <= x <= A)
  p is the phase of the wave in radians (-pi/2 <= p <= pi/2)

If not this... then... "what Jörn said!" :-)

-gabriel
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-dev
Received on Sun Jun 26 00:15:02 2011

This archive was generated by hypermail 2.1.8 : Sun Jun 26 2011 - 00:15:02 EEST