Subject: Re: [ecasound] ecalength
From: Kai Vehmanen (firstname.lastname@example.org)
Date: Thu Apr 26 2001 - 02:45:54 EEST
On Wed, 4 Apr 2001, S. Massy wrote:
> I've scribbled this little "program" to make it easy to retrieve the
> length of a file from the command line. I post it here in the hope
> that it might be useful to others too. Please note that I'm _not_ a
> professional programmer, so be nice. :) Please post it back if you
> bring any improvement to it.
Actually I've been thinking about adding something like this to ecatools.
I think 'ecalength' would fit to the current util set quite well. And it
would be good to have a few ECI apps (both C and Python apps) in the
ecatools set, just to show that not everything needs to be C++ and use
- add support for new ai-* and ao-* commands sets ;)
- usign the recently added ai-get-format/ao-get-format to
also fetch audio format information
- have separate switches for printing individual values;
ie. by default ecalength/ecafile/ecasomething would
print all info, but with..
-l -> print only length in seconds
-b -> print only sample resolution (bits)
... -> and son on
Using the separate switches, you could easily use ecalength in scripts
('echo File length is `ecalength -l $1` seconds.´).
> BTW, it would be really nice if it was possible to pass the command
> and the argument separately. I believe there's already a version of
> this for floats, couldn't there be one for strings as well? Or have I
> just missed something?
Even the float-thing is a bit messy, but it was desperately needed (you
need quite a few bytes to textually represent 64bit floating point
values). So at least now, I'd like to avoid adding any new ECI calls. But
I have to think about this some more...
-- http://www.eca.cx Audio software for Linux!
-- To unsubscribe send message 'unsubscribe' in the body of the message to <email@example.com>.
This archive was generated by hypermail 2b28 : Thu Apr 26 2001 - 03:32:20 EEST