Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hnds.lua - fix sine phase jump #1

Merged
merged 3 commits into from Nov 14, 2019
Merged

hnds.lua - fix sine phase jump #1

merged 3 commits into from Nov 14, 2019

Conversation

@crimclark
Copy link
Contributor

@crimclark crimclark commented Nov 13, 2019

  • make square derived from sine
  • fix initial waveform
  • add depth param
- make square derived from sine
- fix initial waveform
- add depth param
@justmat
Copy link
Owner

@justmat justmat commented Nov 13, 2019

thanks for taking the initiative with this! very appreciated :)

thinking about it, i wonder if the addition of a depth param eliminates the need for min/max lfo params?

i'll be able to test and pull this evening.

@crimclark
Copy link
Contributor Author

@crimclark crimclark commented Nov 13, 2019

Yeah, I was thinking the same thing about min/max lfo params. You should be able to achieve the same behavior with depth and offset. Of course removing those would also require updating otis.lua

Also, instead of doing things like this in otis.lua:

params:set(lfo_targets[target], lfo.scale(lfo[i].slope, -1.0, 1.0, params:get(i .. "lfo_min") + offset, params:get(i .. "lfo_max") + offset) * 0.01)

Could also maybe move the "+ offset" code to hnds (like where I multiply the depth), so otis.lua (or any other script using hnds) doesn't have to worry about that calculation.

@justmat
Copy link
Owner

@justmat justmat commented Nov 13, 2019

These are great suggestions!

- move offset calc to hnds
@crimclark
Copy link
Contributor Author

@crimclark crimclark commented Nov 13, 2019

Added another commit to remove min/max and move offset to hnds

@justmat
Copy link
Owner

@justmat justmat commented Nov 14, 2019

I apologize for slacking on this! I forgot about a social engagement this evening, and haven't had a chance to dive in yet. I have an open schedule tomorrow, and will attend to things then. Very excited about shoring up hnds!

@crimclark
Copy link
Contributor Author

@crimclark crimclark commented Nov 14, 2019

no worries, and no rush! hope you like the changes and I didn't break anything haha :) would love to see hnds developed further and get used in more norns scripts

@justmat
Copy link
Owner

@justmat justmat commented Nov 14, 2019

Just checked this out, and offset + depth seems to work as expected. I am going to play around with it today, and likely merge tonight. Thanks again! I like this much more than the min/max way I was doing it before.

@justmat justmat merged commit e9b1801 into justmat:master Nov 14, 2019
crimclark added a commit to crimclark/otis that referenced this pull request Dec 31, 2019
- fix LFOs do nothing if justmat#1 is off
@crimclark crimclark mentioned this pull request Dec 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants