New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MultiSliderView scope/trace new methods #5992
Comments
One small modification. For allowing a pattern to control a GUI (.setProperties) I need to change the code for: +MultiSliderView {
add {|val|
this.value= this.value.copyRange(1, this.value.size-1)++val;
}
add_ {|val|
this.value= this.value.copyRange(1, this.value.size-1)++val;
}
addFirst {|val|
this.value= val.asArray++this.value.copyRange(0, this.value.size-2);
}
addFirst_ {|val|
this.value= val.asArray++this.value.copyRange(0, this.value.size-2);
}
} |
Why not just use Scope at control rate? Here is a sample in code:
You can see here that you can set the rate (the Stethoscope GUI also has this option) and you can see a control value on that bus changes the scope output. |
Thanks Josh! I see this as a more flexible GUI as it allows methods like I know the back and forth language/server data sharing as proposed is a down point for it (and in favor of scope), but I think that scope's visual possibilities seems to be quite limited. And improving scope isn't in the horizon, right? |
I don't think it is good to use the interface of Array for an object that holds an Array, but has many other functions. I understand that By shortening the code, you can write it more conveniently as: a.value = a.value.drop(1) ++ val
a.value = val ++ a.value.drop(-1) |
This would be much better implemented as a new
... and on the C++ side, the only requirement is that any reading of the array should be done based on Probably this should be named something like |
this would be a great addition. much better than copying yes. |
Ah yes, so you can simply write: //--basic example
(
var n= 100; //number of sliders
var w= Window("scroll test").front;
var a= MultiSliderView(w, Rect(10, 10, w.bounds.width-20, w.bounds.height-20));
var r;
a.elasticMode= 1;
a.value = r = RingBuffer.fill(n, {0});
Routine({
inf.do{|i|
0.05.wait; //scroll speed
a.value = r.overwrite(sin(i/10)*0.5+0.5);
};
}).play(AppClock);
CmdPeriod.doOnce({w.close});
) (edit, of course this is not as efficient as having the ring buffer internally) |
It would be great if one could just wrap the ring buffer interface around the internal DoubleArray. This would do it: #3467 (https://github.com/telephon/rfcs/blob/master/rfcs/0002-abstract-object.md), but of course this is more work … |
Requested feature
Motivation
Provide SuperCollider with a easy way to scope/trace control signals, specially when building custom GUI.
Description of Proposed Feature
This new method for MultiSliderView was proposed here: https://fredrikolofsson.com/f0blog/extmultisliderview/
Plan for Implementation
Example:
The text was updated successfully, but these errors were encountered: