meytin1337 / youtube-dj

2 stars 0 forks source link

Loop beats #9

Closed meytin1337 closed 11 months ago

meytin1337 commented 1 year ago

We want to be able to loop the next x beats.

meytin1337 commented 1 year ago

This PR should probably also add the regions plugin: https://wavesurfer-js.org/docs/modules/plugins_regions

meytin1337 commented 1 year ago

This includes an example to loop a region: https://wavesurfer-js.org/examples/#regions.js

meytin1337 commented 1 year ago

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

meytin1337 commented 1 year ago

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

meytin1337 commented 11 months ago

After playing around a bit with the different filters and offset I finally reached an effect that satisfied me enough for now.