Developing Studio One, Part 1: High DPI graphics engine
Published on 2015-05-28


UPDATE: This article is now also available in the PreSonus Blog

In this new blog series, we like to share some behind-the-scenes information with you about the development of Studio One 3 - as time permits. Let's start with the new graphics engine because there seems to be some confusion about what "High DPI Mode" really means.

In general, Studio One and most of the PreSonus software applications such as Capture and UC Surface are based on our own proprietary application framework called CCL. It provides a nice abstraction layer on top of the APIs (Application Programming Interfaces) provided by Windows, OS X, and iOS allowing the majority of the code to compile on all these platforms. The core part of it additionally expands into the firmware of our AI mixers and speakers which enables us to provide hybrid native/DSP solutions like the Fat Channel - but that's a different story.

The GUI of Studio One is made from thousands of small pieces. Some of them are standard UI elements like buttons and knobs, tons of little icons, your musical data in the arrangement and editors, plug-in windows, and last but not least quite a lot of text. To make it look nice on today's high-resolution 4K/5K/Retina displays an application has to be able to render the GUI at different scaling factors.

So, what does it mean? Let's compare two monitors with the same physical dimensions but different pixel density, a standard 24'' monitor with 1920 x 1080 pixels HD resolution and a 24'' 4K monitor with 3840 x 2160 pixels UHD resolution: To make an UI element appear at the same size visually, the application has to render at 100% scaling on the HD monitor, and at 200% scaling on the UHD monitor. Makes sense? Technically, the common definition is that 96 DPI (dots per inch) equals 100% scaling, and thus 192 DPI equals 200% scaling. Depending on the size of the monitor and the viewing distance, intermediate scaling factors like 125% and 150% might fit as well.


Studio One 3 High DPI option

On Windows, the DPI scaling value can be changed in your system settings: go to Control Panel - Appearance and Personalization - Display. With "High DPI Mode" enabled in Studio One, we follow this setting and render the GUI optimized for the scaling factor of your display. In a multi-monitor configuration with different DPI settings per monitor, you'll notice the difference when you move windows between screens. With "High DPI Mode" turned off in Studio One, the operating system scales the application and you'll notice the fuzziness caused by pixel interpolation.

On OS X, a similar mode is always enabled to support devices like Retina MacBooks and the 5K Retina iMac. Why did we make it optional on Windows? Because as soon as an application declares itself "DPI-aware" to the system, the automatic scaling provided by the DWM (Desktop Window Manager) is turned off and this affects third party plug-ins in a way that they appear smaller on screen than the Studio One stock plug-ins. That said, contrary to OS X where the scaling-magic always works out of the box, the manufacturer of your favorite audio plug-in or instrument will have to spend some time to make the GUIs work for higher DPI settings on Windows.

So, is the new Studio One GUI based on vector graphics? Well, for the most part, yes. All backgrounds that can be tweaked by the user are rendered on the fly, same for the musical data and UI fonts. For version 3, our graphics designers rebuilt all icons as vector files. However, the vector files were then exported as PNGs at different resolutions and the graphics engine selects the PNG which best matches the current scaling factor. For text, we've worked with one of the world's leading type design companies to custom optimize one of their fonts for use in our software applications, and we think the results really look gorgeous.


Studio One 3 compared to version 2 on high-resolution display

On OS X, the lower level graphics implementation hasn't changed a lot since Studio One version 2. The rendering is done by CoreGraphics (Quartz). On Windows, we finally made the switch from "good-old" GDI to the more recent Direct2D and DirectWrite APIs provided by Microsoft. Direct2D allows better use of modern GPUs which leaves more CPU power for the audio processing. It still has some minor issues, but we are confident that Microsoft will improve this technology with Windows 10. If you experience problems on your system, please make sure to install all essential Windows updates and the latest graphics driver. On mobile PCs with multiple graphics adapters it might help to switch between them and see which one works best.

Congratulations, you are now an expert on high DPI! Thanks for reading and please feel free to share this information.

Matthias Juwan
CTO
PreSonus Software