Skip to content

Instantly share code, notes, and snippets.

@lisongx
Created November 23, 2020 23:17
Show Gist options
  • Save lisongx/e09d6eac6d23deb9132b8b15ac3ac3c0 to your computer and use it in GitHub Desktop.
Save lisongx/e09d6eac6d23deb9132b8b15ac3ac3c0 to your computer and use it in GitHub Desktop.
(
SynthDef(\sean_clipp, {|amp=0.2, pan=0, dur=10|
var env, envgen;
var sig = ClipNoise.ar(mul:amp);
env = Env.perc(0.03, 0.98);
sig = Pan2.ar(sig, pan);
envgen = EnvGen.kr(env, doneAction: Done.freeSelf, timeScale: dur);
Out.ar(0, sig*envgen);
}).add;
SynthDef(\sean_saw, {|freq=400, amp=0.2, pan=0, dur=10|
var env, envgen;
var sig = LFSaw.ar(freq, mul:amp);
env = Env([0, 1, 1, 1, 0], [0.3, 0.3, 0.02, 0.5], curve: -10);
sig = Pan2.ar(sig, pan);
envgen = EnvGen.kr(env, doneAction: Done.freeSelf, timeScale: dur);
Out.ar(0, sig*envgen);
}).add;
SynthDef(\sean_clip, {|amp=0.2, pan=0, dur=10|
var env, envgen;
var sig = ClipNoise.ar(mul:amp);
env = Env([0, 1, 1, 1, 0], [0.01, 0.5, 0.02, 0.5]);
sig = Pan2.ar(sig, pan);
envgen = EnvGen.kr(env, doneAction: Done.freeSelf, timeScale: dur);
Out.ar(0, sig*envgen);
}).add;
SynthDef(\sine, {|freq=400, diff=0, amp=0.2, pan=0, dur=10|
var env, envgen, freq1, sig;
freq1 = Line.kr(freq, freq + diff, dur:dur, doneAction: Done.freeSelf);
sig = SinOsc.ar(freq1, mul:amp);
env = Env.sine(dur: 1);
sig = Pan2.ar(sig, pan);
envgen = EnvGen.kr(env, doneAction: Done.freeSelf, timeScale: dur);
Out.ar(0, sig*envgen);
}).add;
SynthDef(\sine_fix, {|freq=400, amp=0.2, pan=0, dur=10|
var env, envgen, sig;
sig = SinOsc.ar(freq, mul:amp);
env = Env.linen(0.05, 0.8, 0.2, curve: \sine);
sig = Pan2.ar(sig, pan);
envgen = EnvGen.kr(env, doneAction: Done.freeSelf, timeScale: dur);
Out.ar(0, sig*envgen);
}).add;
SynthDef(\sine2, {|freq=400, amp=0.2, pan=0, dur=10, attack=0.3, release=0.2|
var env, envgen, sig;
sig = SinOsc.ar(freq, mul:amp);
env = Env.linen(attack, 0.5, release, curve: \sine);
sig = Pan2.ar(sig, pan);
envgen = EnvGen.kr(env, doneAction: Done.freeSelf, timeScale: dur);
Out.ar(0, sig*envgen);
}).add;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment