Re: [LAU] How is the bass mixed? Per-channel frequency analysis? Histogram?

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Matt Garman <matthew.garman@...>
Cc: <linux-audio-user@...>
Date: Thursday, February 6, 2014 - 11:07 am

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

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

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

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@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-user

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [LAU] How is the bass mixed? Per-channel frequency analy..., Robin Gareus, (Thu Feb 6, 11:07 am)
Re: [LAU] How is the bass mixed? Per-channel frequency analy..., Vytautas Jancauskas, (Thu Feb 6, 8:41 am)
Re: [LAU] How is the bass mixed? Per-channel frequency analy..., Vytautas Jancauskas, (Thu Feb 6, 1:54 pm)
Re: [LAU] How is the bass mixed? Per-channel frequency analy..., Vytautas Jancauskas, (Fri Feb 7, 1:16 pm)
Re: [LAU] How is the bass mixed? Per-channel frequency analy..., Raphaël Mouneyres, (Fri Feb 7, 9:23 am)
Re: [LAU] How is the bass mixed? Per-channel frequency analy..., Vytautas Jancauskas, (Fri Feb 7, 7:18 am)