ChucKu: Difference between revisions
Appearance
No edit summary |
No edit summary |
||
Line 8: | Line 8: | ||
<br><br> | <br><br> | ||
''' | |||
'''Saturnine''' - Chris Warren | |||
SawOsc a [100]; int j; while (1) { !j => j; for( int i; i < 100; i++ ) <br> | |||
{Std.rand2f( 90, 1600 ) => a[i].freq; a[i] => dac; <br> | |||
.3 * j => a[i].gain; Std.rand2f( .04, .1 )::second => now;} .7::second => now;} <br> | |||
'''Safety Glass''' - Chris Warren | |||
SqrOsc a => JCRev b => Chorus c => dac => Delay d => a; .17 => b.mix;<br> | SqrOsc a => JCRev b => Chorus c => dac => Delay d => a; .17 => b.mix;<br> | ||
while (1) { Std.rand2( 160, 7100 ) => a.freq => float e; <br> | while (1) { Std.rand2( 160, 7100 ) => a.freq => float e; <br> | ||
2 => a.sync; e * .000062 => c.modFreq; e * .4::samp => d.delay => now;}<br> | 2 => a.sync; e * .000062 => c.modFreq; e * .4::samp => d.delay => now;}<br> | ||
Revision as of 07:43, 15 January 2008
Chucku, haiku in ChucK
- like a haiku, a chucku should contain exactly 3 lines of code (each less than 80 characters)
- each chucku should generate sound
- 5/7/5 pattern optional, but try to make the code "pretty"
- check out one line chuck crazy to see similarly compact examples
- the chucku's should be standalone (i.e., no external audio or chuck files)
Saturnine - Chris Warren
SawOsc a [100]; int j; while (1) { !j => j; for( int i; i < 100; i++ )
{Std.rand2f( 90, 1600 ) => a[i].freq; a[i] => dac;
.3 * j => a[i].gain; Std.rand2f( .04, .1 )::second => now;} .7::second => now;}
Safety Glass - Chris Warren
SqrOsc a => JCRev b => Chorus c => dac => Delay d => a; .17 => b.mix;
while (1) { Std.rand2( 160, 7100 ) => a.freq => float e;
2 => a.sync; e * .000062 => c.modFreq; e * .4::samp => d.delay => now;}