Can I use programmer instrument to play wav files from a local folder?


I am investigating whether it is possible to give players the ability to run audio through an event in FMOD.
Case in point, I would like the ability to let players run their own music through my music system. Back in my days I remember games like GTA Vice City and The Sims that allowed players to populate any number of songs into a folder and the game would then play those tracks through their in-game “radio system”.

What I am looking for is something a little bit more nuanced: not just the ability to play audio as is, but also to use the same in-game music logic on their music of choice.

However the more I thought about this, the more I also realize that these days people listen to music mostly on streaming services. A more advanced feature could be one where the game has a sort of audio input that listens to whatever the user chooses to assign to.

Are any of these ideas even doable in principle?


You can achieve this trivially by using programmer instruments. You would just need to add some code to your game that checks a certain directory for audio files and passes their names to FMOD Studio when needed. Other than that, a programmer instrument functions like any other instrument, and can exist within as complex a framework of timeline and conditional logic as you care to create.

The FMOD Studio API supports certain forms of internet streaming, as described here in the FMOD API User Manual.

Hello Joseph,

is a Spotify integration possible in FMOD?
Officially Spotify doesn’t support videogame integrations

But the game Dangerous Driving does, which seems to be using FMOD.

Could you give me some insight please? thank you

We are not privy to Dangerous Driving’s code, so we don’t know how Three Fields Entertainment did it.

I suspect they may have used one of Spotify’s existing APIs to obtain a stream which could then be fed to the FMOD Engine as per our documentation on internet streaming. This is, however, just speculation on my part.

Perhaps you could contact Three Fields Entertainment for information on this topic?

Yes I have done that and also emailed Spotify :slight_smile: