Plot \bars mode problem

Otherwise, it might be better to let the user define the last value of x when selecting one of the \bars, \levels and \steps.

(
s.waitForBoot{
    var oscillator, modes, cycle;
    oscillator = SinOsc;
    modes = [\linear, \points, \plines, \levels, \steps, \bars];
    cycle = 2000;
    modes.do { |mode, i|
        var interval = cycle.reciprocal;
        {
            { oscillator.ar(cycle) }
            .plot(interval, bounds: Rect((i / 2).floor * 500, i%2 * 330, 500, 300))
            .plotMode_(mode)
            .parent.name_(oscillator.cs + mode)
        }.defer;
        interval.wait
    }
}
)

1 Like