cutterbl/SoundTouchJS

How to use PitchShifter as an AudioNode

qingwufong opened this issue · 1 comments

Hi cutterbl,
sorry about ask question here. How to use PitchShifter as an AudioNode? code like this:

      const audio = document.getElementsByTagName('audio')[0];
      const audioCtx = new (window.AudioContext || window.webkitAudioContext)();
      const gainNode = audioCtx.createGain();
      let shifter;

      const source = audioCtx.createMediaElementSource(audio);
      shifter = new PitchShifter(audioCtx, 1024);
      source.connect(gainNode);
      gainNode.connect(shifter.node);
      shifter.connect(audioCtx.destination)

thanks!

@qingwufong Thanks for reaching out. Unfortunately SoundTouchJS does not, yet, support this. Here's a small write up on the 'why'.