Dusty Leary wrote:
> this works fine when the input signal is f(t) = 440, and fine when the input
> signal is a square wave oscillating between 220 and 440 twice a second...
> but, when I try to make the input signal a sine wave, to oscillate between
> 220 and 440 twice per second, things mess up...
> I can understand why it's not sound right, when the output signal has all
> the constants removed, it's basically s(t) = sin(x*sin(x)), and the pitch
> keeps getting higher and higher
> I'm a bit embarassed, because it seems like this should be simple, but I
> can't think of it!
> what am I doing wrong?
The instantenious frequency of a sound is proportional to the
first derivative of the argument of the sin(.).
For example if x(t) = sin(wt + phi), the frequency is (wt + phi)' = w,
i.e. a constant
Your signal is s(t) = sin(t*sin(t)) and hence (t*sin(t))' = sin(t) +
The amplitude of the oscilation grows unbounded and you hear the
I think you want to use something like s(t) = sin(a*sin(r*t) + w t ). w
= 330, a=110, r=0.5;
-- _____ )o|o( -oO0--V--0Oo-------------------------------------------- Ali Taylan Cemgil http://www.mbfys.kun.nl/~cemgil SNN - University of Nijmegen, The Netherlands
This archive was generated by hypermail 2b29 : Mon Jan 28 2002 - 11:46:40 EST