pre-defined reverb environemnt in EFX

hiya
I have tried EAX before to simulate pre-defined reverb environemnt like auditorium, room, street but i was failed to use EAX using JOAL. after that i got a demo of EFX filter and effects which is working fine. But this demo is generating a typical reverb environment and i dont know wht setting i need to change to simulate various environment around listener. can anyone help me in this regard and give me some sort of example to use EFX effects and filter other than one i got in demo file

cheers

With EAX, you had several different presets for sound environments like a hangar, bathroom, and so on. With EFX, you have no presets, and you have to define your own by adjusting the various settings as needed (it’s moments like this which make me wish OpenAL had attribute matrices like OpenGL to easily push/pop reverb states).

Probably what you’re looking for are the adjustments to the EFX reverb settings. They are all outlined in the Effects Extension Guide (page 102), which is a part of the OpenAL 1.1 w/ EFX SDK. If you don’t already have that guide, I suggest you get it and give it a good read so you know what to do.
The SDK also has 3 EFX demos: EFXEnumerate, EFXFilter, and EFXReverb. You’ll probably want to take a look at EFXReverb as you’ve already taken a look at the Java version of EFXFilter.

Mostly you’ll be adjusting the EFX reverb settings via alEffectsi,iv,f,fv, adjusting reverb density, diffusion, gain, etc…

eg:
al.alEffecti(effect, AL_EFFECT_TYPE, AL_EFFECT_REVERB);
al.alEffectf(effect, AL_REVERB_DENSITY, density);
al.alEffectf(effect, AL_REVERB_DIFUSSION, diffusion);

[EDIT]: I just took a look at the SDK, and the file include/EFX-Util.h has a lot of it’s own presets which I think might be useful for you. The comments in the header file say the presets are conversions of the EAX reverb presets.

thanks alot ultraq for your resopnse… actually i have tried to adjust the reverb setting with the help of include/EFX-Util.h files but the quality of reverb i m getting is not very good… infact in the case of a room i m getting lot of echos… one thing might be the cause of that in the header file there are more properties than those available in the joal using EFX… like in the header file we have
float flDensity;
float flDiffusion;
float flGain;
float flGainHF;
float flGainLF;
float flDecayTime;
float flDecayHFRatio;
float flDecayLFRatio;
float flReflectionsGain;
float flReflectionsDelay;
float flReflectionsPan[3];
float flLateReverbGain;
float flLateReverbDelay;
float flLateReverbPan[3];
float flEchoTime;
float flEchoDepth;
float flModulationTime;
float flModulationDepth;
float flAirAbsorptionGainHF;
float flHFReference;
float flLFReference;
float flRoomRolloffFactor;
int iDecayHFLimit;
whereas in joal we have following corresponding properties.
al.alEffectf(effects[0], AL.AL_REVERB_DENSITY, 21.6f);
al.alEffectf(effects[0], AL.AL_REVERB_DIFFUSION, 1.000f);
al.alEffectf(effects[0], AL.AL_REVERB_GAIN, -1000f);
al.alEffectf(effects[0], AL.AL_REVERB_GAINHF, -476f);
al.alEffectf(effects[0], AL.AL_REVERB_DECAY_TIME, 0.59f);
al.alEffectf(effects[0], AL.AL_REVERB_DECAY_HFRATIO, 1.0f);
al.alEffectf(effects[0], AL.AL_REVERB_REFLECTIONS_GAIN, 0.020f);
al.alEffectf(effects[0], AL.AL_REVERB_REFLECTIONS_DELAY, 0.00f);
al.alEffectf(effects[0], AL.AL_REVERB_LATE_REVERB_GAIN, -289f);
al.alEffectf(effects[0], AL.AL_REVERB_LATE_REVERB_DELAY, 0.030f);
al.alEffectf(effects[0], AL.AL_REVERB_AIR_ABSORPTION_GAINHF, -5.0f);
al.alEffectf(effects[0], AL.AL_ROOM_ROLLOFF_FACTOR, 0f);

by using these properties i m not getting the actual reverb effect close to reality. If you have any suggestion please let me know
cheers

Hmm, according to that list, JOAL does seem to be missing a lot of EFX constants in the AL and ALConstants interfaces. Particularly the LF variants.

I did some more investigation: I know that JOAL builds it’s constants from the ones defined in the OpenAL headers of the OpenAL SDK. Apparently, the efx.h header file is missing those constants too. Unless Creative is cheating us, I looked for that list of constants, and found them defined under the EFXEAXREVERBPROPERTIES struct. I remember reading in the EFX guide that the EFXEAX reverb set is a superset of EFX + Creative-specific extensions, which explains why that list of properties has some that vanilla EFX does not.

Further reading gives me the impression that the missing properties are not actually missing, but have been refactored into their own separate effects. That is, you can make-up for the ‘missing’ properties by doing the following, eg:

The flEcho* properties are present in the EFXEAX reverb, but not in EFX reverb. There is however, a separate EFX reverb effect which you can manage by doing something like:

// Create your own echo effect
int[] effects = new int[1];
al.alGenEffects(1, effects, 0);
al.alEffecti(AL_EFFECT_TYPE, AL_ECHO, effects[0]);

// Adjust echo properties
al.alEffectfv(effects[0], AL_ECHO_DAMPING, ...);
al.alEffectfv(effects[0], AL_ECHO_DELAY, ...);
al.alEffectfv(effects[0], AL_ECHO_SPREAD, ...);
...

And then apply this echo, along with your reverb, to the source (or was it the auxilliary sends?) so that the combination of them gives you the same effect as EFXEAX does it.

yeapp the reverb is auxiliary send but iu m confused in the case of echo properties define in OpenAl header files
// Adjust echo properties
al.alEffectfv(effects[0], AL_ECHO_DAMPING, …);
al.alEffectfv(effects[0], AL_ECHO_DELAY, …);
al.alEffectfv(effects[0], AL_ECHO_SPREAD, …);
are wht we have in joal but idont know which property of echo correspond to which property of OpenAL. Please help me in this regard . one more thing which i want to ask you is that can i use more than one effect like reverb and echo together for a single sound source?

I’m not sure about the echoes.

As for whether you can apply several effects to a source, the EFX guide shows a picture of a source feeding into multiple auxiliiary effect slots using something called aux sends. So yes, it is possible to configure multiple effects to a single source, but a source must be configured to send itself to multiple auxilliary effects slots:

al.alSource3i(sourceID, AL_AUXILIARY_SEND_FILTER, auxEffects[0], 0, AL_FILTER_NULL);
al.alSource3i(sourceID, AL_AUXILIARY_SEND_FILTER, auxEffects[1], 1, AL_FILTER_NULL);

The above sets sourceID’s aux send 0 to feed into the auxiliary effect at auxEffects[0] and aux send 1 to feed into the auxiliary effect at auxEffects[1]. No filters are applied to either of the sends.

The number of aux sends per source is hardware dependant and can be queried using ALC_MAX_AUXILIARY_SENDS.

You can get echo’s from your reverb with a high room size and a low decay.