Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I compress multiple Web Audio sources/tracks into one?

We are making an web based music editor and mixer based on the Web Audio api. Users can mix together multiple tracks, crop tracks, etc. The actual mixing together of the tracks just involves playing back all the sources at once.

We want to be able to add the option to save the mix and make it available for download to a user's computer. Is there some way to do this on the front end (like connecting all the sources to one destination/export node), or even the backend (we are using RoR)?

like image 416
jz999 Avatar asked Oct 22 '22 07:10

jz999


1 Answers

RecorderJS does exactly what you need, and it could not possibly be easier to use. Really, really great library.

https://github.com/mattdiamond/Recorderjs

P.S. Look into OfflineAudioContext and my answer to this question (Web audio API: scheduling sounds and exporting the mix) for info on doing a faster-than-realtime mixdown of your audio.

like image 198
Kevin Ennis Avatar answered Oct 23 '22 22:10

Kevin Ennis