# Is it possible to subscribe to sub-beat callbacks?

**URL:** <https://qa.fmod.com/t/is-it-possible-to-subscribe-to-sub-beat-callbacks/19403>\
**Category:** FMOD Engine\
**Tags:** unity\
**Created:** [October 14, 2022, 11:26pm UTC](https://qa.fmod.com/t/is-it-possible-to-subscribe-to-sub-beat-callbacks/19403 "2022-10-14T23:26:05Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![Kiru176](https://avatars.discourse-cdn.com/v4/letter/k/ba8739/32.png) [@Kiru176](https://qa.fmod.com/u/Kiru176)\
**Post date:** [January 29, 2024, 10:06am UTC](https://qa.fmod.com/t/is-it-possible-to-subscribe-to-sub-beat-callbacks/19403/7 "2024-01-29T10:06:51Z")

</div>

Thanks for the response.  
I have a similar script to the one you linked and it works as expected. I tried altering the signature and managed to get the quarter notes, but I might need things like triplets to also be assigned to events, which seems hard to do.

```auto
        accurateTime = dspclock / 48800;
        halfTime = dspclock / 48800 * 0.5f;
        tripletTime = dspclock / 48800 * GetIntervalLength(_bpm, 0.3f);
        quarterTime = dspclock / 48800 * 0.25f;
      
        public float GetIntervalLength(float bpm, float noteLength)
        {
            return 60f / (bpm * noteLength);
        }

```

This is what I’m trying as of now, but for some reason it keeps being triggered with every frame in a condition like this.

```auto
        if (lastTripletTime != Mathf.FloorToInt(tripletTime))
        {
            lastTripletTime = Mathf.FloorToInt(tripletTime);
            //TripletEventUpdated();
            Debug.Log("Triplet");
        }

```

Any help would be much appreciated!

---

_[View the full topic](https://qa.fmod.com/t/is-it-possible-to-subscribe-to-sub-beat-callbacks/19403)._
