スケール、チューニング。
ScaleやTuningクラスには豊富なメソッドが用意されていて、簡単にスケールやチューニングを変えられるのは、SCの大きな特徴のひとつだと思っていたけれど、あまり有名な話しではないのかな…
s.boot;
(
// シンプルなサイン波の音色を定義
SynthDef(”simpleSine”,
{arg freq=400, out=0, releaseT=0.3, amp=0.8;
var source;
source = SinOsc.ar(freq) * EnvGen.ar(Env.perc(0.0001, releaseT, 1, -6), doneAction:2) * amp;
Out.ar(out, source);
}).store;
)
////////////////////////////////////////////
// スケールは、Scaleクラス
////////////////////////////////////////////
(// 通常の12平均律、長音階
Pbind(
\instrument,\simpleSine,
\degree, Pseq([0,1,2,3,4,5,6,7],inf),
\scale, Scale.major,
\dur, 0.5,
\octave, 6,
\root, 0
).play;
)
(
// 通常の12平均律、普通の自然的短音階
Pbind(
\instrument,\simpleSine,
\degree, Pseq([0,1,2,3,4,5,6,7],inf),
\scale, Scale.minor,
\dur, 0.5,
\octave, 6,
\root, 0
).play;
)
////////////////////////////////////////////
// チューニングは、Tunignクラス
////////////////////////////////////////////
// Tuningの違いが聞き取りづらいので、
// 2つのパターンを同時に動作させている。
(
// 同じパターン
Pbind(
\instrument,\simpleSine,
\degree, Pseq([0,1,2,3,4,5,6,7],inf),
\scale, Scale.major,
\dur, 0.5,
\octave, 6,
\root, 0
).play;
Pbind(
\instrument,\simpleSine,
\degree, Pseq([0,1,2,3,4,5,6,7],inf),
\scale, Scale.major,
\dur, 0.5,
\octave, 6,
\root, 0
).play;
)
////////////////////////////////////////////
(
// ひとつのパターンをヴェルクマイスターチューニングにする。
// ずれが聴こえる。
t = Tuning.werckmeister;
~scale = Scale.major(t);
Pbind(
\instrument,\simpleSine,
\degree, Pseq([0,1,2,3,4,5,6,7],inf),
\scale, ~scale,
\dur, 0.5,
\octave, 6,
\root, 0
).play;
Pbind(
\instrument,\simpleSine,
\degree, Pseq([0,1,2,3,4,5,6,7],inf),
\scale, Scale.major,
\dur, 0.5,
\octave, 6,
\root, 0
).play;
)
////////////////////////////////////////////
沢山のスケールやチューニング用のメソッドが用意されているので、
下記を参照する。
// cmd-J to see scale and tuning dictionaries in full
ScaleInfo
TuningInfo
Posted: 3月 30th, 2010 under SCしつもん箱, 日々のSC.
Comments: none

