Unity Timeline plays fmod Events from the start

When I scroll to the middle of unity event playable it plays from the beginning of the event, which makes it harder to sync audio and more time consuming especially if the Fmod event is long.

Is there any other way to do it?

Hey @BubbleBoi , are you using event emitters to play on enable and using object activators in the timeline? If so, I don’t think there is a work around. If you find one, let me know! It is tedious, haha. Good luck with your project.

There is currently no way to playback an event from a different point in the timeline- there are some modifications that could be made to get simple events containing Single Instruments playing back from a different start point, but playing back Multi Instruments, Scatterer Instruments etc will be more challenging.
Here are some basic changes you could make if you only need Single Instruments playing back at the right time:

        // FMODEventPlayable.cs, FMODEventPlayableBehavior class
...
        float clipStartTime = 0.0f; // 1. Add variable to keep track of start time (~line 158)
...
        protected void PlayEvent()
        {
            if (!eventReference.IsNull)
            {
...
                eventInstance.setVolume(currentVolume);
                eventInstance.setTimelinePosition((int)(clipStartTime * 1000.0f)); // 2. Set event's playback position (~line 198)
                eventInstance.start();
            }
        }
...
        public void UpdateBehavior(float time, float volume)
        {
...
            if ((time >= OwningClip.start) && (time < OwningClip.end))
            {
                clipStartTime = time - (float)OwningClip.start; // 3. Set clip start time (~line 254)
                OnEnter();
            }
...
        }

I have passed this request onto the dev team to look into properly, thanks for the suggestion!

1 Like

I understand that for scatterer and multi instruments things can be more challenging, but can we get something working for a single instrument?

The use case of having just a long music track that needs to be synced with a cutscene made in Timeline is very common and currently the FMOD integration makes it very frustrating / impossible.

  1. At runtime, pausing and resuming the timeline director makes the music start fro the beginning, resulting in the cutscene completely losing the sync with music.

  2. At edit time, you cannot really do any proper editing to the Timeline, since if you skip ahead and press play, the music starts from the beginning, making it impossible to use Timeline + FMOD Studio to properly edit together a music synced cutscene.

You could have a special FMOD Single instrument track or something that is intended to be used with single instruments. Or maybe a check box / parameter that we can tell FMOD if this track is intended to be synced with the Playable Timeline?

This feature will be added in the next release, which should be available within a few weeks.
You can try self implementing it in the meantime as suggested above; in any case this should be available soon.

1 Like