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

Q: val() get/set units #169

Open
X-Raym opened this issue Oct 9, 2020 · 3 comments
Open

Q: val() get/set units #169

X-Raym opened this issue Oct 9, 2020 · 3 comments
Labels
bug Something isn't working documentation

Comments

@X-Raym
Copy link

X-Raym commented Oct 9, 2020

Hi !

Trying to get/set value of a slider,

slider:val() returns value in expected format,
and slider:val( new_val ) requires new_val to be set in incrementation steps ?

Do I miss something there ?

Thanks !

@X-Raym
Copy link
Author

X-Raym commented Oct 9, 2020

Here is the formula to set from an arbitrary val value:

slider:val( (val- slider.min) / slider.inc )

@jalovatt jalovatt added bug Something isn't working documentation labels Nov 9, 2020
@jalovatt
Copy link
Owner

jalovatt commented Nov 9, 2020

Hi X-Raym, sorry I missed this when you posted it. That's correct, and I regret leaving it that way. I actually thought I had gone through all of them at some point and standardized the :val methods to use the same inputs and outputs. I guess not. :(

Unfortunately, this is probably not fixable since it would break any existing scripts that use Slider:val and Reaper/Reapack don't have any dependency management to support multiple versions of Scythe.

If and when I make it back to this project, though, I'll add the correct syntax to the docs.

@X-Raym
Copy link
Author

X-Raym commented Nov 9, 2020

@jalovatt Thanks for your feedback,
and no problem once we figure out the workaround, but sure having it written on the doc would prevent trials and errors 📦 I
a fix could involve having a new val method, or add some kind of parameter to tell "incrementation" or "value" mode.

(Long time no see, so I take advantage of this post to show you the focus system I made for scythe (tab navigation between elements, offset with arrow key...) Also succeeded flexible slider width :P https://forum.cockos.com/showpost.php?p=2358702&postcount=762... Hope you fine ! Cheers !)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation
Projects
None yet
Development

No branches or pull requests

2 participants