View unanswered posts | View active topics It is currently Wed Dec 25, 2024 6:09 am



Reply to topic  [ 2 posts ] 
 Pitch Modulation 
Author Message

Joined: Thu Feb 16, 2012 4:05 am
Posts: 37
Reply with quote
Post 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.


Sat Sep 16, 2017 3:04 am
Profile

Joined: Fri Sep 10, 2010 1:48 am
Posts: 666
Location: Halifax, Canada
Reply with quote
Post 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.


Sat Sep 16, 2017 8:04 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.025s | 13 Queries | GZIP : Off ]