-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathjilet.scd
22 lines (18 loc) · 879 Bytes
/
jilet.scd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
(
SynthDef(\jilet, { arg out=0, gate=1, freq=4, amp=0.5, endReflection=1.5, jetReflection=0.5, jetRatio=10.72, noiseGain=0.35, vibFreq=5.925, vibGain=0.02, outputGain=0.20;
var adsr = (amp*0.2) + EnvGen.ar(Env.adsr(0.005, 0.01, 1.1, 0.01), gate, doneAction: 2);
var noise = WhiteNoise.ar(noiseGain);
var vibrato = SinOsc.ar(vibFreq, 0, vibGain);
var delay = (freq*0.66666).reciprocal;
var lastOut = LocalIn.ar(1);
var breathPressure = adsr*Mix([1.0, noise, vibrato]);
var filter = LeakDC.ar(OnePole.ar(lastOut.neg, 0.7));
var pressureDiff = breathPressure - (jetReflection*filter);
var jetDelay = DelayL.ar(pressureDiff, 0.025, delay*jetRatio);
var jet = (jetDelay * (jetDelay.squared - 1.0)).clip2(1.0);
var boreDelay = DelayL.ar(jet + (endReflection*filter), 0.05, delay);
LocalOut.ar(boreDelay);
Out.ar(out, 0.3*boreDelay*outputGain);
}).add;
)
Synth(\jilet);