Node window not working properly with hp monitor

Hello ;

I have a question, I attach two screenshots of the nodes window. I use SuperCollider on a Mac M1 machine with a 31-inch HP monitor. When I open the nodes window and drag it onto the monitor screen, the content does not come out completely, it is as if it overflows the size of the window. However, after a while, the window resizes and seems to return to its expected appearance. Does anyone know why this happens, and how to fix it?
Greetings to the entire community

I think this is defined in plotTreeView, ServerPlusGui.sc.

I tried to understand how it worked then gave up. There’s recursion, node messaging and thread. So there’s ‘waiting’ involved here, hence the reason why it doesn’t update directly (I think). On my computer, resizing this view takes a noticeable amount of time.

I do not understand why every drawFunc call redefines a new drawFunc function every time.

What strikes me is that the same is not true for the ‘FreqScope’ and ‘Stethscope’ windows.

These are different mechanisms. The scope windows use the shared memory interface to draw the display (in the language) directly from buffer memory (in the server). This is very fast.

The node tree has to retrieve complex, structured data from the server using OSC messages. IIRC multiple queries are needed. It’s necessary to leave time for all the queries to come back before performing the next set of queries. So the update speed is slower. If you resize the window, it won’t redraw until the next update cycle. So if the period during which the window looks wrong is less than a second, I’d say just let it go.

How long is “a while”? (Long enough to grab a screenshot, which would be too long.)

It may be a weird interaction between Qt and displays having different resolutions. For that, I don’t have much of an idea.

hjh

1 Like

Actually, I think a resize event will still call the drawFunc. It won’t query nodes, however. At the moment, resizing shouldn’t (and couldn’t) update nodes, but could adapt GUI to the resize event. It was just not designed that way.

This question got my interest and I’ve tried updating the function. I’ll propose a pull request once this is done.

Didn’t even think this could display synth controls.
This is awesome:

1 Like

How did you get this? I don’t understand ?

I rewrote the widget after seeing your message.

When I though I was getting finished, I just figured out that, internally, synths controls are available, but current implementation doesn’t display them. So I used some black magic to make them appear.

That’s awesome. I like it. The only thing I’m not sure of is the rate at which this data can be refreshed.

That’s something I’m uncomfortable with, but interested in.

One of the downside of my rework is that I think it takes more time calculating everything (although I think this is just a few cpu cycles per node, but this can add up with complex synth graphs). I’m not able to calculate such things precisely.

If someone knows something about this: I moved every variable/function declaration outside of the recurrent function call, so that it doesn’t have to allocate memory or compose complex structures within the loop itself. It made sense to me, but maybe the interpreter or the compiler already take care of that? Or something else?

Since it takes some time for the server to be notified and respond, there will always be latency between what’s displayed and what’s heard. But this doesn’t affect refresh rate directly.

It is easy to test anyway, as the function takes the refresh interval as argument.


As a side note, something I didn’t change from the current implementation: every plotTreeView refreshes all plotTreeView when it ticks. So it’s implicitly supposed to be instantiated only once at a time.

1 Like

It doesn’t unfortunately!