janmyler / web-audio-editor

HTML5 based audio editor.
http://janmyler.github.io/web-audio-editor/
MIT License
177 stars 43 forks source link

Export audio file? #8

Open praneybehl opened 9 years ago

praneybehl commented 9 years ago

Hi mate, Great effort, just wondering if there is an option to export the final audio as mp3/wav?

Appreciate your help. Cheers!

janmyler commented 9 years ago

Hi, unfortunately there is not such feature implemented. I wanted to add it, as the app itself is quite useless without this option, however, I'm quite busy with work related tasks all the time.

I found this http://stackoverflow.com/questions/16969201/web-audio-api-scheduling-sounds-and-exporting-the-mix which might be the way to go.

1j01 commented 9 years ago

@janmyler There's a library for exporting to wav (which I've used here) and a somewhat hackily converted version for mp3 (which does seem to work but might be incredibly slow for longer tracks)

1j01 commented 8 years ago

Feel free to take export.coffee from my audio editor, compile it online and drop it into your project (along with the workers). From there, usage is simple:

var number_of_channels = 2;
var oactx = new OfflineAudioContext(number_of_channels, sample_rate * length, sample_rate);

start_playing(from_position, oactx);

oactx.startRendering().then(function(rendered_audio_buffer) {
    export_audio_buffer_as(rendered_audio_buffer, file_type);
});
niyazhussain commented 8 years ago

I am finding difficulties to save the project in DB and re render as it is saved , is it possible with it , then what is the idea to be used ?