Converge/mix 2 audio streams?

Thomas Stivers stivers_t at tomass.dyndns.org
Thu Apr 15 00:28:02 UTC 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 04/14/04 10:21 AM +0100, Guy Abandon. wrote:
> Hi all.
> 
> I am hoping to describe the process I am trying to achieve, so that
> suggestions of how to achieve it will give me the necessary leads. Man, Help
> and Docs assume a prior specific knowledge; if only on what tools to read
> about.

Check out the sox package. I believe it is precompiled for slackware and
it can do all the things you have mentioned. 

> My objective is to:-
> 
> 1>  convert and stream a collection of .mp3s sequentially into a single .wav
> and hopefully, normalise to a lower volume level in the process.

mpg123 -s file1.mp3 file2.mp3 >output.wav

> 2>  having done the first step into a pair of long .wav's; to them stream
> both in parallel or mix them into a third single .wav...   maybe even a long
> single mp3 but that can be done as an additional later step if necessary.

soxmix file1.wav file2.wav

> The key bits are - to sequence a collection into a single entity, normalise
> such an entity, then mix a pair of such entities into a third single blend.

I am not exactly sure what you're trying to get it to sound like, but
check out the -v global option and the stat effect in the sox man page.
For example when normalizing a narration I use:

sox somefile.wav -v `sox somefile.wav -e stat -v 2>&1 |cut -d\  -f1` newfile.wav

This uses sox to get the volume adjustment of the file and then uses that with the
volume option to set the volume as high as possible without clipping. It
sounds like you want to lower the volume on the music track, so this
isn't what you're after, but it should give you some ideas. The sox man
page is your friend.

- -- 
Clarke's Corollary:
Any technology distinguishable from magic is insufficiently advanced.
Thomas Stivers	e-mail: stivers_t at tomass.dyndns.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAfdcS5JK61UXLur0RAhy1AJ47EjhqHHb8Sh5ANrzKSQnMXohZsACcCXWK
BonN7PJsBC3+IDdQCkTNTB4=
=3auM
-----END PGP SIGNATURE-----





More information about the Blinux-list mailing list