A Parametric Equalizer for MOC / Mono Mixing

Hi everyone!

I'm pleased to announce the implementation of a parametric equalizer for MOC!
This idea was on my mind for a long time but last week really got me working on this. I attended a conference and my WiFi-card seems to be broken; so what better to do than to tinker with MOC ? ;-)

So what is this about ?
Some audio players have means to manipulate the sound by adjusting the amplification/damping of certain frequency ranges.
Mostly, they use a fixed number of bands to manipulate the sound and/or provide some common presets.
A parametric equalizer is somewhat different as it allows you to define your bands yourself. You can guess that there would be no nice way of visualizing this kind of approach.
And here we come to an important point: there is no visual representation in this implementation. You define your preset and select it.
If this thing works for the public, maybe using a menu would be the way to go.

If you want to give it a try use this patch: moc-equalizer.patch
There are also some converted WinAmp / XMMS presets: eqsets.tar.gz (extract inside MOCs homedir)

Please read the README for usage information (README_equalizer, created by the patch)!

This patch also introduces the ability to switch on Mono-Mixing. This means to playback the average audio signal from all channels on all channels.
I use MOC at work sometimes using in-ear headphones. For better social acceptance I mostly leave one ear free - but some tunes need stereo; or mixing to mono...
It's off by default but maybe someone else likes this option too... :-)

Note:
This patch is against revision 2096 of MOCs source.
Besides the equalizer, I had to take out the new Berkeley-DB code as it would only crash on my machines.
Additionally I added the libtool-fixes discussed before to it.
I've just seen that there are some changes in the repo currently. I hope to integrate the EQ soon!

Please tell me what you think of this...

Enjoy!

I incorporated the changes to the repository in my copy of the sources.
It seems that Berkeley DB is finally working for me too (on my 32bit machine.

New patch against revision 2099: moc-equalizer_r2099.patch

Very nice work!

Don't be shy and commit it :)

I have no knowledge about such sound filters, so I will no comment this code, just one little note. There is a function sfmt_Bps () in audio.c that does the same thing as your sample_size() except for SFMT_FLOAT (I don;t know why), and there are already endianess conversion fuctions in audio_conversion.c like your swap_XXbit_endianess().

I havent tried the moc patch jet but i want to say that its a really great thing to have a valuable eq in an audio player.. i do sound design and soundrecording and to listen back with a neutral sound at home i have to adjust my loudspeakers due to my room situation , to get a linear and "true" sound of what i have recorded. and this you only can do with a parametric EQ! So this will be a great and powerfull tool for me, and for every audiophile listener, thanks a lot!!!!

The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error.

If you think this is a server error, please contact the webmaster.

========================
Who can upload a new one? please...

Why would you need it anymore? The code for equalizer is already included in MOC code.

The equalizer (and mono-mixing) code has now been committed to the repository (rev 2101).
I hope this makes testing this feature easier for everyone.

The mentioned README_equalizer file gets installed along the other docs (README, config.example, ...).

I can't seem to get this working on an MP3 file (I don't have any others to test with at the moment) with ALSA output.
moc 2.5.0-alpha4 Build: Jan 31 2010 15:00:33

I bound 'M' to toggling mono-mixing. Hitting it gives me
Mono-Mixing set to: on
but when even stopping and playing from the beginning, the sound is output in stereo.

What should I write in the config file to set the mixer to mono in the start of moc?
I didn't find nowhere.

From cursory glance, it belongs in ~/.moc/softmixer. I have "Mono: 0" there. It's also related to ~/.moc/config "Softmixer_SaveState = yes" setting.

Should not be "Mono : 1"?

O.K. it begins with mixer set to mono on. Thanks! I tried and it begins this way.