ArtsAutosBooksBusinessEducationEntertainmentFamilyFashionFoodGamesGenderHealthHolidaysHomeHubPagesPersonal FinancePetsPoliticsReligionSportsTechnologyTravel

Tempo (BPM) to Millisecond Delay Interval Calculator

Updated on April 19, 2013
This is not the calculator. Just a cool digital audio effects image.
This is not the calculator. Just a cool digital audio effects image.

Have you ever needed to calculate an eighth note, or a sixteenth note delay in milliseconds, but weren't exactly sure how to do it?

Chances are, if you're reading this article, the answer is yes. Subsequently, you thought to yourself,

"You know, there should be a quick and easy calculator that tells me, no matter what tempo I'm playing in, the exact millisecond delay interval for a quarter note, eighth note, sixteenth note, or whatever ... what the hell?!"

I've thought the same thing so many times, that I finally just broke down and created one. Here it is ...

The Tempo, in Beats Per Minute (BPM) to Millisecond Delay Interval Calculator

I can't post Javascript in here (Hubpages) so I have to link you to my other site to use the tool. I hope you enjoy it! Below we'll talk a little bit about the tool.

How does the calculator work?

While the process of figuring out the exact millisecond delay interval between the various note lengths, like eighth note, sixteenth note, etc, is not a difficult mathematical calculation, it is certainly cumbersome enough to be a pain in the ass when you're recording, and just need an accurate delay, or chorus, or reverb effect.

That's why we have computers, right? To do extremely tedious tasks, that we can probably do ourselves, but with extreme speed, precision, and greatly reduced chances for silly human error?

Let's actually look at the tool, if you haven't clicked the link yet:

Here is a screen shot of the tempo to millisecond calculator

It's a little squished, and compressed [damn Hubpages] but you can just click the link above to see the real thing, so deal with it.
It's a little squished, and compressed [damn Hubpages] but you can just click the link above to see the real thing, so deal with it.

Let's continue our discussion about how it works ...

I know some of you want to see the math, to either check it out, or just to learn it. So here it is:

inputBPM=bpm.value
qtrN=Math.round(((60/inputBPM)*1000)*100000)/100000
sixteenN=(qtrN/4)
sixteenN=Math.round(sixteenN*100000)/100000

where, inputeBPM = variable that takes the user BPM input in the web form, qtrN = Quarter Note variable and sixteenN = Sixteenth Note Variable, and so on ....

The above snippet is pulled from some javascript code. Obviously this is not the whole calculator, but describing the event handlers, functions, writing the output to the page, and actually calculating all the different intervals is beyond the scope of this article.

The basic flow of how it works is like this ...

  1. User inputs the tempo, in beats per minute, that they're working with. Say, 148 for instance. 
  2. User then presses the "calculate" button.
  3. The code grabs the user input from field (bpm.value) and assigns it to the inputBPM variable.
  4. I start with the quarter note, because it corresponds exactly to the concept of a "beat".
    • For instance, at 120 beats per minute (BPM), there are exactly 120 quarter notes, in a 4/4 time signature, in exactly 60 seconds. This means there are 2 quarter notes for every second of time that passes (120/60). So, if there are 1,000 milliseconds in a second, then at 120 BPM, each quarter note interval is precisely 500 milliseconds long. So, I like to start with the Quarter note.
  5. The section at the end of the quarter note statement: (result * 100000)/100000 is required, by necessity of using Javascripts "round" function (Math.round[expression]) to get the millisecond value with a precision level of 5 decimal places.
  6. Each note is then calculated from the quarter note. At this stage, each value is allowed to repeat infinitely, to preserve accuracy.
  7. Each note is then rounded to the fifth decimal place.
  8. The values are then written to the page in their appropriate places. For instance: whole, half, quarter, eighth, sixteenth, thirty-second, sixty-fourth, and so on ...
  9. The calculator even calculates some of the "odd" or "non-conventional" intervals like the sixth, twelfth, or twenty-fourth note.
    • I'm aware those are not technically (According to traditional music notation) legitimate intervals. They are either dotted, temporary time signature changes, or whatever ... I know.
  10. You can then change your Tempo / BPM and press calculate again, and instantly get all new results.

Here are some hardware effects processors

Pardon me, but why would I ever need to calculate the delay intervals in milliseconds?

There is a chance that, even the musically inclined, might not see the importance of having these values precisely targeted to your tempo (in beats per minute).

Having these values are especially important when using digital signal processing, digital effects plug-ins for computer software, or when using hardware devices like foot-pedals (stomp boxes), and rack-mounted effects processors.

Essentially all audio effects are manipulating and/or duplicating the audio signal. In nearly all cases, the audio signal (the wave) is duplicated. The copies are then processed, or shifted, and integrated back into the original signal. These adjustments are almost always calculated in milliseconds.

As an artist, attempting to create the most sonically appealing result, having precise control of the millisecond values in these various effects is invaluable. If you're just moving the slider by ear, until it sounds "good", then you'll get a similarly acceptable result. But why not use a precise millisecond delay value in your reverb or tap-delay effect? Why not make it near perfect? That's what the pros do! And now you can too with my simple to use tempo to millisecond delay interval calculator.

Here is the link again, in case you missed it ...

