麻豆小视频在线观看_中文黄色一级片_久久久成人精品_成片免费观看视频大全_午夜精品久久久久久久99热浪潮_成人一区二区三区四区

首頁 > 學院 > 開發設計 > 正文

ChucK初步(2)

2019-11-14 09:58:01
字體:
來源:轉載
供稿:網友

Overview

ChucK is a strongly-typed, strongly-timed, concurrent(并發的) audio and multimedia(多媒體的) PRogramming language. It is compiled(編譯) into virtual(虛擬的) instructions, which is immediately run in the ChucK Virtual Machine. This guide documents the features(特色) of the Language, Compiler, and Virtual Machine for a ChucK programmer.

running ChucK

…this is a quick overview(綜述), see VM options for a more complete guide to command line options.

To run ChucK with a program/patch called foo.ck simply run chuck and then the name of the file:

chuck foo.ck

To run ChucK with multiple patches concurrently(同時發生) (or the same one multiple times):

chuck foo.ck bar.ck bar.ck boo.ck

…the following probes(探查) the audio system and prints out all available audio devices and MIDI devices. You may then refer to them (by number usually) from the command line or from your program. (again, see VM Options for a complete list)

chuck --probe

ChucK can be run in a different terminal as a host/listener that patches may be sent to. The server should invoke(調用) the –loop flag to specify that the virtual machine should not halt(停止) automatically(自動地) (when the current programs exit).

chuck --loop

(See the guide to On-the-fly Programming for more information)

If a ChucK listener is running, we can (from a second terminal) send a program/patch to the listener by using the + command line option:

chuck + foo.ck

Similarly, you can use - and = to remove/replace a patch in the listener, and use ^ to find out the status. Again, see On-the-fly Programming for more information.

To run most of the code or examples in this language specification, you only need to use the basic chuck program.

comments(注釋)

(Note: block comments cannot be nested(嵌入的))

// this is a commentint foo; // another comment/* this is a block comment still going...*/

debug print(調試輸出)

…we have provided a debug print syntax(語法):

// prints out value of expression<<< expression >>>;

This will print the values and types of any expressions placed within them. This debug print construction may be placed around any non-declaration expression ( non l-value ) and will not affect the execution(執行) of the code. Expressions which represent an object will print the value of that object’s reference(引用) address:

// assign 5 to a newly declared variable5 => int i;// prints "5 : (int)"<<<i>>>;// prints "hello! : (string)"<<<"hello!">>>; //prints "hello! : (string)"http:// prints "3.5 : (float)"<<<1.0 + 2.5 >>> => float x;

(ChucK中似乎是沒有了print這一類) (Chuck中有;,還是類似C的)

For more formatted(格式化) data output(輸出), a comma-separated list of expressions will print only their respective(分別的) values (with one space between):

//接上段// prints "the value of x is 3.5" (x from above)<<<"the value of x is" , x >>>;// prints "4 + 5 is 9"<<<"4 + 5 is", 4 + 5>>>;// prints "here are 3 random numbers ? ? ?"<<<"here are 3 random numbers", Std.rand2(0,9), Std.rand2(0,9), Std.rand2(0,9) >>>;

輸出: C:/Users/abc1/Desktop>chuck “debug print.ck” 5 :(int) “hello!” : (string) 3.500000 :(float) the value of x is 3.500000 4 + 5 is 9 here are 3 random numbers 1 8 8

reserved Words(關鍵字)

(primitive types原始類型) int float time dur void same (unimplemented未實現的) (control structures) if else while until for repeat break continue return switch (unimplemented) (class keywords) class extends public static pure this super (unimplemented) interface (unimplemented) implements (unimplemented) protected (unimplemented) private (unimplemented) (other chuck keywords) function fun spork const new (special values) now true false maybe null NULL me pi (special : default durations(默認持續時間)) samp ms second minute hour day week (special : global ugens(不理解)) dac adc blackhole
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 毛片福利 | 国产精品成人免费一区久久羞羞 | 国产精品免费久久久久 | 亚洲影视中文字幕 | 色就色 综合偷拍区91网 | 91豆奶| 香蕉国产9| 国产成人小视频在线观看 | 国产亚洲自拍一区 | 久久影城 | 国产美女三级做爰 | 午夜视频在线 | 成人性生活视频在线播放 | 欧美精品电影一区二区 | 特黄一区二区三区 | av电影免费看 | 日本黄色免费播放 | 美女在线观看视频一区二区 | 久久久久.com | 成人在线观看一区二区 | 欧美一级aa免费毛片 | 亚洲午夜1000理论片aa | 久久美女色视频 | 一级一片免费看 | 欧美www | 精品国产一区二区三区在线 | 精品一区二区在线观看视频 | 久久精品高清 | 中文字幕在线网站 | xxxxxx中国| 欧美日韩夜夜 | 黄色一级电影网 | 欧美成人黄色片 | 国产精品久久久免费观看 | 最新在线黄色网址 | 日本高清视频网站www | 黄视频免费观看 | 久久91久久| 亚洲成人国产 | 中国洗澡偷拍在线播放 | 一本色道久久综合狠狠躁篇适合什么人看 |