Are you able to set a parameter's default per event?

I was wondering if it’s possible inside of FMOD Studio to set a parameter per individual event? I want to set a bpm value for each song, but for some reason FMOD Studio doesn’t have the ability to get BPM set in Tempo Markers output to the actual game engine.

My solution to this was to make a read only bpm Parameter and set it for each event, but to my understanding after some digging, is that you can’t set a parameter inside of FMOD Studio unless it’s the default value for all events? I would love if someone could clarify a solution for me. I just need the BPM of a song in game code and don’t want to resort to storing song BPMs in the code base rather than in FMOD.

Parameters are not the appropriate tool for this task. Instead, we recommend using user properties.

If you select an event in the events browser, you’ll see a section labelled “user properties” near the bottom of the browser. If you lick on the section’s I-beam icon, you’ll be able to enter new user properties by typing them in. Each user property consists of a variable name (in your case, I suggest “bpm”), followed by a value. They’re perfect for storing the BPMs of your music events.

Provided an event has a user property, you can query that user property’s value with Studio::EventDescription::getUserProperty.

You could theoretically use parameters for this instead of user properties, but as you’ve noticed, they’re not well suited to the task, as parameters cannot easily be assigned different initial values in different events. You would need to work around this limitation by creating multiple identically-named parameters with different default values - and so it’s much less of a hassle to use user properties, instead.

1 Like