How to create a stereo file from two mono files

Started by AudioFan, June 17, 2016, 05:23:09 PM

Previous topic - Next topic

AudioFan

Hi there,

I would like to insert two mono files into one single new stereo file and I need that each mono file is inserted in one specific channel. Can this be done with the editor component?

Thanks in advance

AudioFan

Administrator

Hi,

yes, all of our Editor components come with a feature named "Sound Composer" which allow combining different sounds in order to create a new file.
The "How to compose a sound" tutorial is the starting point (in this case the tutorial is related to the Winform .NET version of the component but it's mostly the same for the ActiveX version and for the API version):
http://www.multimediasoft.com/asoednet/help/how_to_compose_sound.htm
and, in your specific case, you should proceed as follows:

- create a new stereo session using the SoundComposer.SessionInit method by passing 2 to the nChannels parameter
- add the first mono file that you want on the left channel to the session using the SoundComposer.ItemSoundFileAdd method: set its nChannel parameter to 0
- add the second mono file that you want on the right channel to the session using the SoundComposer.ItemSoundFileAdd method: set its nChannel parameter to 1
- compose the session through the SoundComposer.SessionComposeItems method: at this point the editor will contain the stereo file that you could still edit.
- once the session is composed and eventual editing sessions applied, you can export the result through the ExportToFile method

Hope this helps.

Kind regards

Severino Delaurenti
MultiMedia Soft