Skip to main content
added 218 characters in body
Source Link
Scott Seidman
  • 30.6k
  • 4
  • 46
  • 114

I think the way to go would be to generate a look up table of full-integer-scale of one cycle of a sine wave at your lowest frequency, and then modulo-index into it with increasing step sizes, possibly doing linear interpolations between two points if using the nearest point is too rough.

Lastly, depending on the relationship between your output rate and your highest wave frequency, you might consider sending this out via low-pass-filtered high res PWM as opposed to a DAC. It might be a lot faster.

I think the way to go would be to generate a look up table of full-integer-scale of one cycle of a sine wave at your lowest frequency, and then modulo-index into it with increasing step sizes, possibly doing linear interpolations between two points if using the nearest point is too rough.

I think the way to go would be to generate a look up table of full-integer-scale of one cycle of a sine wave at your lowest frequency, and then modulo-index into it with increasing step sizes, possibly doing linear interpolations between two points if using the nearest point is too rough.

Lastly, depending on the relationship between your output rate and your highest wave frequency, you might consider sending this out via low-pass-filtered high res PWM as opposed to a DAC. It might be a lot faster.

Source Link
Scott Seidman
  • 30.6k
  • 4
  • 46
  • 114

I think the way to go would be to generate a look up table of full-integer-scale of one cycle of a sine wave at your lowest frequency, and then modulo-index into it with increasing step sizes, possibly doing linear interpolations between two points if using the nearest point is too rough.