# Sound calculation

**URL:** <https://forum.kirupa.com/t/sound-calculation/150983>\
**Category:** flash\
**Created:** [June 12, 2005, 11:29am UTC](https://forum.kirupa.com/t/sound-calculation/150983 "2005-06-12T11:29:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![imported\_ramie](https://avatars.discourse-cdn.com/v4/letter/i/67e7ee/32.png) [@imported\_ramie](https://forum.kirupa.com/u/imported_ramie)\
**Post date:** [June 12, 2005, 11:29am UTC](https://forum.kirupa.com/t/sound-calculation/150983/1 "2005-06-12T11:29:31Z")

</div>

Ok, I know the sound is 3840ms, if I divide by 16 I get 240, there are 16 beats in the sound.

To trigger an event im saying

```auto

onEnterFrame = function() {
  if(sound1.position % 240 == 0) {
    // do something
  }
}

```

so in theory it should trigger 16 times each loop, but it dosent, the loop is 125 bpm and the frame rate is set to 15, im sure this is something to do with the frame rate, but im stuck now as it dosent work, it triggers it once when I start the sound.

Has anyone got a clue what I mean?

Ray.
