|
From: Aaron \Caustik\ R. <ca...@gm...> - 2010-04-30 08:45:32
|
for what it's worth, I've figured out how to tease sox into doing it right. setting the buffer size to equate to half the window size I want (so, 50ms / 2 = 25ms of buffer) does the trick. i've had to move the lowpass/bandpass/highpass into a separate step since i'm not sure about the window size / delay requirements and how that interacts with the 'trim' filter. i'm guessing it would screw things up. On Wed, Apr 28, 2010 at 3:40 PM, Aaron "Caustik" Robinson <ca...@gm... > wrote: > I'll donate $100 to you if you can look at this issue. > > > On Wed, Apr 21, 2010 at 7:50 AM, Aaron "Caustik" Robinson < > ca...@gm...> wrote: > >> I'm attempting to split an input audio file into 3 bands, and measure the >> RMS for each band at 50ms intervals. >> >> Seems easy enough with the filters sox provides, however for some reason I >> can't seem to actually get 50ms resolution. I get about half of that >> (~100ms). Here's the calls I'm making: >> >> ./sox decoded.wav -n lowpass 500 stats trim 0 0.05 : restart 2> >> low-stats.txt >> ./sox decoded.wav -n bandpass 1000 1000 stats trim 0 0.05 : restart 2> >> mid-stats.txt >> ./sox decoded.wav -n highpass 2000 stats trim 0 0.05 : restart 2> >> high-stats.txt >> >> The window for 'stats' is quoted as 50ms. I attempt to send trim to 50ms, >> and use restart to force stats to frequently spew it's data. >> >> Is there something I'm doing wrong here? Is there a better way to pull >> this off? >> >> caustik >> >> > |