real-time sound manipulation,. .

Share your ZGE-development tips and techniques here!

Moderator: Moderators

Post Reply
User avatar
Posts: 1005
Joined: Sat Feb 16, 2008 8:10 pm
Location: Canada

real-time sound manipulation,. .

Post by jph_wacheski »

My experimentation with the ZGE sound system show that sound settings can only be changed before the sounds are triggered, i.e. no dynamic changes from code, once the sound is playing. This is different from using envelops and LFOs to alter values from within the playing sound, as these are predetermined and not script-able.

The way I have been creating sounds that change due to activities in the games is to trigger short sounds repeatedly changing the values before each re-trigger. Here is a little example to show one way to achieve this effect.

This type of dynamic sound manipulation from the game is useful for engine sounds, lifts, weapons,. many things really.
.zgeproj file
(1 KiB) Downloaded 946 times
User avatar
Posts: 1829
Joined: Sat Feb 23, 2008 11:15 pm

Post by Kjell »

Hi jph,

The problem with this approach is that you can't trigger a sound exactly at the moment when another has ended. Obviously you can "mask" that by overlapping sounds using fade in / out envelopes, but that results in all kind of phasing artifacts ( on top of the noise of the envelopes themselves .. but that's a another problem ).

It's a nice solution for lo-fi / noisy sounds and / or if you're not such a audiophile though :-)

+ Still think it would be nice if envelopes would be decoupled from the Sound component as a separate component, so you can add them to a Sound component just like adding Textures to a Material. That way it would also be easier to allow properties of a envelope to be set at run-time.

User avatar
Site Admin
Posts: 2240
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden

Post by VilleK »

I like the effect, it reminds me of old SID-chip tricks. Certain imperfection in the audio hardware/engine just makes it sound more interesting IMO ;)
Post Reply