Skip to content

Instantly share code, notes, and snippets.

View yotamorimoto's full-sized avatar
🖖

yota morimoto yotamorimoto

🖖
View GitHub Profile
{ } カーリーブラッケットは関数
関数の中で、音の鳴り方や、計算などができる
f = {};
SC では、小文字のアルファベットは、変数(関数や値などを格納する)
デフォルトで s にはサーバが格納されている
s.boot; // サーバ起動
s.isKindOf(Server); // s はサーバですか? yes -> true, no -> false が出力
@yotamorimoto
yotamorimoto / gist:2264454
Last active March 30, 2017 12:04
サーバ起動
// サーバの起動
// 下の行にカーソルを置き、実行
s.boot;
/*
 「クライアント」から「サーバ」へ命令が行って
   サーバが起動し、ポストウィンドウに文字が出力される
    ここでは s がサーバで、.boot メッセージを送ることで起動する
*/
@yotamorimoto
yotamorimoto / gist:2261233
Last active January 14, 2019 13:01
シンセ作り
ドラムのハイハットをシンセで作る
SynthDef オブジェクトでシンセサイザーをつくる
SynthDef の引数は
SynthDef(シンセの名前, 関数).add; // .add で定義をサーバに送る
シンセの名前は String オブジェクト "I am SuperCollider" など
あるいは Symbol オブジェクト \iamSuperCollider などを使って書く
Symbol は空白を使えない
() 内を選択後、実行