天刀手游自动弹奏脚本制谱教程(未完待续)

每一个音符的跳动,就是一根头发的飘落,毫无例外,没有一个音符是无辜的。

一、写在前面

完整的《卡农》例谱在最后一个章节

看到这里,说明你已经对如何安装autojs,脚本使用等基本操作已经了然于心,如果还不懂,你需要回去看使用教程,不用继续往下读这篇教程。

言归正传,在曲谱制作中,只需要关注以下代码,其他代码不用动:

const Song= {
    bpm: 80,
    beat_n: 4,
    beat_m: 4,
    music: [[
      
    ]]
}

注意:在写曲谱时,一定要把输入法调为英文模式,特别注意写冒号:和双引号""时,一定要使用英文的,否则脚本无法运行。

二、通用配置介绍

1. bpm

bpm是控制弹奏速度的参数,值越大,速度越快。

2. 拍号

拍号在标准的五线谱、简谱和吉他谱等左上角一般都标有,如下图吉他谱所示:


拍号.png

五线谱和简谱也有类似的记号,照抄对号入座即可。

在弹奏脚本中

  • beat_n为拍号的分子,表示一小节(标准谱中每一小节使用竖线隔开)有多少拍。
  • beat_m为拍号的分母,表示四分音符为一拍。

beat_nbeat_m的值根据谱子标有的拍号进行填写即可。

注意:通用配置中的的三个参数bpmbea_nbeat_m一定要填写,这三个参数是决定演奏速度和音符时值的必备参数。

3. music参数

在弹奏脚本中,弹奏的音符写到music之中。如下代码所示:

const Song= {
    bpm: 80,
    beat_n: 4,
    beat_m: 4,
    music: [[
        // 表示弹奏一个八分音符的1
        {"rc": "1", "note": 8}
        ...
    ]]
}

下面开始正式进入乐曲的编写。

三、乐曲编写

在弹奏脚本中,弹奏的音符均写在music的双[[ ]]中,每个音符使用花括号{}括起来,每个{}代表弹一下。

1. 音符参数说明

  • note:(必填)用于计算音符时值,如4分音符,8分音符
  • rc:(选填)旋律音,为单音,只能放一个音,也可以不写,代替的方式是旋律音也写在 chord中。如果遇到附点音符、延音符、休止符都可以用0或-代替,表示不弹,但是时值note一定要对。
  • chord:(选填)和弦音,可以放多个音,表示同时弹奏放置的音,如何rcchord同时存在,rc音和chord同时弹。旋律音也可以写到这里,二选一。
  • 高中低音_下划线开头为低音,无前后缀为中音,_下划线结尾为高音

2. 单音曲谱编写

单音曲谱编写最为简单,最好参考简谱来对照编写,下面以青花瓷简谱第一小节为例:


青花瓷例图.png
const Song= {
    bpm: 80,
    beat_n: 4,
    beat_m: 4,
    music: [[
        /** 第一小节 **/
        // 第一拍
        {"rc": "1", "note": 8},
        {"rc": "1", "note": 16},
        {"rc": "_6", "note": 16},
        // 第二拍
        {"rc": "1", "note": 8},
        {"rc": "1", "note": 16},
        {"rc": "_6", "note": 16},
        // 第三拍
        {"rc": "1", "note": 16},
        {"rc": "_6", "note": 16},
        {"rc": "_5", "note": 8},
        // 第四拍
        {"rc": "0", "note": 16},
        {"rc": "2", "note": 16},
        {"rc": "1", "note": 16},
        {"rc": "_6", "note": 16},
        ...
    ]]
}

解析:

  1. /** **///表示注释,注释是为了说明和记忆,可以写任何你想写的说明,脚本会忽略不执行;
  2. 第一个1,写在rc中,用双引号""括起来,因为这个1下面有一条线,是一个八分音符,所以note中写8,不需要用双引号括起来
  3. 第二个1,下面有两条线,是一个十六分音符,所以note中写16,以此类推,下面不在赘述。
  4. 由拍号4/4可知,一个小节有4拍,四分音符为一拍,意思就是将一个小节分为4个等分,遂有等式1/4 + 1/4 + 1/4 + 1/4 = 1。上面的乐句中,四分音符继续拆分,如第一小节第一拍,分为1个八分音符和2个十六分音符,所以有等式1/8 + 1/16 + 1/16 = 1/4,因此整个小节,可以用等式1/8 + 1/16 + 1/16 + 1/8 + 1/16 + 1/16 + 1/16 + 1/8 + 1/16 + 1/16 + 1/16 + 1/16 = 1表示,这是用来检查每一个小节是否编写是否正确的好方法。

3. 带和弦的曲谱编写

和弦是什么,可以百度一下,它的表现就是同时按几个音,这种曲谱的编写可以对照五线谱、双手版钢琴数字谱和吉他谱来进行。也可以理解为多音轨乐曲,我们的主要任务就是将多音轨融合成一个音轨,这是重点。

(1)对照双手版数字谱编写

下面以泰勒的LoveStory节选片段中红框标注处为例:


LoveStory双手数字谱例图.png
const Song= {
    bpm: 80,
    beat_n: 4,
    beat_m: 4,
    music: [[
        // 第一种写法
        {"rc": "1", "note": 8, "chord": "_1"},
        {"rc": "1", "note": 8, "chord": "_1"},
        {"rc": "4", "note": 8, "chord": "_1"},
        {"rc": "3", "note": 8, "chord": "_1"},
        {"rc": "2", "note": 8, "chord": "_1"},
        {"rc": "1", "note": 8, "chord": "_1"},

        // 第二种写法
        {"note": 8, "chord": "1,_1"},
        {"note": 8, "chord": "1,_1"},
        {"note": 8, "chord": "4,_1"},
        {"note": 8, "chord": "3,_1"},
        {"note": 8, "chord": "2,_1"},
        {"note": 8, "chord": "1,_1"},
        ...
    ]]
}

解析:

  1. 两种种写法,效果相同,可以使用rcchord将主旋律和和弦分开,也可以将旋律和和弦混写在chord中。在音符参数说明中已经详细说明,这里不再赘述,不懂的可以返回去看;
  2. 融合技巧:
  • 上下节拍一一对正,相同的分音符融合后分音符不变,如上下对应的皆为四分音符,则note值为4
  • 大的分音符和小的分音符融合,融合后分音符取小的分音符,如上4下8,则融合后note8,即把4分音符当8分音符使,因为脚本只是点击后立即放开,4分音符和8分音符的效果是一样的,不一样的是点击后停顿的时间,这个时间就不能省略。比如上面一排的第一小节第二拍的4为四分音符,下面一排的的第二拍为两个八分音符_1,因为它们是同一拍的,所以4和第一个八分音符_1融合,融合后取小的分音符(八分音符时值比四分音符时值小),所以note为8,写为{"rc":"1", "note": 8, "chord": "_1"}{"note": 8, "chord": "4,_1"}

(2)对照五线谱编写

送别五线谱例图.png

(3)对照吉他指弹谱编写

小星星吉他指弹谱例图.png

四、特殊音符的写法

这里所说的特殊音符主要是指休止符附点音符延音线连音符(三连音、五连音等等),下面进行一一举例说明

1. 休止符

休止符的标识如下图所示:

休止符图例.jpg

在简谱中,四分休止符也用横杠-表示。下面还是以送别节选片段为例,如下图:

送别-休止符图例.png
const Song= {
    bpm: 80,
    beat_n: 4,
    beat_m: 4,
    music: [[
        // 第一小节
        {"rc": "5", "note": 4},
        {"rc": "3", "note": 8},
        {"rc": "5", "note": 8},
        {"rc": "1_", "note": 4},
        {"rc": "0", "note": 4}, // 四分休止符

        // 第四小节
        {"rc": "2", "note": 4},
        {"rc": "0", "note": 4}, // 四分休止符
        {"rc": "0", "note": 4}, // 四分休止符
        {"rc": "0", "note": 4}, // 四分休止符
        ...
    ]]
}

解析:
休止符除了在rc中使用"0"表示外,还可以使用"-"或直接不写rcnote的值就是多少分休止符就写多少,如下代码所示:

// 以下三种写法的效果都是一样的,都表示四分休止符,简便写法可以使用第三种
// 1. 在rc中填0,note填相应的分音符值
{"rc": "0", "note": 4},
// 2. 在rc中填 - ,note填相应的分音符值
{"rc": "-", "note": 4},
// 3. 不写rc,note填相应的分音符值
{"note": 4},

五线谱和吉他谱的写法和上面的写法一样,这里不再一一详细说明。

2. 附点音符

附点音符用一个小圆点表示,表示延长前面音符时值的一半,如一个四分音符,后面跟着附点音符,表示这个音符的时值=四分音符的时值+八分音符的时值

附点音符在五线谱中的标识如下图所示:


附点音符图例.jpg

下面以送别节选片段红框标注小节为例,如下图:


送别-附点音符图例.png
const Song= {
    bpm: 80,
    beat_n: 4,
    beat_m: 4,
    music: [[
        // 第一小节
        {"rc": "5", "note": 4},
        {"rc": "3", "note": 8},
        {"rc": "5", "note": 8},
        {"rc": "1_", "note": 4},
        {"rc": "0", "note": 8}, // 附点四分音符,注意:附点四分音符note为8,是前面音符note*2
        {"rc": "7", "note": 8},
        ...
    ]]
}

解析:
附点音符和休止符写法一致,除了在rc中使用"0"表示外,还可以使用"-"或直接不写rcnote的值是前面音符note*2,如下代码所示:

// 以下三种写法的效果都是一样的,都表示附点四分音符,简便写法可以使用第三种
// 1. 在rc中填0,note填前面音符的2倍
{"rc": "0", "note": 8},
// 2. 在rc中填 - ,note填前面音符的2倍
{"rc": "-", "note": 8},
// 3. 不写rc,note填前面音符的2倍
{"note": 8},

3. 延音线

延音线是一条向上或向下弯曲的弧线,其作用是将两个具有相同音高的音符相连,弧线尾端的音不弹,它的长度等于两个音符的总和。注意要和圆滑线区分开来,音高相同则为延音线,音高不同圆滑线,圆滑线可以忽略。

下面以成都节选片段红框标注为例,如下图:


成都-延音线图例.png

如图红框标注所示,因为弧线两边的音为同音高,所以这个是一条延音线,写法如所示:

const Song= {
    bpm: 80,
    beat_n: 4,
    beat_m: 4,
    music: [[
        {"rc": "6", "note": 4},
        {"rc": "3", "note": 4},
        {"rc": "5", "note": 4},
        {"rc": "0", "note": 4}, // 延音线
        {"rc": "3", "note": 4},
        {"rc": "2", "note": 4},
        ...
    ]]
}

解析:
延音线和附点音符与休止符写法也是一致的,除了在rc中使用"0"表示外,还可以使用"-"或直接不写rcnote的值是弧线尾端音符本身音符时值,如下代码所示:

// 以下三种写法的效果都是一样的,都表示延音线,简便写法可以使用第三种
// 1. 在rc中填0,note填弧线尾端音符本身的音符时值
{"rc": "0", "note": 8},
// 2. 在rc中填 - ,note填弧线尾端音符本身的音符时值
{"rc": "-", "note": 8},
// 3. 不写rc,note填弧线尾端音符本身的音符时值
{"note": 8},

4. 连音符

连音符用弧线中间加阿拉伯数字,表示将弧线之间的音符时值自由均分。

下面以某歌曲节选片段为例:


三连音图例.png
const Song= {
    bpm: 80,
    beat_n: 4,
    beat_m: 4,
    music: [[
        {"rc": "1", "note": 8},
        {"rc": "3", "note": 8},
        {"rc": "5", "note": 4},
        {"rc": "6", "note": 4},
        {"rc": "5", "note": 12}, // 三连音
        {"rc": "4", "note": 12}, // 三连音
        {"rc": "2", "note": 12}, // 三连音
        ...
    ]]
}

解析:
连音符主要是计算note值,连音一般占一拍的时值,所以要先弄清楚一拍的时值是多少,比如4/4拍,四分音符为一拍,就是把一拍分成3个等份,有等式1/4/3 = 1/12,所以三连音各音的note值为12,所以也可以推送算出5连音的note值为20

5. 琶音(或吉他扫弦效果)

琶音指一串和弦音从低到高或从高到低依次连续奏出,可视为分解和弦

一般情况下,和弦的弹奏分为柱式和弦和分解和弦,柱式和弦就是同时弹奏和弦组成音,分解和弦则是先后弹奏和弦组成音,琶音可以视为即为极快速的分解和弦。在本模板中,柱式和弦的写法是在chord中写多个和弦的组成音,琶音则要分开写,把note值设置为大一点的值,值越大,弹奏速度越快,如下代码所示:

// 柱式和弦写法
{note: 8, chord: "1,3,5,1_"}

// 琶音
{note: 64, chord: "1"},
{note: 64, chord: "3"},
{note: 64, chord: "5"},
{note: 64, chord: "1_"},

五、《卡农》完整附例

