Thread: Randomly Panning Audio
Status: Alpha
Brought to you by:
cwalther
From: indiedev123 <gz...@gm...> - 2011-02-09 19:08:44
|
Hi, I am trying to figure out how I could set audio such as background noise like dog barking or birds to randomize the panning and volume. I understand how to play random sounds but understanding how to randomize their volume and pan would be a great help! Thanks to all in advance! -- View this message in context: http://old.nabble.com/Randomly-Panning-Audio-tp30885865p30885865.html Sent from the pipmak-users mailing list archive at Nabble.com. |
From: Christian W. <cwa...@gm...> - 2011-02-09 19:32:07
|
> Hi, I am trying to figure out how I could set audio such as > background noise > like dog barking or birds to randomize the panning and volume. I > understand > how to play random sounds but understanding how to randomize their > volume > and pan would be a great help! Are you thinking of random but (for the duration of the sound) fixed volume and panning for each sound, or of randomly animating it while the sound is playing? The former should be easy to achieve using the math.random() function (http://www.lua.org/manual/5.0/manual.html#5.5 ) and the sound:volume() and sound:location() methods (Pipmak manual section 3.9 "Sounds"). The latter would be more involved, probably involving some kind of spline functions, but still easily possible. Does that answer the question or would you like more detail? -Christian |
From: indiedev123 <gz...@gm...> - 2011-02-12 16:56:42
|
Hi, Yes I am thinking of random but fixed for the duration of the sound. I will have a look at the math.random() function. Thank you so much! Christian Walther wrote: > >> Hi, I am trying to figure out how I could set audio such as >> background noise >> like dog barking or birds to randomize the panning and volume. I >> understand >> how to play random sounds but understanding how to randomize their >> volume >> and pan would be a great help! > > Are you thinking of random but (for the duration of the sound) fixed > volume and panning for each sound, or of randomly animating it while > the sound is playing? > > The former should be easy to achieve using the math.random() function > (http://www.lua.org/manual/5.0/manual.html#5.5 > ) and the sound:volume() and sound:location() methods (Pipmak manual > section 3.9 "Sounds"). > > The latter would be more involved, probably involving some kind of > spline functions, but still easily possible. > > Does that answer the question or would you like more detail? > > -Christian > > ------------------------------------------------------------------------------ > The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: > Pinpoint memory and threading errors before they happen. > Find and fix more than 250 security defects in the development cycle. > Locate bottlenecks in serial and parallel code that limit performance. > http://p.sf.net/sfu/intel-dev2devfeb > _______________________________________________ > Pipmak-Users mailing list > Pip...@li... > news://news.gmane.org/gmane.games.devel.pipmak.user > https://lists.sourceforge.net/lists/listinfo/pipmak-users > > -- View this message in context: http://old.nabble.com/Randomly-Panning-Audio-tp30885865p30909928.html Sent from the pipmak-users mailing list archive at Nabble.com. |
From: jcowen <jc...@ma...> - 2011-02-23 22:45:52
|
You could use randomSound:location((math.random()*360), 0) randomSound:play() keeping in mind the sound must be mono to play any positioning... you could adjust the pitch property and volume similarly... makes for a pretty good environment generator... indiedev123 wrote: > > Hi, I am trying to figure out how I could set audio such as background > noise like dog barking or birds to randomize the panning and volume. I > understand how to play random sounds but understanding how to randomize > their volume and pan would be a great help! > > Thanks to all in advance! > -- View this message in context: http://old.nabble.com/Randomly-Panning-Audio-tp30885865p30999580.html Sent from the pipmak-users mailing list archive at Nabble.com. |
From: indiedev123 <gz...@gm...> - 2011-02-24 02:03:14
|
Thanks! I will give it a try! jcowen wrote: > > You could use > > randomSound:location((math.random()*360), 0) > randomSound:play() > > keeping in mind the sound must be mono to play any positioning... > > you could adjust the pitch property and volume similarly... makes for a > pretty good environment generator... > > > > indiedev123 wrote: >> >> Hi, I am trying to figure out how I could set audio such as background >> noise like dog barking or birds to randomize the panning and volume. I >> understand how to play random sounds but understanding how to randomize >> their volume and pan would be a great help! >> >> Thanks to all in advance! >> > > -- View this message in context: http://old.nabble.com/Randomly-Panning-Audio-tp30885865p31000625.html Sent from the pipmak-users mailing list archive at Nabble.com. |