[SUGGESTION/QUESTION] Reverb

Started by Calin Leafshade, Mon 05/10/2009 07:25:32

Previous topic - Next topic

Calin Leafshade

I've just been going through and processing some of my voice acting and it occured to me that it is impossible for me to match my reverb to the environment since certain lines can be said in multiple locations.

So i wondered if it would be possible to implement some kind of reverb on the fly. I cant imagine this would be very difficult to do since there are an awful lot of real time reverb modules already available off the peg for gaming (freeverb for instance) I also think that OpenAL supports environmental audio very easily.

Are there any plans to switch the sound system to openAL or give the engine some kind of reverb plugin?

Pumaman

Unfortunately, the sound system that AGS currently uses doesn't support reverb.

It might be possible to switch sound system in future but that would be a lot of work and is probably not worth the hassle just to implement a reverb effect.

Would anyone else use something like this?

Calin Leafshade

The way i see it, it COULD be implemented using as plugin.

Allegro can be used to process reverb effects. Either through Impulses and convolution or just a delay line.

A delay line is almost trivial to introduce. Just repeat the sample in a stream with diminishing volume.

Alternatively a DSP system (like this http://wiki.allegro.cc/index.php?title=Echo_effect) could be introduced.. after that the actual addition of effects is just a matter of adding the algorithms.


Scavenger

How about dynamic AudioClips, like dynamic sprites, but with audio? I know that plugins have the capability to directly access the stream of data within sprites, so if we implement something similar for sound, we can easily pass the sounds through whatever audio system we want, and still retain the AGS audio storage system.

Of course, I'm not too clued up on sound programming, so I guess to do this the file would have to be in WAV or RAW format. I wonder if OpenAL can manipulate MP3s directly.

Calin Leafshade

Well if you access the stream directly you access them AFTER decoding and edit them on a sample basis in the actual stream itself

Pumaman

The problem is that, as I understand it, Allegro doesn't provide an easy extensibility point for hooking into audiostreams. Because AGS uses various libraries like AllegroMP3, AllegroOGG and DUMB to play different types of audio, all of these would need to be modified to reroute through some sort of custom AGS audiostream processor.

It's probably possible to do, but not a trivial task.

Calin Leafshade

well thats taken the wind out of my sails. I didnt realise there wasnt a central system which plays the samples.

I still think replacing the sound system with OpenAL would be a blast. It would essentially give AGS a more fully funtional sound system. You could define the environment, multiple different sources and have reverb and stuff.

I dont think we should underestimate the power of good sound in a game (says the sound engineer...)

Ryan Timothy B

I totally agree that this would be a very interesting feature/plugin.  Being able to have vocals/music with an echo or effects in certain rooms or areas of rooms.

Lets say if you look at a tree standing in a park, EGO says in normal recorded voice: That's a fancy tree.
Then you stand under the bridge, look at a tree, the EGO would then say it with an echo.

Or perhaps a tv playing in the adjacent room, but the door is closed.  So you'd hear a muffled clip playing.  When you open the door, the audio effect is removed and played normally.
(Now... I haven't played around with your new beta yet, so I'm not sure if you have AudioPosition and the ability to play any clips from any starting point through a song.  Because in a situation like this you could always just have two recorded tv clips, one with a pre-rendered muffle effect and one without.  And just stop one to play the other in the same location as the one had stopped.)

I know.  I'm only thinking though. :P

Pumaman

Quote from: Calin Leafshade on Mon 05/10/2009 20:02:23
well thats taken the wind out of my sails. I didnt realise there wasnt a central system which plays the samples.

I still think replacing the sound system with OpenAL would be a blast. It would essentially give AGS a more fully funtional sound system. You could define the environment, multiple different sources and have reverb and stuff.

It might be beneficial to switch to another audio system like OpenAL, however considering the size of the AGS to-do list, and the relative importance of adding reverb as opposed to all the other things that need to be done, I don't see it happening any time soon :)

SMF spam blocked by CleanTalk