SlideShare a Scribd company logo
1 of 33
Download to read offline
Interactive Music II
SuperCollider入門 5
時間構造をつくる
2013年10月31日
東京藝術大学芸術情報センター(AMC)
田所 淳
今日の内容
‣ 時間構造をつくる
!

‣ エンベロープ(Envelope): 音量の時間的な変化
‣ EnvGen, Env
!

‣ スケジューリング
‣ Rutine
SuperColliderにおける時間構造
‣ ここまでは、プログラムした単体の音を鳴らすだけだった
‣ 音楽、音響作品にしていくには、音を時間構造の中で配置して
いかなくてはならない
!

‣ SuperColliderでの時間構造のとらえ方
‣ シーケンサーや、DAW(ProToolsなど)などの時間の考え方とは
異なる
‣ ロジックによる時間構造の構築 (←→ タイムライン)
‣ 時間の流れは一つとは限らない
エンベロープ (Envelope)
エンベロープ (Envelope)
‣ 音の3要素: 音高、音量、音色
!

‣ しかし、それ意外にも重要な要素がある
‣ 音の時間的な変化 → エンベロープ
!

‣ 同じ音色でも、そのエンベロープが異なると違うキャラクター
の音になる
エンベロープ (Envelope)
‣ エンベロープ

元の音

エンベロープ信号

エンベロープを適用した音
エンベロープ (Envelope)
‣ ADSR (Attack - Decay - Sustain - Release)
エンベロープ (Envelope)
‣ SuperColliderで、エンベロープを使用してみる
!

‣ Env と EnvGen を使用する
‣ Env - エンベロープの形態を定義
‣ EnvGen - Envで生成した形態で信号を生成
エンベロープ (Envelope)
‣ エンベロープ 1 - Env.linen
// Env.linen - アタック、サステイン、リリース、レベルで指定
Env.linen(0.05, 0.2, 0.5, 0.7).plot;

!

{
var env = Env.linen(0.05, 0.1, 0.5);
SinOsc.ar(440) * EnvGen.kr(env, doneAction: 2)
}.play
エンベロープ (Envelope)
‣ エンベロープ 2 - Env.perc
// Env.perk - パーカッシブなエンベロープ
Env.perc(0.01, 2.0).plot;
(
{
var env = Env.perc(0.01, 2.0);
SinOsc.ar(440) * EnvGen.kr(env, doneAction: 2)
}.play
)
エンベロープ (Envelope)
‣ エンベロープ 3 - Env.triangle
// Env.triangle - 三角形のエンベロープ
Env.triangle(1, 1).plot;
(
{
var env = Env.triangle(1, 1);
SinOsc.ar(440) * EnvGen.kr(env, doneAction: 2)
}.play
)
エンベロープ (Envelope)
‣ エンベロープ 3 - Env.sine
// Env.sine - ハニング窓
Env.sine(1, 1).plot;
(
{
var env = Env.sine(1, 1);
SinOsc.ar(440) * EnvGen.kr(env, doneAction: 2)
}.play
)
エンベロープ (Envelope)
‣ エンベロープ 4 - Env.new
// Env.new - 完全に自由なエンベロープ生成
// レベルの配列と、時間の配列で指定
Env.new([0, 1, 0.9, 0], [0.1, 0.5, 1],[-5, 0, -5]).plot;
(
{
var env = Env.new([0, 1, 0.9, 0], [0.1, 0.5, 1],[-5, 0, -5]);
SinOsc.ar(440) * EnvGen.kr(env, doneAction: 2)
}.play
)
エンベロープ (Envelope)
‣ EnvGenで指定されている doneAction:2 とは?
‣ エンベロープが終了した後に、するてつづき
‣ 1∼14まで規定されている
エンベロープ (Envelope)
‣ doneAction
!
0. do nothing when the UGen is finished
1. pause the enclosing synth, but do not free it
2. free the enclosing synth
3. free both this synth and the preceding node
4. free both this synth and the following node
5. free this synth; if the preceding node is a group then do g_freeAll on it, else free it
6. free this synth; if the following node is a group then do g_freeAll on it, else free it
7. free this synth and all preceding nodes in this group
8. free this synth and all following nodes in this group
9. free this synth and pause the preceding node
10. free this synth and pause the following node
11. free this synth and if the preceding node is a group then do g_deepFree on it, else free it
12. free this synth and if the following node is a group then do g_deepFree on it, else free it
13. free this synth and all other nodes in this group (before and after)
14. free the enclosing group and all nodes within it (including this synth)
エンベロープ (Envelope)
‣ doneAction
!
0. do nothing when the UGen is finished
1. pause the enclosing synth, but do not free it
2. free the enclosing synth → Synthを終了して開放
3. free both this synth and the preceding node
4. free both this synth and the following node
5. free this synth; if the preceding node is a group then do g_freeAll on it, else free it
6. free this synth; if the following node is a group then do g_freeAll on it, else free it
7. free this synth and all preceding nodes in this group
8. free this synth and all following nodes in this group
9. free this synth and pause the preceding node
10. free this synth and pause the following node
11. free this synth and if the preceding node is a group then do g_deepFree on it, else free it
12. free this synth and if the following node is a group then do g_deepFree on it, else free it
13. free this synth and all other nodes in this group (before and after)
14. free the enclosing group and all nodes within it (including this synth)
スケジューリング (Scheduling)
スケジューリング (Scheduling)
‣ 音楽は時間の中で展開される
‣ どのタイミングで何を行うかを、細かくコントロールする必要
がある
スケジューリング (Scheduling)
‣ Routine - ルーチン
‣ データ処理のアクション
‣ 必要なパラメータを設定し、スリープする(次のタイミングを
待つ)
‣ 他のコンピュータ言語でいうThread (スレッド) のようなもの
スケジューリング (Scheduling)
‣ Routine基本
// ! Routineをスケジューリング- 1
Routine({
!
12.do{
! arg i; // カウンタ変数

!

"Count = ".post; i.postln; // カウンタ出力
1.yield; // 1秒待つ

!
}
}).play;
!
!

‣ 実行してみる
‣ Post windowに何が表示されるか?
スケジューリング (Scheduling)
‣ Routine - 実行結果
Count
!
Count
Count
!
Count
Count
!
Count
Count
!
Count
Count
!
Count
Count
!
Count

!

=
=
=
=
=
=
=
=
=
=
=
=

0
1
2
3
4
5
6
7
8
9
10
11

‣ 1秒おきに、カウントアップする
スケジューリング (Scheduling)
‣ Routine応用 - ランダムな時間で生成
// Routineをスケジューリング - 2
r = Routine({
//待ち時間を記録する変数
var delta;
12.do {
//待ち時間、1∼5秒をランダムに生成
delta = rrand(1,5);
//メッセージを出力
"Will wait ".post; delta.postln;
//1∼5秒待つ
delta.yield;
}
}).play;
スケジューリング (Scheduling)
‣ Routineを使用して、シーケンスパターンを生成してみる
‣ まずは、エンベロープ付きのSin波の楽器を定義
‣ 定義した楽器を、Routineでくりかえし実行する
スケジューリング (Scheduling)
‣ Routine実験用のSynth singrain を定義
// Routine実験用、Synth "singrain"
(
SynthDef("singrain", {
arg freq = 440, amp = 0.2, sustain = 1;
var env, sig;
env = EnvGen.kr(Env.perc(0.01, sustain), doneAction: 2);
sig = SinOsc.ar([freq, freq * 1.01], 0, amp) * env;
Out.ar(0, sig);
}).add;
)
スケジューリング (Scheduling)
‣ Routineによるシーケンス1 - 反復
//反復して演奏
(
Routine({
loop{
Synth("singrain");
1.yield;
}
}).play;
)
スケジューリング (Scheduling)
‣ Routineによるシーケンス2 - 等比的に上昇
//等比的に上昇
(
Routine({
var freq;
24.do{
arg i;
freq = i * 1.5 * 55;
Synth("singrain", ["freq", freq]);
0.2.yield;
}
}).play;
)
スケジューリング (Scheduling)
‣ Routineによるシーケンス3 - 12音階をランダムに
//12音階をランダムに
(
Routine({
var freq;
loop{
freq = [60,61,62,63,64,65,66,67,68,69,70,71].choose.midicps;
Synth("singrain", ["freq", freq]);
0.5.yield;
}
}).play;
)
スケジューリング (Scheduling)
‣ Routineによるシーケンス4 - 音程、長さ、音量をランダムに
//音程、長さ、音量をランダムに
(
Routine({
var freq, amp, sustain;
loop{
freq = [60,61,62,63,64,65,66,67,68,69,70,71].choose.midicps;
amp = exprand(0.1, 0.5);
sustain = rrand(1, 4) * 0.5;
Synth("singrain", ["freq", freq, "amp", amp, "sustain", sustain]);
(sustain * 0.8).yield;
}
}).play;
)
スケジューリング (Scheduling)
‣ Routineによるシーケンス5 - 2つの音程
//2つの音程
(
Routine({
var freq1, freq2, amp, sustain;
loop{
freq1 = [60,61,62,63,64,65,66,67,68,69,70,71].choose.midicps;
freq2 = [60,61,62,63,64,65,66,67,68,69,70,71].choose.midicps;
amp = exprand(0.1, 0.3);
sustain = rrand(1, 4) * 0.5;
Synth("singrain", ["freq", freq1, "amp", amp, "sustain", sustain]);
Synth("singrain", ["freq", freq2, "amp", amp, "sustain", sustain]);
(sustain * 0.8).yield;
}
}).play;
)
スケジューリング (Scheduling)
‣ Routineによるシーケンス6 - 2つの音程(2)
//2つの音程 - 2
(
Routine({
var freq1, freq2, amp, sustain;
loop{
freq1 = [60,61,62,63,64,65,66,67,68,69,70,71].choose.midicps;
freq2 = freq1 * [1.0/1.0, 2.0/1.0, 3.0/2.0, 4.0/3.0, 5.0/4.0].choose;
amp = exprand(0.1, 0.3);
sustain = rrand(1, 4) * 0.5;
Synth("singrain", ["freq", freq1, "amp", amp, "sustain", sustain]);
Synth("singrain", ["freq", freq2, "amp", amp, "sustain", sustain]);
(sustain * 0.8).yield;
}
}).play;
)
スケジューリング (Scheduling)
‣ Routineによるシーケンス7 - 4つの音程
//4つの音程
(
Routine({
var note1, note2, note3, note4, amp, sustain;
loop{
note1 = [60,61,62,63,64,65,66,67,68,69,70,71].choose;
note2 = note1 + [0, 2, 4, 5, 7, 9].choose - [0, 12].choose;
note3 = note1 + [0, 2, 4, 5, 7, 9].choose - [0, 12].choose;
note4 = note1 + [0, 2, 4, 5, 7, 9].choose - [0, 12].choose;
amp = exprand(0.05, 0.2);
sustain = rrand(1, 8);
Synth("singrain", ["freq", note1.midicps, "amp", amp, "sustain",
Synth("singrain", ["freq", note2.midicps, "amp", amp, "sustain",
Synth("singrain", ["freq", note3.midicps, "amp", amp, "sustain",
Synth("singrain", ["freq", note4.midicps, "amp", amp, "sustain",
(sustain * 0.8).yield;
}
}).play;
)

sustain]);
sustain]);
sustain]);
sustain]);
スケジューリング (Scheduling)
‣ Routineによるシーケンス7 - 4つの音程2
//4つの音程2
(
Routine({
var note1, note2, note3, note4, amp, sustain;
loop{
note1 = [60,61,62,63,64,65,66,67,68,69,70,71].choose;
note2 = note1 + [0, 5, 7].choose - [0, 12].choose;
note3 = note2 + [0, 5, 7].choose - [0, 12].choose;
note4 = note3 + [0, 5, 7].choose - [0, 12].choose;
amp = exprand(0.1, 0.2);
sustain = rrand(1, 8);
Synth("singrain", ["freq", note1.midicps, "amp", amp,
Synth("singrain", ["freq", note2.midicps, "amp", amp,
Synth("singrain", ["freq", note3.midicps, "amp", amp,
Synth("singrain", ["freq", note4.midicps, "amp", amp,
(sustain * 0.8).yield;
}
}).play;
)

"sustain",
"sustain",
"sustain",
"sustain",

sustain]);
sustain]);
sustain]);
sustain]);
スケジューリング (Scheduling)
‣ Routineによるシーケンス8 - 4つの音程 x 2
//4つの音程 x 2
(
r = Routine({
var note1, note2, note3, note4, amp, sustain;
loop{
note1 = [60,61,62,63,64,65,66,67,68,69,70,71].choose;
note2 = note1 + [0, 5, 7].choose - [0, 12, 24].choose;
note3 = note2 + [0, 5, 7].choose - [0, 12, 24].choose;
note4 = note3 + [0, 5, 7].choose - [0, 12, 24].choose;
amp = exprand(0.05, 0.1);
sustain = rrand(1, 8);
Synth("singrain", ["freq", note1.midicps, "amp", amp, "sustain",
Synth("singrain", ["freq", note2.midicps, "amp", amp, "sustain",
Synth("singrain", ["freq", note3.midicps, "amp", amp, "sustain",
Synth("singrain", ["freq", note4.midicps, "amp", amp, "sustain",
(sustain * 0.8).yield;
}
});
r.play;
r.play;
)

sustain]);
sustain]);
sustain]);
sustain]);

More Related Content

What's hot

OSvの概要と実装
OSvの概要と実装OSvの概要と実装
OSvの概要と実装Takuya ASADA
 
ガチで聞く!ヤフーのOpenStackプライベート・クラウドの実態とは
ガチで聞く!ヤフーのOpenStackプライベート・クラウドの実態とはガチで聞く!ヤフーのOpenStackプライベート・クラウドの実態とは
ガチで聞く!ヤフーのOpenStackプライベート・クラウドの実態とはBrocade
 
Hybrid Public Key Encryption (HPKE)
Hybrid Public Key Encryption (HPKE)Hybrid Public Key Encryption (HPKE)
Hybrid Public Key Encryption (HPKE)Jun Kurihara
 
Automating OpenSCAP with Foreman
Automating OpenSCAP with ForemanAutomating OpenSCAP with Foreman
Automating OpenSCAP with Foremanszadok
 
CyberChefの使い方(HamaCTF2019 WriteUp編)
CyberChefの使い方(HamaCTF2019 WriteUp編)CyberChefの使い方(HamaCTF2019 WriteUp編)
CyberChefの使い方(HamaCTF2019 WriteUp編)Shota Shinogi
 
アニメーションとスキニングをBurstで独自実装する.pdf
アニメーションとスキニングをBurstで独自実装する.pdfアニメーションとスキニングをBurstで独自実装する.pdf
アニメーションとスキニングをBurstで独自実装する.pdfinfinite_loop
 
【Unity】 Behavior TreeでAIを作る
 【Unity】 Behavior TreeでAIを作る 【Unity】 Behavior TreeでAIを作る
【Unity】 Behavior TreeでAIを作るtorisoup
 
Goでかんたんソースコードの静的解析
Goでかんたんソースコードの静的解析Goでかんたんソースコードの静的解析
Goでかんたんソースコードの静的解析Takuya Ueda
 
Goでwebアプリを開発してみよう
Goでwebアプリを開発してみようGoでwebアプリを開発してみよう
Goでwebアプリを開発してみようTakuya Ueda
 
CDNの仕組み(JANOG36)
CDNの仕組み(JANOG36)CDNの仕組み(JANOG36)
CDNの仕組み(JANOG36)J-Stream Inc.
 
Fuchsia概略その1
Fuchsia概略その1Fuchsia概略その1
Fuchsia概略その1l_b__
 
分散システムについて語らせてくれ
分散システムについて語らせてくれ分散システムについて語らせてくれ
分散システムについて語らせてくれKumazaki Hiroki
 
VirtualBox と Rocky Linux 8 で始める Pacemaker ~ VirtualBox でも STONITH 機能が試せる! Vi...
VirtualBox と Rocky Linux 8 で始める Pacemaker  ~ VirtualBox でも STONITH 機能が試せる! Vi...VirtualBox と Rocky Linux 8 で始める Pacemaker  ~ VirtualBox でも STONITH 機能が試せる! Vi...
VirtualBox と Rocky Linux 8 で始める Pacemaker ~ VirtualBox でも STONITH 機能が試せる! Vi...ksk_ha
 
Lisperの見る世界
Lisperの見る世界Lisperの見る世界
Lisperの見る世界fukamachi
 
本当は恐ろしい分散システムの話
本当は恐ろしい分散システムの話本当は恐ろしい分散システムの話
本当は恐ろしい分散システムの話Kumazaki Hiroki
 
tcpdumpとtcpreplayとtcprewriteと他。
tcpdumpとtcpreplayとtcprewriteと他。tcpdumpとtcpreplayとtcprewriteと他。
tcpdumpとtcpreplayとtcprewriteと他。(^-^) togakushi
 
デジタルアートセミナー#2 openFrameworksで学ぶ、 クリエイティブ・コーディング Session 2: 構造をつくる
デジタルアートセミナー#2 openFrameworksで学ぶ、 クリエイティブ・コーディング Session 2: 構造をつくるデジタルアートセミナー#2 openFrameworksで学ぶ、 クリエイティブ・コーディング Session 2: 構造をつくる
デジタルアートセミナー#2 openFrameworksで学ぶ、 クリエイティブ・コーディング Session 2: 構造をつくるAtsushi Tadokoro
 
FridaによるAndroidアプリの動的解析とフッキングの基礎
FridaによるAndroidアプリの動的解析とフッキングの基礎FridaによるAndroidアプリの動的解析とフッキングの基礎
FridaによるAndroidアプリの動的解析とフッキングの基礎ken_kitahara
 

What's hot (20)

OSvの概要と実装
OSvの概要と実装OSvの概要と実装
OSvの概要と実装
 
ガチで聞く!ヤフーのOpenStackプライベート・クラウドの実態とは
ガチで聞く!ヤフーのOpenStackプライベート・クラウドの実態とはガチで聞く!ヤフーのOpenStackプライベート・クラウドの実態とは
ガチで聞く!ヤフーのOpenStackプライベート・クラウドの実態とは
 
Hybrid Public Key Encryption (HPKE)
Hybrid Public Key Encryption (HPKE)Hybrid Public Key Encryption (HPKE)
Hybrid Public Key Encryption (HPKE)
 
Automating OpenSCAP with Foreman
Automating OpenSCAP with ForemanAutomating OpenSCAP with Foreman
Automating OpenSCAP with Foreman
 
AS45679 on FreeBSD
AS45679 on FreeBSDAS45679 on FreeBSD
AS45679 on FreeBSD
 
CyberChefの使い方(HamaCTF2019 WriteUp編)
CyberChefの使い方(HamaCTF2019 WriteUp編)CyberChefの使い方(HamaCTF2019 WriteUp編)
CyberChefの使い方(HamaCTF2019 WriteUp編)
 
アニメーションとスキニングをBurstで独自実装する.pdf
アニメーションとスキニングをBurstで独自実装する.pdfアニメーションとスキニングをBurstで独自実装する.pdf
アニメーションとスキニングをBurstで独自実装する.pdf
 
【Unity】 Behavior TreeでAIを作る
 【Unity】 Behavior TreeでAIを作る 【Unity】 Behavior TreeでAIを作る
【Unity】 Behavior TreeでAIを作る
 
Goでかんたんソースコードの静的解析
Goでかんたんソースコードの静的解析Goでかんたんソースコードの静的解析
Goでかんたんソースコードの静的解析
 
Goでwebアプリを開発してみよう
Goでwebアプリを開発してみようGoでwebアプリを開発してみよう
Goでwebアプリを開発してみよう
 
CDNの仕組み(JANOG36)
CDNの仕組み(JANOG36)CDNの仕組み(JANOG36)
CDNの仕組み(JANOG36)
 
Fuchsia概略その1
Fuchsia概略その1Fuchsia概略その1
Fuchsia概略その1
 
分散システムについて語らせてくれ
分散システムについて語らせてくれ分散システムについて語らせてくれ
分散システムについて語らせてくれ
 
VirtualBox と Rocky Linux 8 で始める Pacemaker ~ VirtualBox でも STONITH 機能が試せる! Vi...
VirtualBox と Rocky Linux 8 で始める Pacemaker  ~ VirtualBox でも STONITH 機能が試せる! Vi...VirtualBox と Rocky Linux 8 で始める Pacemaker  ~ VirtualBox でも STONITH 機能が試せる! Vi...
VirtualBox と Rocky Linux 8 で始める Pacemaker ~ VirtualBox でも STONITH 機能が試せる! Vi...
 
自作GPUへの道
自作GPUへの道自作GPUへの道
自作GPUへの道
 
Lisperの見る世界
Lisperの見る世界Lisperの見る世界
Lisperの見る世界
 
本当は恐ろしい分散システムの話
本当は恐ろしい分散システムの話本当は恐ろしい分散システムの話
本当は恐ろしい分散システムの話
 
tcpdumpとtcpreplayとtcprewriteと他。
tcpdumpとtcpreplayとtcprewriteと他。tcpdumpとtcpreplayとtcprewriteと他。
tcpdumpとtcpreplayとtcprewriteと他。
 
デジタルアートセミナー#2 openFrameworksで学ぶ、 クリエイティブ・コーディング Session 2: 構造をつくる
デジタルアートセミナー#2 openFrameworksで学ぶ、 クリエイティブ・コーディング Session 2: 構造をつくるデジタルアートセミナー#2 openFrameworksで学ぶ、 クリエイティブ・コーディング Session 2: 構造をつくる
デジタルアートセミナー#2 openFrameworksで学ぶ、 クリエイティブ・コーディング Session 2: 構造をつくる
 
FridaによるAndroidアプリの動的解析とフッキングの基礎
FridaによるAndroidアプリの動的解析とフッキングの基礎FridaによるAndroidアプリの動的解析とフッキングの基礎
FridaによるAndroidアプリの動的解析とフッキングの基礎
 

More from Atsushi Tadokoro

「クリエイティブ・ミュージック・コーディング」- オーディオ・ビジュアル作品のための、オープンソースなソフトウエア・フレームワークの現状と展望
「クリエイティブ・ミュージック・コーディング」- オーディオ・ビジュアル作品のための、オープンソースなソフトウエア・フレームワークの現状と展望「クリエイティブ・ミュージック・コーディング」- オーディオ・ビジュアル作品のための、オープンソースなソフトウエア・フレームワークの現状と展望
「クリエイティブ・ミュージック・コーディング」- オーディオ・ビジュアル作品のための、オープンソースなソフトウエア・フレームワークの現状と展望Atsushi Tadokoro
 
プログラム初級講座 - メディア芸術をはじめよう
プログラム初級講座 - メディア芸術をはじめようプログラム初級講座 - メディア芸術をはじめよう
プログラム初級講座 - メディア芸術をはじめようAtsushi Tadokoro
 
Interactive Music II ProcessingとSuperColliderの連携 -2
Interactive Music II ProcessingとSuperColliderの連携 -2Interactive Music II ProcessingとSuperColliderの連携 -2
Interactive Music II ProcessingとSuperColliderの連携 -2Atsushi Tadokoro
 
coma Creators session vol.2
coma Creators session vol.2coma Creators session vol.2
coma Creators session vol.2Atsushi Tadokoro
 
Interactive Music II ProcessingとSuperColliderの連携1
Interactive Music II ProcessingとSuperColliderの連携1Interactive Music II ProcessingとSuperColliderの連携1
Interactive Music II ProcessingとSuperColliderの連携1Atsushi Tadokoro
 
Interactive Music II Processingによるアニメーション
Interactive Music II ProcessingによるアニメーションInteractive Music II Processingによるアニメーション
Interactive Music II ProcessingによるアニメーションAtsushi Tadokoro
 
Interactive Music II Processing基本
Interactive Music II Processing基本Interactive Music II Processing基本
Interactive Music II Processing基本Atsushi Tadokoro
 
Interactive Music II SuperCollider応用 2 - SuperColliderとPure Dataの連携
Interactive Music II SuperCollider応用 2 - SuperColliderとPure Dataの連携Interactive Music II SuperCollider応用 2 - SuperColliderとPure Dataの連携
Interactive Music II SuperCollider応用 2 - SuperColliderとPure Dataの連携Atsushi Tadokoro
 
Media Art II openFrameworks アプリ間の通信とタンジブルなインターフェイス
Media Art II openFrameworks  アプリ間の通信とタンジブルなインターフェイス Media Art II openFrameworks  アプリ間の通信とタンジブルなインターフェイス
Media Art II openFrameworks アプリ間の通信とタンジブルなインターフェイス Atsushi Tadokoro
 
iTamabi 13 ARTSAT API 実践 5 - 衛星の軌道を描く
iTamabi 13 ARTSAT API 実践 5 - 衛星の軌道を描くiTamabi 13 ARTSAT API 実践 5 - 衛星の軌道を描く
iTamabi 13 ARTSAT API 実践 5 - 衛星の軌道を描くAtsushi Tadokoro
 
メディア芸術基礎 II 第11回:HTML5実践 表現のための様々なJavaScriptライブラリ
メディア芸術基礎 II 第11回:HTML5実践 表現のための様々なJavaScriptライブラリメディア芸術基礎 II 第11回:HTML5実践 表現のための様々なJavaScriptライブラリ
メディア芸術基礎 II 第11回:HTML5実践 表現のための様々なJavaScriptライブラリAtsushi Tadokoro
 
芸術情報演習デザイン(Web) 第8回: CSSフレームワークを使う
芸術情報演習デザイン(Web)  第8回: CSSフレームワークを使う芸術情報演習デザイン(Web)  第8回: CSSフレームワークを使う
芸術情報演習デザイン(Web) 第8回: CSSフレームワークを使うAtsushi Tadokoro
 
Interactive Music II SuperCollider応用 JITLib - ライブコーディング 2
Interactive Music II SuperCollider応用 JITLib - ライブコーディング 2Interactive Music II SuperCollider応用 JITLib - ライブコーディング 2
Interactive Music II SuperCollider応用 JITLib - ライブコーディング 2Atsushi Tadokoro
 
iTamabi 13 第9回:ARTSAT API 実践 3 ジオコーディングで衛星の位置を取得
iTamabi 13 第9回:ARTSAT API 実践 3 ジオコーディングで衛星の位置を取得iTamabi 13 第9回:ARTSAT API 実践 3 ジオコーディングで衛星の位置を取得
iTamabi 13 第9回:ARTSAT API 実践 3 ジオコーディングで衛星の位置を取得Atsushi Tadokoro
 
Webデザイン 第10回:HTML5実践 Three.jsで3Dプログラミング
Webデザイン 第10回:HTML5実践 Three.jsで3DプログラミングWebデザイン 第10回:HTML5実践 Three.jsで3Dプログラミング
Webデザイン 第10回:HTML5実践 Three.jsで3DプログラミングAtsushi Tadokoro
 
Interactive Music II SuperCollider応用 JITLib - ライブコーディング 1
Interactive Music II SuperCollider応用 JITLib - ライブコーディング 1Interactive Music II SuperCollider応用 JITLib - ライブコーディング 1
Interactive Music II SuperCollider応用 JITLib - ライブコーディング 1Atsushi Tadokoro
 
iTamabi 13 第8回:ARTSAT API 実践 2 衛星アプリを企画する
iTamabi 13 第8回:ARTSAT API 実践 2 衛星アプリを企画するiTamabi 13 第8回:ARTSAT API 実践 2 衛星アプリを企画する
iTamabi 13 第8回:ARTSAT API 実践 2 衛星アプリを企画するAtsushi Tadokoro
 
Media Art II openFrameworks 複数のシーンの管理・切替え
Media Art II openFrameworks 複数のシーンの管理・切替えMedia Art II openFrameworks 複数のシーンの管理・切替え
Media Art II openFrameworks 複数のシーンの管理・切替えAtsushi Tadokoro
 
Interactive Music II SuperCollider実習 オリジナルの楽器を作ろう!
Interactive Music II SuperCollider実習  オリジナルの楽器を作ろう!Interactive Music II SuperCollider実習  オリジナルの楽器を作ろう!
Interactive Music II SuperCollider実習 オリジナルの楽器を作ろう!Atsushi Tadokoro
 

More from Atsushi Tadokoro (20)

「クリエイティブ・ミュージック・コーディング」- オーディオ・ビジュアル作品のための、オープンソースなソフトウエア・フレームワークの現状と展望
「クリエイティブ・ミュージック・コーディング」- オーディオ・ビジュアル作品のための、オープンソースなソフトウエア・フレームワークの現状と展望「クリエイティブ・ミュージック・コーディング」- オーディオ・ビジュアル作品のための、オープンソースなソフトウエア・フレームワークの現状と展望
「クリエイティブ・ミュージック・コーディング」- オーディオ・ビジュアル作品のための、オープンソースなソフトウエア・フレームワークの現状と展望
 
プログラム初級講座 - メディア芸術をはじめよう
プログラム初級講座 - メディア芸術をはじめようプログラム初級講座 - メディア芸術をはじめよう
プログラム初級講座 - メディア芸術をはじめよう
 
Interactive Music II ProcessingとSuperColliderの連携 -2
Interactive Music II ProcessingとSuperColliderの連携 -2Interactive Music II ProcessingとSuperColliderの連携 -2
Interactive Music II ProcessingとSuperColliderの連携 -2
 
coma Creators session vol.2
coma Creators session vol.2coma Creators session vol.2
coma Creators session vol.2
 
Interactive Music II ProcessingとSuperColliderの連携1
Interactive Music II ProcessingとSuperColliderの連携1Interactive Music II ProcessingとSuperColliderの連携1
Interactive Music II ProcessingとSuperColliderの連携1
 
Interactive Music II Processingによるアニメーション
Interactive Music II ProcessingによるアニメーションInteractive Music II Processingによるアニメーション
Interactive Music II Processingによるアニメーション
 
Interactive Music II Processing基本
Interactive Music II Processing基本Interactive Music II Processing基本
Interactive Music II Processing基本
 
Interactive Music II SuperCollider応用 2 - SuperColliderとPure Dataの連携
Interactive Music II SuperCollider応用 2 - SuperColliderとPure Dataの連携Interactive Music II SuperCollider応用 2 - SuperColliderとPure Dataの連携
Interactive Music II SuperCollider応用 2 - SuperColliderとPure Dataの連携
 
Media Art II openFrameworks アプリ間の通信とタンジブルなインターフェイス
Media Art II openFrameworks  アプリ間の通信とタンジブルなインターフェイス Media Art II openFrameworks  アプリ間の通信とタンジブルなインターフェイス
Media Art II openFrameworks アプリ間の通信とタンジブルなインターフェイス
 
iTamabi 13 ARTSAT API 実践 5 - 衛星の軌道を描く
iTamabi 13 ARTSAT API 実践 5 - 衛星の軌道を描くiTamabi 13 ARTSAT API 実践 5 - 衛星の軌道を描く
iTamabi 13 ARTSAT API 実践 5 - 衛星の軌道を描く
 
メディア芸術基礎 II 第11回:HTML5実践 表現のための様々なJavaScriptライブラリ
メディア芸術基礎 II 第11回:HTML5実践 表現のための様々なJavaScriptライブラリメディア芸術基礎 II 第11回:HTML5実践 表現のための様々なJavaScriptライブラリ
メディア芸術基礎 II 第11回:HTML5実践 表現のための様々なJavaScriptライブラリ
 
芸術情報演習デザイン(Web) 第8回: CSSフレームワークを使う
芸術情報演習デザイン(Web)  第8回: CSSフレームワークを使う芸術情報演習デザイン(Web)  第8回: CSSフレームワークを使う
芸術情報演習デザイン(Web) 第8回: CSSフレームワークを使う
 
Interactive Music II SuperCollider応用 JITLib - ライブコーディング 2
Interactive Music II SuperCollider応用 JITLib - ライブコーディング 2Interactive Music II SuperCollider応用 JITLib - ライブコーディング 2
Interactive Music II SuperCollider応用 JITLib - ライブコーディング 2
 
iTamabi 13 第9回:ARTSAT API 実践 3 ジオコーディングで衛星の位置を取得
iTamabi 13 第9回:ARTSAT API 実践 3 ジオコーディングで衛星の位置を取得iTamabi 13 第9回:ARTSAT API 実践 3 ジオコーディングで衛星の位置を取得
iTamabi 13 第9回:ARTSAT API 実践 3 ジオコーディングで衛星の位置を取得
 
Tamabi media131118
Tamabi media131118Tamabi media131118
Tamabi media131118
 
Webデザイン 第10回:HTML5実践 Three.jsで3Dプログラミング
Webデザイン 第10回:HTML5実践 Three.jsで3DプログラミングWebデザイン 第10回:HTML5実践 Three.jsで3Dプログラミング
Webデザイン 第10回:HTML5実践 Three.jsで3Dプログラミング
 
Interactive Music II SuperCollider応用 JITLib - ライブコーディング 1
Interactive Music II SuperCollider応用 JITLib - ライブコーディング 1Interactive Music II SuperCollider応用 JITLib - ライブコーディング 1
Interactive Music II SuperCollider応用 JITLib - ライブコーディング 1
 
iTamabi 13 第8回:ARTSAT API 実践 2 衛星アプリを企画する
iTamabi 13 第8回:ARTSAT API 実践 2 衛星アプリを企画するiTamabi 13 第8回:ARTSAT API 実践 2 衛星アプリを企画する
iTamabi 13 第8回:ARTSAT API 実践 2 衛星アプリを企画する
 
Media Art II openFrameworks 複数のシーンの管理・切替え
Media Art II openFrameworks 複数のシーンの管理・切替えMedia Art II openFrameworks 複数のシーンの管理・切替え
Media Art II openFrameworks 複数のシーンの管理・切替え
 
Interactive Music II SuperCollider実習 オリジナルの楽器を作ろう!
Interactive Music II SuperCollider実習  オリジナルの楽器を作ろう!Interactive Music II SuperCollider実習  オリジナルの楽器を作ろう!
Interactive Music II SuperCollider実習 オリジナルの楽器を作ろう!
 

Recently uploaded

Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介Yuma Ohgami
 
Postman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By DanielPostman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By Danieldanielhu54
 
論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNetToru Tamaki
 
TSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdfTSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdftaisei2219
 
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...Toru Tamaki
 
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)Hiroki Ichikura
 
論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A surveyToru Tamaki
 
SOPを理解する 2024/04/19 の勉強会で発表されたものです
SOPを理解する       2024/04/19 の勉強会で発表されたものですSOPを理解する       2024/04/19 の勉強会で発表されたものです
SOPを理解する 2024/04/19 の勉強会で発表されたものですiPride Co., Ltd.
 
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略Ryo Sasaki
 
スマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システムスマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システムsugiuralab
 

Recently uploaded (10)

Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
 
Postman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By DanielPostman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By Daniel
 
論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet
 
TSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdfTSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdf
 
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
 
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
 
論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey
 
SOPを理解する 2024/04/19 の勉強会で発表されたものです
SOPを理解する       2024/04/19 の勉強会で発表されたものですSOPを理解する       2024/04/19 の勉強会で発表されたものです
SOPを理解する 2024/04/19 の勉強会で発表されたものです
 
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
 
スマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システムスマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システム
 

Interactive Music II SuperCollider入門 5 時間構造をつくる

  • 1. Interactive Music II SuperCollider入門 5 時間構造をつくる 2013年10月31日 東京藝術大学芸術情報センター(AMC) 田所 淳
  • 2. 今日の内容 ‣ 時間構造をつくる ! ‣ エンベロープ(Envelope): 音量の時間的な変化 ‣ EnvGen, Env ! ‣ スケジューリング ‣ Rutine
  • 3. SuperColliderにおける時間構造 ‣ ここまでは、プログラムした単体の音を鳴らすだけだった ‣ 音楽、音響作品にしていくには、音を時間構造の中で配置して いかなくてはならない ! ‣ SuperColliderでの時間構造のとらえ方 ‣ シーケンサーや、DAW(ProToolsなど)などの時間の考え方とは 異なる ‣ ロジックによる時間構造の構築 (←→ タイムライン) ‣ 時間の流れは一つとは限らない
  • 5. エンベロープ (Envelope) ‣ 音の3要素: 音高、音量、音色 ! ‣ しかし、それ意外にも重要な要素がある ‣ 音の時間的な変化 → エンベロープ ! ‣ 同じ音色でも、そのエンベロープが異なると違うキャラクター の音になる
  • 7. エンベロープ (Envelope) ‣ ADSR (Attack - Decay - Sustain - Release)
  • 8. エンベロープ (Envelope) ‣ SuperColliderで、エンベロープを使用してみる ! ‣ Env と EnvGen を使用する ‣ Env - エンベロープの形態を定義 ‣ EnvGen - Envで生成した形態で信号を生成
  • 9. エンベロープ (Envelope) ‣ エンベロープ 1 - Env.linen // Env.linen - アタック、サステイン、リリース、レベルで指定 Env.linen(0.05, 0.2, 0.5, 0.7).plot; ! { var env = Env.linen(0.05, 0.1, 0.5); SinOsc.ar(440) * EnvGen.kr(env, doneAction: 2) }.play
  • 10. エンベロープ (Envelope) ‣ エンベロープ 2 - Env.perc // Env.perk - パーカッシブなエンベロープ Env.perc(0.01, 2.0).plot; ( { var env = Env.perc(0.01, 2.0); SinOsc.ar(440) * EnvGen.kr(env, doneAction: 2) }.play )
  • 11. エンベロープ (Envelope) ‣ エンベロープ 3 - Env.triangle // Env.triangle - 三角形のエンベロープ Env.triangle(1, 1).plot; ( { var env = Env.triangle(1, 1); SinOsc.ar(440) * EnvGen.kr(env, doneAction: 2) }.play )
  • 12. エンベロープ (Envelope) ‣ エンベロープ 3 - Env.sine // Env.sine - ハニング窓 Env.sine(1, 1).plot; ( { var env = Env.sine(1, 1); SinOsc.ar(440) * EnvGen.kr(env, doneAction: 2) }.play )
  • 13. エンベロープ (Envelope) ‣ エンベロープ 4 - Env.new // Env.new - 完全に自由なエンベロープ生成 // レベルの配列と、時間の配列で指定 Env.new([0, 1, 0.9, 0], [0.1, 0.5, 1],[-5, 0, -5]).plot; ( { var env = Env.new([0, 1, 0.9, 0], [0.1, 0.5, 1],[-5, 0, -5]); SinOsc.ar(440) * EnvGen.kr(env, doneAction: 2) }.play )
  • 14. エンベロープ (Envelope) ‣ EnvGenで指定されている doneAction:2 とは? ‣ エンベロープが終了した後に、するてつづき ‣ 1∼14まで規定されている
  • 15. エンベロープ (Envelope) ‣ doneAction ! 0. do nothing when the UGen is finished 1. pause the enclosing synth, but do not free it 2. free the enclosing synth 3. free both this synth and the preceding node 4. free both this synth and the following node 5. free this synth; if the preceding node is a group then do g_freeAll on it, else free it 6. free this synth; if the following node is a group then do g_freeAll on it, else free it 7. free this synth and all preceding nodes in this group 8. free this synth and all following nodes in this group 9. free this synth and pause the preceding node 10. free this synth and pause the following node 11. free this synth and if the preceding node is a group then do g_deepFree on it, else free it 12. free this synth and if the following node is a group then do g_deepFree on it, else free it 13. free this synth and all other nodes in this group (before and after) 14. free the enclosing group and all nodes within it (including this synth)
  • 16. エンベロープ (Envelope) ‣ doneAction ! 0. do nothing when the UGen is finished 1. pause the enclosing synth, but do not free it 2. free the enclosing synth → Synthを終了して開放 3. free both this synth and the preceding node 4. free both this synth and the following node 5. free this synth; if the preceding node is a group then do g_freeAll on it, else free it 6. free this synth; if the following node is a group then do g_freeAll on it, else free it 7. free this synth and all preceding nodes in this group 8. free this synth and all following nodes in this group 9. free this synth and pause the preceding node 10. free this synth and pause the following node 11. free this synth and if the preceding node is a group then do g_deepFree on it, else free it 12. free this synth and if the following node is a group then do g_deepFree on it, else free it 13. free this synth and all other nodes in this group (before and after) 14. free the enclosing group and all nodes within it (including this synth)
  • 18. スケジューリング (Scheduling) ‣ 音楽は時間の中で展開される ‣ どのタイミングで何を行うかを、細かくコントロールする必要 がある
  • 19. スケジューリング (Scheduling) ‣ Routine - ルーチン ‣ データ処理のアクション ‣ 必要なパラメータを設定し、スリープする(次のタイミングを 待つ) ‣ 他のコンピュータ言語でいうThread (スレッド) のようなもの
  • 20. スケジューリング (Scheduling) ‣ Routine基本 // ! Routineをスケジューリング- 1 Routine({ ! 12.do{ ! arg i; // カウンタ変数 ! "Count = ".post; i.postln; // カウンタ出力 1.yield; // 1秒待つ ! } }).play; ! ! ‣ 実行してみる ‣ Post windowに何が表示されるか?
  • 21. スケジューリング (Scheduling) ‣ Routine - 実行結果 Count ! Count Count ! Count Count ! Count Count ! Count Count ! Count Count ! Count ! = = = = = = = = = = = = 0 1 2 3 4 5 6 7 8 9 10 11 ‣ 1秒おきに、カウントアップする
  • 22. スケジューリング (Scheduling) ‣ Routine応用 - ランダムな時間で生成 // Routineをスケジューリング - 2 r = Routine({ //待ち時間を記録する変数 var delta; 12.do { //待ち時間、1∼5秒をランダムに生成 delta = rrand(1,5); //メッセージを出力 "Will wait ".post; delta.postln; //1∼5秒待つ delta.yield; } }).play;
  • 23. スケジューリング (Scheduling) ‣ Routineを使用して、シーケンスパターンを生成してみる ‣ まずは、エンベロープ付きのSin波の楽器を定義 ‣ 定義した楽器を、Routineでくりかえし実行する
  • 24. スケジューリング (Scheduling) ‣ Routine実験用のSynth singrain を定義 // Routine実験用、Synth "singrain" ( SynthDef("singrain", { arg freq = 440, amp = 0.2, sustain = 1; var env, sig; env = EnvGen.kr(Env.perc(0.01, sustain), doneAction: 2); sig = SinOsc.ar([freq, freq * 1.01], 0, amp) * env; Out.ar(0, sig); }).add; )
  • 25. スケジューリング (Scheduling) ‣ Routineによるシーケンス1 - 反復 //反復して演奏 ( Routine({ loop{ Synth("singrain"); 1.yield; } }).play; )
  • 26. スケジューリング (Scheduling) ‣ Routineによるシーケンス2 - 等比的に上昇 //等比的に上昇 ( Routine({ var freq; 24.do{ arg i; freq = i * 1.5 * 55; Synth("singrain", ["freq", freq]); 0.2.yield; } }).play; )
  • 27. スケジューリング (Scheduling) ‣ Routineによるシーケンス3 - 12音階をランダムに //12音階をランダムに ( Routine({ var freq; loop{ freq = [60,61,62,63,64,65,66,67,68,69,70,71].choose.midicps; Synth("singrain", ["freq", freq]); 0.5.yield; } }).play; )
  • 28. スケジューリング (Scheduling) ‣ Routineによるシーケンス4 - 音程、長さ、音量をランダムに //音程、長さ、音量をランダムに ( Routine({ var freq, amp, sustain; loop{ freq = [60,61,62,63,64,65,66,67,68,69,70,71].choose.midicps; amp = exprand(0.1, 0.5); sustain = rrand(1, 4) * 0.5; Synth("singrain", ["freq", freq, "amp", amp, "sustain", sustain]); (sustain * 0.8).yield; } }).play; )
  • 29. スケジューリング (Scheduling) ‣ Routineによるシーケンス5 - 2つの音程 //2つの音程 ( Routine({ var freq1, freq2, amp, sustain; loop{ freq1 = [60,61,62,63,64,65,66,67,68,69,70,71].choose.midicps; freq2 = [60,61,62,63,64,65,66,67,68,69,70,71].choose.midicps; amp = exprand(0.1, 0.3); sustain = rrand(1, 4) * 0.5; Synth("singrain", ["freq", freq1, "amp", amp, "sustain", sustain]); Synth("singrain", ["freq", freq2, "amp", amp, "sustain", sustain]); (sustain * 0.8).yield; } }).play; )
  • 30. スケジューリング (Scheduling) ‣ Routineによるシーケンス6 - 2つの音程(2) //2つの音程 - 2 ( Routine({ var freq1, freq2, amp, sustain; loop{ freq1 = [60,61,62,63,64,65,66,67,68,69,70,71].choose.midicps; freq2 = freq1 * [1.0/1.0, 2.0/1.0, 3.0/2.0, 4.0/3.0, 5.0/4.0].choose; amp = exprand(0.1, 0.3); sustain = rrand(1, 4) * 0.5; Synth("singrain", ["freq", freq1, "amp", amp, "sustain", sustain]); Synth("singrain", ["freq", freq2, "amp", amp, "sustain", sustain]); (sustain * 0.8).yield; } }).play; )
  • 31. スケジューリング (Scheduling) ‣ Routineによるシーケンス7 - 4つの音程 //4つの音程 ( Routine({ var note1, note2, note3, note4, amp, sustain; loop{ note1 = [60,61,62,63,64,65,66,67,68,69,70,71].choose; note2 = note1 + [0, 2, 4, 5, 7, 9].choose - [0, 12].choose; note3 = note1 + [0, 2, 4, 5, 7, 9].choose - [0, 12].choose; note4 = note1 + [0, 2, 4, 5, 7, 9].choose - [0, 12].choose; amp = exprand(0.05, 0.2); sustain = rrand(1, 8); Synth("singrain", ["freq", note1.midicps, "amp", amp, "sustain", Synth("singrain", ["freq", note2.midicps, "amp", amp, "sustain", Synth("singrain", ["freq", note3.midicps, "amp", amp, "sustain", Synth("singrain", ["freq", note4.midicps, "amp", amp, "sustain", (sustain * 0.8).yield; } }).play; ) sustain]); sustain]); sustain]); sustain]);
  • 32. スケジューリング (Scheduling) ‣ Routineによるシーケンス7 - 4つの音程2 //4つの音程2 ( Routine({ var note1, note2, note3, note4, amp, sustain; loop{ note1 = [60,61,62,63,64,65,66,67,68,69,70,71].choose; note2 = note1 + [0, 5, 7].choose - [0, 12].choose; note3 = note2 + [0, 5, 7].choose - [0, 12].choose; note4 = note3 + [0, 5, 7].choose - [0, 12].choose; amp = exprand(0.1, 0.2); sustain = rrand(1, 8); Synth("singrain", ["freq", note1.midicps, "amp", amp, Synth("singrain", ["freq", note2.midicps, "amp", amp, Synth("singrain", ["freq", note3.midicps, "amp", amp, Synth("singrain", ["freq", note4.midicps, "amp", amp, (sustain * 0.8).yield; } }).play; ) "sustain", "sustain", "sustain", "sustain", sustain]); sustain]); sustain]); sustain]);
  • 33. スケジューリング (Scheduling) ‣ Routineによるシーケンス8 - 4つの音程 x 2 //4つの音程 x 2 ( r = Routine({ var note1, note2, note3, note4, amp, sustain; loop{ note1 = [60,61,62,63,64,65,66,67,68,69,70,71].choose; note2 = note1 + [0, 5, 7].choose - [0, 12, 24].choose; note3 = note2 + [0, 5, 7].choose - [0, 12, 24].choose; note4 = note3 + [0, 5, 7].choose - [0, 12, 24].choose; amp = exprand(0.05, 0.1); sustain = rrand(1, 8); Synth("singrain", ["freq", note1.midicps, "amp", amp, "sustain", Synth("singrain", ["freq", note2.midicps, "amp", amp, "sustain", Synth("singrain", ["freq", note3.midicps, "amp", amp, "sustain", Synth("singrain", ["freq", note4.midicps, "amp", amp, "sustain", (sustain * 0.8).yield; } }); r.play; r.play; ) sustain]); sustain]); sustain]); sustain]);