I’ve got many objects in the environment which are playing the same looping sound, eg a fountain.
When the player is within a certain distance, the we hear the fountain. No problems.
however, when the player enters a doorway with a fountain on either side, then I hear two instances of the same sound played at almost the same time, resulting in a phasey/flammy sound quality.
Is there any way that I can specify a "start time" in a looping sound that is random?
- mattconnolly asked 9 years ago
[quote="mattconnolly":2x3n5b7p]I had thought of splitting the loop into several pieces that would play in a random order. Of course it would no longer be a perfect loop… I’ll test it out – hopefully the transitions between the pieces will be less distracting than the flamming artifacts.[/quote:2x3n5b7p]
Why not just loop-tune each segment?
I could do that. But I’d like each fountain to have the whole 10 second loop for example, rather than each fountain only loop 1 second of 10.
Possibly a better solution would be to have a "Play mode" that was "SequentialRandomStart" where all wave files would play in a sequence, but would start at a random one.
Then I could split each 10 second loop into 10 x 1 second segments, where each would splice perfectly into the next. When the sound is played, FMOD could pick which segment to start at and then loop through the others in sequence.
This could also provide an advantage over a purely random start position in that if a sound had things in it that shouldn’t be broken up. For example birds tweeting in a cage… the sound designer could split the loop at "desirable" points in the bird tweeting loop so that "half a tweet" is never heard.
As a workaround, we’re planning on iterating through the Event’s ChannelGroup’s Channels and setting the Channel position to a random location. (That’ll only work for simple events – it’s probably possible to hook into FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_START to achieve the same effect more generally.)
Would be nice to have this officially supported, though
- Adiss answered 9 years ago
As others have stated, this is not currently possible. One thing you could maybe try would be to use a time offset effect on the event and correlate it to distance, so that depending on how far the event spawns from the listener, the time offset will be different. Might work, might not.
Something I’ve done for this is to take say a 10-second fountain sample, cut it into 5 pieces, and then stuff them all in the sound definition and set them to shuffle globally while also having a random pitch deviation of 0.2 octaves. This does a good job of making sure that every instance has a great chance of being aurally different enough from a neighboring instance that the player doesn’t pick up on it.
I had thought of splitting the loop into several pieces that would play in a random order. Of course it would no longer be a perfect loop… I’ll test it out – hopefully the transitions between the pieces will be less distracting than the flamming artifacts.
Please login first to submit.