Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Sound effects  (Read 9568 times)

0 Members and 1 Guest are viewing this topic.

panithadrum

  • Sr. Member
  • ****
  • Posts: 304
    • View Profile
    • Skyrpex@Github
    • Email
Sound effects
« on: March 01, 2010, 03:49:23 pm »
I searched a little and found nothing about this.
Are you going, Laurent, to make some sound effects? Like reverb or echo.

gsaurus

  • Sr. Member
  • ****
  • Posts: 262
    • View Profile
    • Evolution Engine
Sound effects
« Reply #1 on: March 01, 2010, 04:18:42 pm »
I think it's planned for SFML2 (but not for soon). I remember Laurent to say something about it.
Pluma - Plug-in Management Framework

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Sound effects
« Reply #2 on: March 01, 2010, 04:20:57 pm »
It would be a nice feature, but I don't know if it's well supported by OpenAL Soft and by sound cards. I think it those effects rely on OpenAL extensions.

Anyway, this is not a priority at the moment, I focus on finishing SFML 2.0. Maybe it will be added after that, in a SFML 2.x release.
Laurent Gomila - SFML developer

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Sound effects
« Reply #3 on: March 02, 2010, 09:13:13 am »
I made some experiments to see what could be done with sound effects.

The latest version of OpenAL Soft only supports two effects (reverb and echo) and one filter (low pass), which is pretty frustrating when you see the full list of effects that is defined by the EFX extension :)
And it's probably all done in software.

I also tried the same stuff with the official OpenAL binaries from Creative Labs, which is supposed to have hardware support and more effects available, but I got very bad results so I don't know if I did it well or if my two versions of OpenAL conflicted somehow.

I have no idea about the Mac OS X version, where we use the official OpenAL distribution instead of OpenAL Soft.

So what do you think? Is it worth implementing effects with very little and random support, but possible improvements in the future?
Laurent Gomila - SFML developer

Walker

  • Full Member
  • ***
  • Posts: 181
    • View Profile
Sound effects
« Reply #4 on: March 02, 2010, 11:19:44 am »
If you can add the reverb, echo and low pass filter, I don't see why you shouldn't. Or did I misunderstand something?

For myself, reverb and echo would be good, useful additions to SFML. The audio package, to me, seems more limited than the other packages. More features now!  :wink:

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Sound effects
« Reply #5 on: March 02, 2010, 12:09:20 pm »
Quote
Or did I misunderstand something?

Well, you're right, if I can add it then I should do it. But the support for these features will be very limited, and pretty random. It depends on many things that I can't control. In the end, the feature won't be really usable, except for people who will never distribute their applications.

Anyway, it will probably be implemented soon ;)

Quote
The audio package, to me, seems more limited than the other packages

It's true, but this is because of the lack of low-level support. OpenAL is really a great API, too bad it never got the same support as OpenGL.
Laurent Gomila - SFML developer

model76

  • Full Member
  • ***
  • Posts: 231
    • View Profile
Sound effects
« Reply #6 on: March 07, 2010, 06:00:57 am »
You could also think about implementing your own effect chain, if that is even possible. There are some pretty good free light-weight algorithms floating around out there - see for instance Jezar's freeverb, which happens to be in the public domain. Good stuff!

And even if it is just a few effects, like reverb, echo, and a low pass filter, you can do A LOT with those... Sounds under water, through a wall, in a tunnel, etc., etc.

And if you wanted to expand on that, you could add a high pass, and a band pass filter, for even more possibilities.

One thing that I personally think you should avoid, is adding effects if they won't work reliably on different computers, especially since that would make it impractical to later change to a custom effect chain. If you would even consider that, that is...  :wink:

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Sound effects
« Reply #7 on: March 07, 2010, 09:49:40 am »
I can't implement my own effect chain, I have no control on the sound data that is played when it is stored in a sf::SoundBuffer. I mean, no control in real-time. And an effect that can't be applied in real-time is pretty much useless ;)
Laurent Gomila - SFML developer

model76

  • Full Member
  • ***
  • Posts: 231
    • View Profile
Sound effects
« Reply #8 on: March 07, 2010, 05:17:00 pm »
Certaily is  :)

Too bad that isn't possible, and too bad about OpenAL...