1

I created a audiocontext instance suing web audio , and loaded the music file as a audiobuffer into it and i can play the songs now , and my question is:Is there any way i can set tempo of the audiosource(audiobuffer) by any node and play accordingly ?

I have tried with

var context = AudioContext();
source= context.createBufferSource();
context.nodes.push(source);
source.buffer = Audiobuffer;
source.playbackRate.value = 1.5;

And the problem above is , it is changing the pitch of the audio files, how to change the tempo without changing the pitch ?.

Niyaz
  • 2,677
  • 3
  • 21
  • 40
  • 1
    https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/playbackRate will act as forward and rewind it will always act like that , perhaps you can try with the sound touch library https://github.com/also/soundtouch-js –  May 09 '16 at 09:02
  • 1
    cannot explain everything in a comment , so please try that library , that will be usefull for what you are seeking. –  May 09 '16 at 09:05
  • 1
    Did you ever get an answer to this question? I'm looking for this, too. – Paulie Oct 15 '20 at 18:43
  • 2
    No @Paulie, if you found please post that here – Niyaz Oct 16 '20 at 04:56

0 Answers0