# Can you use Get Parameter to get the current Timeline value of an FMODAudio component?

**URL:** <https://qa.fmod.com/t/can-you-use-get-parameter-to-get-the-current-timeline-value-of-an-fmodaudio-component/11785>\
**Category:** Unreal Engine\
**Created:** [January 7, 2015, 6:23am UTC](https://qa.fmod.com/t/can-you-use-get-parameter-to-get-the-current-timeline-value-of-an-fmodaudio-component/11785 "2015-01-07T06:23:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![BooleanFiasco](https://avatars.discourse-cdn.com/v4/letter/b/a88e57/32.png) [@BooleanFiasco](https://qa.fmod.com/u/BooleanFiasco)\
**Post date:** [January 7, 2015, 6:23am UTC](https://qa.fmod.com/t/can-you-use-get-parameter-to-get-the-current-timeline-value-of-an-fmodaudio-component/11785/1 "2015-01-07T06:23:51Z")

</div>

Hello!

I’m currently working on a music game in UE4 and thus have somewhat unusual needs for audio synchronization between Fmod and my game logic. In particular, I need to be able to tell whether or not a player’s button input is on tempo or not.

The ideal way to do this seems to be to use the Timeline parameter in Fmod to tell where playback currently is whenever the player hits the button. Once I’ve added a tempo marker to my logic track everything gets broken into nice beats and measures, which seems perfect, except that when I try to use the Get Parameter node in a Blueprint to get the Timeline parameter it always returns 0 as a result.

Is it not possible to access the current value of the Timeline in this manner? I realize that actually setting the Timeline parameter isn’t a valid behavior (and I’m not trying to do that!) but getting its current value seems quite useful in a situation such as this. If this isn’t possible, is there another route to getting this information from Fmod?

Sorry for the somewhat complex question but I hope this is clear. Thank you very much for your time!

---

<div class="post-metadata">

**Author:** ![geoff](https://avatars.discourse-cdn.com/v4/letter/g/a3d4f5/32.png) [@geoff](https://qa.fmod.com/u/geoff)\
**Post date:** [January 15, 2015, 2:19am UTC](https://qa.fmod.com/t/can-you-use-get-parameter-to-get-the-current-timeline-value-of-an-fmodaudio-component/11785/2 "2015-01-15T02:19:38Z")

</div>

Hi Norman,  
Timelines won’t be found as parameters.

It is fairly simple to add timeline get/set functions that are exposed to blueprints though, it is just a matter of wrapping the FMOD Studio API functions EventInstance::getTimelinePosition and EventInstance::setTimelinePosition, probably converting them to float seconds as they are called.

I have created a task into our backlog for adding that feature into our wrapper. If you really need it before then, you could always change the wrapper with this new function:

```
float UFMODAudioComponent::GetTimelinePosition()
{
int TimeMs = 0;
if (StudioInstance)
{
	FMOD_RESULT Result = StudioInstance->getTimelinePosition(&TimeMs);
	if (Result != FMOD_OK)
	{
		UE_LOG(LogFMOD, Warning, TEXT("Failed to get timeline position"));
	}
}
return TimeMs / 1000.0f;
}
```

---

<div class="post-metadata">

**Author:** ![geoff](https://avatars.discourse-cdn.com/v4/letter/g/a3d4f5/32.png) [@geoff](https://qa.fmod.com/u/geoff)\
**Post date:** [April 30, 2015, 12:41am UTC](https://qa.fmod.com/t/can-you-use-get-parameter-to-get-the-current-timeline-value-of-an-fmodaudio-component/11785/3 "2015-04-30T00:41:47Z")

</div>

> [@](#):
>
> Hi Norman,  
> Timelines won’t be found as parameters.
> 
> It is fairly simple to add timeline get/set functions that are exposed to blueprints though, it is just a matter of wrapping the FMOD Studio API functions EventInstance::getTimelinePosition and EventInstance::setTimelinePosition, probably converting them to float seconds as they are called.
> 
> I have created a task into our backlog for adding that feature into our wrapper. If you really need it before then, you could always change the wrapper with this new function:
> 
> ```
> float UFMODAudioComponent::GetTimelinePosition()
> {
> int TimeMs = 0;
> if (StudioInstance)
> {
> FMOD_RESULT Result = StudioInstance->getTimelinePosition(&TimeMs);
> if (Result != FMOD_OK)
> {
> UE_LOG(LogFMOD, Warning, TEXT("Failed to get timeline position"));
> }
> }
> return TimeMs / 1000.0f;
> }
> 
> ```

GetTimelinePosition and SetTimelinePosition have now been added to the audio component. They will be available next release.
