Get rid of sound distortion

Hi,
I’m trying to play tiny parts of the same sound file through MouseDragged function on p5.
Everything works just fine when the variables are defined in the begining, but I want to be able to change them using the keyboard. I can get the sketch to work but the problem is that the sound gets gradually distorted.
How can I solve the problem?
Thanks

1 Like

Just found out a way.

Hey, good to hear you figured it out. What solved it?

1 Like