electro-smith / DaisyExamples

Examples for the Daisy Platform
https://github.com/electro-smith/DaisyWiki/wiki
MIT License
376 stars 194 forks source link

Pot update in SynthVoice example #294

Open Chect opened 1 year ago

Chect commented 1 year ago

Looks like the old pot values are set to the current pot values inside the UpdateLED function (oldk2 = k2;)

The old values should only update if the pot has moved past the hysteresis value. Since you use ConditionalParameter on multiple possible targets (probably should be abstracted out) you may want to just set a 'bPotMoved' flag and use that to determine if the old value should be updated

Probably best to move that inside the UpdateKnobs function as well for clarity

takumi-ogata commented 1 year ago

Hi Chect! I'm really sorry for the delay in response.

Yes, this is a great suggestion! You're more than welcome to make those changes and submit a PR. We would greatly appreciate it. Thank you so much!