Angled Sliders Issue
-
@ustk ohhhhh, this makes much more sense. I thought you meant put my filmstrips into individual panels and was hella confused.
@Christoph-Hart I'll take a look at this as well when I get back to the studio. It sounds super interesting!
-
Nice! Great docs, too.
Question barrage time. Sorry!
One thing I didn't quite get is when using a "class" converter to refer to a CSS class, where does it look for the class? In the entire script? Do we just import the css file as .js like we do with external scripts?
Are the shadows using melatonin?
Now that CSS introduces animation, component fading still needs custom implementation with timers and color mixing in LAF with the timer alpha since the fade method is broken. Do you know why it sometimes "skips" and instantly changes state?
https://github.com/christophhart/HISE/issues/481
Until that gets solved, fading a CSS component consistently would require writing to the property with the timer (instead of calling repaint) and referring to the var inside the css, right ?
-
@aaronventure Maybe we'll split the thread into two so that poor @trillbilly doesn't get flooded with a CSS discussion after I shamelessly hijacked his question for adversarial purposes...
-
@Christoph-Hart That’s great! Lots of possibilities are available now.
My favourite: No need to use timer objects for fading zoom in/out UI elements
-
@Christoph-Hart Thanks, I think I got this to work in my current project. When would something like this be safe to use in releases?
@ustk Thanks again for the help and docs!
-
@trillbilly said in Angled Sliders Issue:
When would something like this be safe to use in releases?
General experimental feature guidance is to use it in production whenever you're ready to lock down on the specific HISE commit for that particular product, or ready to do refactoring in the future.
-
It‘s not so much stability issues (in fact the scripted LaF is less stable because of inherent multithreadung issues) but rather consistency of the rendering that might break in the foreseeable future because I picked a wrong default value or wasn‘t aware of a standard behaviour that you would expect.
-
@Christoph-Hart Awesome, thanks!
I used your CSS demo. I am having issues getting sliders to update their amount.Im using these sliders for an ADSR. I have scripted the ADSR functions but cannot get the sliders to return the correct amount unless I change the knob & hit compile. If I do not hit compile, the slider stays the previous rate and never updates.
I have tried adding
knobs.changed()
to the CCS script with no luck. I also tried adding it in the script for my knob functions with no luck.Where am I going wrong here?
Thanks again.
-
-
HiseSnippet 2196.3oc6Z8zaabbEeWItNVLwNQE8TOTLknodUfjLIksRKKLLk0ehDpkrfniQJBBbGt6PxAZ4LD6N7eow.A8V+BzyEn.8aPA5w7AnGROz68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6eCzJ6oFsr+dNy5TiVVSd+Numy3RNSecS3crE+BXmiL2wCdONBnB7gouCtW7NnxM6cNJN0qHap6KLmvcUmS4JuVSGuKME7BYVeUi23az6FN62nAySk.1bNG7IW3028+bnbcCTdKmSj7HlFDeGyyjOhIXgnyrzEbCqe87dCqcl6aX0d4rb1Y9JzHaTYJ4eDDn2iy5+Rtx0buptx0uQC2ekt57RbA1ous32cTLl91b0vDdFKEOC5NVJjcZIEbuzwRmwfJwa1jElFySkHlZW1saXuLAi5c6mnWivw8PrH+oplddHqGj3MkfGB7Lo8Orp1bi63e8mqFuS63t9xpeU71Ri6J2WWceOILovtHG+he07NyYvwMhquinWB95cd6aNBqlYjWuA66Xpo7MA+56Npzv2Hbr2bTIduI3ZupTiIgh4Kdn4wTHKNTAqyIcaWC1o2iAHQ.00h6uauDVKrocQrM5YpwD95FX0xwurD11N9kkF8xKa4Lk++a4L49urblqJc40gRWJeUoKWU5xUktbUoKWU5xUktr3kt7MwXzl5EJepW72GMLwcccO.uE5+SrshywXaRoLeYC5OsgREdpmWVSMghkWTE2ZQU7NKph2cQUb6EUwObQU7G+xUDqjamtJYayRVKqiOce8WNjs89BJDwqWcX8ePbi6nk
-
@trillbilly
value * 20000
Why not set the slider's range to match the attack knob's? -
@d-healey I tried, but then the knob wasn't functioning at all. It would only function/slide if I have the range set to 0-1.
-
Ah ok I see what's happening. When you move the slider you're not actually moving the slider, you're clicking on the panel and the panel is setting the slider's value. You need to call .changed() after the value is set.
-
@d-healey Ok, Ill try this. Am I calling ".changed()" to the panel or to the slider?
-
@trillbilly Find the bit of code where the knob's value is being set (it's in the panel's callback). Then following that you need to add .changed() to the knob.
-
@d-healey In the panels MouseCallback I see what I believe is the bit of code setting the knobs value.
knobs[sliderIndex].setValue(Math.range(xNorm * 1.3, 0.0, 3.0));
If I try adding "knobs.changed();" or "Attackknb.changed();" after this I get an error anytime the knob is changed that reads "Unknown function 'changed'".
I've tried this below each other bit of code within the panels MouseCallback as well with the same error message.
-
@trillbilly said in Angled Sliders Issue:
If I try adding "knobs.changed();"
knobs is the name of the array. You need to refer to the element, just like the line you see for setting the value.
Try
knobs[sliderIndex].changed();
-
@d-healey Correct you are. Much appreciated.
-
@d-healey Hi David, another question about this. So I have UI buttons that change the color of background, buttons and sliders. I duplicated the CSS sliders and grouped them according to color. Everything works as it should except the CSS sliders do not stay "Linked", even if I use the "Link To" option in the properties editor. Is there a way I can ensure all of these get linked and keep the same value (Attack links with other Attacks, Decay with other decays, etc)?
Is there an easier way instead of copying the sliders panel multiple times that I can just change the color of the sliders when a button is clicked since they are scripted?
-
@trillbilly said in Angled Sliders Issue:
Is there an easier way instead of copying the sliders panel multiple times that I can just change the color of the sliders when a button is clicked since they are scripted?
Yes, that's what CSS is great for. Just swap out the class for a different class that has different colours. I haven't used the CSS stuff in HISE yet, but this is how it works in web dev.
"Traditionally" in HISE you'd change the colour properties of the component, but I'm guessing this isn't needed when using CSS.