How to get either (A) The length of whatever audio clip is playing in a multi instrument, or (B) an event that plays when a clip in a multi instrument is finished

Basically, I have a 3d action event, with a multi instrument that has various clips of various lengths, between 1-10ish seconds.


When the sound randomly chosen by the multi instrument is completed, I want someway to tell UE about that.

I was reading that there’s a way to get the length of the clip via getLength or something, but I also read that that doesn’t work for multi instruments, and I’m not sure if that’s applicable to Get parameter value

The best way I’ve found to do this is to use an Fmod Audio Component instead as it has access to the audio length, but in that case the component does need to get added to something. If you don’t have an actor for this, you could use something else like the player controller or game state and add the Fmod Audio Component there.

1 Like

Hi,

An option may be using the On Event Stopped callback: Unreal Engine | API Reference - UFMODAudioComponent::OnEventStopped


Please note, this will require using an FMOD Audio Component:

Hope this helps!

Just giving this a bump to see if there is anything new in this department? Retrieving the play length and / or current time of the selected sound in a Multi-Instrument on an FMod Component seems a valuable bit of information to have inside UE? At least to me?

Hi,

Unfortunately not, but I can add your interest in the feature.

I will note that is it possible to retrieve the length of a sound from an event callback: FMOD Engine | Studio Api Eventinstance - Fmod::Studio::Event::Callback::Sound_Played.

1 Like