# How can I determine how on-beat an input is in Unity? (with no delay)

**URL:** <https://qa.fmod.com/t/how-can-i-determine-how-on-beat-an-input-is-in-unity-with-no-delay/22767>\
**Category:** Unity\
**Tags:** unity\
**Created:** [April 6, 2025, 12:21am UTC](https://qa.fmod.com/t/how-can-i-determine-how-on-beat-an-input-is-in-unity-with-no-delay/22767 "2025-04-06T00:21:12Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Connor\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/connor_fmod/32/3685_2.png) [@Connor\_FMOD](https://qa.fmod.com/u/Connor_FMOD)\
**Post date:** [April 14, 2025, 11:59pm UTC](https://qa.fmod.com/t/how-can-i-determine-how-on-beat-an-input-is-in-unity-with-no-delay/22767/4 "2025-04-14T23:59:20Z")

</div>

Thank you for the detailed explanation.

> [@NTAMusic](#):
>
> Timeline Beat callback only triggers directly on the downbeat, not in-between

An option may be to add markers for the off beats which will trigger the [FMOD Engine | Studio API Reference - FMOD\_STUDIO\_TIMELINE\_MARKER\_PROPERTIES](https://fmod.com/docs/2.02/api/studio-api-eventinstance.html#fmod_studio_timeline_marker_properties), which also has the `position` property.

> [@NTAMusic](#):
>
> the latter has a variable delay of up to a few milliseconds in either direction. This variability still exists when called in the FixedUpdate().

Correct, the event timeline position is based on the studio update period of `20ms`. You could try improve this update time by reducing the [FMOD Engine | Core API Reference - System::setDSPBufferSize](https://www.fmod.com/docs/2.02/api/core-api-system.html#system_setdspbuffersize) which can be set in the FMOD integration settings:

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/e/e71743ef087979b541862b7b49d71dd129b8187a.png).

There is also the option of using the [FMOD Engine | Core API Reference - ChannelControl::getDSPClock](https://fmod.com/docs/2.02/api/core-api-channelcontrol.html#channelcontrol_getdspclock). A user has created a created a script using the `DSP Clock` here: [Perfect Beat Tracking in Unity? - #28 by bloo\_regard\_q\_kazoo](https://qa.fmod.com/t/perfect-beat-tracking-in-unity/18788/28).

Hope this helps!

---

_[View the full topic](https://qa.fmod.com/t/how-can-i-determine-how-on-beat-an-input-is-in-unity-with-no-delay/22767)._
