Skip to content

Instantly share code, notes, and snippets.

@Sciss
Created March 1, 2018 13:21
Show Gist options
  • Select an option

  • Save Sciss/5b73486171494a99a4f6466d58ebd76b to your computer and use it in GitHub Desktop.

Select an option

Save Sciss/5b73486171494a99a4f6466d58ebd76b to your computer and use it in GitHub Desktop.
~buf = Buffer.alloc(s, 64 * 4);
~buf.clear;
({
var b, x, y, out, sig;
b = LocalBuf(1);
b.set(0);
y = Dbufrd(b);
x = (y + 1) % 7;
out = Duty.ar(SampleDur.ir, 0, Dbufwr(x, b));
sig = DC.ar(1) - out.sign;
RecordBuf.ar(sig, ~buf.bufnum, loop: 0, doneAction: Done.freeSelf);
}.play)
~plotter = ~buf.plot;
//~plotter.parent.alwaysOnTop = true;
~plotter.plotMode_(\steps).refresh;
~buf.free;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment