Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7898961
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T08:34:39+00:00 2026-06-03T08:34:39+00:00

IN SHORT: I have a method being called at 44,100 times per second. I

  • 0

IN SHORT:
I have a method being called at 44,100 times per second. I would like to know what to do in a situation where I need a sound to be ticked at the 13781.25th method call – thats a 192 Beats Per Minute). I have the option to round off that number and make the sound tick at the 13781st method call which would mean i am making the sound tick at 0.25th too early. this equates to being 0.00000566893424 of a second too early.

after a 100 ticks im sure the delay will certainly add up. Are there any smart work arounds that sort of keeps track of the delay and when the delay gets over a certain point then maybe ± some figures to keep the beat on track again?

Here is my code below so far..

int counter; // used to track down the amount of times the method has been called

signalMethod(){
    if(counter % ceil(2,646,000/10) == 0){ //the ceil function turns the decimal point into a whole number so it can be used for analysis. but this will cut off delay.. and over time im sure it will add up.. which will cause the beats to fluctuate...
        playSound();
    }
    counter++;
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T08:34:40+00:00Added an answer on June 3, 2026 at 8:34 am

    Your problem is just another variation of the problem addressed “Bresenham’s Algorithm”, but instead of incrementing the Y coordinate of a line drawn with a certain slope (the slope would be the beat frequency), you’re emitting ticks.

    Wikipedia on Bresenham’s Algorithm

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a situation where I need to know what methods are being called
What I have is something similar to this: //method being called by thread pool
I'd like to use the somelist.sort() method to do this if possible. I have
I have a short version of the question: I start a thread like that:
In short, I would like to, in Objective-C cocoa, program something that functions the
I would like to have the editor in my editable JTables select all text
In Restlet you have a class called SecretVerifier with an abstract method verify(String identifier,
The short question: Does Castle Windsor have something similar to Spring.Net's Lookup Method Injection
I have a number of Jquery plugins being called through my Drupal Acquia Marina
I have several class where I need to inject a static method; this static

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.