[Flashcoders] how to get a byteArray of multiple sounds?

2011-02-17 Thread Pierrick Pluchon
Hi List, I'm currently working on a little musical app with multiple sounds. Think of it like a piano - each key plays a different note. What i'm trying to do is to record my whole composition as a byteArray and to export it as wav file. The export is ok, i get good results when I play one note

Re: [Flashcoders] how to get a byteArray of multiple sounds?

2011-02-17 Thread Henrik Andersson
Pierrick Pluchon skriver: Hi List, I'm currently working on a little musical app with multiple sounds. Think of it like a piano - each key plays a different note. What i'm trying to do is to record my whole composition as a byteArray and to export it as wav file. The export is ok, i get good

Re: [Flashcoders] how to get a byteArray of multiple sounds?

2011-02-17 Thread Pierrick Pluchon
I also thought to Sound.extract, but the question is : how to combine byteArray with my mixing? Here is what i've done : public function playNote(id:String):void { //My note mySound=myMC.getSound(id) as Sound; mySound.play(); outputSound=new Sound();

Re: [Flashcoders] how to get a byteArray of multiple sounds?

2011-02-17 Thread Henrik Andersson
You need to do your own mixing. First you need a way to get each note and then a way to know when each note should play. With that information you can start mixing, read the value of the first sample from each note currently playing and add them together, this is the mixed value. Now write

Re: [Flashcoders] how to get a byteArray of multiple sounds?

2011-02-17 Thread Pierrick Pluchon
Ok , i didn't get a clue on how to do that :) Is it possible to have a pseudocode example please(or even better as3) :D ? Currently, i can easily get a byteArray for each sound, and i know when each note should play. But, how to add them together? 2011/2/17 Henrik Andersson

Re: [Flashcoders] how to get a byteArray of multiple sounds?

2011-02-17 Thread Glen Pike
If you read the first code section of this blog post, it describes how to mix audio tracks using AS3 rather than pixel bender http://www.kaourantin.net/2008/10/audio-mixing-with-pixel-bender.html There are a lot of posts on the net about mixing audio with Flash