Java Millisecond Format millisPerBeat(final float bpm)

Here you can find the source of millisPerBeat(final float bpm)

Description

Given a beats-per-minute rate, returns the number of milliseconds in a single beat.

License

Open Source License

Parameter

Parameter Description
bpm Beats per minute

Return

Number of milliseconds per beat.

Declaration

public static int millisPerBeat(final float bpm) 

Method Source Code

//package com.java2s;

public class Main {
    /**//from   w  ww . ja  v  a2 s . c o  m
     *    Given a beats-per-minute rate, returns the number of milliseconds
     *    in a single beat.
     * 
     *   @param bpm Beats per minute
     *   @return Number of milliseconds per beat.
     */
    public static int millisPerBeat(final float bpm) {
        return (int) (60000f / bpm);
    }
}

Related

  1. milliSecondsSince(long startMillis)
  2. milliSecondsToFormatedString(long timeMillis)
  3. millisecondsToToTimeFormat(long inMs)
  4. milliSekundsToTime(long millisecond)
  5. millisOf(long timestamp)
  6. millisSince(long from)
  7. millisToDate(long millis, String format)
  8. millisTrimTo(long millis, long unitInMillis)
  9. parseDate(long millisec, String format)