You could build a generator using Gen7 or CurveTable. That might be a
little more efficient, but maybe not worthwhile.
andy
On Thu, Nov 18, 2010 at 10:13 AM, Tom Lieber
Is there a nice UGen I could be using instead of bitmaster in this snippet? (um, you kinda need scale.ck to run it http://www.dtic.upf.edu/~gcoleman/chuck/tutorial/tutorial.html)
//BlitSaw osc => blackhole; //SawOsc osc => blackhole; TriOsc osc => blackhole; Step bitter => ADSR env => dac; env.set(1::ms, 40::ms, .1, 300::ms);
spork ~ bitmaster();
Scale sc; [0, 1, 3, 8, 6, 4] @=> int notes[];
while(true) { for(0 => int i; i < notes.size(); i++) { sc.scale(notes[i], sc.maj) + 60 => Std.mtof => osc.freq; env.keyOn(1); second/6 => now; env.keyOff(1); second/7 => now; } }
fun void bitmaster() { 4 => float bits; while(true) { (osc.last() * bits) $ int => int rounded; rounded / bits => bitter.next; samp => now; } }
-- Tom Lieber http://AllTom.com/ http://favmusic.net/ _______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users