0
0

I’m looking for some sample code to add an equalizer into my Delphi MP3Player….. do ya know where could i find this kind of code?? Thanks VERY MUCH, Arigatou gozaimasu, obrigado, and etc! ^_^

See ya![/list]

  • You must to post comments
0
0

Well actually there was another post ([url:tcqpr1w4]http://www.fmod.org/forum/viewtopic.php?t=651[/url:tcqpr1w4]) covering this subject.

c u laser

  • You must to post comments
0
0

thanks pal =]

=]
[=
=]
[=
=]
[=

๐Ÿ˜ฎ

  • You must to post comments
0
0

Oh you are welcome
=-=-=-=-=-=-=-=-=-
๐Ÿ˜€ :) ๐Ÿ˜† ๐Ÿ˜‰ ๐Ÿ˜›

  • You must to post comments
0
0

Hi

Im new here, and i really like FMOD sofar. I changed my program’s internal player from Xaudio to FMOD, in minutes, and it works very nice. I even improved the spectrum to do background peaks… looks cool ๐Ÿ˜‰

Anyway.. im also having trouble getting the equalizer to work at all. I have read about every post about this, even downloaded the VB exampl, and tried to ‘fix’ my program so it would work… I set the buffersize up, i make sure im using directx8, and so on.. i am sure i have initialized correctly, and using it correctly, but i keep getting FALSE returned from

FSOUND_FX_SetParamEQ

when trying to change during play.. i tried to use

FSOUND_SetPaused(song.Channel, TRUE);
FSOUND_FX_SetParamEQ
FSOUND_SetPaused(song.Channel, FALSE);

to no availl.. im very puzzled

I think i have tried all possible combinations with this stuff, and i cant get it to work… The VBS example worked, but was very slooow! (Using 800mhz duron)

Would somebody please post a sample in Delphi code, that would show how to make an equalizer work?

What i really want is an true stereo equalizer, where i can set both the left and right channel’s eqalizer setting… But it seems that FMOD only supports 16 FX’s ?

  • You must to post comments
0
0

To tell the truth I have never experimented in DSP and so. But if I remember well you have to stop the FMOD and then start it again, in order to activate your changes…
Sorry if this does not help a lot.
But at the moment I am reading some work from the site [url:2tnfpo66]http://www.musicdsp.org[/url:2tnfpo66].

c u laser

  • You must to post comments
0
0

Ok.. i’ll try to post what i got so far, maybe someboy will correct me on the way.. i believe i have read about all posts about the equalizer stuff, but i still dont get it to work correctly. I use Delphi 6 personal.

Btw.. i have also corrected the typo in fmod.pas

-fmod.pas

function FSOUND_FX_SetParamEq; external FMOD_DLL {$IFDEF WIN32} name ‘_FSOUND_FX_SetParamE[b:1r79gzg4]Q[/b:1r79gzg4]@16’ {$ENDIF};

This is what i do to initialize:
[code:1r79gzg4]
{ Initialize FSOUND }
FSOUND_SetOutput(FSOUND_OUTPUT_DSOUND);
FSOUND_SetBufferSize(200);
FSOUND_SetDriver(0); // default
FSOUND_SetHWND(Handle);
if not FSOUND_Init(44100, 32, FSOUND_INIT_ENABLEOUTPUTFX AND FSOUND_INIT_GLOBALFOCUS) then
begin
Application.MessageBox(FMOD_ErrorString(FSOUND_GetError), ‘FSOUND_Init’, MB_OK or MB_ICONHAND);
Halt;
end;
[/code:1r79gzg4]

ok.. so i load the file:

[code:1r79gzg4]
song.Stream := FSOUND_Stream_OpenFile(PChar(filename), FSOUND_NORMAL or FSOUND_LOOP_NORMAL, 0);[/code:1r79gzg4]

And gets everything ready, with dsp stuff.. but does not play it yet:
[code:1r79gzg4]
song.Channel := FSOUND_Stream_PlayEX(FSOUND_FREE, song.Stream,0,true);
[/code:1r79gzg4]

Now i set up the Eq stuff.. still not playing.. i use all 16 fx’s.
[code:1r79gzg4]
for tel:=1 to 16 do
begin
eq[tel].fxid:=FSOUND_FX_Enable(song.channel, cardinal(FSOUND_FX_PARAMEQ));
eq[tel].value:=0;
end;
for tel:=1 to 16 do
if not FSOUND_FX_SetParamEQ(eq[tel].fxid, eqtable[tel], 18, eq[tel].value) then
showmessage(‘Cant set EQ’);

[/code:1r79gzg4]

According to the help file
[quote:1r79gzg4]
FSOUND_FX_SetParamEQ
Sets the parameters for the Param EQ effect on a particular channel

signed char F_API FSOUND_FX_SetParamEQ(
int fxid,
float Center,
float Bandwidth,
float Gain
);

Parameters
channel Channel number/handle to set ParamEQ parameters for.

Center Center frequency, in hertz, in the range from 80 to 16000. This value cannot exceed one-third of the frequency of the buffer.

Bandwidth Bandwidth, in semitones, in the range from 1 to 36.

Gain Gain, in the range from -15 to 15.

Return Value
On success, TRUE is returned.
On failure, FALSE is returned.

Remarks
Make sure you have enabled this effect with FSOUND_FX_Enable and FSOUND_FX_WAVES_PARAMEQ before using this function.
[/quote:1r79gzg4]

I dont know what is meant by “bandwidth” … im sure i could figure it out if i could get it running.. ๐Ÿ˜† Anyway.. i set it to 18, which i saw in a VB example, in this forum:
[url:1r79gzg4]http://www.fmod.org/forum/viewtopic.php?t=685&sid=138bf1708abedfa5eecbae4a4ef4323c[/url:1r79gzg4]

The remarks also mentions to remember to enable the “FSOUND_FX_WAVES_PARAMEQ”.. but there is no reference to that in the help file. What is meant here?

18 bandwidth.. beats me why? ๐Ÿ˜•

Now i start playing:
[code:1r79gzg4]
FSOUND_SetPaused(song.Channel, FALSE);
[/code:1r79gzg4]

And the music starts.

Ok.. i have 16 small trackbars that goes from -15 to 15. As soon as one of them is changed, i grab the data in the trackbars, and use it in this function:

[code:1r79gzg4]

Const
EQTable : array[1..16] of word = (80,170,310,600,800,1000,3000,4500,6000,9000,12000,14000,16000,18000,20000,22000);

// FSOUND_SetPaused(song.Channel, TRUE);
for tel:=1 to 16 do
if not FSOUND_FX_SetParamEQ(eq[tel].fxid, eqtable[tel], 18, eq[tel].value) then
showmessage(‘Cant set EQ’);
// FSOUND_SetPaused(song.Channel, FALSE;
[/code:1r79gzg4]

All i get is “cant set…”.. so the function returns false… so im stuck… ๐Ÿ˜•
And as you may notice i also tried the pause function in between, but to no avail ๐Ÿ˜ฅ
I sure its no problem getting the equalizer to work, without creating tons of your own code, with FFT, and iFFT stuff.. this should be handled by the player internally (and it already is.. im sure)… well thats just what i think.

Hope someone can understand my jibberish, and help me out.

  • You must to post comments
Showing 6 results
Your Answer

Please first to submit.