Hi,
I'm looking for ways to use Web Audio javascript API to adjust pitch of the music from a <video> or <audio> element.
I understand that if I use XMLHttpRequest to load a mp3 file, and then use decodeAudioData to get the buffer of the audio data, then I can use the SoundTouch library to adjust the pitch.
But I'm wondering whether I can directly do this from a <video> or <audio> element.
I can create a media element source using createMediaElementSource, but I'm not sure how to get the buffer from this source to pass to the soundtouch library, or whether there are ways to adjust pitch without the need of getting the buffer.
Any help would be appreciated.
Thank you very much.
Yuan