Hi @Justmat , so first off, hnds.lua is awesome, and thank you for making it.
I was playing around with it in my own script and noticed a couple (mostly minor) issues, which I’ve addressed in a PR. Let me know what you think!
Details and stuff
- The “sine” LFO will sometimes “jump” to a different point in the phase.
I’ve tracked this down to line 113:
lfo[i].counter = (lfo[i].counter + lfo[i].freq) % 360
If you remove the modulo 360 it fixes the issue. This is maybe easiest to hear if you play a single note and turn feedback all the way up with a short delay time. Set an lfo_target to “speed1” and add a print(lfo[i].counter) after that line. You should hear the lfo “skip” when the counter gets to 360.
-
The square wave seems to be slower than the sine. I noticed because I was attempting to make a tempo synced LFO in my script. I updated the square to make it derived from the sine, that way they should always be the same frequency.
-
The initial waveform in the lfo[i] table should be set to “sine” instead of 1. In my script, this causes the LFO to not work until I manually go to params and set the shape (so it is updated from 1 to a valid value). This isn’t an issue in Otis, I think because you call params:bang which auto sets it.
-
Not an issue but more of a feature
, I added an lfo depth param.