Skip to content

How to control the amplitude and the frequency of the generator? #164

Answered by pschatzmann
wimverlindensa asked this question in Q&A
Discussion options

You must be logged in to vote

I suggest that you check the class documentation and look up SineWaveGenerator. If you plan to change the parameters of a running tone I suggest that you use the SineFromTable instead as documented.

Instead of changing the amplitude you might also consider to use the Volume Control as described in the Wiki

You can comment out the log statement or set it to Warning as it is recommended in the Readme.

Starting/Stopping can be done in many ways:

  • by setting to volume to 0 and back to the original value
  • by setting to frequency to 0 and back to the original value
  • with a flag that activates/deactivates the copy in the loop

For the max frequency I am not sure. I would guess it is half the sampl…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by pschatzmann
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants