Playing Audio From Memory

I was wondering if there is a way to generate the sound in memory that you wish to play.  Right now I allow the user to select several options which can generate many different sounds.  I take this information and write out a wav file from it and load it back in to play it.  This starts taking a long time especially if you bump up the sampling rate.

I’m curious if there is a way in corona to generate the information in memory somehow and not have to write it to a file first to play audio?  Any examples of this would be great if it is possible.

Thanks.

I’m curious as to how you generate the sounds.  Are they basic (or complex) waveforms being generated from scratch, or a sampling of other audio files that are being played in a sequence or pattern?

Right now it is just a simple tone generator.  You enter your frequency and it will play it for you.  I wish to add a lot more things to it but I want to make sure corona has the ability to play from memory so I don’t have the lag of writing to file and reading back in.

I’m curious as to how you generate the sounds.  Are they basic (or complex) waveforms being generated from scratch, or a sampling of other audio files that are being played in a sequence or pattern?

Right now it is just a simple tone generator.  You enter your frequency and it will play it for you.  I wish to add a lot more things to it but I want to make sure corona has the ability to play from memory so I don’t have the lag of writing to file and reading back in.