How can I identify the instrument / audio file that is currently playing?

We are using multi-instruments with events so that we can randomize our music. For debugging purposes I need to know which audioclip is currently being played. I’m trying to get information by looking at the bus:channelgroup:channel:sound but I’m getting nothing. When I create an event instance it appears to be assigned to the Master Bus which is also the channel group but following that chain doesn’t get me any useful information.

Am I totally going about this the wrong way?

All I really want to do is to see all the sound files (or instruments) that are currently playing. Is there a simpler way to do this?

Apologies, there is actually a way to retrieve the name.

To retrieve the sound we will need to use a CallBack. More information about Callbacks can be read under Studio API | Callbacks.

Using your event instance you will want to assign it this callback:

Sound Callback
[AOT.MonoPInvokeCallback(typeof(FMOD.Studio.EVENT_CALLBACK))]
static FMOD.RESULT SoundCallback(FMOD.Studio.EVENT_CALLBACK_TYPE type, System.IntPtr instancePtr, System.IntPtr parameterPtr)
{
	FMOD.RESULT result;
	FMOD.Studio.EventInstance instance = new FMOD.Studio.EventInstance(instancePtr);
		
	switch (type)
	{
		case FMOD.Studio.EVENT_CALLBACK_TYPE.SOUND_PLAYED:
			{
				FMOD.Sound sound = new FMOD.Sound(parameterPtr);
				result = sound.getName(out string name, 256);
				if (result != FMOD.RESULT.OK)
					return result;
				Debug.Log(name); 
				break; 
			}
		case FMOD.Studio.EVENT_CALLBACK_TYPE.SOUND_STOPPED:
            {
				FMOD.Sound sound = new FMOD.Sound(parameterPtr);
				result = sound.getName(out string name, 256);
				if (result != FMOD.RESULT.OK)
					return result;
				Debug.Log(name);
				break;
            }
	}
	return FMOD.RESULT.OK; 
}

Assing the call back like this:

		FMOD.RESULT result; 

        _eventIntstance = FMODUnity.RuntimeManager.CreateInstance(_eventRef);

        result = _eventIntstance.setCallback(SoundCallback, FMOD.Studio.EVENT_CALLBACK_TYPE.SOUND_PLAYED | FMOD.Studio.EVENT_CALLBACK_TYPE.SOUND_STOPPED);

		if (result != FMOD.RESULT.OK)
        {
			Debug.Log("Failed to assign Callback with the result: " + result);
			
        }
		else 
			_eventIntstance.start();

Again apologies for the confusion. Hope this helps