Created
June 1, 2014 11:40
-
-
Save ALOUT/82c88dbaea995dfb37b2 to your computer and use it in GitHub Desktop.
amen Glitchテンプレート
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
// @phrontist | |
// https://soundcloud.com/phrontist/lazy-amen-break-glitches | |
s.reboot; | |
s.stop; | |
~amen = Buffer.readChannel(s,"/Applications/SuperCollider/sounds/fools_gold.wav", channels:[0,0]); | |
SynthDef(\loop, {| out = 0, bufnum = 0, gate = 1, pos = 0, speed = 1, freq = 0, endfreq = 0.001, sustain, wobble = 1, boost = 1| | |
var player,env,amp; | |
freq = XLine.ar(freq,endfreq,sustain/4); | |
freq = freq.cpsmidi + (LFNoise2.ar(3).range(-1,1) * (1/12)); | |
freq = freq.midicps; | |
env = Env.adsr(0.0001,0.01, 1, sustain/8, 1); | |
amp = EnvGen.kr(env, gate, doneAction:2); | |
player = PlayBuf.ar(2, bufnum, BufRateScale.kr(bufnum) * speed, Impulse.ar(freq), startPos: (pos*BufFrames.kr(bufnum)) + Rand(0,100), doneAction:2, loop: 1) * boost; | |
player = RLPF.ar(player, SinOsc.ar(wobble/sustain).range(20000,80), XLine.ar(0.2,0.9,sustain)) * boost; | |
Out.ar(out, player); | |
}).store; | |
TempoClock.default.tempo = 48/~amen.duration; | |
~rhythm = Pseq([8,[2,[1,[1,1,[1,1!3],[1,1!4]]],[1,1!4]]].convertRhythm,1); // Evaluate one of these before playing the Pbind | |
Pbind( | |
\instrument, \loop, | |
\bufnum, ~amen.bufnum, | |
\out, 0, | |
\freq, Pstep([60.midicps,0,0,0],4/~amen.duration,inf), | |
\endfreq, Pstep([20.midicps/2,0,0,0],2,inf), | |
\wobble, Pstep([Prand([1/2,2,1,1/3]),0,1/2,0],16/~amen.duration,inf), | |
\pos, Pstep(Array.series(8,0,1,3,6,2,4,7),16/~amen.duration,inf)/8, | |
\legato, 1, | |
\sustain,1.0, | |
\dur, Pn(Plazy({2}),inf) | |
).play; | |
SynthDef(\compressor, { | |
var in,compressed; | |
in = In.ar(0,2); | |
compressed = Compander.ar(in, in, 0.1, 1, 1/8, 0.002, 0.01); | |
ReplaceOut.ar(0, compressed * 4); | |
}).store; | |
~comp = Synth(\compressor, addAction: \addToTail); | |
~comp.free; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment