Game Development Community

Hooking up audio speed/pitch with $timescale

by Bryce · in Torque Game Engine · 02/18/2010 (8:18 pm) · 3 replies

Hello!

Just out of curiosity, has anybody figured out how to lower the pitch of all in-game sounds according to the timescale? For example, if I've got the timescale at 0.5, the sounds would play at half speed, etc. Any ideas?

Thanks,
Bryce

#1
02/18/2010 (9:21 pm)

I can only answer that for T3D where it would be:

AudioChannelMaster.setPitch( $timeScale );

:)
#2
02/18/2010 (9:34 pm)
Bah. Not possible in TGE? I know that the engine sounds for vehicles change their pitch based on the amount of power, but there's got to be a way to apply that to *all* sounds. Not too familiar with the audio code at all.
#3
02/18/2010 (9:40 pm)

It's definitely possible, though I think not without some custom coding. Think I'd add a second property to the "channel" concept that so far only supports volume adjustments. By adding a per-channel pitch scaler, the pitch of in-game audio could be easily changed without affecting GUI audio, for example.

(which BTW is also easily done in T3D by using a different source object, like e.g. AudioChannelEffects)