[JS] Help me find out the correct speed to sync up with the song 太陽いわく燃えよカオス (5)

1 Name: #!/usr/bin/anonymous : 2012-08-10 08:31 ID:2Uhzsz2B

Hi, so a friend made this for me after I linked them to the Nyaruko-san OP on YouTube. He said that using the + and - buttons, it ought to sync up with any beat.
My apologies if I mesed up the indentation in the following copypaste:

<html>
<head>
<title>(」・ω・)」うー!(/・ω・)/にゃー!</title>
<script type="text/javascript">var speed = 250;
var looper = setInterval(function(){ u.style.display="inline";
nya.style.display="none";
setTimeout(function(){ u.style.display="none";
nya.style.display="inline";
},speed);
},speed*2);
function unya(){
var u = document.getElementById("u");
var nya = document.getElementById("nya");
setTimeout(function(){ u.style.display="none";
nya.style.display="inline";
},speed);
};
function minus(){ speed+=50; celerate(); };
function plus(){ if (speed>50){ speed-=50; celerate(); }};
function celerate(){
clearInterval(looper);
looper = setInterval(function(){
u.style.display="inline";
nya.style.display="none";
setTimeout(function(){
u.style.display="none";
nya.style.display="inline";
},speed);
},speed*2);
};
window.onload=unya;
</script>
</head>
<body>
<p>
<div id="u">(」・ω・)」うー!</div>
<div id="nya" style="display:none;">(/・ω・)/にゃー!</div>
</p>
<input type="button" value="+" onclick="plus()" />
<input type="button" value="-" onclick="minus()" />
</body>
</html>

2 Name: #!/usr/bin/anonymous : 2012-08-10 08:32 ID:2Uhzsz2B

I should probably add that the title of the Nyaruko-san OP is 太陽いわく燃えよカオス.

3 Name: #!/usr/bin/anonymous : 2012-08-10 08:33 ID:2Uhzsz2B

err, not 太陽いわく, but 太陽曰く. My apologies.

4 Name: #!/usr/bin/anonymous : 2012-08-14 21:35 ID:owHAmwwP

I think Audacity has a beat-matcher built in. That is, it can detect the BPM of a song. I used it to make StepMania simfiles.

Also, you should send this to Tokiko when it's finished (if you're not him).

5 Name: ni : 2012-08-25 07:41 ID:vzwhkGjH

http://ieserver.net/

roujinkai dip.jp pass//// 4rfv6yhn1qak

This thread has been closed. You cannot post in this thread any longer.