Skip to content

Instantly share code, notes, and snippets.

@ALOUT
Last active August 29, 2015 14:02
Show Gist options
  • Save ALOUT/c9213ef03498207846cb to your computer and use it in GitHub Desktop.
Save ALOUT/c9213ef03498207846cb to your computer and use it in GitHub Desktop.
Effectt-SynthDef定義用ラッパー
~makeEffect = {| name, func, lags, numChannels = 2 |
SynthDef(name, {| i_bus = 0, gate = 1, wet = 1|
var in, out, env, lfo;
in = In.ar(i_bus, numChannels);
env = Linen.kr(gate, 2, 1, 2, 2); // fade in the effect
out = SynthDef.wrap(func, lags, [in, env]);
XOut.ar(i_bus, wet * env, out);
}, [0, 0, 0.1] ).add;
};
(
~makeEffect.value(\reverb, {|in, env|
var input;
input = in;
input = GVerb.ar(input,300,103,0.43,0.51,15,-5,-26,-20,300,0.5,0);
input; },
nil, // no lags
2 // numChannels
);
)
// 音源.Play
Synth.tail(s, \reverb, [\wet, 0.5]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment