Mark Knecht wrote:
On 12/19/05, Brad Fuller <brad(a)sonaural.com>
wrote:
Brad Fuller wrote:
>Brad Fuller wrote:
>
>
>
>>I couldn't find a way to do this in ecasound, maybe there's a way to
>>do it. Here's what I want to do:
>>
>>Find the exact length of a audio file in ms. I think ecalength can do
>>this, I know it's not sample accurate, but I just need down to the
>>around 1ms. Maybe there's another option other than ecalength.
>>
>>
sndfile-info?
mark@lightning ~ $ sndfile-info Web-music/2AM-40Bars.wav
Version : libsndfile-1.0.11
========================================
File : Web-music/2AM-40Bars.wav
Length : 35744300
RIFF : 35744292
WAVE
fmt : 16
Format : 0x1 => WAVE_FORMAT_PCM
Channels : 2
Sample Rate : 44100
Block Align : 6
Bit Width : 24
Bytes/sec : 264600
data : 35744256
End
----------------------------------------
Sample Rate : 44100
Frames : 5957376
Channels : 2
Format : 0x00010003
Sections : 1
Seekable : TRUE
Duration : 00:02:15.087
Signal Max : 7.50863e+06 (-0.96 dB)
mark@lightning ~ $
I cannot help with the rest. Sorry.
Thanks mark. I was hoping that there was a utility that I could use in
a script as I have to do this many many times. I guess I could grep for
"Duration<tab>: " and grab the numbers.
brad
- Mark
>>>Then, I want to extract a section of another file: at a specific
>>>location in ms at a length of the file above.
>>>
>>>Then, mix that extracted segment with another file and save the
>>>result to a new file. How can this be done? I don't know of a
>>>utility that can extract a specific length at a specific location in ms.
>>>
>>>brad
>>>
>>>
>>>
>>>
>>I forgot all about sox - looks like I could use sox to essentially
>>extract a section by using the feature "trim start length"
>>
>>
>does anyone have any ideas on how I can accomplish this process? Has
>anyone used the "trim" feature in sox?
>Also, I like to be able to extract the file section (step 2 above) to
>the nearest zero crossing (to prevent potential clicks). Any pointers,
>even off the top of your head, would be most appreciated.
>
>thanks,
>
>
>