Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (707)
Games in Android Showcase (208)
games submitted by our members
Games in WIP (781)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  pre-defined reverb environemnt in EFX  (Read 4637 times)
0 Members and 1 Guest are viewing this topic.
Offline kamrandemon

Junior Newbie

« Posted 2007-07-14 15:41:15 »

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

Offline Ultraq

Junior Devvie

That's what she said

« Reply #1 - Posted 2007-07-14 22:39:53 »

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 alEffects[i,iv,f,fv](...), adjusting reverb density, diffusion, gain, etc...

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.

Ultraq's Final MooCow
Bits and Pieces by Emanuel Rabina
Offline kamrandemon

Junior Newbie

« Reply #2 - Posted 2007-07-15 09:34:34 »

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

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Ultraq

Junior Devvie

That's what she said

« Reply #3 - Posted 2007-07-15 22:11:13 »

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.

Ultraq's Final MooCow
Bits and Pieces by Emanuel Rabina
Offline kamrandemon

Junior Newbie

« Reply #4 - Posted 2007-07-16 09:58:31 »

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?

Offline Ultraq

Junior Devvie

That's what she said

« Reply #5 - Posted 2007-07-16 22:14:46 »

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.

Ultraq's Final MooCow
Bits and Pieces by Emanuel Rabina
Offline keldon85

Senior Devvie

Medals: 1

« Reply #6 - Posted 2007-07-16 22:35:30 »

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

Pages: [1]
  ignore  |  Print  
You cannot reply to this message, because it is very, very old.

Galdo (416 views)
2017-01-12 13:44:09

Archive (571 views)
2017-01-02 05:31:41

0AndrewShepherd0 (1044 views)
2016-12-16 03:58:39

0AndrewShepherd0 (968 views)
2016-12-15 21:50:57

Lunch (1100 views)
2016-12-06 16:01:40

ral0r2 (1335 views)
2016-11-23 16:08:26

ClaasJG (1429 views)
2016-11-10 17:36:32

CoffeeChemist (1416 views)
2016-11-05 00:46:53

jay4842 (1499 views)
2016-11-01 19:04:52

theagentd (1251 views)
2016-10-24 17:51:53
List of Learning Resources
by elect
2016-09-09 09:47:55

List of Learning Resources
by elect
2016-09-08 09:47:20

List of Learning Resources
by elect
2016-09-08 09:46:51

List of Learning Resources
by elect
2016-09-08 09:46:27

List of Learning Resources
by elect
2016-09-08 09:45:41

List of Learning Resources
by elect
2016-09-08 08:39:20

List of Learning Resources
by elect
2016-09-08 08:38:19

Rendering resources
by Roquen
2016-08-08 05:55:21 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!