Accessing Parameters from QtScopeShm in SCLang

Hello everyone,

I have been playing around with changing the Color of my Stethoscope while its running (for some very cheap visuals). This can be done by editing the Stethoscope class, however only the Color of the line that gets drawn is changeable (and that only since there is a different color for control and audio rate scope).
I have been digging around and have found now that the way to change the background color is most likely to edit “QcScopeShm.cpp” (propably _bkg(QColor(0, 0, 0)) in line 48) and to compile the software myself.
However I don’t have any experience with either of these things so i was wondering if there is a simpler way, or if this is maybe already integrated and i just can’t read it out of the code how to.

SCFan

I once had to do this… As a c++ novice, it’s not so bad, the patterns are all clearly laid out and you just follow them with the new things you want to add.

I wish widgets were easier to change and distribute though…

nvm, Accessing Parameters from QtScopeShm in SCLang - #4 by droptableuser is the proper answer here :slight_smile:

Old post I am not too familiar with QtCollider, but it seems the values from sclang

are simply mapped to a function call on the C++ side

https://github.com/supercollider/supercollider/blob/9028422a145230c322cfc923e3c1a41fc4a1b998/QtCollider/widgets/QcScopeShm.cpp#L79-L88

and

But QcScopeShm has already a setter for the bg color on the C++ side

and

but it is not exposed via its sclang class - so I wrote a PR to fix this :wink: => Set background color of scope via sclang by capital-G · Pull Request #6857 · supercollider/supercollider · GitHub

Not sure if you’re looking for something different but you can change the background color via the scopeView property…

w = Window.new("my own scope", Rect(20, 20, 400, 500));
w.view.decorator = FlowLayout(w.view.bounds);
c = Stethoscope.new(s, view:w.view);
c.scopeView.background_(Color.blue);
c.scopeView.waveColors_( [Color.yellow, Color.red ] )
w.onClose = { c.free }; // don't forget this
w.front;