How do I generate a Sine Sweep in Java (Android)

前端 未结 1 1044
再見小時候
再見小時候 2021-01-22 03:37

I found Playing an arbitrary tone with Android to be helpful when I was generating a frequency tone. Now I want the frequency to change while the tone is playing.

I mo

相关标签:
1条回答
  • 2021-01-22 04:04

    Which effect does changing the the samplerate has in the frequency measured by the oscilloscope? I would try to increase the samplerate to higher values if possible, because the higher the samplerate is, the more accurate the generated signal can be.

    Anyways if that does't help, please tweak the formula from:

    currentFreq = startFreq + (numerator * (endFreq - startFreq));

    to:

    currentFreq = startFreq + (numerator * (endFreq - startFreq))/2;

    and tell us the new measured interval of variation of your signal now.

    Good luck.

    0 讨论(0)
提交回复
热议问题