Help - Search - Members - Calendar
Full Version: stereo to 2xmono wav converter?
Hydrogenaudio Forums > Hydrogenaudio Forum > General Audio
smok3
some time ago john33 was nice enough to provide m2s utility found on rarewares up to this days, now i would need a similar - but reversed s2m thingy..., anything like that lying around?

(the desired usage would be:
s2m audio.wav (i would need 48 kHz only)

and the results:
auido.a1.wav
audio.a2.wav
(2xmono, 48 kHz)

(+ the ability to run this easily on lots of files and a warning if the input file is not 48kHz, also wavgain calculation and limiting the peaks to desired scale would fit in fine.)

(i split this part from my original mjpeg question in video section...)
M
Not quite the desired syntax, but you can easily achieve the same results via SoX. Each of the following lines will accept a stereo file as input (or a group of files, if used from within Speek's batchenc frontend) and output a monophonic file with the appropriately described channel:
CODE
sox <infile> -c 1 <outfile-Left.wav> avg -l
sox <infile> -c 1 <outfile-Right.wav> avg -r

These lines work equally well with 48kHz sources as with 44.1kHz. Hope this helps.

- M.
smok3
ty M, with some extra help, i came up with this 'fancy' bat file (so i dont need batchenc and everything gets done in one step..., no RG at this point thought):

CODE
FOR %%i in (*) DO volumax -y -l -12.0 "%%i"
FOR %%i in (*) DO sox "%%i" -c 1 "%%~ni.a2.wav" avg -r | sox "%%i" -c 1 "%%~ni.a1.wav" avg -l


biggrin.gif

(john33-volumax & sox are in system path)

edit: actually - probably i could use sox as -12db peak normalizer, but i have no clue how the command line should look like.
john33
Sorry for the delay in making in response to this!! wink.gif

You can d/l a program for testing, unsurprisingly called "s2m", from here: http://homepage.ntlworld.com/jfe1205/s2m.zip smile.gif

I've given it a quick test and it seems OK, but you should test it out yourself before doing any extensive processing. This is basically a version of WaveGain, but producing 2 mono output files - one with .L.wav as a suffix and the other as .R.wav. All WaveGain processing is performed on the "stereo" input file so that the output replaygained files are a matching pair. All other included WaveGain options should be OK, but I've not tested exhaustively. If the input file is NOT 48000Hz, a warning is issued, but processing continues.

If there are any problems, let me know.
n68
Hello.

For what it`s worth, checked it with speek`s WG. frontend last night,
and running fine. I imagine this util. also can be used in foo_openwith
and foo_run.

wink.gif
smok3
john33: great stuff!

but i do have some problems:
- i dont know how to peak normalize to -12 dB (i decided i will not use RG since i only control a portion of files on that specific jukebox..., and the others are not RGed in anyway, so...) - but i can always use volumax for this step...
- would be great if i could manually define suffix somehow (i just need a1 and a2, but to be usable for others as well)
( - and a wish: run ssrc first if file is not 48 kHz - or is there a way to do a bat file that will do that somehow?)
john33
QUOTE(smok3 @ Sep 3 2004, 09:41 AM)
john33: great stuff!

but i do have some problems:
- i dont know how to peak normalize to -12 dB  (i decided i will not use RG since i only control a portion of files on that specific jukebox..., and the others are not RGed in anyway, so...) - but i can always use volumax for this step...
- would be great if i could manually define suffix somehow (i just need a1 and a2, but to be usable for others as well)
( - and a wish: run ssrc first if file is not 48 kHz - or is there a way to do a bat file that will do that somehow?)
*


I'll try to put together a version of Volumax for you, but it will have to be the early part of next week as I'm away over the weekend. wink.gif
smok3
tnx in advance, uhmm what can i say - you are to kind.
john33
A modified version of Volumax called - s2mv - is now on this link: http://homepage.ntlworld.com/jfe1205/s2mv.zip . No resampling included, just the warning. I'll look at adding the resampling later. wink.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.