Hi! This is my first post in this forum
I'm a musician, I produce electronic music, sing and do some more interesting stuff.
I was thinking about this especially recently when I found out that the Flash Player is capable of some realtime DSP (lowpass and highpass filtering).
So the question is:
Is it possible to use digital sound processing inside Blender Game Engine?
I mean things like using LADSPA or LV2 effects to process sounds and music, change their parameters in realtime, create a virtual mixing board inside BGE.
I don't think there is any easy way to do this right now. Or any way at all. Maybe with a lot of phyton scripting?
Here is one of my ideas what could be done:
Let's debate over a little standard package of LADSPA of LV2 plugins that will be always present with installed Blender Game Engine (or Blender Player). We'd need:
1. a versatile filter (lowpass, highpass, bandpass) with variable resonace, stages, frequency and level.
2. a versatile reverb (Calf reverb should be enough for all needs)
3. a simple delay (with filters)
4. a versatile distortion box (something used in ZynAddSubFX and Rakarrack would be cool)
5. a phaser?
6. a compressor (SC4 should do the trick)
7. a limiter - the Fast Lookahead Limiter always works fine for me (to make sure no sound will get saturated at the end of the DSP chain)
8. A pitch shifter maybe?
9. Also some hard gate/hard limiter could be cool
10. and a 10-band EQ to fine-tune the mix
I think that those 10 DSP modules could make a great job for all basic DSP needs. It's even an overkill at the moment. The basic setup could have a filter, a reverb and a compressor maybe
Now: what this can be used for? What is the point of this?
1. In FPP games: when player goes underwater all sounds (excluding music and interface sounds) could be put through a lowpass filter to simulate the effect of swimming and how sounds change underwater.
2. When player dies, all sounds could be put through a Pitchshifter with the frequency slowly getting lower (sounds a bit like a vinyl being stopped)
3. Reverb and delay could be used to make the size and type of environments not only be perceived by the sight, but also by hearing. Shooting in a bathroom should give much louder and reverbated sound than shooting on a plain. Also shooting in mountains would give a nice delay (echo) etc.
4. Compressor used on game sounds would prevent them from getting saturated and too loud (for example when 20 barrels of oil are exploding simultaneously).
5. Distortion could be used to change sounds like explosions, or voices heard over radio dynamically. For example the same explosion sound slightly distorted will sound louder. Also a voice can be recorded and stored in a dry form, when a player is hearing the voice while standing next to a person, he hears the dry sound, when he looses sight of the speaking person the voice can get through distortion and a bandpass filter to make it sound like being transmitted with a radio.
6. a phaser could be use to emphesazie the electriciness of some sounds.
You might say: hey, we can do all this in some program and use processed samples!
Well, not really.
Having at least a filter, reverb and a limiter would give much more possibilites.
I think that using external LADSPA or LV2 plugins would be cool. Then anyone would just use what he needs, the problem would be those who play the game also need the same set of plugins. That's why making a standars set of theese and ship them with Blender would simplify things.
What do you guys think?
The Audaspace module
is included with Blender for use with the BGE and supports quite a few features for audio processing, including realtime synth generation, high and low-pass filtering, and pitch changes, among other things.
Check out my blog of game design and BGE tutorials at http://solarlune-gameup.blogspot.com/