[chuck-dev] SoundFonts in ChucK
Tom Lieber
lieber at princeton.edu
Thu Oct 2 17:41:25 EDT 2008
SoundFonts part II: using SoundFonts.
---
SFont f => dac;
int chan;
float key;
float veloc;
0.07 => f.norm;
// easy to find using the Internet
"Gort's-DoubleDecker_J1.SF2" => f.read;
while( true ) {
Std.rand2( 0, 15 ) => chan;
Std.rand2f( 50.0, 300.0 ) => key;
Std.rand2f( 0.0, 127.0 ) => veloc;
chan => f.channel;
key => f.freq;
f.noteOn( veloc );
1::second => now;
f.noteOff( veloc );
}
---
--
Tom Lieber
http://AllTom.com/
More information about the chuck-dev
mailing list