Change placement in audiofile with distance parameter

i just started using FMOD and I ran into the following: I would like to make it so that the place in the audio file is connected to the distance on the distance parameter. So for instance, when the distance is further away a fragment later in the audio file will be played then when the distance is closer. Is this possible?

You should be able to do this by utilizing the “Hold value during playback” property on the Distance parameter.

Automating the instrument’s Start Offset property by the Distance parameter will allow the instrument to start at different times depending on the distance between the listener and the event instance.

Thanks Richard! I was trying this but when I move the source / change the distance, the audiofile doesnt change. It just plays linearly

Does anyone know how to do this?

I think I understand what you are wanting but it would help to have more context on what the event you’re creating is for.

If you’re wanting it to scrub back and forth on a timeline depending on distance that’s not possible (though I WISH it was!).

But if you’re working with a continuous pad-like sound, what you could do is create multiple looping audio files, each of which represents a different distance. Set them all on the same track in the distance parameter tab, and cross fade them all. If the sound is not a continuous pad-like sound and a cross fade would not sound right, do the same thing with more segments to keep the gradation more incremental, set no cross fades, and set each instrument with a short attack and release.

Scrubbing through a timeline depending on distance is exactly what I want! What a shame it isn’t possible, it seem so basic.
Your suggestion however does seem interesting too. I will do some experiments with this :slight_smile:

If you want that scrubbing effect (slowing/speeding up/reversing), you could use a combination of two features and probably achieve a really convincing result. Instead of a distance parameter, use the timeline. For the reversing effect, bounce a reversed version of the file you want to “scrub” on. In your event place both the regular and reversed file, loop them using a destination region, and use the new inverted relative offset feature in a transition region to transition between the two files using a parameter. The inverted option will allow the transition to send the playhead to exactly the same place of the reversed file (if the file is 10 seconds long and you reverse at 8 seconds, it will place you at 2 seconds in on the reversed file’s timeline). Then to speed up and slow down simply make a parameter and attach it to the pitch macro on the event’s master track. It will require coding to hook up those two parameters to a distance function in-game, and you’re limited by only +/-24 semitones in pitch, but I’d start there!

1 Like

That’s awesome! Thanks for sharing this technique :smiley: