webaudio

create html <audio> element from Tone.js object

故事扮演 提交于 2020-06-29 03:52:26
问题 I am using Tone.js to modify sounds: audio_url = "/sounds/damncoolbeats.m4a" player = new Tone.Player(audio_url) modified_player = <some Tone.js modifications to player> To play the modified sound I would like to use a web audio element so that I can make use of audio.currentTime and eventlisteners to 'play' 'pause' and 'timeupdate' (which I can't seem to do with Tone.js). The only way I managed to create an audio element so far is by loading from an url: audio = new Audio(audio_url) My