You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Plotter:setProperties works fine for plots of Arrays, Buffers, and Envs, but results in a noop for Functions.
Here's a snippet that demonstrates this bug:
// setProperties works for Array:plot
(
a = (0..31).plot;
a.setProperties(
\plotColor, Color.blue,
\backgroundColor, Color.black,
);
a.refresh;
);
// setProperties works for Buffer:plot
(
b = Buffer.read(s, Platform.resourceDir +/+ "sounds/sinedpink.aiff");
)
(
a = b.plot;
a.setProperties(
\plotColor, Color.blue,
\backgroundColor, Color.black,
);
a.refresh;
);
// setProperties works for Env:plot
(
a = Env.perc.plot;
a.setProperties(
\plotColor, Color.blue,
\backgroundColor, Color.black,
);
a.refresh;
);
// But setProperties is a noop for Function:plot
(
a = {SinOsc.ar}.plot;
a.setProperties(
\plotColor, Color.blue,
\backgroundColor, Color.black,
);
a.refresh;
);
// However, plotMode works for Function:plot, for some reason:
(
a = {SinOsc.ar}.plot;
a.plotMode = \steps;
a.setProperties(
\plotColor, Color.blue,
\backgroundColor, Color.black,
);
a.refresh;
);
The text was updated successfully, but these errors were encountered:
Ah, ok: the plot is waiting for the waveform to be calculated when you set its properties. Once it has received them, it somehow uses the old ones. This works:
a = {SinOsc.ar}.plot;
// and then, separately:
(
a.setProperties(
\plotColor, Color.blue,
\backgroundColor, Color.black,
);
a.refresh;
);
for function:plot this is done by initialising the plot instance before
it begins to wait for the server to send back the wave data. This fixessupercollider#1762.
Plotter:setProperties
works fine for plots of Arrays, Buffers, and Envs, but results in a noop for Functions.Here's a snippet that demonstrates this bug:
The text was updated successfully, but these errors were encountered: