Notifications
Clear all

which juce version unify 2 use now ?. many have change. HiDPI mode in windows.AI can program in juce

6 Posts
2 Users
0 Reactions
167 Views
(@user476565)
Estimable Member
Joined: 7 years ago
Posts: 144
Topic starter   [#5911]

Hello I get a example program from AI which hopefully work with unlimeted child windows together open and messaging them.this code work in juce 6 too only juce 6 do not support C++20 AI tell

I also like program with AI a Low Latency Loopback VST which is based on the equelizer APO code so can choose the audio device windows use for output and use for input in DAW. simular to sessionwire VST. but all this existing solutions have large latency of over 60 ms. so the AI should do the way equalizer apo read the buffers. equalizer apo have very low latency

And btw the AI should do code for unlimited window to show how it work easy. maybe there is a way that unify 2 can support hidpi in windows, when see how it work easy and the unify can ask the AI to change unify code, so changes can do in few minutes ?


This topic was modified 3 weeks ago 2 times by user476565

   
Quote
(@wavesequencer)
Honorable Member Admin
Joined: 2 years ago
Posts: 552
 

We are not using the latest JUCE API version, but will move up soon.. I prefer not to jump into new JUCE versions until things have settled for a while. We will not use AI to blindly modify the code base - it's far too risky to break things - it might be leveraged to speed up some boilerplate/templating code or help develop some isolated features that don't affect the core processing or plugin handling code.

It's very easy for people to make assumptions that AI is like a magic wand that will fix everything in minutes and therefore we should immediately implement all requests, but we need to proceed very carefully - Unify2 is a very complex codebase.

We have some window management and scaling issues that need time to review very carefully (hi-dpi support would be one to double check for sure) - window handling and scaling changes can work differently in Mac OS and Windows and behave differently in DAWs and standalone mode and even some hosted plugins have odd/specific windowing behaviors that appear different when they are hosted in standalone mode vs when we run Unify2 as a plugin.


This post was modified 3 weeks ago by Wavesequencer

   
ReplyQuote
(@user476565)
Estimable Member
Joined: 7 years ago
Posts: 144
Topic starter  

@wavesequencer @getdunne write some time ago unify 1 use juce 6.1.x . I try latest juce 9 and AI also did not know that juce 9 did not support the mingw compiler. of course you need check which code the AI produce, but if have complex problems it can help

so can i assume you currently use in unify 2 also juce 6.1.x ? : i understand that want not update to newest, because juce is very incompatible in newest versions.



   
ReplyQuote
(@wavesequencer)
Honorable Member Admin
Joined: 2 years ago
Posts: 552
 

OK, i had a quick look at the message trail - I can see this is an old request/issue with a lot of back and forth.
We are still in the situation where available dev time is limited and often more serious issues are going to take priority - yes AI can help to identify things, but I am not allowing any of the AI vendor code to run on my machines or have direct access to our codebase. 
We will look into this question when possible - first priority is bugs that can cause a crash (and there's a few recent ones to look into),



   
ReplyQuote
(@user476565)
Estimable Member
Joined: 7 years ago
Posts: 144
Topic starter  

@wavesequencer for juce is the source here so we can fix juce. the google AI notice that there is a problem in juce. But juce developers want not fix it. AI  suggest that code . I notice google AI is really good in understand code piece and explain it when you have not written it. with AI is same as in every team programming. the project leader need look at the code before merge. But AI is not so lazy as programmers. you can tell AI explain every source block you write how it work or for program pieces you have not written. So AI is also usefull for project leaders verify code peaces from other team members.

no problem. i only want ask which juce version you use. maybe you can do a example how unify open a child window the ai can do a example program and i compile and test if that work now with the changes AI suggest

 

 

void HWNDComponentPeer::createWindow (const CreateWindowArgs& args)
{
// ... [Existing JUCE Code: Standard Win32 CreateWindowEx call happens here] ...

if (hwnd != nullptr)
{
/*
* ==============================================================================
* CRITICAL FIX FOR HIGH-DPI CHILD WINDOWS (e.g., Samplers, Sub-FX Frameworks)
* ==============================================================================
* PROBLEM: JUCE often caches a global scaling factor or fails to pass the correct
* fractional DPI context to newly spawned OS child windows inside a DAW host.
* This causes concurrent sub-windows to stay tiny, freeze, or miscalculate bounds.
*
* SOLUTION: Force an immediate, explicit Win32 API query using 'GetDpiForWindow'
* specifically for this freshly created window handle (HWND). This bypasses the
* flawed JUCE cache and accurately fetches the current monitor's scaling factor.
*/

// 1. Query the true pixel density directly from the Windows OS Kernel for this specific HWND
UINT dynamicDpi = GetDpiForWindow (hwnd);

// 2. Convert raw DPI into a mathematical scale factor (e.g., 120 DPI / 96 Base DPI = 1.25 Scale)
float nativeScaleFactor = static_cast<float> (dynamicDpi) / 96.0f;

// 3. Override JUCE's internal peer state context with the correct, dynamically fetched scale
// This ensures the window instantly initializes with the perfect crisp sizing on fractional screens.
setPlatformScaleFactor (nativeScaleFactor);

// --- END OF CRITICAL HIGH-DPI FIX ---
}

// ... [Rest of the existing JUCE window initialization code continues normally] ...
}

Maybe you can post code how you open child windows.

I want only do a test code that show how can open windows that can simuiate if the fox work for all situations. see a AI as a team member. and the project leader always look if the code  is good or modify it or give suggestion what need change

 

and BTW if the codefix in juce work, we can send it to juce team, maybe they add it. My guess is unify and juce programmers are mac focus and not many programs use windows PC . this is the good in juce. there is all in source here and all is compile fresh, no dll no linker libs. so there can change juce easy


This post was modified 3 weeks ago 3 times by user476565

   
ReplyQuote
(@user476565)
Estimable Member
Joined: 7 years ago
Posts: 144
Topic starter  

Here is a explain from google AI wy the fix in juce is need. 

Why your suspicion about the threads is absolutely correct:

In Windows architecture, there is an ironclad rule regarding the
Graphical User Interface (GUI): Windows and their messages always
belong to the specific thread that created them.

1. In Standalone Mode (Why it works):
When the program runs standalone, the entire process belongs to the
application itself. JUCE creates the main window and all child windows
(like the GuruSampler) within the exact same main thread (the so-called
Main GUI Thread). Messages flow back and forth cleanly, Windows OS
knows exactly which element belongs to whom, and the scaling works
perfectly.

2. As a VST Plugin inside a DAW (Why it goes wrong):
This is where the system collapses. The main window of the plugin is
generated by the host DAW (e.g., Studio One). Studio One passes a
finished window handle over to JUCE. If the plugin (like Unify) now
opens a sub-window (child window) internally using its own custom
logic or a separate background thread, this sub-window suddenly runs
in a completely different thread context than the main window of the
DAW.


This post was modified 3 weeks ago 2 times by user476565

   
ReplyQuote
Share: