-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 40286ce
Showing
1 changed file
with
121 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
<html> | ||
<head> | ||
<title>Tap for Beats Per Minute BPM</title> | ||
|
||
<script language="JavaScript"> | ||
<!-- Original: Derek Chilcote-Batto ([email protected]) --> | ||
<!-- 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) > 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)) / 4; | ||
document.TAP_DISPLAY.T_AVG.value = Math.round(Math.round(bpmAvg * 100) / 100); | ||
document.TAP_DISPLAY.T_WHOLE.value = Math.round(bpmAvg * 2); | ||
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> | ||
> | ||
<a href="http://www.all8.com/tools/">tools</a> | ||
> | ||
<b>Tap for Beats Per Minute</b> | ||
</font> | ||
<center> | ||
|
||
<noscript> | ||
<p><table border=0 bgcolor="FFFF99" cellpadding=5><tr><td><font color="FF0000" size=+1><b> ! Javascript must be enabled ! </b></font></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>osu! streaming BPM</tt> | ||
<input readonly name="T_AVG" size=12></td> | ||
<td> </td> | ||
</tr><tr> | ||
<td> </td> | ||
<td align=right><font color="#000000"><tt>osu! singletap BPM</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="100">100</option> | ||
<option value="200" >200</option> | ||
<option value="300">300</option> | ||
<option value="400" SELECTED>400</option> | ||
<option value="500">500</option> | ||
</select> | ||
milliseconds (ms) or | ||
<input type="button" name="T_RESET" value="RESET" onclick="ResetCount()"> | ||
to start again</td> | ||
</form></tr> | ||
<tr><td> </td></tr> | ||
<tr><td> | ||
Touchscreen click here > <input name="T_FOCUS" size=2 maxLength=1> < 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>Mod by Devocub<br/>17 May 2011 <a href="http://www.all8.com/rich.htm">Rich Reel</a> | ||
< Feel free to comment on recent changes. | ||
Previous version <a href="http://www.all8.com/tools/bpm7.htm">here</a> | ||
</body> | ||
</html> |