View unanswered posts | View active topics It is currently Tue Nov 21, 2017 8:05 pm



Reply to topic  [ 2 posts ] 
 Pitch Modulation 
Author Message

Joined: Thu Feb 16, 2012 4:05 am
Posts: 36
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: 627
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: Bing [Bot]


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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.023s | 18 Queries | GZIP : Off ]