On 02/05/2014 04:36 PM, Matt Garman wrote: > I'm not sure if "histogram" is the right word, but in my mind what > I'd like to see, per-channel, is something like this: > > 150--125 Hz: x samples 125--100 Hz: y samples 100--80 Hz: z > samples ... a low-pass or band-pass filter, followed by an RMS meter can do what you want. Though ideally you'll look at the stereo-phase correlation (after filtering). [..] > I am a programmer, and thought it would be easy to quickly hack > something up that would do this, but I have no experience with > signal processing, and as I started reading about this, I quickly > got in over my head! So I was hoping there might already exist a > tool that has this functionality. There are various GUI tools and Plugins for audio-analysis. But that's no fun for batch-analysis of > 10K audio-files. I don't think a commandline tool exists. You might be able to hack something together jalv.console (http://dev.drobilla.net/ticket/943) or vamp-simple-host or maybe ecasound. But it'll probably be easier to whip something up from scratch; some simplified pseudo-code: foreach audio-sample as inL, inR { /* 1st order low pass filter */ left += w * (inL - left); right += w * (inR - right); /* calc RMS */ rmsL = left * left; rmsR = right * right; if (rmsL > threshold_squared) ++L_above; if (rmsR > threshold_squared) ++R_above; } w ~ omega, is the filter constant. For -3dB at freq: w = 1.0 - e^(-2.0 * π * freq / SampleRate); see also https://en.wikipedia.org/wiki/Low-pass_filter This should get you started at least, there's plenty of example code and literature around for more advanced filters. > The motivation for this is: I have a hardware DAC (digital audio > converter) in one part of my house, and a subwoofer in another. > There is a single coax run between the DAC and subwoofer, so I can > only send one channel. If you only have one subwoofer, just downmix to mono before sending the audio there. Cheers! robin _______________________________________________ Linux-audio-user mailing list Linux-audio-user@xxxxxxxxxxxxxxxxxxxx http://lists.linuxaudio.org/listinfo/linux-audio-user