I find that a good way of making loops out of limited sample data is to make a bunch of crossfaded segments and have the sound definition spawn them such that the segments crossfade nicely. With enough segments you can get seamless loops that never repeat for only a few seconds of source audio. You’d need much more data to create a single loop
I’ve found a few problems with this method. One is that for lower spawn times and shorter segments (e.g. segments 100ms long or so), the timing becomes increasingly inaccurate and I start getting gaps in between spawned sounds. How accurately can FMOD keep time, and is this independent of the game frame rate? I have been testing in FMOD event player.
Another is that as soon as Doppler comes into play, the sounds are altered in pitch (and hence duration) but the spawn times are not altered accordingly. This causes the spawn overlap to be incorrect, causing gaps when sounds are pitched up and too much overlap when they are pitched down.
The Doppler thing could be fixed (perhaps) by setting the spawn time as an inter-sound delay, rather than a delay between the start of one sound and the start of the next. (I mentioned this in a related post about spawning a while ago). Ideally we’d be able to set a negative inter-sound delay to cater for crossfades…
No idea how useful this would be to other users, but it would be great for me!
- PeteWard asked 10 years ago
- You must login to post comments