// 按键对应的坐标
const KeyMap = {
    // 低音键位坐标
    "_1": [424, 991],
    "_2": [693, 991],
    "_3": [962, 991],
    "_4": [1231, 991],
    "_5": [1500, 991],
    "_6": [1769, 991],
    "_7": [2038, 991],
    // 中音键位坐标
    "1": [424, 874],
    "2": [693, 874],
    "3": [962, 874],
    "4": [1231, 874],
    "5": [1500, 874],
    "6": [1769, 874],
    "7": [2038, 874],
    // 高音键位坐标
    "1_": [424, 765],
    "2_": [693, 765],
    "3_": [962, 765],
    "4_": [1231, 765],
    "5_": [1500, 765],
    "6_": [1769, 765],
    "7_": [2038, 765],
}

// 曲谱定义
const Song = {
    bpm: 80,
    beat_n: 4,
    beat_m: 4,
    music: [[
        // C G
        {"rc": "3_", "note": 4, "chord": "1,5,1_"},
        {"rc": "-", "note": 4},
        {"rc": "7", "note": 4, "chord": "_5,2,5"},
        {"rc": "-", "note": 4},

        // Am Em
        {"rc": "1_", "note": 4, "chord": "_6,3,6"},
        {"rc": "-", "note": 4},
        {"rc": "7", "note": 4, "chord": "_3,2,5"},
        {"rc": "-", "note": 4},

        // F C
        {"rc": "6", "note": 4, "chord": "_4,1,4"},
        {"rc": "-", "note": 4},
        {"rc": "1_", "note": 4, "chord": "1,3,5"},
        {"rc": "-", "note": 4},

        // F G
        {"rc": "6", "note": 4, "chord": "_4,1,4"},
        {"rc": "-", "note": 4},
        {"rc": "7", "note": 4, "chord": "_5,2,5"},
        {"rc": "-", "note": 4},

        // C G
        {"rc": "3_", "note": 8, "chord": "1"},
        {"rc": "0", "note": 8, "chord": "5"},
        {"rc": "0", "note": 8, "chord": "1_"},
        {"rc": "0", "note": 8, "chord": "3_"},
        {"rc": "7", "note": 8, "chord": "_5"},
        {"rc": "0", "note": 8, "chord": "2"},
        {"rc": "0", "note": 8, "chord": "5"},
        {"rc": "0", "note": 8, "chord": "7"},

        // Am Em
        {"rc": "1_", "note": 8, "chord": "_6"},
        {"rc": "0", "note": 8, "chord": "3"},
        {"rc": "0", "note": 8, "chord": "1_"},
        {"rc": "0", "note": 8, "chord": "3_"},
        {"rc": "7", "note": 8, "chord": "_3"},
        {"rc": "0", "note": 8, "chord": "3"},
        {"rc": "0", "note": 8, "chord": "5"},
        {"rc": "0", "note": 8, "chord": "7"},

        // F C
        {"rc": "6", "note": 8, "chord": "_4"},
        {"rc": "0", "note": 8, "chord": "1"},
        {"rc": "0", "note": 8, "chord": "4"},
        {"rc": "0", "note": 8, "chord": "6"},
        {"rc": "5", "note": 8, "chord": "1"},
        {"rc": "0", "note": 8, "chord": "3"},
        {"rc": "0", "note": 8, "chord": "5"},
        {"rc": "0", "note": 8, "chord": "1_"},

        // F G
        {"rc": "6", "note": 8, "chord": "_4"},
        {"rc": "0", "note": 8, "chord": "1"},
        {"rc": "0", "note": 8, "chord": "4"},
        {"rc": "0", "note": 8, "chord": "6"},
        {"rc": "7", "note": 8, "chord": "5_"},
        {"rc": "0", "note": 8, "chord": "2"},
        {"rc": "0", "note": 8, "chord": "5"},
        {"rc": "0", "note": 8, "chord": "7"},

        // C G
        {"rc": "3_", "note": 8, "chord": "1"},
        {"rc": "0", "note": 8, "chord": "5"},
        {"rc": "0", "note": 8, "chord": "1_"},
        {"rc": "0", "note": 8, "chord": "5"},
        {"rc": "7", "note": 8, "chord": "_5"},
        {"rc": "0", "note": 8, "chord": "2"},
        {"rc": "0", "note": 8, "chord": "5"},
        {"rc": "0", "note": 8, "chord": "2"},

        // Am Em
        {"rc": "1_", "note": 8, "chord": "_6"},
        {"rc": "0", "note": 8, "chord": "3"},
        {"rc": "3_", "note": 8},
        {"rc": "0", "note": 8, "chord": "6"},
        {"rc": "5_", "note": 8, "chord": "_3"},
        {"rc": "0", "note": 8, "chord": "5"},
        {"rc": "6_", "note": 8, "chord": "5_"},
        {"rc": "0", "note": 8, "chord": "7"},

        // F C
        {"rc": "4_", "note": 8, "chord": "_4"},
        {"rc": "0", "note": 8, "chord": "4"},
        {"rc": "0", "note": 8, "chord": "1_"},
        {"rc": "0", "note": 8, "chord": "_4"},
        {"rc": "3_", "note": 8, "chord": "1"},
        {"rc": "0", "note": 8, "chord": "7"},
        {"rc": "0", "note": 8, "chord": "5"},
        {"rc": "0", "note": 8, "chord": "1"},

        // F G
        {"rc": "1_", "note": 8, "chord": "_4"},
        {"rc": "0", "note": 8, "chord": "4"},
        {"rc": "0", "note": 8, "chord": "6"},
        {"rc": "0", "note": 8, "chord": "1_"},
        {"rc": "1_", "note": 8, "chord": "_5"},
        {"rc": "0", "note": 8, "chord": "2"},
        {"rc": "1_", "note": 8},
        {"rc": "7", "note": 8},

        // C G
        {"rc": "1_", "note": 8, "chord": "1"},
        {"rc": "7", "note": 8},
        {"rc": "1_", "note": 8},
        {"rc": "3", "note": 8},
        {"rc": "5", "note": 8, "chord": "_5"},
        {"rc": "0", "note": 8, "chord": "2"},
        {"rc": "7", "note": 8},
        {"rc": "0", "note": 8, "chord": "_5"},

        // Am Em
        {"rc": "1_", "note": 8, "chord": "_6"},
        {"rc": "0", "note": 8, "chord": "3"},
        {"rc": "3_", "note": 8},
        {"rc": "0", "note": 8, "chord": "6"},
        {"rc": "5_", "note": 8, "chord": "_3"},
        {"rc": "3_", "note": 8},
        {"rc": "5_", "note": 8},
        {"rc": "6_", "note": 8},

        // F C
        {"rc": "4_", "note": 8, "chord": "_4"},
        {"rc": "3_", "note": 8},
        {"rc": "2_", "note": 8},
        {"rc": "4_", "note": 8},
        {"rc": "3_", "note": 8, "chord": "1"},
        {"rc": "2_", "note": 8},
        {"rc": "1_", "note": 8},
        {"rc": "7", "note": 8},

        // F Gsus4
        {"rc": "6", "note": 8, "chord": "_4"},
        {"rc": "-", "note": 8, "chord": "4"},
        {"rc": "-", "note": 8, "chord": "6"},
        {"rc": "1_", "note": 8},
        {"rc": "1_", "note": 8, "chord": "_5"},
        {"rc": "-", "note": 8,  "chord": "2"},
        {"rc": "1_", "note": 8},
        {"rc": "7", "note": 8},   

        // C G
        {"rc": "1_", "note": 8, "chord": "1"},
        {"rc": "7", "note": 8},
        {"rc": "1_", "note": 8},
        {"rc": "3", "note": 8},
        {"rc": "5", "note": 8, "chord": "_5"},
        {"rc": "0", "note": 8, "chord": "2"},
        {"rc": "7", "note": 8},
        {"rc": "0", "note": 8, "chord": "_5"},

        // Am Em
        {"rc": "1_", "note": 8, "chord": "_6"},
        {"rc": "0", "note": 8, "chord": "3"},
        {"rc": "3_", "note": 8},
        {"rc": "0", "note": 8, "chord": "6"},
        {"rc": "5_", "note": 8, "chord": "_3"},
        {"rc": "7", "note": 8},
        {"rc": "5_", "note": 8},
        {"rc": "6_", "note": 8},

        // F C
        {"rc": "4_", "note": 8, "chord": "_4"},
        {"rc": "3_", "note": 8},
        {"rc": "2_", "note": 8},
        {"rc": "4_", "note": 8},
        {"rc": "3_", "note": 8, "chord": "1"},
        {"rc": "2_", "note": 8},
        {"rc": "1_", "note": 8},
        {"rc": "7", "note": 8},

    
        // F Gsus4
        {"rc": "6", "note": 8, "chord": "_4"},
        {"rc": "-", "note": 8, "chord": "4"},
        {"rc": "-", "note": 8, "chord": "6"},
        {"rc": "1_", "note": 8},
        {"rc": "1_", "note": 8, "chord": "_5"},
        {"rc": "-", "note": 16,  "chord": "2"},
        {"rc": "1_", "note": 16},
        {"rc": "7", "note": 16},   
        {"rc": "1_", "note": 16},
        {"rc": "2_", "note": 8}, 

        // C G
        {"rc": "3_", "note": 8, "chord": "1"},
        {"rc": "0", "note": 8, "chord": "5"},
        {"rc": "3_", "note": 16},
        {"rc": "2_", "note": 16},
        {"rc": "1_", "note": 16},
        {"rc": "2_", "note": 16},
        {"rc": "_5", "note": 8},
        {"rc": "0", "note": 16, "chord": "5"},
        {"rc": "3_", "note": 16},
        {"rc": "4_", "note": 16},
        {"rc": "3_", "note": 16},
        {"rc": "2_", "note": 8},

        // Am Em
        {"rc": "1_", "note": 8, "chord": "_6"},
        {"rc": "0", "note": 16, "chord": "3"},
        {"rc": "1_", "note": 16},
        {"rc": "0", "note": 16, "chord": "6"},
        {"rc": "0", "note": 16, "chord": "3"},
        {"rc": "7", "note": 16},
        {"rc": "1_", "note": 16},
        {"rc": "1_", "note": 8, "chord": "_3"},
        {"rc": "5", "note": 16},
        {"rc": "3", "note": 16},
        {"rc": "0", "note": 8},
        {"rc": "5", "note": 8},

        // F C
        {"rc": "6", "note": 8, "chord": "_4"},
        {"rc": "0", "note": 16, "chord": "4"},
        {"rc": "7", "note": 16},
        {"rc": "0", "note": 8},
        {"rc": "1_", "note": 8},
        {"rc": "5", "note": 8, "chord": "1"},
        {"rc": "0", "note": 8, "chord": "3"},
        {"rc": "0", "note": 8, "chord": "1_"},
        {"rc": "0", "note": 8, "chord": "3"},

        // F Gsus4
        {"rc": "6", "note": 8, "chord": "_4"},
        {"rc": "-", "note": 8, "chord": "1"},
        {"rc": "4", "note": 16},
        {"rc": "6", "note": 16},   
        {"rc": "1_", "note": 16},
        {"rc": "2_", "note": 16}, 
        {"rc": "1_", "note": 8, "chord": "_5"},
        {"rc": "0", "note": 16, "chord": "2"},
        {"rc": "7", "note": 16},
        {"rc": "0", "note": 8},
        {"rc": "1_", "note": 8},
        {"rc": "2_", "note": 8},

        // C G
        {"rc": "3_", "note": 8, "chord": "1"},
        {"rc": "0", "note": 8, "chord": "5"},
        {"rc": "3_", "note": 16},
        {"rc": "2_", "note": 16},
        {"rc": "1_", "note": 16},
        {"rc": "2_", "note": 16},
        {"rc": "_5", "note": 8},
        {"rc": "0", "note": 16, "chord": "5"},
        {"rc": "3_", "note": 16},
        {"rc": "4_", "note": 16},
        {"rc": "3_", "note": 16},
        {"rc": "2_", "note": 8},

        // Am Em
        {"rc": "1_", "note": 8, "chord": "_6"},
        {"rc": "0", "note": 16, "chord": "3"},
        {"rc": "1_", "note": 16},
        {"rc": "0", "note": 16, "chord": "6"},
        {"rc": "0", "note": 16, "chord": "3"},
        {"rc": "7", "note": 16},
        {"rc": "1_", "note": 16},
        {"rc": "1_", "note": 8, "chord": "_3"},
        {"rc": "5", "note": 16},
        {"rc": "3", "note": 16},
        {"rc": "0", "note": 8},
        {"rc": "5", "note": 8},

        // F C
        {"rc": "6", "note": 8, "chord": "_4"},
        {"rc": "0", "note": 16, "chord": "4"},
        {"rc": "1_", "note": 16},
        {"rc": "0", "note": 8},
        {"rc": "4_", "note": 8},
        {"rc": "3_", "note": 8, "chord": "1"},
        {"rc": "2_", "note": 16},
        {"rc": "1_", "note": 16},
        {"rc": "0", "note": 8},
        {"rc": "0", "note": 8, "chord": "5"},

        // F G
        {"rc": "6", "note": 8, "chord": "_4"},
        {"rc": "0", "note": 8, "chord": "1"},
        {"rc": "4", "note": 16},
        {"rc": "6", "note": 16},
        {"rc": "1_", "note": 16},
        {"rc": "2_", "note": 16},
        {"rc": "7", "note": 8, "chord": "_5"},
        {"rc": "0", "note": 16, "chord": "2"},
        {"rc": "1_", "note": 16},
        {"rc": "0", "note": 8},
        {"rc": "2_", "note": 16},
        {"rc": "1_", "note": 16},

        // C G
        {"rc": "5_", "note": 8, "chord": "1"},
        {"rc": "3_", "note": 16},
        {"rc": "4_", "note": 16},
        {"rc": "5_", "note": 8},
        {"rc": "3_", "note": 16},
        {"rc": "4_", "note": 16},
        {"rc": "5_", "note": 16, "chord": "_5"},
        {"rc": "5", "note": 16},
        {"rc": "6", "note": 16},
        {"rc": "7", "note": 16},
        {"rc": "1_", "note": 16},
        {"rc": "2_", "note": 16},
        {"rc": "3_", "note": 16},
        {"rc": "4_", "note": 16},

        // Am Em
        {"rc": "3_", "note": 8, "chord": "_6"},
        {"rc": "1_", "note": 16},
        {"rc": "2_", "note": 16},
        {"rc": "3_", "note": 8},
        {"rc": "2", "note": 16},
        {"rc": "3", "note": 16},
        {"rc": "5", "note": 16, "chord": "_3"},
        {"rc": "6", "note": 16},
        {"rc": "5", "note": 16},
        {"rc": "4", "note": 16},
        {"rc": "5", "note": 16},
        {"rc": "1_", "note": 16},
        {"rc": "7", "note": 16},
        {"rc": "1_", "note": 16},

        // F C
        {"rc": "6", "note": 8, "chord": "_4"},
        {"rc": "1_", "note": 16},
        {"rc": "7", "note": 16},
        {"rc": "6", "note": 8},
        {"rc": "5", "note": 16},
        {"rc": "4", "note": 16},
        {"rc": "5", "note": 16, "chord": "1"},
        {"rc": "4", "note": 16},
        {"rc": "3", "note": 16},
        {"rc": "4", "note": 16},
        {"rc": "5", "note": 16},
        {"rc": "6", "note": 16},
        {"rc": "7", "note": 16},
        {"rc": "1_", "note": 16},

        // F G
        {"rc": "6", "note": 8, "chord": "_4"},
        {"rc": "1_", "note": 16},
        {"rc": "7", "note": 16},
        {"rc": "1_", "note": 8},
        {"rc": "7", "note": 16},
        {"rc": "1_", "note": 16},
        {"rc": "7", "note": 16, "chord": "_5"},
        {"rc": "6", "note": 16},
        {"rc": "7", "note": 16},
        {"rc": "1_", "note": 16},
        {"rc": "2_", "note": 16},
        {"rc": "3_", "note": 16},
        {"rc": "4_", "note": 16},
        {"rc": "5_", "note": 16},

        // C G
        {"rc": "5_", "note": 8, "chord": "_1"},
        {"rc": "3_", "note": 16},
        {"rc": "4_", "note": 16},
        {"rc": "5_", "note": 8},
        {"rc": "3_", "note": 16},
        {"rc": "4_", "note": 16},
        {"rc": "5_", "note": 16, "chord": "_5"},
        {"rc": "5", "note": 16},
        {"rc": "6", "note": 16},
        {"rc": "7", "note": 16},
        {"rc": "1_", "note": 16},
        {"rc": "2_", "note": 16},
        {"rc": "3_", "note": 16},
        {"rc": "4_", "note": 16},

        // Am Em
        {"rc": "3_", "note": 8, "chord": "_6"},
        {"rc": "1_", "note": 16},
        {"rc": "2_", "note": 16},
        {"rc": "3_", "note": 8},
        {"rc": "2", "note": 16},
        {"rc": "3", "note": 16},
        {"rc": "5", "note": 16, "chord": "_3"},
        {"rc": "6", "note": 16},
        {"rc": "5", "note": 16},
        {"rc": "4", "note": 16},
        {"rc": "5", "note": 16},
        {"rc": "1_", "note": 16},
        {"rc": "7", "note": 16},
        {"rc": "1_", "note": 16},

        // F C
        {"rc": "6", "note": 8, "chord": "_4"},
        {"rc": "1_", "note": 16},
        {"rc": "7", "note": 16},
        {"rc": "6", "note": 8},
        {"rc": "5", "note": 16},
        {"rc": "4", "note": 16},
        {"rc": "5", "note": 16, "chord": "1"},
        {"rc": "4", "note": 16},
        {"rc": "3", "note": 16},
        {"rc": "4", "note": 16},
        {"rc": "5", "note": 16},
        {"rc": "6", "note": 16},
        {"rc": "7", "note": 16},
        {"rc": "1_", "note": 16},

        // F G
        {"rc": "6", "note": 8, "chord": "_4"},
        {"rc": "1_", "note": 16},
        {"rc": "7", "note": 16},
        {"rc": "1_", "note": 8},
        {"rc": "7", "note": 16},
        {"rc": "1_", "note": 16},
        {"rc": "7", "note": 16, "chord": "_5"},
        {"rc": "6", "note": 16},
        {"rc": "7", "note": 16},
        {"rc": "1_", "note": 16},
        {"rc": "2_", "note": 16},
        {"rc": "3_", "note": 16},
        {"rc": "4_", "note": 16},
        {"rc": "5_", "note": 16},

        // C G
        {"rc": "3_", "note": 8, "chord": "1"},
        {"rc": "1_", "note": 16},
        {"rc": "2_", "note": 16},
        {"rc": "3_", "note": 8},
        {"rc": "2_", "note": 16},
        {"rc": "1_", "note": 16},
        {"rc": "2_", "note": 16, "chord": "_5"},
        {"rc": "7", "note": 16},
        {"rc": "1_", "note": 16},
        {"rc": "2_", "note": 16},
        {"rc": "3_", "note": 16},
        {"rc": "2_", "note": 16},
        {"rc": "1_", "note": 16},
        {"rc": "7", "note": 16},

        // Am Em
        {"rc": "1_", "note": 8, "chord": "_6"},
        {"rc": "6", "note": 16},
        {"rc": "7", "note": 16},
        {"rc": "1_", "note": 8},
        {"rc": "3_", "note": 16},
        {"rc": "4_", "note": 16},
        {"rc": "5", "note": 16, "chord": "_3"},
        {"rc": "6", "note": 16},
        {"rc": "5", "note": 16},
        {"rc": "4", "note": 16},
        {"rc": "5", "note": 16},
        {"rc": "1_", "note": 16},
        {"rc": "7", "note": 16},
        {"rc": "1_", "note": 16},

        // F C
        {"rc": "6", "note": 8, "chord": "_4"},
        {"rc": "1_", "note": 16},
        {"rc": "7", "note": 16},
        {"rc": "6", "note": 8},
        {"rc": "5", "note": 16},
        {"rc": "4", "note": 16},
        {"rc": "5", "note": 16, "chord": "1"},
        {"rc": "4", "note": 16},
        {"rc": "3", "note": 16},
        {"rc": "4", "note": 16},
        {"rc": "5", "note": 16},
        {"rc": "6", "note": 16},
        {"rc": "7", "note": 16},
        {"rc": "1_", "note": 16},

        // F G
        {"rc": "6", "note": 8, "chord": "_4"},
        {"rc": "1_", "note": 16},
        {"rc": "7", "note": 16},
        {"rc": "1_", "note": 8},
        {"rc": "7", "note": 16},
        {"rc": "1", "note": 16},
        {"rc": "7", "note": 16, "chord": "_5"},
        {"rc": "1_", "note": 16},
        {"rc": "2_", "note": 16},
        {"rc": "1_", "note": 16},
        {"rc": "7", "note": 16},
        {"rc": "1_", "note": 16},
        {"rc": "6", "note": 16},
        {"rc": "7", "note": 16},

        // C G
        {"rc": "0", "note": 8, "chord": "1"},
        {"rc": "3_", "note": 16, "chord": "1_"},
        {"rc": "4_", "note": 16, "chord": "1_"},
        {"rc": "5_", "note": 8, "chord": "1_"},
        {"rc": "3_", "note": 8, "chord": "1_"},
        {"rc": "0", "note": 8, "chord": "_5"},
        {"rc": "7", "note": 16, "chord": "5"},
        {"rc": "1_", "note": 16, "chord": "6"},
        {"rc": "2_", "note": 8, "chord": "5"},
        {"rc": "7", "note": 8, "chord": "5"},

        // Am Em
        {"rc": "0", "note": 8, "chord": "_6"},
        {"rc": "1_", "note": 16, "chord": "6"},
        {"rc": "2_", "note": 16, "chord": "6"},
        {"rc": "3_", "note": 8, "chord": "1_"},
        {"rc": "1_", "note": 8, "chord": "6"},
        {"rc": "0", "note": 8, "chord": "_5"},
        {"rc": "3_", "note": 16, "chord": "7"},
        {"rc": "2_", "note": 16, "chord": "5"},
        {"rc": "1_", "note": 8, "chord": "6"},
        {"rc": "7", "note": 8, "chord": "5"},

        // F C
        {"rc": "0", "note": 8, "chord": "_4"},
        {"rc": "6", "note": 16, "chord": "4"},
        {"rc": "7", "note": 16, "chord": "6"},
        {"rc": "1_", "note": 8, "chord": "6"},
        {"rc": "6", "note": 8, "chord": "4"},
        {"rc": "0", "note": 8, "chord": "1"},
        {"rc": "5", "note": 16, "chord": "3"},
        {"rc": "6", "note": 16, "chord": "4"},
        {"rc": "1_", "note": 8, "chord": "5"},
        {"rc": "5", "note": 8, "chord": "3"},

        // F G
        {"rc": "0", "note": 8, "chord": "_4"},
        {"rc": "6", "note": 16, "chord": "4"},
        {"rc": "7", "note": 16, "chord": "6"},
        {"rc": "1_", "note": 8, "chord": "6"},
        {"rc": "6", "note": 16, "chord": "4"},
        {"rc": "5", "note": 16, "chord": "2"},
        {"rc": "0", "note": 16},
        {"rc": "5", "note": 16},
        {"rc": "7", "note": 16},
        {"rc": "1_", "note": 16},
        {"rc": "2_", "note": 8},
        {"rc": "7", "note": 8},

        // C G
        {"rc": "0", "note": 8, "chord": "1"},
        {"rc": "3_", "note": 16, "chord": "1_"},
        {"rc": "4_", "note": 16, "chord": "1_"},
        {"rc": "5_", "note": 8, "chord": "1_"},
        {"rc": "3_", "note": 8, "chord": "1_"},
        {"rc": "0", "note": 16, "chord": "5_"},
        {"rc": "2_", "note": 16, "chord": "5"},
        {"rc": "3_", "note": 16, "chord": "7"},
        {"rc": "4_", "note": 16, "chord": "7"},
        {"rc": "2_", "note": 8, "chord": "5"},

        // Am Em
        {"rc": "0", "note": 8, "chord": "_6"},
        {"rc": "1_", "note": 16, "chord": "6"},
        {"rc": "2_", "note": 16, "chord": "6"},
        {"rc": "3_", "note": 8},
        {"rc": "1_", "note": 8, "chord": "6"},
        {"rc": "7", "note": 16, "chord": "6"},
        {"rc": "0", "note": 16, "chord": "_3"},
        {"rc": "5_", "note": 16, "chord": "7"},
        {"rc": "4_", "note": 16, "chord": "7"},
        {"rc": "3_", "note": 16, "chord": "7"},
        {"rc": "5_", "note": 16, "chord": "7"},

        // F C
        {"rc": "6_", "note": 8, "chord": "4"},
        {"rc": "6_", "note": 16},
        {"rc": "5_", "note": 16},
        {"rc": "4_", "note": 8},
        {"rc": "6_", "note": 8},
        {"rc": "5_", "note": 8, "chord": "1"},
        {"rc": "5_", "note": 16},
        {"rc": "4_", "note": 16},
        {"rc": "3_", "note": 8},
        {"rc": "5_", "note": 8},

        // F G
        {"rc": "6_", "note": 16, "chord": "4"},
        {"rc": "5_", "note": 16},
        {"rc": "4_", "note": 16},
        {"rc": "6_", "note": 16},
        {"rc": "5_", "note": 16},
        {"rc": "4_", "note": 16},
        {"rc": "6_", "note": 8},
        {"rc": "7_", "note": 16, "chord": "5"},
        {"rc": "6_", "note": 16},
        {"rc": "5_", "note": 16},
        {"rc": "7_", "note": 16},
        {"rc": "7", "note": 16},
        {"rc": "1_", "note": 16},
        {"rc": "2", "note": 8},

        // C G
        {"rc": "3_", "note": 16, "chord": "1"},
        {"rc": "0", "note": 16},
        {"rc": "0", "note": 16},
        {"rc": "0", "note": 16},
        {"rc": "3_", "note": 16},
        {"rc": "2_", "note": 16},
        {"rc": "1_", "note": 16},
        {"rc": "2_", "note": 16},
        {"rc": "0", "note": 16, "chord": "_5"},
        {"rc": "0", "note": 16, "chord": "2"},
        {"rc": "0", "note": 16, "chord": "5"},
        {"rc": "3_", "note": 16},
        {"rc": "4_", "note": 16},
        {"rc": "3_", "note": 16},
        {"rc": "2_", "note": 8},

        // Am Em
        {"rc": "2_", "note": 16, "chord": "1"},
        {"rc": "0", "note": 16, "chord": "3"},
        {"rc": "0", "note": 16, "chord": "6"},
        {"rc": "1", "note": 16},
        {"rc": "0", "note": 16, "chord": "6"},
        {"rc": "0", "note": 16, "chord": "3"},
        {"rc": "7", "note": 16},
        {"rc": "1_", "note": 16},
        {"rc": "3", "note": 16, "chord": "1"},
        {"rc": "5", "note": 16},
        {"rc": "7", "note": 16},
        {"rc": "1_", "note": 16},
        {"rc": "3_", "note": 16},
        {"rc": "5_", "note": 16},
        {"rc": "7_", "note": 16},
        {"rc": "1__", "note": 16}, // 此处应该再高一个八度

        // F C
        {"rc": "7_", "note": 16, "chord": "4"},
        {"rc": "6_", "note": 16},
        {"rc": "5_", "note": 16},
        {"rc": "4_", "note": 16},
        {"rc": "5_", "note": 16},
        {"rc": "4_", "note": 16},
        {"rc": "3_", "note": 16},
        {"rc": "2_", "note": 16},
        {"rc": "3_", "note": 16, "chord": "1"},
        {"rc": "2_", "note": 16},
        {"rc": "1_", "note": 16},
        {"rc": "7", "note": 16},
        {"rc": "1_", "note": 16},
        {"rc": "7_", "note": 16},
        {"rc": "6_", "note": 16},
        {"rc": "5_", "note": 16},

        // F G
        {"rc": "6", "note": 16, "chord": "4"},
        {"rc": "5", "note": 16},
        {"rc": "4", "note": 16},
        {"rc": "5", "note": 16},
        {"rc": "6", "note": 8},
        {"rc": "4", "note": 16},
        {"rc": "5", "note": 16},
        {"rc": "7", "note": 16, "chord": "_5"},
        {"rc": "0", "note": 16},
        {"rc": "0", "note": 16},
        {"rc": "1_", "note": 16},
        {"rc": "0", "note": 16, "chord": "2"},
        {"rc": "0", "note": 16},
        {"rc": "2_", "note": 8},

        // C G
        {"rc": "3_", "note": 16, "chord": "1"},
        {"rc": "0", "note": 16, "chord": "5"},
        {"rc": "0", "note": 16, "chord": "1_"},
        {"rc": "0", "note": 16, "chord": "5"},
        {"rc": "3_", "note": 16},
        {"rc": "0", "note": 16, "chord": "5"},
        {"rc": "4_", "note": 16},
        {"rc": "0", "note": 16, "chord": "5"},
        {"rc": "5_", "note": 16},
        {"rc": "0", "note": 16, "chord": "5"},
        {"rc": "6_", "note": 16},
        {"rc": "0", "note": 16, "chord": "5"},
        {"rc": "5_", "note": 16},
        {"rc": "0", "note": 16, "chord": "5"},
        {"rc": "4_", "note": 16},
        {"rc": "0", "note": 16, "chord": "5"},

        // Am- Em C9
        {"rc": "3_", "note": 16, "chord": "_6"},
        {"rc": "0", "note": 16, "chord": "4"},
        {"rc": "0", "note": 16, "chord": "6_"},
        {"rc": "0", "note": 16, "chord": "4"},
        {"rc": "1_", "note": 16},
        {"rc": "0", "note": 16, "chord": "6"},
        {"rc": "2_", "note": 16},
        {"rc": "0", "note": 16, "chord": "6"},
        {"rc": "3_", "note": 16, "chord": "_3"},
        {"rc": "0", "note": 16, "chord": "5"},
        {"rc": "4_", "note": 16},
        {"rc": "0", "note": 16, "chord": "5"},
        {"rc": "3_", "note": 16, "chord": "1"},
        {"rc": "0", "note": 16, "chord": "5"},
        {"rc": "2_", "note": 16},
        {"rc": "0", "note": 16, "chord": "5"},

        // F C
        {"rc": "1_", "note": 16, "chord": "_4"},
        {"rc": "0", "note": 16, "chord": "4"},
        {"rc": "0", "note": 16, "chord": "6"},
        {"rc": "0", "note": 16, "chord": "4"},
        {"rc": "6", "note": 16},
        {"rc": "7", "note": 16},
        {"rc": "1_", "note": 16},
        {"rc": "1_", "note": 16},
        {"rc": "0", "note": 16, "chord": "1"},
        {"rc": "1_", "note": 16, "chord": "5"},
        {"rc": "7", "note": 16, "chord": "5"},
        {"rc": "1_", "note": 16, "chord": "5"},
        {"rc": "5", "note": 16, "chord": "5"},
        {"rc": "1_", "note": 16, "chord": "5"},
        {"rc": "7_", "note": 16, "chord": "5"},
        {"rc": "1_", "note": 16, "chord": "5"},

        // F Gsus4
        {"rc": "1_", "note": 16, "chord": "_4"},
        {"rc": "0", "note": 16, "chord": "1"},
        {"rc": "0", "note": 16, "chord": "4"},
        {"rc": "0", "note": 16, "chord": "1"},
        {"rc": "4", "note": 16},
        {"rc": "6", "note": 16},
        {"rc": "1_", "note": 16},
        {"rc": "2_", "note": 16},
        {"rc": "1_", "note": 16, "chord": "_5"},
        {"rc": "0", "note": 16, "chord": "2"},
        {"rc": "0", "note": 16, "chord": "5"},
        {"rc": "7", "note": 16},
        {"rc": "0", "note": 16, "chord": "2"},
        {"rc": "0", "note": 16, "chord": "5"},
        {"rc": "1_", "note": 16},
        {"rc": "2_", "note": 16},

        // C G
        {"rc": "3_", "note": 16, "chord": "1"},
        {"rc": "0", "note": 16, "chord": "5"},
        {"rc": "0", "note": 16, "chord": "1_"},
        {"rc": "0", "note": 16, "chord": "5"},
        {"rc": "3_", "note": 16},
        {"rc": "0", "note": 16, "chord": "5"},
        {"rc": "4_", "note": 16},
        {"rc": "0", "note": 16, "chord": "5"},
        {"rc": "5_", "note": 16},
        {"rc": "0", "note": 16, "chord": "5"},
        {"rc": "6_", "note": 16},
        {"rc": "0", "note": 16, "chord": "5"},
        {"rc": "5_", "note": 16},
        {"rc": "0", "note": 16, "chord": "5"},
        {"rc": "4_", "note": 16},
        {"rc": "0", "note": 16, "chord": "5"},

        // Am- Em C9
        {"rc": "3_", "note": 16, "chord": "_6"},
        {"rc": "0", "note": 16, "chord": "4"},
        {"rc": "0", "note": 16, "chord": "6_"},
        {"rc": "0", "note": 16, "chord": "4"},
        {"rc": "1_", "note": 16},
        {"rc": "0", "note": 16, "chord": "1_"},
        {"rc": "2_", "note": 16},
        {"rc": "0", "note": 16, "chord": "6"},
        {"rc": "3_", "note": 16, "chord": "_3"},
        {"rc": "0", "note": 16, "chord": "5"},
        {"rc": "4_", "note": 16},
        {"rc": "0", "note": 16, "chord": "5"},
        {"rc": "3_", "note": 16, "chord": "1"},
        {"rc": "0", "note": 16, "chord": "5"},
        {"rc": "2_", "note": 16},
        {"rc": "0", "note": 16, "chord": "5"},

        // F C
        {"rc": "1_", "note": 16, "chord": "_4"},
        {"rc": "0", "note": 16, "chord": "4"},
        {"rc": "0", "note": 16, "chord": "6"},
        {"rc": "0", "note": 16, "chord": "4"},
        {"rc": "6", "note": 16},
        {"rc": "7", "note": 16},
        {"rc": "1_", "note": 16},
        {"rc": "1_", "note": 16},
        {"rc": "0", "note": 16, "chord": "1"},
        {"rc": "1_", "note": 16, "chord": "5"},
        {"rc": "7", "note": 16, "chord": "5"},
        {"rc": "1_", "note": 16, "chord": "5"},
        {"rc": "5", "note": 16, "chord": "5"},
        {"rc": "1_", "note": 16, "chord": "5"},
        {"rc": "7_", "note": 16, "chord": "5"},
        {"rc": "1_", "note": 16, "chord": "5"},

        // F Gsus4
        {"rc": "1_", "note": 16, "chord": "_4"},
        {"rc": "0", "note": 16, "chord": "1"},
        {"rc": "0", "note": 16, "chord": "4"},
        {"rc": "0", "note": 16, "chord": "1"},
        {"rc": "4", "note": 16},
        {"rc": "6", "note": 16},
        {"rc": "1_", "note": 16},
        {"rc": "2_", "note": 16},
        {"rc": "1_", "note": 16, "chord": "_5"},
        {"rc": "0", "note": 16, "chord": "2"},
        {"rc": "0", "note": 16, "chord": "5"},
        {"rc": "7", "note": 16},
        {"rc": "0", "note": 16, "chord": "2"},
        {"rc": "0", "note": 16, "chord": "5"},
        {"rc": "1_", "note": 16},
        {"rc": "2_", "note": 16},

        // C G
        {"rc": "3_", "note": 8},
        {"rc": "0", "note": 8, "chord": "5"},
        {"rc": "0", "note": 8, "chord": "1_"},
        {"rc": "0", "note": 8, "chord": "3_"},
        {"rc": "7", "note": 8},
        {"rc": "0", "note": 8, "chord": "2"},
        {"rc": "0", "note": 8, "chord": "5"},
        {"rc": "0", "note": 8, "chord": "7"},

        // Am Em
        {"rc": "1_", "note": 8},
        {"rc": "0", "note": 8, "chord": "3"},
        {"rc": "0", "note": 8, "chord": "1_"},
        {"rc": "0", "note": 8, "chord": "3_"},
        {"rc": "7", "note": 8},
        {"rc": "0", "note": 8, "chord": "3"},
        {"rc": "0", "note": 8, "chord": "5"},
        {"rc": "0", "note": 8, "chord": "7"},

        // F C
        {"rc": "6", "note": 8},
        {"rc": "0", "note": 8, "chord": "1"},
        {"rc": "0", "note": 8, "chord": "4"},
        {"rc": "0", "note": 8, "chord": "6"},
        {"rc": "5", "note": 8},
        {"rc": "0", "note": 8, "chord": "3"},
        {"rc": "0", "note": 8, "chord": "5"},
        {"rc": "0", "note": 8, "chord": "1_"},

        // F G
        {"rc": "6", "note": 8},
        {"rc": "0", "note": 8, "chord": "1"},
        {"rc": "0", "note": 8, "chord": "4"},
        {"rc": "0", "note": 8, "chord": "6"},
        {"rc": "_5", "note": 8},
        {"rc": "0", "note": 8, "chord": "2"},
        {"rc": "0", "note": 8, "chord": "5"},
        {"rc": "0", "note": 8, "chord": "7"},
    ]]
}

/**
 * 点击
 * @param {*} keys 
 */
function keyClick(keys) {
    console.log(arguments)
    for(let i = 0; i < arguments.length; i++) {
        let coord = KeyMap[arguments[i]];
        if(coord) {
            press(KeyMap[arguments[i]][0], KeyMap[arguments[i]][1], 1)
        }
    }
}

/**
 * 长按
 * @param {*} duration 
 * @param {*} keys 
 */
function keyLongClick(duration, keys) {
    for(let i = 1; i < arguments.length + 1; i++) {
        press(KeyMap[arguments[i]][0], KeyMap[arguments[i]][1], duration)
    }
}

// 从和弦中获取在键盘中对应的键位
function getKeysFromChord(chord){
    // 得多和弦的组成音
    if(chord) {
        return chord.split(",")
    }else {
        return null
    }
}

function play(music) {
    let m = music["music"]
    for (let i = 0; i < m.length; i++) {
        let chapter = m[i];
        // roll_call唱名,note音符,如八分音符
        for (let j = 0; j < chapter.length; j++) {
            let note = chapter[j]
            // 旋律音对应的键
            let key = note["rc"]
            // 和弦
            let chord = note["chord"]
            // 和弦对应的键位
            let keys = getKeysFromChord(chord)
            // 时值
            let time = (60 * 1000 / music["bpm"]) / (note["note"] / music["beat_m"])
            if(!key) {
                if (chord) {
                    keyClick.apply(null, keys)
                }
                sleep(time)
            }else {
                // 如果存在和音,则加人和音
                if (chord) {
                    // 如果和弦音中已经存在旋律音,直接弹和弦音。否则,将旋律音加人
                    keys.push(key)
                    keyClick.apply(null, keys)
                    sleep(time)
                }else{
                    keyClick(key)
                    sleep(time)
                }
            }
            chord = null
        }
    }
}
// 延时2s
sleep(2000)
// 自动转跳至游戏界面
let isLaunch = launch("com.tencent.tmgp.wuxia")
if(isLaunch) {
    // 到游戏界面后,延时2s
    sleep(2000)
    // 开始自动弹奏
    play(Song)
}

六、《卡农》吉他谱附谱

卡农1.jpg

卡农2.jpg

卡农3.jpg

卡农4.jpg

卡农5.jpg

卡农6.jpg

你可能感兴趣的:(天刀手游自动弹奏脚本制谱教程(未完待续))