Skip to content

Instantly share code, notes, and snippets.

@ALOUT
Last active August 29, 2015 14:02
Show Gist options
  • Save ALOUT/6f7e7d9edc4859c2361b to your computer and use it in GitHub Desktop.
Save ALOUT/6f7e7d9edc4859c2361b to your computer and use it in GitHub Desktop.
ピアノパターン #01
(
SynthDef(\mdapiano1, { |out=0, freq=440, gate=1|
var son = MdaPiano.ar(freq, gate, release: 0.9, stereo: 0.3, sustain: 0);
DetectSilence.ar(son, 0.01, doneAction:2);
Out.ar(out, son * 0.1);
}).add;
)
TempoClock.default.tempo = 0.8;
(
Pdef(\a).quant = 8;
Pdef(\b).quant = 8;
Pdef(\c).quant = 8;
Pdef(\a, Pbind(
\instrument, \mdapiano1,
\scale, Scale.major,
\octave, Prand([3,4,4,3],inf),
\degree, Prand([[1,3,5], 3,1,[4,7,11], 1,3,[1,3,5], 1],inf),
\amp, Pseq([0.5,0.2,0.3,0.1],inf),
\gate, Pseq([0.5,0.7,0.2,0.6],inf),
\cutoff, Prand([30,100,10,200,150,300,10,200],inf),
\resonance, Pseq([3.5,1.7,3.8,2.6],inf),
\strum, Prand([0.75,0,0.125],inf) ,
\room, 20000,
\vel, Pwhite(50, 100, inf),
\legato, 0.95,
\sustain, 0.8,
\dur,1/8
)
).play;
Pdef(\b, Pbind(
\instrument, \mdapiano1,
\scale, Scale.major,
\octave, Prand([2,4,2,3],inf),
\degree, Prand([[1,3,5], 3,1,[4,7,11], 1,3,[1,3,5], 1],inf),
\amp, Pseq([0.5,0.2,0.3,0.1],inf),
\gate, Pseq([0.5,0.7,0.2,0.6],inf),
\cutoff, Prand([30,100,10,200,150,300,10,200],inf),
\resonance, Pseq([3.5,1.7,3.8,2.6],inf),
\strum, Prand([0.75,0,0.125],inf) ,
\room, 20000,
\vel, Pwhite(50, 100, inf),
\sustain, 0.8,
\legato, 0.95,
\dur,1/4
)
).play;
Pdef(\c, Pbind(
\instrument, \mdapiano1,
\scale, Scale.major,
\octave, Prand([5,4,2,3],inf),
\degree, Prand([[1,3,5], 3,1,[4,7,11], 1,3,[1,3,5], 1],inf),
\amp, Pseq([0.5,0.2,0.3,0.1],inf),
\gate, Pseq([0.5,0.7,0.2,0.6],inf),
\cutoff, Prand([30,100,10,200,150,300,10,200],inf),
\resonance, Pseq([3.5,1.7,3.8,2.6],inf),
\strum, Prand([0.75,0,0.125],inf) ,
\room, 20000,
\vel, Pwhite(50, 100, inf),
\legato, 0.95,
\sustain, 0.8,
\dur,1/2
)
).play;
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment