Data Realms Fan Forums
http://868000.nnhp.asia/

Pitch Modulation
http://868000.nnhp.asia/viewtopic.php?f=1&t=46208
Page 1 of 1

Author:  Magmacow358 [ Sat Sep 16, 2017 3:04 am ]
Post subject:  Pitch Modulation

Is there a way, LUA or otherwise, to change the pitch of a played sound in-game? I'd like to be able to randomize it within a small range, to add further variance to weapon firing sounds.

Author:  Bad Boy [ Sat Sep 16, 2017 8:04 am ]
Post subject:  Re: Pitch Modulation

As far as I know there's no way to modulate pitch with the current lua. Your best bet might be to use a sound editing tool (e.g. audacity) and edit your sounds, then write a script that plays the sound you want.
You can play sounds with AudioMan:PlaySound() or by putting the sound on an emitter and spawning in the emitter.

Here's the wiki page for AudioMan. PlaySound isn't in it unfortunately, but you can find reference to the function here and you can figure out the arguments for it by trial and error I imagine - or just do what most people do and use an emitter.

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/