Skip to content

Update NodeTreeView.sc#6917

Merged
dyfer merged 3 commits intosupercollider:developfrom
prko:topic/update_plotting_algorithm_of_NodeTreeView
Jun 2, 2025
Merged

Update NodeTreeView.sc#6917
dyfer merged 3 commits intosupercollider:developfrom
prko:topic/update_plotting_algorithm_of_NodeTreeView

Conversation

@prko
Copy link
Contributor

@prko prko commented Jun 1, 2025

Purpose and Motivation

Fixes the following problems

The commit for resolving the problem in #6834 is problematic due to its complicated structure; there are too many if clauses, which makes it very complex and confusing. In this implementation, I reinstated the algorithm from before #6834 and made a few minor changes to the countSize function. While not perfect, this is a significant improvement on my previous implementation.

To test extreme cases

  • Evaluate multiple times the following code block, or
  • Change ! 15 to ! 100 or ! 202
(
{ Group(s) } ! 2;

{}.play;

x = {
	s.bind {
		g = Group(s);
		{
			var h = Group(g);
			{ Synth(\default, [\amp, 0.0001], target: h, addAction: \addAfter) } ! 4
		} ! 15;// ! 100 

		{}.play;
	};
};

x.();
s.meter;

s.freqscope;

s.scope
)

Types of changes

  • Documentation
  • Bug fix
  • New feature
  • Breaking change

To-do list

  • Code is tested
  • All tests are passing
  • This PR is ready for review

@prko
Copy link
Contributor Author

prko commented Jun 1, 2025

All tests with #6914 passed.

@dyfer dyfer added the comp: class library SC class library label Jun 1, 2025
Copy link
Member

@dyfer dyfer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!
This does seem to fix all node plotting.

However, could you change the Colors back to the ones using globalAlpha parameter? This will make the plot "fade" slightly when the server quits, which isn't happening in this PR.

@prko
Copy link
Contributor Author

prko commented Jun 1, 2025

However, could you change the Colors back to the ones using globalAlpha parameter? This will make the plot "fade" slightly when the server quits, which isn't happening in this PR.

Done in 8029b19

I'm sorry, I didn't realise that I removed this. Is this now ok?

@dyfer
Copy link
Member

dyfer commented Jun 2, 2025

Yes, it's good now, thanks!

@dyfer dyfer merged commit cac7fa6 into supercollider:develop Jun 2, 2025
24 of 25 checks passed
@prko prko deleted the topic/update_plotting_algorithm_of_NodeTreeView branch October 13, 2025 01:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: class library SC class library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants