Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (496)
Games in Android Showcase (114)
games submitted by our members
Games in WIP (563)
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 3886 times)
0 Members and 1 Guest are viewing this topic.
Offline kamrandemon

Junior Newbie





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

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
Offline Ultraq

Junior Member




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...

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.

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
cheers

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

Junior Member




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 Member




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 Member


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.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

BurntPizza (14 views)
2014-09-19 03:14:18

Dwinin (33 views)
2014-09-12 09:08:26

Norakomi (58 views)
2014-09-10 13:57:51

TehJavaDev (80 views)
2014-09-10 06:39:09

Tekkerue (40 views)
2014-09-09 02:24:56

mitcheeb (62 views)
2014-09-08 06:06:29

BurntPizza (46 views)
2014-09-07 01:13:42

Longarmx (33 views)
2014-09-07 01:12:14

Longarmx (37 views)
2014-09-07 01:11:22

Longarmx (36 views)
2014-09-07 01:10:19
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org 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‑gaming.org
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!