AudioContext模拟钢琴效果
代码语言:html
所属分类:其他
代码描述:AudioContext模拟钢琴效果
代码标签: 效果
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
body
{
background:#112;
color:#fff;
user-select:none;
text-align:center;
style=font-size:30px;
font-family:arial;
}
input
{
width:40;
}
</style>
<body>
<span id="K"></span>
八度音 <input type=number id=O value=0 min=-3 max=3 onkeydown='return false'>
Key <input type=number id=Y value=0 min=-12 max=12 onkeydown='return false'><br>
<script>
///////////////////////////////////////////////////////////////////////////////
/* 1Keys - A 1 Kilobyte JavaScript Piano - CodePen Version
By Frank Force 2020
GNU General Public License v3.0
https://github.com/KilledByAPixel/1Keys
Orignally made for JS1024
1k Features...
- Three different instrument sounds
- Keyboard and mouse support
- Multiple notes can be played independently
.........完整代码请登录后点击上方下载按钮下载查看
网友评论0