How do I add tempo and pitch with JS

56 Views Asked by At

I am quite a beginner to JS, I know my way around some things, but nowhere near an expert, and I'm new to using libraries, so sorry if this is terrible on my part.

Anyway, I've created this website on github https://stevenphotos.github.io/reverb/ with ToneJS. You can basically choose any song and then with the input ranges change the reverb, pitch and how slow (playbackRate) it is. (You can view page source and look in the script) One problem is that the pitchShift from toneJS distorts the audio quite badly.

I came across someone who created this https://dumbmatter.com/screw/ It's in one of the comments on this reddit post. https://www.reddit.com/r/javascript/comments/af9nip/how_to_pitch_shift_in_js/

This seems to not distort audio too much and it's cool that they've made it so you can scroll through the timeline and change the tempo and pitch. I guess all I'd need is the reverb from my project but I really have 0 clue on how I would combine the library he posted (or if I should even do that or if it's possible) in the comments with ToneJS.

Don't need an exact solution (although that would be great), any tutorials online that you've come across that would help with this are muchly appreciated as well.

0

There are 0 best solutions below