0
0

Some of my mp3 or ogg files are differently recorded, I mean volume output is not same, one song is enough loud, second one is too loud, third one is
too silent…so I have to change mixer volume values by hands …
My question is :
Is there any way to normalize volumes while stream plays to some value ?

tnx

  • You must to post comments
0
0

This is way over my head.

What I wanted was a function in FMOD that would give a volume setting that I could save with my playlist, and adjust the volume on each song.

Maybe in FMOD 4.0 ?

  • You must to post comments
0
0

[quote="David":2v37pok6]This is way over my head.

What I wanted was a function in FMOD that would give a volume setting that I could save with my playlist, and adjust the volume on each song.

Maybe in FMOD 4.0 ?[/quote:2v37pok6]

This sound like ReplayGain support.
[url:2v37pok6]http://replaygain.hydrogenaudio.org/[/url:2v37pok6]

This will be a useful function. Can be implemented with a gain function.

cmstein

  • You must to post comments
0
0

[quote="Jordi":2cv1yql0]Hello

A good way, is calling the DirectX function SET COMPRESSOR

There is an example of code with Delphi,

(I have placed the constant -1000 instead of FSOUND_SYSTEMCHANNEL
because isn’t defined in the Delphi API)

[code:2cv1yql0]

Var compHandle: Integer;

Begin

FSOUND_SetBufferSize(100);
if not FSOUND_Init(44100, 128, FSOUND_INIT_ENABLEOUTPUTFX or FSOUND_INIT_GLOBALFOCUS) then
begin
Application.MessageBox(FMOD_ErrorString(FSOUND_GetError), ‘FSOUND_Init’, MB_OK or MB_ICONHAND);
Halt;
end;

FSOUND_SetPaused(-1000, TRUE);
compHandle := FSOUND_FX_Enable(-1000,Ord(FSOUND_FX_Compressor));
FSOUND_FX_SetCompressor(compHandle,0,1,2500,-20,10,0);
FSOUND_SetPaused(-1000, FALSE);

End;

[/code:2cv1yql0]

With the correct settings, you can emulate a real AGC controller

I hope this helps you

Regards,[/quote:2cv1yql0]

But what are the correct settings? I tried the compressor but without success. I want to have nearly the same effect that the Dynamic compressor in soundforge has. It is realy great but I want to do this in realtime. And chance of this with the embadded FX compressor?

Cheers
Mike

  • You must to post comments
0
0

Uhm… just open them with a good audio editor and do the job!
Personally I use Goldwave.
If you want to do this in real time, you have to write a dsp, I think… You have to analyze the signal, get maximum VU level and amplify or reduce the signal as your wish.
Check on the web for “Normalizer”, “AGC” and “Automatic Gain Control”.
Maybe I can send you the code I used in my player.

  • You must to post comments
0
0

For mp3 I use Mp3Gain [url:23mqamrf]http://www.geocities.com/mp3gain/[/url:23mqamrf]. This program change the volume of mp3 files, without decoder/encoder the file, i.e. out of your fmod based program.

For ogg, I use WinVorbis [url:23mqamrf]http://winvorbis.stationplaylist.com/[/url:23mqamrf]. This program don’t modifies the files, only add tags with the gain.

[quote="blackshard":23mqamrf]
Maybe I can send you the code I used in my player.[/quote:23mqamrf]

This can be a good idea 😉

cmstein

  • You must to post comments
0
0

I’m looking for a normalizer to have in my player.

But I want to do this without doing anything with the actual sound file.

What I would like to do is get a maximum volume function, ie one that returns the max peak for a sound file. Must support MP3, and hopefully OGG and WAV

Any ideas ?

David

  • You must to post comments
0
0

Hello

A good way, is calling the DirectX function SET COMPRESSOR

There is an example of code with Delphi,

(I have placed the constant -1000 instead of FSOUND_SYSTEMCHANNEL
because isn’t defined in the Delphi API)

[code:9s7uw8ak]

Var compHandle: Integer;

Begin

FSOUND_SetBufferSize(100);
if not FSOUND_Init(44100, 128, FSOUND_INIT_ENABLEOUTPUTFX or FSOUND_INIT_GLOBALFOCUS) then
begin
Application.MessageBox(FMOD_ErrorString(FSOUND_GetError), ‘FSOUND_Init’, MB_OK or MB_ICONHAND);
Halt;
end;

FSOUND_SetPaused(-1000, TRUE);
compHandle := FSOUND_FX_Enable(-1000,Ord(FSOUND_FX_Compressor));
FSOUND_FX_SetCompressor(compHandle,0,1,2500,-20,10,0);
FSOUND_SetPaused(-1000, FALSE);

End;

[/code:9s7uw8ak]

With the correct settings, you can emulate a real AGC controller

I hope this helps you

Regards,

  • You must to post comments
0
0

Hi Jordi.

Did not understand what you were trying to do here.

David

  • You must to post comments
0
0

Yeah. That’s true. A compressor would work as good as an AGC.
But David, are you talking about a dynamic AGC or a static volume normalizer? The difference is that the first adjust the volume dynamically while playing a song, while the second amplifies the song before playing.

  • You must to post comments
0
0

I think the best method would be to amplify the song. You could use the Compressor DSP or you could write a amplify Callback function. Using the compressor would be easier but writing your own callback would be more reliable.

  • You must to post comments
0
0

hm…I need it for Linux not Windows so I need useable solution with fmod.

  • You must to post comments
Showing 11 results
Your Answer

Please first to submit.