// title: Sunday's patch & shader: Value Noise // author: TatriX // description: // code: ( Ndef(\valuenoise, { var sig = 0; var note = Demand.kr(Impulse.kr(1/8), 0, Dseq([0, 12, 0, 10, 0], inf)); var freq = (110 + (24 + note).midicps).lag(1/2); var trig = Impulse.kr(1) + Impulse.kr(1/9, 1/2); var dm = SinOsc.ar( freq: Env.perc(0, 0.01).kr(0, trig).exprange(freq*4, freq/4), mul: 0.5*Env.perc(0.01, 0.5).kr(0, trig), ) + BPF.ar(WhiteNoise.ar(Env.perc(0, 0.01, 0.1).kr(0, trig)), 6000); var hh = BPF.ar(WhiteNoise.ar( 0.03 * Env.perc(0, 1/8 + SinOsc.kr(1, mul: 1/12)).kr(0, Impulse.kr(4)) ), 9000); var noise = PinkNoise.ar( LFTri.kr([3, 3.01]).range(0.2, 0.01) * LFPulse.kr(3).lag(0.1) * LFTri.kr(1/4) ); var offset = Demand.kr(Impulse.kr(1/2), 0, Dseq([5, 6, 4], inf)); var shift = LFPulse.kr(1/20).range(4, 2); var glass = SinOsc.ar( freq: freq*[4, offset, 12] / shift, mul: 0.7 * Env.perc(0.01, 0.2).kr(0, Impulse.kr(5/2)), ).sum!2; var bass = SinOsc.ar(freq, mul: 0.5 * LFTri.kr(1/4).range(0.5, 1)); bass = bass * SinOsc.ar(freq * 2 * SinOsc.ar(freq/4)); bass = RLPF.ar(bass, LFTri.kr(1/3, 2).exprange(freq/2, freq*4), 0.9); bass = (bass * 4).tanh * 0.5; bass = LPF.ar(bass, freq*2); bass = Pan2.ar(bass); bass = bass.blend(NHHall.ar(HPF.ar(bass, freq*2), 3), 1/4); glass = (glass * 10).tanh * 0.15 * LFTri.kr(1/8); glass = LPF.ar(glass, 6000); glass = glass.blend([ CombL.ar(glass[0], 1, 3/4 + SinOsc.kr(1).range(0.01, 0.02)), CombL.ar(glass[1], 1, 4/4), ]); glass = glass.blend(NHHall.ar(glass, 2 + LFTri.kr(1/4).range(0, 4)), 1/6); glass = Rotate2.ar(glass[0], glass[1], SinOsc.kr(1/2)); noise = noise.blend(NHHall.ar(noise)); dm = (dm * 3).tanh * 0.5; dm = dm.blend(CombL.ar(dm, 1, 1/4, 2), 1/4); hh = hh.blend(CombL.ar(hh, 1, [1/9, 1/3], 2), 1/4); hh = Rotate2.ar(hh[0], hh[1], LFTri.kr(1/4)); if (true) { bass = bass * Env.asr().delay(0).kr; dm = dm * Env.asr().delay(0).kr; hh = hh * Env.asr().delay(4).kr; noise = noise * Env.asr().delay(10).kr; glass = glass * Env.asr(4, curve: 8).delay(12).kr; }; sig = sig + bass; sig = sig + glass; sig = sig + noise; sig = sig + dm; sig = sig + hh; sig = Limiter.ar(sig); }).play; )