Background image aspect ratio and display
ldrolez opened this issue ยท 11 comments
Ok I see this image visibility is controlled here: https://github.com/sfztools/sfizz/blob/ae42f4a8822bb433f72912158e07d28331d0a447/plugins/editor/src/editor/Editor.cpp#L1901
Background image dimensions for sfizz are 790x285
as seen in code here:
https://github.com/sfztools/sfizz/blob/develop/plugins/editor/layout/main.fl#L10
For a 2x version you can use 1580x570
, but as mentioned file will error in Sforzando if you use the image tag
Hello! sorry for the long delay.
I've played with the 'image' tag, which is working quite well but, I'd like to know
* what is the recommended size/aspect ratio? * why is there a gray area on the left (see photo)? * would it be easy to have the same image in the 'knobs screen'?
- The aspect ratio is the original, 1:1 adapted to fit in the image container
- in the kmturley posted link you see a
xywh {90 110 790 285}
; for convenience it was decided to use that 90 pixels x offset - I'll try something ASAP, although I think it would look ugly if the image don't span the full width
Like this (800x285)?
sfizz-background-image.mp4
My opinion:
- Removing the offset is a good idea, looks better to have a full width image
- Using the same image for Home and Controls looks cluttered
Instruments loaded into sforzando, use two separate images to avoid this issue.
Image used: https://github.com/sfzinstruments/karoryfer.bear-sax/blob/master/GUI/bear_info_tab.png
775 x 335
Image used: https://github.com/sfzinstruments/karoryfer.bear-sax/blob/master/GUI/bear_control_tab_1.png
773 x 333
I would size sfizz window to fit existing ARIA background images, as images are already created.
Otherwise you are asking every instrument maker to create separate image crops for sforzando vs sfizz
Instruments loaded into sforzando, use two separate images to avoid this issue
We don't have the UI system sforzando have, we can only set a single image when image opcode is set in sfz, the video demo was just to propose a solution to the OP.
Let me know what do you think about this solution:
- no bg image on controls page unless a
image_controls
opcode is set - replace the info panel with a semitransparent overlay (like the about dialog) over the home page
- remove the "about sfizz" button in settings and replace it with the sfizz logo (as it was previously) being orange on mouse hover
EDIT: Added an opcode instead searching for a file name
The full-width image change is applied in develop, the image container size is now 800x300. If the image can't fit with a 1:1 aspect ratio, it will be rescaled (as previously) and now centered.
I'll try to make the other 2 changes (possibly together with #8) before the next release, planned for the next weekend.
Sometimes you have to switch tabs for the image to load properly (a known bug)
@kmturley is this on both LV2 and VST3/AU or VST3/AU only? It happened to me 2 or 3 times only with VST3. I see that vmeters doesn't work there. With LV2 when loading a sfz file it starts from the plugin contents directory instead from the user folder.
Anyway, I changed the UI to incorporate a size of 775x335 for the graphic part (C:\Program Files\Plogue\sforzando\GUI\gui_settings.xml
)
and this is what I got: