View Full Version : command line audio tools for linux?
November 3rd 06, 09:29 PM
Greetings,
I'm in the hunt for Linux-based command line tools that might conspire
to automate this process.
concatenate a string of WAV files
maximize volume
automagically split the big honkin file where the level falls
below a given dB level for, oh 3-5 seconds
I guess I'm sort of looking for the audio equivalent of imagemagick (a
package of nifty command line image manipulation tools).
In my application, the source files are 15min WAV's from a digital
recorder, and they're typically of live performances. The focus here
is on turnaround time and ease -- basically turning around live
recordings made of shows for consumption by the band members
themselves. If there are one or two too many tracks/wav files cut,
that's okay.
If command line tools don't exist, is there anything GUI or not in the
Linux world that'll do this? Free of course is preferable. :-)
TIA for any insight or advice.
Best Regards,
--
Todd H.
http://www.toddh.net/
Robert Heller
November 3rd 06, 09:51 PM
At 03 Nov 2006 15:29:40 -0600 wrote:
>
>
> Greetings,
>
> I'm in the hunt for Linux-based command line tools that might conspire
> to automate this process.
>
>
> concatenate a string of WAV files
cat a.wav b.wav >ab.wav
> maximize volume
> automagically split the big honkin file where the level falls
> below a given dB level for, oh 3-5 seconds
>
> I guess I'm sort of looking for the audio equivalent of imagemagick (a
> package of nifty command line image manipulation tools).
>
I believe lame can do some of this. And create a .mp3 file as final
output. Also see sox -- the man page looks like an audio equivelant to
imagemagick's man page.
> In my application, the source files are 15min WAV's from a digital
> recorder, and they're typically of live performances. The focus here
> is on turnaround time and ease -- basically turning around live
> recordings made of shows for consumption by the band members
> themselves. If there are one or two too many tracks/wav files cut,
> that's okay.
>
> If command line tools don't exist, is there anything GUI or not in the
> Linux world that'll do this? Free of course is preferable. :-)
>
> TIA for any insight or advice.
>
> Best Regards,
--
Robert Heller -- 978-544-6933
Deepwoods Software -- Linux Installation and Administration
http://www.deepsoft.com/ -- Web Hosting, with CGI and Database
-- Contract Programming: C/C++, Tcl/Tk
Emiliano Grilli
November 3rd 06, 09:59 PM
wrote:
> Greetings,
>
> I'm in the hunt for Linux-based command line tools that might conspire
> to automate this process.
>
>
> concatenate a string of WAV files
> maximize volume
> automagically split the big honkin file where the level falls
> below a given dB level for, oh 3-5 seconds
>
> I guess I'm sort of looking for the audio equivalent of imagemagick (a
> package of nifty command line image manipulation tools).
You might have a look at ecasound:
http://www.eca.cx/
It's a quite powerful command line audio tool.
other useful CLI audio tools are sndfile-info, resample, normalize,
and sox
> Free of course is preferable. :-)
Those are all licensed under GPL :-)
>
> TIA for any insight or advice.
HTH
--
Emiliano Grilli
Linux user #209089
http://www.emillo.net
Todd H.
November 3rd 06, 10:15 PM
Robert Heller > writes:
> At 03 Nov 2006 15:29:40 -0600 wrote:
>
> >
> >
> > Greetings,
> >
> > I'm in the hunt for Linux-based command line tools that might conspire
> > to automate this process.
> >
> >
> > concatenate a string of WAV files
>
> cat a.wav b.wav >ab.wav
Hi Robert,
Thanks for the response. I've been tempted to try that... figuring
it couldn't be that easy. Is the file format of WAV such that that
works all the time, or are there headers that really should be
rewritten or... ?
> I believe lame can do some of this. And create a .mp3 file as final
> output. Also see sox -- the man page looks like an audio equivelant to
> imagemagick's man page.
Cool - I'll check that out.
Much appreciated.
--
/"\ ASCII Ribbon Campaign | Todd H
\ / | http://www.toddh.net/
X Promoting good netiquette | http://triplethreatband.com/
/ \ http://www.toddh.net/netiquette/ | http://myspace.com/mytriplethreatband
Michael Black
November 3rd 06, 10:15 PM
Todd H. ) writes:
> Robert Heller > writes:
>
>> At 03 Nov 2006 15:29:40 -0600 wrote:
>>
>> >
>> >
>> > Greetings,
>> >
>> > I'm in the hunt for Linux-based command line tools that might conspire
>> > to automate this process.
>> >
>> >
>> > concatenate a string of WAV files
>>
>> cat a.wav b.wav >ab.wav
>
> Hi Robert,
>
> Thanks for the response. I've been tempted to try that... figuring
> it couldn't be that easy. Is the file format of WAV such that that
> works all the time, or are there headers that really should be
> rewritten or... ?
>
It won't work, there is a header that not only includes the type of
file, but info on the actual .wav and it's length. Those will not
be updated with the cat command, and I would think the headers would
even land inside the One Big Wav.
There are bound to be lots of programs that do the deed.
wavemixer would seem to be one, I say "seem" because it wouldn't run
when I tried it (a missing lib I think). But it's not really
a complicated task, it just has to deal with the header.
Michael
Scott Dorsey
November 3rd 06, 10:24 PM
Robert Heller > wrote:
>At 03 Nov 2006 15:29:40 -0600 wrote:
>>
>> Greetings,
>>
>> I'm in the hunt for Linux-based command line tools that might conspire
>> to automate this process.
>>
>> concatenate a string of WAV files
>
> cat a.wav b.wav >ab.wav
Not sufficient, since you need to deal with the headers. I think something
out of Cook's audio toolbox will let you turn the wav into a raw data file
that you can cat with other raw data files, then turn back into a .wav.
tail -c +56 will strip the header off the .wav file, and you could proabably
do some trick with that... if you were SURE all the files had the same word
length, you could do
tail -c +56 b.wav >> a.wav
tail -c +56 c.wav >> a.wav
--scott
--
"C'est un Nagra. C'est suisse, et tres, tres precis."
Brendan Gillatt
November 3rd 06, 10:37 PM
wrote:
> If command line tools don't exist, is there anything GUI or not in the
> Linux world that'll do this? Free of course is preferable. :-)
There is probably many linux (or even GPL) tools that will do such a
thing yet there is not a chance at all that Sony will release anything
that has a remote ability to actually get your nice split up tracks onto
a disc =/
--
| Brendan Gillatt |
| brendan {at} brendan \removethis// gillatt {dot} co {dot} uk |
| http://www.brendangillatt.co.uk |
| PGP Key: pgp.mit.edu:11371/pks/lookup?op=get&search=0x6E265E61|
Dan Espen
November 3rd 06, 10:39 PM
writes:
> Greetings,
>
> I'm in the hunt for Linux-based command line tools that might conspire
> to automate this process.
>
>
> concatenate a string of WAV files
Install sox:
sox in1.wav in2.wav ... out.wav
> maximize volume
sox has something (read the man page).
There is a program called "normalize" (no experience).
Audacity does the best job.
> automagically split the big honkin file where the level falls
> below a given dB level for, oh 3-5 seconds
If the time is known exactly beforehand, sox.
Audacity has sometime for silence detection (no experience).
gramofile does a very good job on vinyl rips.
> I guess I'm sort of looking for the audio equivalent of imagemagick (a
> package of nifty command line image manipulation tools).
sox.
> If command line tools don't exist, is there anything GUI or not in the
> Linux world that'll do this? Free of course is preferable. :-)
all free.
Emiliano Grilli
November 3rd 06, 10:47 PM
wrote:
> concatenate a string of WAV files
sox infile1 [ infile2 ... ] outfile
(max 32 input files)
> maximize volume
normalize file.wav (http://normalize.nongnu.org/) or
ecanormalize file.wav (part of ecasound)
> automagically split the big honkin file where the level falls
> below a given dB level for, oh 3-5 seconds
gramofile ( http://www.opensourcepartners.nl/~costar/gramofile/ )
according to
http://www.opensourcepartners.nl/~costar/gramofile/Tracksplit2.txt is
capaple of splitting automatically wav into smaller portions.
HTH
--
Emiliano Grilli
Linux user #209089
http://www.emillo.net
The Spanish Inquisition
November 4th 06, 11:31 AM
Michael Black wrote:
> Todd H. ) writes:
>> Robert Heller > writes:
>>
>>> At 03 Nov 2006 15:29:40 -0600 wrote:
>>>
>>>>
>>>> Greetings,
>>>>
>>>> I'm in the hunt for Linux-based command line tools that might conspire
>>>> to automate this process.
>>>>
>>>>
>>>> concatenate a string of WAV files
>>> cat a.wav b.wav >ab.wav
>> Hi Robert,
>>
>> Thanks for the response. I've been tempted to try that... figuring
>> it couldn't be that easy. Is the file format of WAV such that that
>> works all the time, or are there headers that really should be
>> rewritten or... ?
>>
> It won't work, there is a header that not only includes the type of
> file, but info on the actual .wav and it's length. Those will not
> be updated with the cat command, and I would think the headers would
> even land inside the One Big Wav.
>
> There are bound to be lots of programs that do the deed.
> wavemixer would seem to be one, I say "seem" because it wouldn't run
> when I tried it (a missing lib I think). But it's not really
> a complicated task, it just has to deal with the header.
Your post inspired a quick google for 'wavcat' (that's what I'd call
it), results:
http://www.morphet.org.uk/comp/wavtools.html
http://www.programmersheaven.com/download/47517/download.aspx
I normally reach for the sox toolkit for jobs like this.
Ximinez
--
Our three weapons are fear, surprise, and ruthless efficiency...
and an almost fanatical devotion to the Pope....
http://www.ai.mit.edu/people/paulfitz/spanish/t1.html
http://www.youtube.com/watch?v=gldlyTjXk9A
Kevin the Drummer
November 6th 06, 04:47 PM
The Spanish Inquisition > wrote:
> I normally reach for the sox toolkit for jobs like this.
Yes, it's amazing what one can get done with SoX and a Makefile to drive
it. Also, 'normalize' is a good command line program. Isn't ecasound
command line too? I think there was an article in a Linux Journal
magazine earlier this year that wrote specificly about command line
sound file manipulation.
Best of luck....
--
PLEASE post a SUMMARY of the answer(s) to your question(s)!
Show Windows & Gates to the exit door.
Unless otherwise noted, the statements herein reflect my personal
opinions and not those of any organization with which I may be affiliated.
Todd H.
November 6th 06, 05:10 PM
(Kevin the Drummer) writes:
> The Spanish Inquisition > wrote:
> > I normally reach for the sox toolkit for jobs like this.
>
> Yes, it's amazing what one can get done with SoX and a Makefile to drive
> it. Also, 'normalize' is a good command line program. Isn't ecasound
> command line too? I think there was an article in a Linux Journal
> magazine earlier this year that wrote specificly about command line
> sound file manipulation.
>
> Best of luck....
Thanks to all who responded. sox is the imagemagick of sound! :-)
I haven't been able to completely automate my workflow on these
unfortunately. One thing I found was that sox seemed to add a click
at every file boundary that I had to manually remove in audacity in
order for normalization to do much anything (since the click's
magnitude was pretty large in magnitude). The windows utility
WAVmerge didn't seem to have this issue when glomming WAV's together
so I'm not sure if sox is perhaps doing something inelegant in that
operation.
Due to the trouble normalizing, I haven't played with automated
splitting yet, but opted to do it visually in audacity. Audacity's
track splitting on labels is not quite as elegant as it could be.
Thanks much for everyone who responded. Sox and ecatools have been
fun to play with.
Best Regards,
--
/"\ ASCII Ribbon Campaign | Todd H
\ / | http://www.toddh.net/
X Promoting good netiquette | http://triplethreatband.com/
/ \ http://www.toddh.net/netiquette/ | http://myspace.com/mytriplethreatband
Michael Black
November 6th 06, 06:09 PM
Kevin the Drummer ) writes:
> The Spanish Inquisition > wrote:
>> I normally reach for the sox toolkit for jobs like this.
>
> Yes, it's amazing what one can get done with SoX and a Makefile to drive
> it. Also, 'normalize' is a good command line program. Isn't ecasound
> command line too? I think there was an article in a Linux Journal
> magazine earlier this year that wrote specificly about command line
> sound file manipulation.
>
Actually, it's the current issue, unless a new one has since arrived. I
only noticed it a couple of weeks ago, so it may still be on the newsstand.
Michael
vBulletin® v3.6.4, Copyright ©2000-2025, Jelsoft Enterprises Ltd.