Skip to content

Instantly share code, notes, and snippets.

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

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

Select an option

Save yotamorimoto/2322855 to your computer and use it in GitHub Desktop.
snare
スネアドラムをつくる
スネア(響き線)と膜面の振動を単純なモデルでシミュレート
SynthDef(\snr, { |amp=0.1|
var sig, env, snr, mem;
env = EnvGen.kr(Env.perc(0, 0.05), 1, amp, doneAction: 2);
snr = WhiteNoise.ar;//スネア音
mem = FSinOsc.ar(200);//膜面
sig = LPF.ar(snr + mem, 12000);//両方を足し 1.2kHz 以上をカット
sig = Pan2.ar(sig, 0, env);
Out.ar(0, sig);
}).add;
~snrA = Pbind(\instrument, \snr, \dur, 1).play;
~snrA.stop;
実践
dur キーワードにパターンを入れ替えてフレーズをつくる
Pseq([0.5, 0.5, 1], inf) などのパターンを使う
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment