love2d / love

LÖVE is an awesome 2D game framework for Lua.
https://love2d.org
Other
5.06k stars 401 forks source link

EAX sound effects #178

Closed slime73 closed 7 years ago

slime73 commented 13 years ago

Original report by Anonymous.


The ability to use EAX effects on audio, like flange, echo, reverb, distortion, high pass and low pass filters on sources.

slime73 commented 13 years ago

Original comment by Danny Fritz (Bitbucket: dannyfritz, GitHub: dannyfritz).


I really like this idea.

However, echo/reverb are the same thing and "distortion" doesn't really mean much, so in my eyes, that leaves:

flanger, reverb, high-pass, and low-pass filters}}}
{{{flanger, reverb, high-pass, and low-pass filters

I suppose distortion might make sense in a mapSample (mapPixel) way.

slime73 commented 13 years ago

Original comment by Matthias Richter (Bitbucket: vrld, GitHub: vrld).


I would also like this, but it seems as though EAX/EFX is only available for Windows.

slime73 commented 13 years ago

Original comment by Christian Howe (Bitbucket: FierceForm, GitHub: FierceForm).


Quote from the OpenAL website: http://connect.creativelabs.com/developer/Wiki/Introduction%20to%20EFX.aspx

"The EAX API was designed around the DirectSound3D property set mechanism, and thus the EAX interface does not take full advantage of OpenAL's extension system, and EAX extensions all exist solely on PC."

"The Effects Extension (EFX) on the other hand, was designed specifically to provide a generic, cross-platform framework for adding advanced DSP effects to OpenAL. This framework offers the OpenAL programmer two new ways to process audio. Firstly, Sources can be processed through filters. Secondly, Auxiliary Effect Sends are introduced, so that effects processing can be applied to groups of Sources. The output of the Auxiliary Effects is fed into the final mix. It is also possible to filter Sources as they are fed into each Auxiliary Effect."

slime73 commented 13 years ago

Original comment by Matthias Richter (Bitbucket: vrld, GitHub: vrld).


EFX may be designed to be cross platform, but in reality it is not: The extension is only available on Windows:

http://connect.creativelabs.com/openal/OpenAL%20Wiki/Extensions.aspx (look for ALC_EXT_EFX)

slime73 commented 13 years ago

Original comment by Christian Howe (Bitbucket: FierceForm, GitHub: FierceForm).


Wow, that's pretty contradictory, but it looks like [[http://kcat.strangesoft.net/openal.html|OpenAL Soft]] supports it. Maybe software DSP (with possibly custom effects, like the XAPO stuff on Windows) would be possible. It seems software DSP is almost as fast as hardware DSP (and doesn't require hardware and drivers). [[http://www.fmod.org/index.php/products/fmodex|FMOD]] (and by extension, [[http://unity3d.com/unity/engine/audio|Unity]]) use software DSP for their game audio engines.

slime73 commented 13 years ago

Original comment by Bill Meltsner (Bitbucket: bmelts, GitHub: bmelts).


I'm marking this 'wontfix', for the simple fact that there is absolutely no EAX/EFX on Mac OS X. OpenAL Soft does have EFX support, but we don't use OpenAL Soft on the Mac - we use Apple's native implementation instead.

The Mac version of OpenAL does have its own extension architecture, ASA, but it's not really comparable to EFX - it has much more limited functionality, and the API for creating things like reverb is different enough to likely render futile any attempt to create a Lua API that can handle both.

slime73 commented 9 years ago

Original comment by Alex Szpakowski (Bitbucket: slime73, GitHub: slime73).


LÖVE now uses OpenAL-Soft in OS X.

It still has to use Apple's OpenAL on iOS though. Maybe LÖVE could expose a more limited API on that platform.

slime73 commented 8 years ago

Original comment by Mi 28 (Bitbucket: rcoaxil, ).


I'm thinking of implementing EFX effects, however iOS poses a problem still, since it wouldn't be really possible to expose meaningful functionality to it. Because of the way AL works, it will only be possible to statically process samples, but not dynamically, defeating the purpose.

slime73 commented 7 years ago

Original comment by Alex Szpakowski (Bitbucket: slime73, GitHub: slime73).


Low-pass, high-pass, and band-pass filters are now implemented (thanks to Raidho).

slime73 commented 7 years ago

Original comment by Bart van Strien (Bitbucket: bartbes, GitHub: bartbes).


So the filters (low pass, high pass and band pass) are in since 8871bbc2e08ac517732def0cb9263ec23ab2c8b8.

EDIT: So @slime73 updated this while I was getting coffee

slime73 commented 7 years ago

Original comment by Bart van Strien (Bitbucket: bartbes, GitHub: bartbes).


As a status update, @rcoaxil has opened another pull request for effects: https://bitbucket.org/rude/love/pull-requests/75

slime73 commented 7 years ago

Original comment by Alex Szpakowski (Bitbucket: slime73, GitHub: slime73).


Pull request has been merged: 209c2c9