Created
November 20, 2015 19:32
-
-
Save Rampoina/9fb555c053faf5e97b24 to your computer and use it in GitHub Desktop.
3DPulse
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SynthDef.new("3DPulse", | |
{ | |
arg freq=440, z=0, gate=0, bend=0, y = 0; | |
var f, signal, env; | |
f = freq * bend.midiratio; | |
env = EnvGen.kr(Env.adsr(attackTime: 0.1,sustainLevel: 1, releaseTime: 0.5), gate, doneAction: 2); | |
signal = Pulse.ar(freq: f, width: y.linlin(0, 127, 0.5, 0.2), mul: 0.2); | |
signal = LPF.ar(in: signal, freq: z.linexp(0, 127, 50, 2500))!2*env; | |
Out.ar(0, signal); | |
}).add; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment