How to use a ramp down on MegaDrone or similar? #1196
-
Thank you for the quick replies to my question under the closed #326. I wanted to continue the thread here, as I had some questions about it, that may potentially benefit other inexperienced users. @philburk suggested that I should leave the stream open for longer and mix more notes in, but I am not sure how to do that? The stream in MegaDrone is created in the engine and sound is running after a tap is detected and wave is set to on. void tap(bool isOn) override { for (auto &osc : mOscs) osc.setWaveOn(isOn);} I wanted to have a pure sine wave sound as well as one that is with mixed sine wave + a few harmonics, so the clicking sounds appear only when the harmonics are below 6 and the wave is relatively pure. I have no such problems when I have the main sine wave mixed with 16 harmonics for example or when using a square wave as is in MegaDrone by default. I am sorry if this is too basic, but I couldn't get it to work myself, so would really appreciate the help. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You could use a RampLinear object. But that would involve switching over to using the flowgraph library and that is not well documented. I would suggest making a smaller modification to your program. Basically you just want to multiply your output by an amplitude variable. If amplitude=0.0 then the output will be silent. If amplitude=1.0 then the output will be heard at full volume. Then ramp the amplitude up or down when you touch the screen.
When you tap down:
When you lift your finger:
If you used MegaDrone then you are already doing that. Just start the stream once and leave it running while you change your sound synthesizer.
Yes, clicking is more obvious when playing pure low frequency sine tones. Complex waves like square are all clicks so you don't notice the volume clicks. |
Beta Was this translation helpful? Give feedback.
You could use a RampLinear object. But that would involve switching over to using the flowgraph library and that is not well documented.
I would suggest making a smaller modification to your program. Basically you just want to multiply your output by an amplitude variable. If amplitude=0.0 then the output will be silent. If amplitude=1.0 then the output will be heard at full volume. Then ramp the amplitude up or down when you touch the screen.
When you tap down:
When you lift your finger: