[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sc-users] fun with new buffer methods



Here's something very useful you can do with Scott's new buffer stuff. This one retrieves and plots the contents of a wavetable buffer. If you want to plot (part of) a soundfile buffer, or an audio buffer recorded on the server side, you can leave out the .select call.

~sb = Buffer.alloc(s, 4096, 1);
~sb.cheby([1, 0, 1]);
~sb.sine1([0.5], normalize:false, clearFirst:false);

~sb.getToFloatArray(action: { |a| { a.select({ |y, i| i.even }).plot }.defer })

Thanks Scott!

hjh
____________________________________

H. James Harkins /// dewdrop_world
http://www.dewdrop-world.net

"If attacked by a lion, thrust your arm down his throat.
This takes some practice." -- Cyril Connolly