From 405cb58f0d176e1f6472d6aa8c363843c451f51f Mon Sep 17 00:00:00 2001 From: skratchdot Date: Sat, 21 Nov 2015 14:46:12 -0500 Subject: [PATCH] adding links and publishing demo --- clap.ogg | Bin 0 -> 17816 bytes demo.html | 1 + index.html | 7 ++- litsynth.js | 164 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 171 insertions(+), 1 deletion(-) create mode 100644 clap.ogg create mode 100644 demo.html create mode 100644 litsynth.js diff --git a/clap.ogg b/clap.ogg new file mode 100644 index 0000000000000000000000000000000000000000..d19b91f1bfd0a362e350b3ba1b2fa991799c1391 GIT binary patch literal 17816 zcmeIaby$^8_b+^JHnHh$q`Ra$HYnXGAV_y84I;QfKtQ^?yCejp6zL9W5Kt)r5u}@Q zqu=K_&-;6S*E#QXo$LMY46}!cHM8#d%vv*R&Avgy)>a2V0{#iu-2!HJ+2FqBOb9i^ z>#3WCz587S5~B6)7Z_as62FIN-1Yo-xa$c4OKIvo&IFRT|0Tph{|?0kQW)4jv*Xrq zv!!*ix6uE?fL4i?kB66s7mT#5I+k|ko;KDlp0>8u9&C5xLs0&9W|MuO4*_6c4X-L~ z4`Mu44*>80z>JX%C&5OEttc^%)i*U!@h;cH6P}tF-a}>?$=my{gjT?c7yys~1S@)U z!G@Bl#V&SPdvm*RKDjxM8YOfYOi6maGMT#+t>Nc%3a z2%`%n1C!TOZvAv6nQj>DrMW>EeEqbqRQa|F6V%1FN(-XJwprhe%VKi9`>d?WJFRb7 z-HvMV!hKY9GxMJW{m(pT!Do?0CAY$ph20Gw##Wr_1`hRiTC@NHoFc-p0i&5hN&Ts-}@WB4|zNnVsaW{P8Rx4Jo8^U zy^DXQP748Y8AOv;+4AWr^1qAbLxV#rkpQbZNNCaH>Dl57l!|Q}s_iox?J63bhw3ahNh01%MmF67#$7yrMajbXC&|31R)`q=?Eh-IHERi7)PoHk>h8z#c~TXq0|^HTM=QVoD;Xmd@v2|jX{oOM^51);b@ ze^$_GlzbIjOSZwZp4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}-sQAY5>3=#S} z&ot0_(sE-@V~SLG4O)!QEDs*YC1hZdRV6i!VJaO!0?^si@+8a|N?eNix1$Fd{-N~4M0dHK=4>E;uP zi`{Qj*;X#}62{S(pIS!8gp~ACTtkLOZIJQmwIAx5Kf{~P#bS?J?H8Dj;G5*}h#OQr zh~|$_Wp-t&e_)|U0esI#MdjsAF2@fGVjo+tt_+X0K+*O=Y<_+oWf*8~D5cL$6bS(= zzMzLPcGFKwNr*<2=(#nTEMda=84ZfJV)A_u{S7MV>Autkl-i+k1if%(1FN^hT5$hJ z1mpwgpKp_f(9X+Gsn*4wI$q@B@#N~$w?#)^7*&-!s7}O#4!Y00<%W&>s+$;gv*<|7 z)Iq|LJw=+(WX4*XvP;VL+Yh0e7gyP55y$E8ZC{dK9Xc=mZhTW+cr&S%^?b|ZsIXHH z5Vlm))1`XozNN;O&Ujcs#<$o$w#%SXFWj?lsaPKV+^DrQJv)E-srLijm53xJw|76t zGZk>?a40z@zc%Lf;}!JE$R;Il%i?PqVF;N04AjDc_hD-#5I%sY@#?f1d~(6Vfb9qA zsN!ZfVDqE}%Hr{?%1jkL#GGpg+h^bP=y9r1(f-gLV5IFsdX`&=vwq01QZFIN~>*}&ereF6mkWK16G(8psUnhz?P`>=SE_pw3Th})K@W)A!Sft;1KQ40snpE`qiXZ9e&sNFi zt@*?2+)+KEk6Jvx> zd8QmGsJb+c!@cCd3&>?md%}v~0vFK?R9bQ;4453`)FSnCd2 zI(kDK$C~Hj+$&t3JfZltf+tfB3>10Xa$2e&H7%sSFGL{06z7<~>f&S|`xHv>>-+kX z<@IOb4{i^x0(?r}wFQi7=&T=odd#21x;E$jvPEL{)%{=8Cov~cyRljkPboN6{WZ579uHmR9c*M z`l~;n diff --git a/index.html b/index.html index 7a29fc9..cfb2862 100644 --- a/index.html +++ b/index.html @@ -34,7 +34,12 @@

litsynth

-

Introduction and scope

+ +

Introduction and scope

