Created
September 20, 2013 12:48
-
-
Save halfbyte/6636966 to your computer and use it in GitHub Desktop.
A patch for liv3c0der I used (in slightly modified form) at JSConf.eu 2013 and onGameStart 2013.
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
// NAME: finalist | |
AE.Instance.tempo = 135; | |
AE.Instance.groove = 0.3; | |
function draw(c, s) { | |
LC.cls(c) | |
} | |
// context, outlet, times, time per step, state, data | |
// should return array of functions that accept a single argument: the time | |
function pattern(c, o, t, l, s, d) { | |
var i; | |
var ll=t.length; | |
s.init('loop',0); | |
s.loop++; | |
LC.LO.reset(); | |
AE.ReverbLine.mix.value = 0.0; | |
for(i=0;i<ll;i++) { | |
if (i % 6 == 0) AE.DrumSynth.play(o, t[i], 2, 10, 5, 200, 50); | |
AE.SnareSynth.flt_f = 1500; | |
//if (i == 8) AE.SnareSynth.play(o, t[i], 0.7, 10, 3, 300, 50); | |
var odd = (i % 2 == 1); | |
//AE.NoiseHat.play(o, t[i], 0.2 - (i % 2) * 0.1, odd ? 10 : 5, 6000, 10); | |
} | |
AE.WubSynth.flt_mod = 500; | |
AE.WubSynth.lfo_f = 1 / (l*2); | |
//AE.WubSynth.play(AE.REV, t[0], l*4, 24, 0.4); | |
AE.WubSynth.lfo_f = 1 / (l*1); | |
//AE.WubSynth.play(o, t[8], l*8, 24+3, 0.4); | |
AE.WubSynth.lfo_f = 1 / (l*3); | |
//AE.WubSynth.play(o, t[14], l*4, 24-2, 0.4); | |
notes = [0, 0, 6, 4] | |
var base = notes[s.loop % notes.length]; | |
//AE.SawSynth.play(AE.REV, t[0], l*3, 48 + base, 0.05); | |
//AE.SawSynth.play(AE.REV, t[6], l*3, 48 + base + 1, 0.05); | |
//AE.SawSynth.play(AE.REV, t[10], l*3, 48 + base + 6, 0.05); | |
//AE.SawSynth.play(AE.REV, t[0], l*3, 48+ base + 12, 0.05); | |
//AE.SawSynth.play(AE.REV, t[6], l*3, 48 + base + 12 + 1, 0.05); | |
//AE.SawSynth.play(AE.REV, t[10], l*3, 48 + base + 12 + 6, 0.05); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment