Not working: getMinValue() and getMaxValue()
-
@d-healey
Oh no, I'm building a granular synth and need a range slider. Thanks for confirming!By the way, it is no longer possible to tag you here. Maybe that's intentional. :-)
-
This post is deleted! -
@Oli-Ullmann said in Not working: getMinValue() and getMaxValue():
By the way, it is no longer possible to tag you here. Maybe that's intentional. :-)
@Dominik-Mayer Looks like tagging is broken when there is a
.
in the username. -
@Oli-Ullmann yeah, your best guess is to just write a panel that does the same thing. I've never actually used the range slider function and with the latest modulation & plugin parameter gesture rewrite I'm assuming single value use at too many places.
Also I would have to change the data model in the user preset system to store two values for a slider element and if you do it with a panel you can easily do just that.
I'll cook something up and put it in the snippet browser.
-
@Christoph-Hart said in Not working: getMinValue() and getMaxValue():
I'll cook something up and put it in the snippet browser.
Maybe remove the option for creating a range in the property editor if it's no longer supported.
-
@d-healey Ah yes good idea. Will do at the next commit.
-
All right, thanks for the info. I'll try using a panel.
-
Alright there you go:
https://docs.hise.dev/tutorials/ui/index.html#range-slider-panel
You'll need the latest commit, I've added a small helper function that makes the text input parsing easier.
-
@Oli-Ullmann not working
ScriptSlider.setMinValue()
slider callback triggered if LMB is up. functions for get values not working too.Snippet:
HiseSnippet 1151.3ocsV0sahaDEdbR71Eq1Uck1K6EVbEoMh0.IjzVU0z.IszcIAsjj16hFrO.ixvLV1CIPqx6Vej5aP6YFaisSHaWgTsDRb9+aNy4mYPjzGhikQDKmKWFBDqO2d3RgZZmoTlfzqKw5U18owJHxMg0IKCowwP.wxZ6eVyvpxNDy2e+imP4TgOjyhPtVx7g2ylwT4bGb76Xb9Yz.3R1rBZu+w87khNRtbNhmss8HgT+aoSfyoZ01xl7Kz3oDqu1tYiVdMaO9fliOpYqVGbf29sGMtYCOuCaGz5aaMJ.Z3621yiX8hSCXJYzPEUAwnSOQFrb3T48hj.bMKlMhCZhFjgXjSXS5LkwCFjkbhIDqcFjmp1NIU8F69r.1J94oruzHvM2hhIMqsJCocJAoFEgjWAHcljGncfVk0.OqBvamD38Z6g9QrPUtDM1dId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3rk0olAhlpUx+BLtBncJ
-
@It_Used said in Not working: getMinValue() and getMaxValue():
not working ScriptSlider.setMinValue() slider callback triggered if LMB is up. functions for get values not working too.
As discussed above, the range slider is no longer supported and shouldn't be used. Use a panel instead - check Christoph's last post above.
-
@d-healey i've see this later, after post publishing.
-
@It_Used way better to just script your own using a panel like Dave suggested. I wasted a bunch of time trying to get that thing to work properly for what I needed, I just ended up scripting my own.
-
@Chazrox into online docs available new UI Snippet, this range slider based on panel, you can use it! This is time economy, Homie)
-
@Christoph-Hart
This looks and works great!
Thanks very much for taking the time to create the snippet! :-) -
Where do you find
RangeSlider.js
? I can't target it from the snippet browser or or the Project Directory, neither from a finder search...Loading the snippet works fine, but as soon as you recompile, the include can't be found
Am I stupid or?
-
@ustk Hmm, yes that's weird, usually it should just reload the script that's embedded into the snippet. I'll check what's wrong there.
-
Alrighty, that's fixed now, not sure where this regression came from, but it didn't treat embedded script files correctly and assumed that the file was deleted - I vaguely remember a fix a few months ago regarding non-existent files that might have caused this.
-
@Christoph-Hart
Unfortunately, when I try to transfer this to my own project, it doesn't work. I get the following error code for the following line:g.drawAlignedText(Engine.getTextForValue(v[0], this.data.range.mode) + " - " + Engine.getTextForValue(v[1], this.data.range.mode), tb, "centred");
API call with undefined parameter 0 {{SW50ZXJmYWNlfHw2MjR8MjR8MTA2}}
Unfortunately, I can't figure out what the problem is.
I created a slider and a panel with the same names and copied the code into my new project. Is there anything else I need to do?
Even if I delete the panel in the snippet and add a new panel with the same name, it still doesn't work.
I have the feeling that
this.data.range
is not defined.