Skip to content

Instantly share code, notes, and snippets.

View AdrienFromToulouse's full-sized avatar

Adrien AdrienFromToulouse

  • EchoesHQ
  • Toulouse ⇄ Seoul ⇄ Singapore ⇄ Amsterdam
View GitHub Profile
const fs = require('fs');
module.exports = (audioContext) => {
const buffer = fs.readFileSync('/tmp/MixTwoDifferentChannels.wav');
return audioContext.decodeAudioData(buffer).then((audioBuffer) => {
const bufSrc = audioContext.createBufferSource();
const panNode = audioContext.createStereoPanner();
// mostly on the left