tone.js播放chatgpt谱写的歌曲效果代码

代码语言:html

所属分类:多媒体

代码描述:tone.js播放chatgpt谱写的歌曲效果代码

代码标签: tone.js 播放 chatgpt 谱写 歌曲

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html>
 
<head>
   
<meta charset="UTF-8">
<script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/Tone.js"></script>
 
</head>
 
<body>
   
<h1>Bach-style Happy Song</h1>
   
<p>Press the button to start the music!</p>
   
<button onclick="startMusic()">Start Music</button>
   
<script>
      const synth = new Tone.Synth().toDestination();

      const melody = [
        { note: "C4", duration: "8n" },
        { note: "D4", duration: "8n" },.........完整代码请登录后点击上方下载按钮下载查看

网友评论0