LinuxMedia 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. > >>> > >>> 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. > > This should work... > > bash> ecalength LengthFile.wav > LengthFile.wav: 9.083s (0m9s) > > bash> ecasound -i:ExtractFrom.wav -y:(StartPosition) -t:9.083 > -o:Extracted.wav > > bash> ecasound -a:1 -i:Extracted.wav -a:2 -i:MixWith.wav -a:1,2 > -o:BothFilesMixed.wav > > Of course, this gets tricky if any of the files in question have > different channel counts, bit depths, sampling rates or are of > different file types. It still can be done, but there will be other > interm steps involved. But in a best case scenerio, the above should > work. > > Let me know if this how it went.... > Rocco > Thanks Rocco, That's close to what Jeremy mentioned over on the ecasound list. I asked him, and I'll ask here: do you know who to find the closest zero crossing? in the extracted "from" file? That would seem to be a necessary step to prevent clicks. brad