Difference between revisions of "ChucKu"

From CCRMA Wiki
Jump to: navigation, search
(chucku)
 
Line 1: Line 1:
 
'''Chucku''', haiku in ChucK
 
'''Chucku''', haiku in ChucK
 
<br><br>
 
<br><br>
like a [http://en.wikipedia.org/wiki/Haiku haiku], a ''chucku'' should contain exactly 3 lines of code (each less than 80 characters)<br>
+
* like a [http://en.wikipedia.org/wiki/Haiku haiku], a ''chucku'' should contain exactly 3 lines of code (each less than 80 characters)<br>
each chucku should generate sound<br>
+
* each chucku should generate sound<br>
5/7/5 pattern optional, but try to make the code "pretty"<br>
+
* 5/7/5 pattern optional, but try to make the code "pretty"<br>
check out [http://electro-music.com/forum/topic-13512.html one line chuck crazy] to see similarly compact examples<br>
+
* check out [http://electro-music.com/forum/topic-13512.html one line chuck crazy] to see similarly compact examples<br>
the chucku's should be standalone (i.e., no external audio or chuck files)<br>
+
* the chucku's should be standalone (i.e., no external audio or chuck files)<br>
 
<br><br>
 
<br><br>
  

Revision as of 20:43, 13 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)




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;}



SawOsc a [100];
while (1) {for( int i; i < 100; i++ ) {Std.rand2f( 90, 1600 ) => a[i].freq;
a[i] => dac; .3 => a[i].gain; Std.rand2f( .04, .1 )::second => now;}}