🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.msdos.programmer
Article #574

Discrete sin function programming

#574
From: jkchan
Date: Fri, 19 Oct 1990 19:57
28 lines
1314 bytes
I am programming a frequency varying sin function like:

     y = sin ( 2 PI (f+df)(t+dt)/sf)

where 
     PI=3.14159
      f=initial frequency
     df=delta change of frequency
      t=time
     df=delta change of time
     sf=sampling frequency = # of sample points/sec

The problem is that the final waveform of y is not varying as what I like.
I used 1000Hz and 2000Hz for initial and final f respectively but
it actually gave 3000Hz at the end, or something like that.
Are there anyone who have met this situation and fixed it before?
I am sure it is due to the discrete computation of the function because
this problem of frequency modulation does not happen in analog world.
Any pointer is much appreciated.
Please email to the above address.
Thanks in advance.
Jim
  
-- 
Jim Chan
Hearing Lab
Communication Sciences and Disorders
School of Special Education
Technical Details
Message-ID: <1990Oct19.195714.4621@rodan.acs.syr.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!rpi!uupsi!rodan.acs.syr.edu!jkchan

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!rpi!uupsi!rodan.acs.syr.edu!jkchan
From: jkchan@rodan.acs.syr.edu
Newsgroups: alt.msdos.programmer,comp.os.msdos.programmer
Subject: Discrete sin function programming
Message-ID: <1990Oct19.195714.4621@rodan.acs.syr.edu>
Date: 19 Oct 90 19:57:14 GMT
Sender: jkchan@rodan.acs.syr.edu
Organization: Syracuse University, Syracuse, NY
Lines: 28