From 45d1be31d98ea6f52c4a12571f41e60226ea1046 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Fri, 2 Mar 2018 17:21:12 +0100 Subject: build --- client/index.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'client/index.js') diff --git a/client/index.js b/client/index.js index 75dc612..ca6b3d9 100644 --- a/client/index.js +++ b/client/index.js @@ -25,7 +25,7 @@ requestAudioContext( () => { }) samplers['smash'] = new Sampler('samples/smash/g{}.mp3', 12) -samplers['glass'] = new Sampler('samples/glass/0{}Particle.mp3', 90) +// samplers['glass'] = new Sampler('samples/glass/0{}Particle.mp3', 90) let last_index = 0 keys.listen(index => { @@ -46,10 +46,10 @@ keys.listen(index => { for (i = 0; i < count; i++) { // kalimba.play(freq * (i+1)/4, now + Math.random()/(i+1)) when = Math.random()/2000 + (i + Math.random()/10)/randrange(2,5) - samplers['glass'].play( - 100 + index*(Math.random() * 10), - now + when - ) + // samplers['glass'].play( + // 100 + index*(Math.random() * 10), + // now + when + // ) setTimeout( () => { draw.triangle(randint(window.innerWidth), randint(window.innerHeight), randrange(10, 100)) }, when * 1000) @@ -75,10 +75,10 @@ mouse.register({ let when, i, player for (i = 0; i < count; i++) { when = Math.random()/2000 + (i+ Math.random()/10)/randrange(2,5) - player = samplers['glass'].play( - 100 * randrange(2,5) / randrange(2,5) * randrange(0.5,1.5), - now + when - ) + // player = samplers['glass'].play( + // 100 * randrange(2,5) / randrange(2,5) * randrange(0.5,1.5), + // now + when + // ) player.volume.value = isMobile ? -(1+i/2) : -i*i } setTimeout( () => { -- cgit v1.2.3-70-g09d2