Help - Search - Members - Calendar
Full Version: Columns UI Equalizer panel
Hydrogenaudio Forums > Hosted Forums > foobar2000 > Development - (fb2k)
Mastermnd
Hi everyone!

I think I just finally found an excuse to learn about Foobar plugins!
I want a plugin to control foobar's equalizer.
Basically, I want to be able to have a ColumnsUI panel that can:
1) Determine whether the EQ is on/off
2) Turn the EQ on/off (I'll have a green/red light with a small switch or something).
3) Load a preset (maybe have programmable buttons, maybe a list...)
*No need to modify the frequencies from this panel.
I want something simple to avoid the darn floating panel, something that looks good, something that does not take too much space and is always visible in my layout.

So i've got VS2008 set up, and unzipped foobar's SDK to my projects folder. When i open the solution everything appears to be ok.
I then downloaded ColumnsUI SDK, it also appears to load OK now.
I then downloaded the "tutorial" stickied in this forum, and although i'm more of a C/Java programmer (not c++) I seem to get enough of the code to make some progress.

Now my problem is that dsp.h does not seem to contain the functionality i need to do the above.
I was thinking that maybe it's best to examine the equalizer's dll to see which functions it exports, but somehow I can't find it.
foo_dsp_std.dll doesn't seem to be what i'm looking for, and only exports foobar2000_get_interface.

Can someone please point me in the right direction?
Thanks
Zao
Unless the component explicitly exports any other functions, the only function exported by a component is the foobar2000_get_interface function.
When a component is loaded by the core, the core calls that function to get information on all services exposed by the component.
In your case, you should not try to directly interact with the DLL that happens to contain the equalizer DSP service, but instead retrieve the DSP manager service and ask it for the current DSP chain.
From that chain, you can retrieve the GUIDs of the DSP services currently used, and from there you can add/remove DSP components from the current global DSP chain, as well as change their presets. Or so I guess, as I don't have the documentation in front of me.
If I would do something like this, I would probably write my own equalizer component with the built-in ability to be modified by a UI element.
Mastermnd
Thanks, that was helpful. I also realized that from looking at dsp.h, but didn't know that was the preferred way to do it. What is clear is that, this way, i can determine whether it is in the chain, but I don't know If I can query/change the dsp's settings from there. I can definitely retrieve them, but since I am not the dsp component programmer, I don't know if I'll be able to make sense of the data i get back, or even save it. I'll repost if I make any progress.
Yirkha
QUOTE (Mastermnd @ Oct 4 2009, 15:56) *
I can definitely retrieve them, but since I am not the dsp component programmer, I don't know if I'll be able to make sense of the data i get back, or even save it.
Since the DSP preset format is internal to the individual DSP (unless it's explicitely documented), that doesn't seem like a good idea. Even if you did guess what the format is, it could change in any new version, such practices could get your component banned, etc.
I guess that's why Zao wrote
QUOTE (Zao @ Oct 4 2009, 14:09) *
If I would do something like this, I would probably write my own equalizer component with the built-in ability to be modified by a UI element.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.