minimalistic sine wave generation algorithmn

creating sound with microcontrollers

minimalistic sine wave generation algorithmn

Postby chris on Fri Feb 14, 2014 4:44 pm

The generation algorithmen needs only one multiplication and 3 additions.
( there is also a division through 65536 but this is only for scaling
to integer reasons. The division may be replaced by a shift operation
and a compare to keep the sign )

History:
I was trying to simulate a spring-mass-system. It was possible to
reduce the equations for this system to the algorthmen below to generate a
sine wave.
Attachments
sineWaveOneMultiplikation.zip
(1.17 KiB) Downloaded 373 times
chris
 
Posts: 289
Joined: Sun May 25, 2008 7:21 am

Re: minimalistic sine wave generation algorithmn

Postby chris on Tue Aug 12, 2014 11:27 am

My further optimized version.
A discussion about this topic you can find here:
http://www.mikrocontroller.net/topic/324429#3534636
Attachments
sinus.c.zip
(543 Bytes) Downloaded 359 times
chris
 
Posts: 289
Joined: Sun May 25, 2008 7:21 am

Re: minimalistic sine wave generation algorithmn

Postby chris on Sat Aug 23, 2014 5:20 am

Diagram for DDS sin wave generation:
http://www.96khz.org/oldpages/limitsofdds.htm
chris
 
Posts: 289
Joined: Sun May 25, 2008 7:21 am

Re: minimalistic sine wave generation algorithmn

Postby chris on Sat Sep 27, 2014 12:35 pm

Fast int16 sine wave calculation in C:
http://www.atwillys.de/content/cc/sine- ... dded-in-c/
chris
 
Posts: 289
Joined: Sun May 25, 2008 7:21 am


Return to sound

Who is online

Users browsing this forum: No registered users and 1 guest

cron