Closed meytin1337 closed 11 months ago
This PR should probably also add the regions plugin: https://wavesurfer-js.org/docs/modules/plugins_regions
This includes an example to loop a region: https://wavesurfer-js.org/examples/#regions.js
Looping currently still leads to clipping. Further investigation is needed: http://alemangui.github.io/ramp-to-value https://stackoverflow.com/questions/38547340/web-audio-api-glitching-distortions-issues https://stackoverflow.com/questions/71460284/web-audio-api-clicks-crackles-pops-distortion-noise-elimination-can-i-d
What we really want is probably a compressor: https://developer.mozilla.org/en-US/docs/Web/API/DynamicsCompressorNode
Example can be found here: https://developer.mozilla.org/en-US/docs/Web/API/BaseAudioContext/createDynamicsCompressor#example
After playing around a bit with the different filters and offset I finally reached an effect that satisfied me enough for now.
We want to be able to loop the next x beats.