1. Hey! Guest! The 36th GMC Jam will take place between February 27th, 12:00 UTC - March 2nd, 12:00 UTC. Why not join in! Click here to find out more!
    Dismiss Notice
  2. NOTICE: We will be applying a Xenforo update on Tuesday 25th of February. This means that from approximately 10:00 to 14:00 BST the forums will be offline (or possibly longer). Sorry for the inconvenience! Official Announcement here.

How to do something every x seconds based on audio's track position

Discussion in 'Programming' started by CKlidify, Mar 18, 2017.

  1. CKlidify

    CKlidify Member

    Nov 22, 2016
    I'm trying to make a rhythm game and right now I have an alarm that triggers every 0.43 seconds to go along with the song but that can go out of sync after a while and there are parts in the game where the music will slow down or speed up respectively and everything will go out of sync.

    I was wondering if I could just make the code run every 0.43 seconds based on the track position of the audio that's playing. If someone could help me figure this out it would be greatly appreciated!
  2. Storyteller

    Storyteller Member

    Jul 19, 2016
    might help. you could test that each step and check where it is,
    then use audio_sound_get_pitch or get_gain to check for your beats? Id almost say you need a map file to the track to align beats you need to hit to beats in the song.

Share This Page