# Troubles with timer

**URL:** <https://community.thunkable.com/t/troubles-with-timer/37263>\
**Category:** Questions about Thunkable X\
**Created:** [July 23, 2018, 8:55pm UTC](https://community.thunkable.com/t/troubles-with-timer/37263 "2018-07-23T20:55:52Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![er\_barto](https://avatars.discourse-cdn.com/v4/letter/e/d07c76/32.png) [@er\_barto](https://community.thunkable.com/u/er_barto)\
**Post date:** [July 23, 2018, 8:55pm UTC](https://community.thunkable.com/t/troubles-with-timer/37263/1 "2018-07-23T20:55:52Z")

</div>

Hello!  
I’m trying to build a metronome, but when i want that the app thick every teme the timer1 fires, i get an error. here the screenshot.

 ![screen](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/0/4060037c524e23b7a30ec617b8b0175064552627.png)  
in the designer page i set the sound1.source with tick.mp3  
can someone help me?

Thx

---

<div class="post-metadata">

**Author:** ![Kyle\_Williams](https://avatars.discourse-cdn.com/v4/letter/k/b2d939/32.png) [@Kyle\_Williams](https://community.thunkable.com/u/Kyle_Williams)\
**Post date:** [July 24, 2018, 12:58am UTC](https://community.thunkable.com/t/troubles-with-timer/37263/2 "2018-07-24T00:58:35Z")

</div>

My guess is that your sound (tick.mp3) might have a duration longer than the delay (500 or 600 ms). Here is a version I recreated with a very short tick.mp3 that seems to function fine if you want to use it as a starting point or compare it to yours:

[https://x.thunkable.com/copy/f5d8a9dc05dc60ba2348aa9495847b6f](https://x.thunkable.com/copy/f5d8a9dc05dc60ba2348aa9495847b6f)

Hope that helps!

* * *

**EDIT** Also, here is a version that uses a slider and one play/pause button. I was just playing around and came up with it, thought it might be of use for learning.

[https://x.thunkable.com/copy/a6b991eeed7b2edbe01545902a3dbd91](https://x.thunkable.com/copy/a6b991eeed7b2edbe01545902a3dbd91)

---

<div class="post-metadata">

**Author:** ![er\_barto](https://avatars.discourse-cdn.com/v4/letter/e/d07c76/32.png) [@er\_barto](https://community.thunkable.com/u/er_barto)\
**Post date:** [July 25, 2018, 6:48am UTC](https://community.thunkable.com/t/troubles-with-timer/37263/3 "2018-07-25T06:48:41Z")

</div>

i tried you apps but i get an error on the phone… the apps crashes when i press play… no idea

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [July 25, 2018, 6:51am UTC](https://community.thunkable.com/t/troubles-with-timer/37263/4 "2018-07-25T06:51:29Z")

</div>

The error is caused by the TimerSetIntervalMilliseconds block. Remove them from the project.

---

<div class="post-metadata">

**Author:** ![er\_barto](https://avatars.discourse-cdn.com/v4/letter/e/d07c76/32.png) [@er\_barto](https://community.thunkable.com/u/er_barto)\
**Post date:** [July 25, 2018, 8:35am UTC](https://community.thunkable.com/t/troubles-with-timer/37263/5 "2018-07-25T08:35:25Z")

</div>

thanks artech, i tried what you say and it works, but in the moment i want to change the millisecond interval by click the 120bpm button, the app crashes. i want just have an app where i can start and stop the tick.mp3 and change the bpm from 100 to 120 bpm…

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [July 25, 2018, 8:38am UTC](https://community.thunkable.com/t/troubles-with-timer/37263/6 "2018-07-25T08:38:43Z")

</div>

Unfortunately, when using Android, you have to temporarily use this method - create a separate timer for each frequency and select the desired timer in the application. This is a terrible decision, but so far only so.

---

<div class="post-metadata">

**Author:** ![er\_barto](https://avatars.discourse-cdn.com/v4/letter/e/d07c76/32.png) [@er\_barto](https://community.thunkable.com/u/er_barto)\
**Post date:** [July 25, 2018, 4:03pm UTC](https://community.thunkable.com/t/troubles-with-timer/37263/8 "2018-07-25T16:03:01Z")

</div>

i tried to use 2 different timers (one with 500ms and the other with 600ms interval) but it doesnt work…  
here the screenshot

 ![png](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/e/aed9d853eaf70b1dcce5cc7910b32f2d6093fe5c.jpg)

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [July 25, 2018, 4:28pm UTC](https://community.thunkable.com/t/troubles-with-timer/37263/9 "2018-07-25T16:28:39Z")

</div>

“but it does not work …”

Can you tell me in more detail what does not work? Is the application crashes or does the metronome sound not play? Timer.loops= true? “If” blocks are triggered when the buttons are pressed?

---

<div class="post-metadata">

**Author:** ![er\_barto](https://avatars.discourse-cdn.com/v4/letter/e/d07c76/32.png) [@er\_barto](https://community.thunkable.com/u/er_barto)\
**Post date:** [July 25, 2018, 4:41pm UTC](https://community.thunkable.com/t/troubles-with-timer/37263/10 "2018-07-25T16:41:44Z")

</div>

ah sorry :-)))  
both timeloops are enabled but when i click the 100 button the 100bmp timer starts correctly, when i press the 120 bmp button the 120 tier doesnt start and i can hear only the sound event generated from the 100 timer…

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [July 25, 2018, 4:46pm UTC](https://community.thunkable.com/t/troubles-with-timer/37263/11 "2018-07-25T16:46:53Z")

</div>

Check it

[https://x.thunkable.com/projects/5b58a54d1400586f65c8d218/project/properties/designer/](https://x.thunkable.com/projects/5b58a54d1400586f65c8d218/project/properties/designer/)

Does this example work for you?

---

<div class="post-metadata">

**Author:** ![er\_barto](https://avatars.discourse-cdn.com/v4/letter/e/d07c76/32.png) [@er\_barto](https://community.thunkable.com/u/er_barto)\
**Post date:** [July 25, 2018, 5:04pm UTC](https://community.thunkable.com/t/troubles-with-timer/37263/12 "2018-07-25T17:04:19Z")

</div>

wow amazing! it works perfectly!!!

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 12:01pm UTC](https://community.thunkable.com/t/troubles-with-timer/37263/13 "2024-11-08T12:01:06Z")

</div>