diff --git a/litsynth.js b/litsynth.js new file mode 100644 index 0000000..d05970e --- /dev/null +++ b/litsynth.js @@ -0,0 +1,164 @@ +function note2freq(note) { + return Math.pow(2, (note - 69) / 12) * 440; +} +function S(ac, clap, track) { + this.ac = ac; + this.clap = clap; + this.track = track; + this.rev = ac.createConvolver(); + this.rev.buffer = this.ReverbBuffer(); + this.sink = ac.createGain(); + this.sink.connect(this.rev); + this.rev.connect(ac.destination); + this.sink.connect(ac.destination); +} +S.prototype.NoiseBuffer = function() { + if (!S._NoiseBuffer) { + S._NoiseBuffer = this.ac.createBuffer(1, this.ac.sampleRate / 10, this.ac.sampleRate); + var cd = S._NoiseBuffer.getChannelData(0); + for (var i = 0; i < cd.length; i++) { + cd[i] = Math.random() * 2 - 1; + } + } + return S._NoiseBuffer; +} +S.prototype.ReverbBuffer = function() { + var len = 0.5 * this.ac.sampleRate, + decay = 0.5; + var buf = this.ac.createBuffer(2, len, this.ac.sampleRate); + for (var c = 0; c < 2; c++) { + var channelData = buf.getChannelData(c); + for (var i = 0; i < channelData.length; i++) { + channelData[i] = (Math.random() * 2 - 1) * Math.pow(1 - i / len, decay); + } + } + return buf; +} +S.prototype.Kick = function(t) { + var o = this.ac.createOscillator(); + var g = this.ac.createGain(); + o.connect(g); + g.connect(this.sink); + g.gain.setValueAtTime(1.0, t); + g.gain.setTargetAtTime(0.0, t, 0.1); + o.frequency.value = 100; + o.frequency.setTargetAtTime(30, t, 0.15); + o.start(t); + o.stop(t + 1); + var osc2 = this.ac.createOscillator(); + var gain2 = this.ac.createGain(); + osc2.frequency.value = 40; + osc2.type = "square"; + osc2.connect(gain2); + gain2.connect(this.sink); + gain2.gain.setValueAtTime(0.5, t); + gain2.gain.setTargetAtTime(0.0, t, 0.01); + osc2.start(t); + osc2.stop(t + 1); +} +S.prototype.Hats = function(t) { + var s = this.ac.createBufferSource(); + s.buffer = this.NoiseBuffer(); + var g = this.ac.createGain(); + var hpf = this.ac.createBiquadFilter(); + hpf.type = "highpass"; + hpf.frequency.value = 5000; + g.gain.setValueAtTime(1.0, t); + g.gain.setTargetAtTime(0.0, t, 0.02); + s.connect(g); + g.connect(hpf); + hpf.connect(this.sink); + s.start(t); +} +S.prototype.Clap = function(t) { + var s = this.ac.createBufferSource(); + var g = this.ac.createGain(); + s.buffer = this.clap; + s.connect(g); + g.connect(this.sink); + g.gain.value = 0.5; + s.start(t); +} +S.prototype.Bass = function(t, note) { + var o = this.ac.createOscillator(); + var o2 = this.ac.createOscillator(); + var g = this.ac.createGain(); + var g2 = this.ac.createGain(); + o.frequency.value = o2.frequency.value = note2freq(note); + o.type = o2.type = "sawtooth"; + g.gain.setValueAtTime(1.0, t); + g.gain.setTargetAtTime(0.0, t, 0.1); + g2.gain.value = 0.5; + var lp = this.ac.createBiquadFilter(); + lp.Q.value = 25; + lp.frequency.setValueAtTime(300, t); + lp.frequency.setTargetAtTime(3000, t, 0.05); + o.connect(g); + o2.connect(g); + g.connect(lp); + lp.connect(g2); + g2.connect(this.sink); + o.start(t); + o.stop(t + 1); +} +S.prototype.clock = function() { + var beatLen = 60 / this.track.tempo; + return (this.ac.currentTime - this.startTime) / beatLen; +} +S.prototype.start = function() { + this.startTime = this.ac.currentTime; + this.nextScheduling = 0; + this.scheduler(); +} +S.prototype.scheduler = function() { + var beatLen = 60 / this.track.tempo; + var current = this.clock(); + var lookahead = 0.5; + if (current + lookahead > this.nextScheduling) { + var steps = []; + for (var i = 0; i < 4; i++) { + steps.push(this.nextScheduling + i * beatLen / 4); + } + for (var i in this.track.tracks) { + for (var j = 0; j < steps.length; j++) { + var idx = Math.round(steps[j] / ((beatLen / 4))); + var note = this.track.tracks[i][idx % this.track.tracks[i].length]; + if (note != 0) { + this[i](steps[j], note); + } + } + } + this.nextScheduling += (60 / this.track.tempo); + } + setTimeout(this.scheduler.bind(this), 100); +} +var track = { + tempo: 135, + tracks: { + Kick: [ 1, 0, 0, 0, 1, 0, 0, 0, + 1, 0, 0, 0, 1, 0, 0, 0, + 1, 0, 0, 0, 1, 0, 0, 0, + 1, 0, 0, 0, 1, 0, 0, 0], + Hats: [ 0, 0, 1, 0, 0, 0, 1, 0, + 0, 0, 1, 0, 0, 0, 1, 1, + 0, 0, 1, 0, 0, 0, 1, 0, + 0, 0, 1, 0, 0, 0, 1, 0 ], + Clap: [ 0, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0], + Bass: [36, 0,38,36,36,38,41, 0, + 36,60,36, 0,39, 0,48, 0, + 36, 0,24,60,40,40,24,24, + 36,60,36, 0,39, 0,48, 0 ] + } +}; +fetch('clap.ogg').then((response) => { + response.arrayBuffer().then((arraybuffer) => { + var ac = new AudioContext(); + ac.decodeAudioData(arraybuffer).then((clap) => { + var s = new S(ac, clap, track); + s.start(); + }); + }); +});