Value of Knob to a Graphic size
-
@d-healey you are a genius, thanks a lot, exactly what I was looking for
-
@d-healey How do I attach it to a parameters in an fx?
-
@jay I don't think you can have a scripted callback and assign a parameter ID in the interface designer, you'd have to add the functionality you want in the knob's scripted callback function.
-
@d-healey Can you do an Example for me?
Like get the RoomSize of a reverb and when turning the knob for that parameter the image go big or small
-
@d-healey any ideas? please
-
That's not going to work out, resizing images that way looks terrible.
Either use a ScriptPanel and draw it in the paint routine, which scales nicely because it's rendered dynamically or use a filmstrip with the different sizes prerendered.
-
@christoph-hart I did that way but is doing it in a weird way, I can send you an snippet of what I'm trying to do, so you can check it out if you can.
Thanks in advance
-
@Christoph-Hart said in Value of Knob to a Graphic size:
use a filmstrip with the different sizes prerendered
What method would you use to change the filmstrip image according to GUI size? I can't find anything in the API that can query the GUI zoom setting.
-
@dustbro I don't think this would work because HISE doesn't embed all images in the binary, only the ones that are used. But to set the image of a knob you can use
knob.set("filmstripImage, image);
(or something like that).As far as scaling to GUI goes, just make the knob image 2x its normal size, then it will scale down just fine for people on lower resolution screens, and those on higher resolution will get the unscaled image.
-
@d-healey said in Value of Knob to a Graphic size:
just make the knob image 2x its normal size
This worked perfectly. Took me a sec to figure out how to set the scale to .5
-
@d-healey @dustbro But I don't see how this solution can follow a GUI zoom change...?
-
@ustk When you change the GUI zoom level HISE scales all of the images. If you have an image that is 2x and the user scales it to 50% the image will now be 1x.
-
@d-healey Yep I know that but I thought the solution asked/proposed was in a way changing the image regarding the zoom factor (like with a film strip)
I'm not sure it always happens, but with subdivisions of zoom factor, you still have aliasing with a 2x image size. For instance, if you use 25/75/125% zoom or even 33/66% for the most crazy guys ou there like me :)For the moment I'm trying to go 100% vectors, but surely in a close future, I'll make image-based GUIs...
Having a get/set zoom factor API would surely simplify the lifeBut this has a drawback => the size of the cumulated images/filmstrips...
This API would be very helpful anyway as I foresee other use of it...
-
Yeah that was the original question, but it's not possible :)
I haven't noticed any scaling issues, I'm sure there is some aliasing but if no-one sees it then I don't think it matters. If I scale to 25% then my interface looks horrible and small, but that's because I'm using a 2K monitor.