The Tempo, in BPM (beats per minute), to Millisecond Delay Interval Calculator

I hope you all get some good use out of this, and enjoy it! Please leave a comment if you think this tool could be easily improved upon, or if there is another simple calculator thing out there that you're surprised doesn't exist yet.

Be peaceful on your way,

Time_Spiraling

Comments

    0 of 8192 characters used
    Post Comment

    • profile image

      ChronoCross 

      6 years ago

      wow this great! This helping my game music project, thanks a lot!

    • Time Spiral profile imageAUTHOR

      Time Spiral 

      7 years ago from Florida

      Thanks, guys! I'd love to hear what you come up with.

    • profile image

      Laro 

      7 years ago

      G R E A T ! ! ! Thank you very very much!!!

    • Painter Penfield profile image

      Painter Penfield 

      7 years ago from Tampa Bay area Florida

      Time Spiral you are scary smart! Believe it or not, I could really use this in the recording studio at home. Thanks for a well thought out and fascinatingly useful tool invention. You are right...why settle for slider fiddling when you can get the computerized coolness of the real math? ;) I want to play around with this in the studio now. Thanks for the inspiration.

    working

    This website uses cookies

    As a user in the EEA, your approval is needed on a few things. To provide a better website experience, hubpages.com uses cookies (and other similar technologies) and may collect, process, and share personal data. Please choose which areas of our service you consent to our doing so.

    For more information on managing or withdrawing consents and how we handle data, visit our Privacy Policy at: https://hubpages.com/privacy-policy#gdpr

    Show Details
    Necessary
    HubPages Device IDThis is used to identify particular browsers or devices when the access the service, and is used for security reasons.
    LoginThis is necessary to sign in to the HubPages Service.
    Google RecaptchaThis is used to prevent bots and spam. (Privacy Policy)
    AkismetThis is used to detect comment spam. (Privacy Policy)
    HubPages Google AnalyticsThis is used to provide data on traffic to our website, all personally identifyable data is anonymized. (Privacy Policy)
    HubPages Traffic PixelThis is used to collect data on traffic to articles and other pages on our site. Unless you are signed in to a HubPages account, all personally identifiable information is anonymized.
    Amazon Web ServicesThis is a cloud services platform that we used to host our service. (Privacy Policy)
    CloudflareThis is a cloud CDN service that we use to efficiently deliver files required for our service to operate such as javascript, cascading style sheets, images, and videos. (Privacy Policy)
    Google Hosted LibrariesJavascript software libraries such as jQuery are loaded at endpoints on the googleapis.com or gstatic.com domains, for performance and efficiency reasons. (Privacy Policy)
    Features
    Google Custom SearchThis is feature allows you to search the site. (Privacy Policy)
    Google MapsSome articles have Google Maps embedded in them. (Privacy Policy)
    Google ChartsThis is used to display charts and graphs on articles and the author center. (Privacy Policy)
    Google AdSense Host APIThis service allows you to sign up for or associate a Google AdSense account with HubPages, so that you can earn money from ads on your articles. No data is shared unless you engage with this feature. (Privacy Policy)
    Google YouTubeSome articles have YouTube videos embedded in them. (Privacy Policy)
    VimeoSome articles have Vimeo videos embedded in them. (Privacy Policy)
    PaypalThis is used for a registered author who enrolls in the HubPages Earnings program and requests to be paid via PayPal. No data is shared with Paypal unless you engage with this feature. (Privacy Policy)
    Facebook LoginYou can use this to streamline signing up for, or signing in to your Hubpages account. No data is shared with Facebook unless you engage with this feature. (Privacy Policy)
    MavenThis supports the Maven widget and search functionality. (Privacy Policy)
    Marketing
    Google AdSenseThis is an ad network. (Privacy Policy)
    Google DoubleClickGoogle provides ad serving technology and runs an ad network. (Privacy Policy)
    Index ExchangeThis is an ad network. (Privacy Policy)
    SovrnThis is an ad network. (Privacy Policy)
    Facebook AdsThis is an ad network. (Privacy Policy)
    Amazon Unified Ad MarketplaceThis is an ad network. (Privacy Policy)
    AppNexusThis is an ad network. (Privacy Policy)
    OpenxThis is an ad network. (Privacy Policy)
    Rubicon ProjectThis is an ad network. (Privacy Policy)
    TripleLiftThis is an ad network. (Privacy Policy)
    Say MediaWe partner with Say Media to deliver ad campaigns on our sites. (Privacy Policy)
    Remarketing PixelsWe may use remarketing pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to advertise the HubPages Service to people that have visited our sites.
    Conversion Tracking PixelsWe may use conversion tracking pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to identify when an advertisement has successfully resulted in the desired action, such as signing up for the HubPages Service or publishing an article on the HubPages Service.
    Statistics
    Author Google AnalyticsThis is used to provide traffic data and reports to the authors of articles on the HubPages Service. (Privacy Policy)
    ComscoreComScore is a media measurement and analytics company providing marketing data and analytics to enterprises, media and advertising agencies, and publishers. Non-consent will result in ComScore only processing obfuscated personal data. (Privacy Policy)
    Amazon Tracking PixelSome articles display amazon products as part of the Amazon Affiliate program, this pixel provides traffic statistics for those products (Privacy Policy)