Submit
Browse
Anonymous
Login
RSS
SuperCollider Code
Fork Code: The Sh*te Saber
name
code content
( { var flutter, flutterAmt = 0.02, humPitch = 88, hum, humLevel = 0.3, amp = 1.0, output; var swing, swingNoise, swingLevel = 1.0, swingSwitch, swingThresh = 0.87; var clash, clashTrig, clashDecay, clashEnvGen, clashSpring, clashLevel = 0.6; flutter = 4.collect( { |i| LFNoise0.kr(rrand(3, 16), flutterAmt, 1).lag(0.48); } ); humPitch = humPitch * StandardL.ar(2, 3.7).range(0.97, 1.03); hum = Mix(SyncSaw.ar([humPitch, humPitch * 1.001] * flutter.copyRange(0, 1), [humPitch * 1.003, humPitch * 1.0025] * flutter.copyRange(2, 3))); hum = hum * LFNoise0.kr(8.77224).range(0.2, 1.0).lag(0.4); hum = RLPF.ar(hum, LFNoise0.kr(21).range(200, 1800).lag(1.2), 0.5) * 0.1 * humLevel; humPitch = humPitch * StandardL.ar(3.8, 2.9).range(0.93, 1.07); swingNoise = LFNoise1.kr(16.2).range(0, 1); swingSwitch = if(swingNoise > swingThresh, 1, 0).lag2(0.9, 1.3); swingLevel = swingLevel * swingSwitch; humPitch = humPitch * StandardL.ar(3.8, 2.9).range(0.97, 1.03) * (1 + (swingSwitch * 0.2)); swing = SyncSaw.ar(humPitch * 0.501, humPitch * 1.09); swing = LPF.ar(swing, 4300); swing = swing * swingLevel; clashTrig = Trig.kr( Schmidt.kr(1 - swingSwitch, swingThresh, swingThresh + 0.01), 0.01 ); clashDecay = TRand.kr(0.1, 1.6, clashTrig); clashEnvGen = Decay.kr(clashTrig, clashDecay) * TRand.kr(0.8, 1.0, clashTrig); clashSpring = Spring.kr(clashTrig, TRand.kr(5, 20, clashTrig), TRand.kr(0.001, 0.07, clashTrig)); clash = SinOsc.ar(8000 * clashSpring + TRand.kr(600, 2342, clashTrig), SinOsc.ar(TRand.kr(452, 662, clashTrig), 0, 2)); clash = clash + BPF.ar(WhiteNoise.ar(2), SinOsc.kr(2.6).range(3326, 4444), 0.16); clash = clash * clashEnvGen; clash = clash + ( clash * SinOsc.ar(39) * SinOsc.ar(3013) * 0.3); clash = clash * 0.1 * clashLevel; output = hum + swing + clash; (output * amp) ! 2 }.play )
code description
Another Star Wars inspired sound effect. Room for improvement: this does not really give the sense of two lightsabers engaging in combat, there should be another humming sound and each one should be panned slightly (as well as tuned a little differently.)
use markdown for formating
category tags
comma separated, i.g. "wild, siren" (do not enter default SC class names, please)
ancestor(s)
comma separated identificators, i.g. "1-C,1-1,1-4M,1-x"
Private?
the code will be accessible by direct url and not visible in public activity
signup to submit public code without captcha
comment of change