• TAP BPM

      <html><head><title>Tap for Beats Per Minute BPM</title>

       

      <script language="JavaScript">

      <!-- Original: Derek Chilcote-Batto (dac-b@usa.net) -->

      <!-- Web Site: http://www.mixed.net -->

      <!-- Rewritten by: Rich Reel all8.com -->

       

      <!-- Begin

      var count = 0;

      var msecsFirst = 0;

      var msecsPrevious = 0;

       

      function ResetCount(){

      count = 0;

      document.TAP_DISPLAY.T_AVG.value = "";

      document.TAP_DISPLAY.T_TAP.value = "";

      document.TAP_DISPLAY.T_RESET.blur();

      }

       

      function TapForBPM(e){

      document.TAP_DISPLAY.T_WAIT.blur();

      timeSeconds = new Date;

      msecs = timeSeconds.getTime();

      if ((msecs - msecsPrevious) > 1000 * document.TAP_DISPLAY.T_WAIT.value){

      count = 0;

      }

       

      if (count == 0){

      document.TAP_DISPLAY.T_AVG.value = "First Beat";

      document.TAP_DISPLAY.T_TAP.value = "First Beat";

      msecsFirst = msecs;

      count = 1;

      }

      else

      {

      bpmAvg = 60000 * count / (msecs - msecsFirst);

      document.TAP_DISPLAY.T_AVG.value = Math.round(bpmAvg * 100) / 100;

      document.TAP_DISPLAY.T_WHOLE.value = Math.round(bpmAvg);

      count++;

      document.TAP_DISPLAY.T_TAP.value = count;

      }

      msecsPrevious = msecs;

      return true;

      }

      document.onkeypress = TapForBPM;

       

      // End -->

      </script>

      </head>

       

      <body bgcolor="#AABBCC">

      <font face="arial">

      <font size=-1><a href="http://www.all8.com/">all8.com</a>

      &gt;

      <a href="http://www.all8.com/tools/">tools</a>

      &gt;

      <b>Tap for Beats Per Minute</b>

      </font>

      <center>

       

      <noscript>

      <p><table border=0 bgcolor="FFFF99″ cellpadding=5>

      <tr><td><b>&nbsp;! Javascript must be enabled !&nbsp;</b></fnt></td></tr></table></p>

      </noscript>

       

      <p>Use any key - Start tapping to measure BPM

      <table border=0><tr>

      <form name="TAP_DISPLAY">

      <td align=center><table border=0 cellpadding=3 cellspacing=0 bgcolor="#666666″><tr>

      <td><table border=0 cellpadding=4 cellspacing=0 bgcolor="#CCCCCC"><tr>

      <td> </td>

      <td align=right><font color="#000000″><tt>Average BPM</tt>

      <input readonly name="T_AVG" size=12></td>

      <td> </td>

      </tr><tr>

      <td> </td>

      <td align=right><font color="#000000″><tt>Nearest Whole</tt>

      <input readonly name="T_WHOLE" size=12></td>

      <td> </td>

      </tr><tr>

      <td> </td>

      <td align=right><font color="#000000″><tt>Timing Taps</tt>

      <input readonly name="T_TAP" size=12></td>

      <td> </td>

      </tr></table></td></tr></table></td>

      </tr><tr>

      <td align=center>

      Pause

      <select name="T_WAIT">

      <option value="1″>1</option>

      <option value="2″ SELECTED>2</option>

      <option value="3″>3</option>

      <option value="4″>4</option>

      <option value="5″>5</option>

      </select>

      second(s) or

      <input type="button" name="T_RESET" value="RESET" onclick="ResetCount()">

      to start again</td>

      </form></tr>

      <tr><td>&nbsp;</td></tr>

      <tr><td>

      Touchscreen click here &gt; <input name="T_FOCUS" size=2 maxLength=1> &lt; to activate keyboard</td>

      </tr></table>

       

      <font face="arial, helvetica" size="-2″>

       

      <p>(Tap once per measure for Measures Per Minute - set Pause to 5 seconds)

      </center>

       

      <hr>

      <font size=-2>17 May 2011 &nbsp; <a href="http://www.all8.com/rich.htm">Rich Reel</a>

      &nbsp; &lt; Feel free to comment on recent changes.&nbsp;

      Previous version <a href="http://www.all8.com/tools/bpm7.htm">here</a>

      </body>

      </html>

 

Aucun commentaire

 

Laissez un commentaire