ChucK

維基百科,自由的百科全書
(重新導向自Chuck
跳至導覽 跳至搜尋
ChucK
the ChucK Operator
編程範型多重編程範式
設計者王戈
釋出時間2003年,​23年前​(2003[1]
當前版本
    Module:EditAtWikidata第29行Lua錯誤:attempt to index field 'wikibase' (a nil value)
    型態系統強類型
    作業系統跨平台- OS X, Linux, Windows
    許可證GNU通用公共許可證
    iOS: 閉源軟件
    網站http://chuck.cs.princeton.edu/

    ChucK 是一個並發和強調時間的音頻程式語言,主要用於實時聲音合成、作曲和表演,[3] 可運行於OS XLinuxMicrosoft WindowsiOS。相比性能等其他因素的考慮,它的設計更注重程序的可讀性與編程靈活性。它原生支持確定性並發和同時多重動態控制率。另外一個關鍵的功能其對現場編程英語Live coding的支持, 可以在程序不停止或重啟的情況下,現場增加、刪除和修改程序。它有着非常精確的定時/並發模型,允許任意準確的控制。它為作曲家與研究人員而開發的編程工具兼具強大性能與靈活性,包括對複雜聲音合成進行開發和調試,以及實時的交互控制。[4]

    代碼例子[編輯]

    下面是生成聲音和音樂一個簡單的ChucK程序:

     // our signal graph (patch)
     SinOsc f => dac;
     // set gain
     .3 => f.gain;
     // an array of pitch classes (in half steps)
     [ 0, 2, 4, 6, 9, 10 ] @=> int hi[];
     
     // infinite loop
     while( true )
     {
         // choose a note, shift registers, convert to frequency
         Std.mtof( 65 + Std.rand2(0,1) * 43 +
             hi[Std.rand2(0,hi.cap()-1)] ) => f.freq;
     
         // advance time by 120 ms
         120::ms => now;
     }
    

    參考資料[編輯]

    1. ^ Dean, R. T. The Oxford handbook of computer music. Oxford Handbooks in Music Series. Oxford University Press US. 2009: 57 [2021-02-22]. ISBN 0-19-533161-3. (原始內容存檔於2020-07-29). 
    2. ^ github.com/ccrma/chuck. [2021-01-18]. (原始內容存檔於2022-04-10). 
    3. ^ Ge Wang. A history of programming and music. Collins, Nicholas; Rincón, Julio d'Escrivan (編). The Cambridge companion to electronic music. Cambridge University Press. 2007: 69 [2013-11-22]. ISBN 0-521-86861-0. (原始內容存檔於2014-01-03). 
    4. ^ ChucK : Strongly-timed, Concurrent, and On-the-fly Music Programming Language. [2013-09-06]. (原始內容存檔於2011-04-10). ...offers composers, researchers, and performers a powerful programming tool for building and experimenting with complex audio synthesis/analysis programs, and real-time interactive music. 

    外部連結[編輯]