On Saturday, June 25, 2011 09:23:29 am 
pshir...@boosthardware.com 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@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev

Reply via email to