Skip to content

Instantly share code, notes, and snippets.

@yotamorimoto
Last active July 28, 2021 11:15
Show Gist options
  • Select an option

  • Save yotamorimoto/2331990 to your computer and use it in GitHub Desktop.

Select an option

Save yotamorimoto/2331990 to your computer and use it in GitHub Desktop.
Ppar
(
// これまで作ったリズム隊のパターンを再定義します
// シンセ定義は以前のものを使う
~hatA = Pbind(\instrument, \hat,
\dur, Pn(0.25, 4 * 4 * 8), // 注1
\amp, Pseq([0.4, 0.2, 0.3, 0.2], inf),
\pan, -0.5
);
~snrA = Pbind(\instrument, \snr,
\dur, Pseq([
Pseq([1, 1, 1, 1], 7),
Pseq([1, 1, 0.5, Pn(0.25, 4), 0.5], 1)
], 1),
\degree, Pseq([
Pseq([\, 1, \, 1], 7), // 注2
Pseq([\, 1, \, Pn(1, 4), 1], 1)
], 1)
);
~kikA = Pbind(\instrument, \kik,
\dur, Pn(1, 4 * 8),
\amp, 0.8,
\freq, 50
);
~bssA = Pbind(\instrument, \bss,
\dur, Pseq([
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),
\legato, 0.7,
\amp, 0.5,
\scale, [2, 4, 5, 7, 9, 10, 12],
\degree, Pseq([
Pseq([1, 2, 3, 1, 7, 3, 6, \, 5, 4, 6, 5], 1) - 1,
Pseq([1, 2, 3, 1, 7, 3, 6, 6, 6, 6, 5], 1) - 1
], inf),
\octave, Pseq([
Pseq([3, 3, 3, 3, 2, 3, 2, 2, 2, 2, 2, 2], 1),
Pseq([3, 3, 3, 3, 2, 3, 2, 2, 2, 2, 2], 1)
], inf)
);
)
Ppar をパターンのパラレル化に使う
Ppar([~hatA, ~snrA, ~kikA, ~prcA, ~bssA]).play;
注1: Pn(値、繰返し)
注2:スネアには degree はありませんが、休符を表現するため使っています
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment