# Rythm and markers inside the event

**URL:** <https://qa.fmod.com/t/rythm-and-markers-inside-the-event/17247>\
**Category:** Unity\
**Tags:** unity, csharp\
**Created:** [May 25, 2021, 6:35pm UTC](https://qa.fmod.com/t/rythm-and-markers-inside-the-event/17247 "2021-05-25T18:35:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![LeMaq](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/lemaq/32/2286_2.png) [@LeMaq](https://qa.fmod.com/u/LeMaq)\
**Post date:** [May 25, 2021, 6:35pm UTC](https://qa.fmod.com/t/rythm-and-markers-inside-the-event/17247/1 "2021-05-25T18:35:20Z")

</div>

I am trying to make a rhythmic game and one of the biggest challenges I’m having is trying to find out how to know exactly when the Drums will make a certain beat. I was wondering if there was a way for me to mark inside the event certain areas where a variable is changed or something like that so I could use it inside unity to determine if the player hit the button at the same time said variable was “true”. I’m 100% open to suggestions.

---

<div class="post-metadata">

**Author:** ![Alcibiade](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/alcibiade/32/4284_2.png) [@Alcibiade](https://qa.fmod.com/u/Alcibiade)\
**Post date:** [May 25, 2021, 7:31pm UTC](https://qa.fmod.com/t/rythm-and-markers-inside-the-event/17247/2 "2021-05-25T19:31:44Z")

</div>

Hi,  
That could work as you say, by using 2 command instruments to set a boolean parameter in the timeline. But if you want a more systematic way, it’s by using FMOD\_STUDIO\_EVENT\_CALLBACK\_TIMELINE\_MARKER or FMOD\_STUDIO\_EVENT\_CALLBACK\_TIMELINE\_BEAT

---

<div class="post-metadata">

**Author:** ![LeMaq](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/lemaq/32/2286_2.png) [@LeMaq](https://qa.fmod.com/u/LeMaq)\
**Post date:** [May 25, 2021, 8:06pm UTC](https://qa.fmod.com/t/rythm-and-markers-inside-the-event/17247/3 "2021-05-25T20:06:43Z")

</div>

Hey! Thanks for the reply!! I’m sorry if I’m asking for too much, but how can I implement the first idea using the command instrument?

---

<div class="post-metadata">

**Author:** ![Alcibiade](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/alcibiade/32/4284_2.png) [@Alcibiade](https://qa.fmod.com/u/Alcibiade)\
**Post date:** [May 25, 2021, 8:10pm UTC](https://qa.fmod.com/t/rythm-and-markers-inside-the-event/17247/4 "2021-05-25T20:10:08Z")

</div>

Very simple, you create a discrete parameter taking {0,1} values, create a command instrument where you want that sets the parameter on 1, then another that sets it on 0.

---

<div class="post-metadata">

**Author:** ![LeMaq](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/lemaq/32/2286_2.png) [@LeMaq](https://qa.fmod.com/u/LeMaq)\
**Post date:** [May 25, 2021, 8:12pm UTC](https://qa.fmod.com/t/rythm-and-markers-inside-the-event/17247/5 "2021-05-25T20:12:36Z")

</div>

Got it. Thank you very much !! \<3
