ChucK - Code Example

Code Example

The following is a simple ChucK program that generates sound and music:

// our signal graph (patch) SinOsc s => JCRev r => dac; // set gain .2 => s.gain; // set dry/wet mix .1 => r.mix; // an array of pitch classes (in half steps) @=> int hi; // infinite time loop while( true ) { // choose a note, shift registers, convert to frequency Std.mtof( 45 + Std.rand2(0,3) * 12 + hi ) => s.freq; // advance time by 120 ms 120::ms => now; }

Read more about this topic:  ChucK

Other articles related to "codes, code, code example":

... Xpediter for DB2 helps developers quickly ascertain how the code works and how to fix it when it doesn’t for DB2 Stored Procedures Xpediter/Code Coverage validates testing thoroughness and provides application analysis Xpediter/IMS offers complete control of application code execution in an IMS/DC environment ... It can also work in batch environment for IMS, normal JCls as well as online ...
Codes and Acronyms
... Acronyms and abbreviations can be considered codes, and in a sense all languages and writing systems are codes for human thought ... Air Transport Association airport codes are three-letter codes used to designate airports and used for bag tags ... Station codes are similarly used on railways, but are usually national, so the same code can be used for different stations if they are in different countries ...
National Guard Of The United States - National Guard Active Duty Character
... there are two titles in the United State Code (USC) under which units and troops may be activated, Title 32 (Militia Code) and Title 10 (Uniform Code of Military Justice) ...
File Select - Code Example
... Here is a code example of a web form with a file-select control ... It is the input element with type="file" that creates the file-select control ...

Famous quotes containing the word code:

    Faultless honesty is a sine qua non of business life. Not alone the honesty according to the moral code and the Bible. When I speak of honesty I refer to the small, hidden, evasive meannesses of our natures. I speak of the honesty of ourselves to ourselves.
    Alice Foote MacDougall (1867–1945)

    ... the self respect of individuals ought to make them demand of their leaders conformity with an agreed-upon code of ethics and moral conduct.
    Mary Barnett Gilson (1877–?)