BrU32

JS LFO/HFO Web Audip FX

Jul 25th, 2016
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. <script>
  2. var context = new AudioContext();
  3.  
  4.  
  5. var lfo = context.createOscillator();
  6. lfo.frequency.value = 1.0;
  7.  
  8.  
  9. var hfo = context.createOscillator();
  10. hfo.frequency.value = 400.0;
  11.  
  12.  
  13. var modulationGain = context.createGain();
  14. modulationGain.gain.value = 50;
  15.  
  16.  
  17. lfo.connect(modulationGain);
  18. modulationGain.connect(hfo.detune);
  19. hfo.connect(context.destination);
  20. hfo.start(0);
  21. lfo.start(0);
  22.  
  23. </script>
Advertisement
Add Comment
Please, Sign In to add comment