[chuck-users] 8-bit?
Tom Lieber
tom at alltom.com
Thu Nov 18 13:13:09 EST 2010
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/
More information about the chuck-users
mailing list