12 April 2007

sin~

sin~

This block calculates the sine for a audio signal (sample by sample). Only cos~ is included in PureData.
The input is the audio signal. The output its' sine. You can verify its working well with
testcos_sin.pd

version

v1.0: built 12/04/2007 with Pd v0.40-2 [pd][pdf]
related testfile: testcos_sin.pd
v1.1: built 13/04/2007 with Pd v0.40-2 [pd][pdf]

interface

Input1 : the (mono) audio signal input

Output1: the sine for the audio signal

implementation

The implementation is based on the relationship between the cosine and the sine function. You have to be careful here because in PureData the arguments are normalised. This means 1 corresponds to 360 degrees or 2*Pi. The cosine of 0.25 gives 0, 0.5 gives -1, 0.75 gives 0 again. This means the sine of 0.25 has to be 1, 0.5 has to be 0, 0.75 has to be -1. So there is a translation of 0.25 between the 2 functions. This comes from sin(x) = cos (pi/2-x)






No comments: