Last active
July 28, 2021 11:20
-
-
Save yotamorimoto/2331737 to your computer and use it in GitHub Desktop.
bass
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ベース作りと音階、音度、オクターブについて | |
| 倍音成分が豊かな「ノコギリ波」をフィルタリングしてつくる | |
| ( | |
| // 引数 freq, gate を準備 | |
| SynthDef(\bss, { |gate=1, amp=0.1, sustain=1, freq=440| | |
| var sig, env; | |
| env = EnvGen.kr(Env.adsr, gate, amp, 0, sustain, 2); | |
| // 2つのノコギリ波をmixし少し歪みを加える | |
| sig = Mix(Saw.ar([freq,freq+0.1])).tanh; | |
| sig = RLPF.ar(sig, 1000, 0.8); | |
| sig = Pan2.ar(sig, 0, env); | |
| Out.ar(0, sig); | |
| }).add; | |
| ) | |
| 注: Env.adsr は gate の開け閉め(1/0)が必要 | |
| gate が空いている間は音が持続し、閉まると減衰、リリースされる | |
| gate の開閉は Pbind 側で適宜行われる | |
| ライディーンのセクション1のベースフレーズ | |
| ( | |
| ~bssA = Pbind(\instrument, \bss, | |
| \dur, Pseq([// 注1:入れ子状 | |
| Pseq([1.5, 1.5, 1.5, 1.5, 1, 1, 2, 0.5, 1, 2.5, 1, 1], 1), | |
| Pseq([1.5, 1.5, 1.5, 1.5, 1, 1, 2, 2, 2, 1, 1], 1), | |
| ], 1),// 注2:有限パターン(1回のみ) | |
| \legato, 0.7, | |
| \amp, 0.6, | |
| \scale, [2, 4, 5, 7, 9, 10, 12], // 注3:レ、ミ、ファ、ソ、ラ、シb、ド | |
| \degree, Pseq([ | |
| Pseq([0, 1, 2, 0, 6, 2, 5, \, 4, 3, 5, 4], 1),// 注4:ゼロ度始まり | |
| Pseq([0, 1, 2, 0, 6, 2, 5, 5, 5, 5, 4], 1) | |
| ], inf), | |
| \octave, Pseq([ | |
| Pseq([3, 3, 3, 3, 2, 3, 2, 2, 2, 2, 2, 2], 1),// 注5 | |
| Pseq([3, 3, 3, 3, 2, 3, 2, 2, 2, 2, 2], 1) | |
| ], inf) | |
| ).play; | |
| ) | |
| 注1:有限パターンがあるとそのパターンの終了で全体が止まる | |
| 注2:パターンは入れ子状にできる | |
| 注3: scale に音階を渡す(0がド、半音増えるごとに1増える) | |
| デフォルトは [0, 2, 4, 5, 7, 9, 11] = ドレミファソラシ | |
| 注4: degree は音度(音階の何番目の音かを表す) | |
| 西洋音楽理論では1度が主音 | |
| SC では0度が主音 | |
| \ (バックスラッシュ)は degree, octave, freq などの中では「休符」として定義されている | |
| 注5:オクターブの5が中央ド | |
| scale, degree, octave などのキーワードから計算された周波数が最後に freq 引数へ渡される | |
| Pbind をキーワード instrument なしで実行すると仮のシンセサイザーがなる | |
| Pbind(\octave, 5).play;//中央ド | |
| 実践 | |
| 音階をつくり、鳴らす | |
| 例 | |
| 五音音階や全音音階など |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment