Closed Nowhk closed 4 years ago
Hi @Nowhk
I think what you are seeing is actually the intended behavior.
The modulation generator generates a "random" waveform each time. It's an weighted average between a square, sine, saw and triangle. The glitch you're seeing is probably because there's a bit of a square waveform in there.
Does that make sense?
Best regards, Thomas
Not sure I got it :) The regenerate function https://github.com/thomassidor/tinytricks/blob/master/src/modulation-generator.cpp#L26 is called once, when I click Trigger. If I click once, I would expect it select a single lfoWave. Than, on each step, is always use the same (only) waveform, no?
I mean, it will only use sin or tri or saw or sqr for each trigger https://github.com/thomassidor/tinytricks/blob/master/src/modulation-generator.cpp#L80, not mixing them :O
Hi again :)
Yes, lfoWave is set once - it's a random float value between 0 and 3.
But in line 79 to 84 that float value is used to create a weighted sum of the pure waves - so if lfoWave is 0.5 you'll get both a bit of a sine wave and a triangle wave.
Oh now I see the trick :) Thanks
I'm trying your fancy MG16, and sometimes I see that generated waveform are a bit "glitchy".
here's a screenshot of a "saw" waveform:
That "jump" in the middle of the period is not intended I think (at least, seeing your code). Is it?
I'd like to understand this. Many others waveform have those "glitch" sometimes. Here's a triangle one: