Musicreater/nmcsup/const.py
2022-01-27 21:21:25 +08:00

447 lines
16 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"""音创系列的音符对照表 以及一系列常数"""
# 诸葛亮与八卦阵帮忙修改语法 日期:---2022年1月19日
# 统计致命三级错误0个警告二级错误0个语法一级错误109个
notes = {
'....A': [0.074, 27.5, 'wood', 8],
'....A#': [0.0787, 29.135, 'wood', 9],
'....B': [0.083, 30.868, 'wood', 10],
'...C': [0.088, 32.703, 'wood', 11],
'...C#': [0.094, 34.648, 'wood', 12],
'...D': [0.1, 36.708, 'wood', 13],
'...D#': [0.105, 38.891, 'log', 0],
'...E': [0.11, 41.203, 'log', 1],
'...F': [0.12, 43.654, 'log', 2],
'...F#': [0.125, 46.249, 'wood', 0],
'...G': [0.13, 48.999, 'wood', 1],
'...G#': [0.14, 51.913, 'wood', 2],
'...A': [0.15, 55.0, 'wood', 3],
'...A#': [0.16, 58.27, 'wood', 4],
'...B': [0.17, 61.735, 'wood', 5],
'..C': [0.18, 65.406, 'wool', 0],
'..C#': [0.19, 69.296, 'wool', 1],
'..D': [0.2, 73.416, 'wool', 2],
'..D#': [0.21, 77.782, 'wool', 3],
'..E': [0.22, 82.407, 'wool', 4],
'..F': [0.235, 87.307, 'wool', 5],
'..F#': [0.25, 92.499, 'concretepowder', 0],
'..G': [0.26, 97.999, 'concretepowder', 1],
'..G#': [0.28, 103.826, 'concretepowder', 2],
'..A': [0.3, 110.0, 'concretepowder', 3],
'..A#': [0.31, 116.541, 'concretepowder', 4],
'..B': [0.33, 123.471, 'concretepowder', 5],
'.C': [0.35, 130.813, 'concretepowder', 6],
'.C#': [0.37, 138.591, 'concretepowder', 7],
'.D': [0.4, 146.832, 'concretepowder', 8],
'.D#': [0.42, 155.563, 'concretepowder', 9],
'.E': [0.44, 164.814, 'concretepowder', 10],
'.F': [0.47, 174.614, 'concretepowder', 11],
'.F#': [0.5, 184.997, 'concretepowder', 12],
'.G': [0.53, 195.998, 'concretepowder', 13],
'.G#': [0.56, 207.652, 'concretepowder', 14],
'.A': [0.6, 220.0, 'concretepowder', 15],
'.A#': [0.63, 233.082, 'concrete', 0],
'.B': [0.67, 246.942, 'concrete', 1],
'C': [0.7, 261.626, 'concrete', 2],
'C#': [0.75, 277.183, 'concrete', 3],
'D': [0.8, 293.665, 'concrete', 4],
'D#': [0.84, 311.127, 'concrete', 5],
'E': [0.9, 329.628, 'concrete', 6],
'F': [0.94, 349.228, 'concrete', 7],
'F#': [1.0, 369.994, 'concrete', 8],
'G': [1.05, 391.995, 'concrete', 9],
'G#': [1.12, 415.305, 'concrete', 10],
'A': [1.2, 440.0, 'concrete', 11],
'A#': [1.25, 466.164, 'concrete', 12],
'B': [1.33, 493.883, 'concrete', 13],
'`C': [1.4, 523.251, 'concrete', 14],
'`C#': [1.5, 554.365, 'concrete', 15],
'`D': [1.6, 587.33, 'stained_hardened_clay', 0],
'`D#': [1.7, 622.254, 'stained_hardened_clay', 1],
'`E': [1.8, 659.255, 'stained_hardened_clay', 2],
'`F': [1.9, 698.456, 'stained_hardened_clay', 3],
'`F#': [2.0, 739.989, 'stained_hardened_clay', 4],
'`G': [2.1, 783.991, 'stained_hardened_clay', 5],
'`G#': [2.24, 830.609, 'stained_hardened_clay', 6],
'`A': [2.4, 880.0, 'stained_hardened_clay', 7],
'`A#': [2.5, 932.328, 'stained_hardened_clay', 8],
'`B': [2.67, 987.767, 'stained_hardened_clay', 9],
'``C': [2.83, 1046.502, 'stained_hardened_clay', 10],
'``C#': [3.0, 1108.731, 'stained_hardened_clay', 11],
'``D': [3.17, 1174.659, 'stained_hardened_clay', 12],
'``D#': [3.36, 1244.508, 'stained_hardened_clay', 13],
'``E': [3.56, 1318.51, 'stained_hardened_clay', 14],
'``F': [3.78, 1396.913, 'stained_hardened_clay', 15],
'``F#': [4.0, 1479.978, 'white_glazed_terracotta', 0],
'``G': [4.24, 1567.982, 'orange_glazed_terracotta', 0],
'``G#': [4.5, 1661.219, 'magenta_glazed_terracotta', 0],
'``A': [4.76, 1760.0, 'light_blue_glazed_terracotta', 0],
'``A#': [5.04, 1864.655, 'yellow_glazed_terracotta', 0],
'``B': [5.34, 1975.533, 'lime_glazed_terracotta', 0],
'```C': [5.66, 2093.005, 'pink_glazed_terracotta', 0],
'```C#': [6.0, 2217.461, 'gray_glazed_terracotta', 0],
'```D': [6.35, 2349.318, 'silver_glazed_terracotta', 0],
'```D#': [6.73, 2489.016, 'cyan_glazed_terracotta', 0],
'```E': [7.13, 2637.02, 'purple_glazed_terracotta', 0],
'```F': [7.55, 2793.826, 'blue_glazed_terracotta', 0],
'```F#': [8.0, 2959.955, 'brown_glazed_terracotta', 0],
'```G': [8.47, 3135.963, 'green_glazed_terracotta', 0],
'```G#': [8.98, 3322.438, 'red_glazed_terracotta', 0],
'```A': [9.51, 3520.0, 'black_glazed_terracotta', 0],
'```A#': [10.08, 3729.31, 'stained_glass', 0],
'```B': [10.68, 3951.066, 'stained_glass', 1],
'````C': [11.31, 4186.009, 'stained_glass', 2],
'0': [0.0, 0.0, 'glass', 0]
}
'''音符对照表\n
音符:[MC音调, 声音频率, 方块名称, 数据值]'''
# 方块
'''
blocks = {
0.074 : ['stained_glass', 3],
0.0787 : ['stained_glass', 4],
0.083 : ['stained_glass', 5],
0.088 : ['stained_glass', 6],
0.094 : ['stained_glass', 7],
0.1 : ['stained_glass', 8],
0.105 : ['stained_glass', 9],
0.11 : ['stained_glass', 10],
0.12 : ['stained_glass', 11],
0.125 : ['stained_glass', 12],
0.13 : ['stained_glass', 13],
0.14 : ['stained_glass', 14],
0.15 : ['stained_glass', 15],
0.16 : ['wool', 0],
0.17 : ['wool', 1],
0.18 : ['wool', 2],
0.19 : ['wool', 3],
0.2 : ['wool', 4],
0.21 : ['wool', 5],
0.22 : ['wool', 6],
0.235 : ['wool', 7],
0.25 : ['concretepowder', 0],
0.26 : ['concretepowder', 1],
0.28 : ['concretepowder', 2],
0.3 : ['concretepowder', 3],
0.31 : ['concretepowder', 4],
0.33 : ['concretepowder', 5],
0.35 : ['concretepowder', 6],
0.37 : ['concretepowder', 7],
0.4 : ['concretepowder', 8],
0.42 : ['concretepowder', 9],
0.44 : ['concretepowder', 10],
0.47 : ['concretepowder', 11],
0.5 : ['concretepowder', 12],
0.53 : ['concretepowder', 13],
0.56 : ['concretepowder', 14],
0.6 : ['concretepowder', 15],
0.63 : ['concrete', 0],
0.67 : ['concrete', 1],
0.7 : ['concrete', 2],
0.75 : ['concrete', 3],
0.8 : ['concrete', 4],
0.84 : ['concrete', 5],
0.9 : ['concrete', 6],
0.94 : ['concrete', 7],
1.0 : ['concrete', 8],
1.05 : ['concrete', 9],
1.12 : ['concrete', 10],
1.2 : ['concrete', 11],
1.25 : ['concrete', 12],
1.33 : ['concrete', 13],
1.4 : ['concrete', 14],
1.5 : ['concrete', 15],
1.6 : ['stained_hardened_clay', 0],
1.7 : ['stained_hardened_clay', 1],
1.8 : ['stained_hardened_clay', 2],
1.9 : ['stained_hardened_clay', 3],
2.0 : ['stained_hardened_clay', 4],
2.1 : ['stained_hardened_clay', 5],
2.24 : ['stained_hardened_clay', 6],
2.4 : ['stained_hardened_clay', 7],
2.5 : ['stained_hardened_clay', 8],
2.67 : ['stained_hardened_clay', 9],
2.83 : ['stained_hardened_clay', 10],
3.0 : ['stained_hardened_clay', 11],
3.17 : ['stained_hardened_clay', 12],
3.36 : ['stained_hardened_clay', 13],
3.56 : ['stained_hardened_clay', 14],
3.78 : ['stained_hardened_clay', 15],
4.0 : ['stained_glass_pane', 0],
4.24 : ['stained_glass_pane', 1],
4.5 : ['stained_glass_pane', 2],
4.76 : ['stained_glass_pane', 3],
5.04 : ['stained_glass_pane', 4],
5.34 : ['stained_glass_pane', 5],
5.66 : ['stained_glass_pane', 6],
6.0 : ['stained_glass_pane', 7],
6.35 : ['stained_glass_pane', 8],
6.73 : ['stained_glass_pane', 9],
7.13 : ['stained_glass_pane', 10],
7.55 : ['stained_glass_pane', 11],
8.0 : ['stained_glass_pane', 12],
8.47 : ['stained_glass_pane', 13],
8.98 : ['stained_glass_pane', 14],
9.51 : ['stained_glass_pane', 15],
10.08 : ['stained_glass', 0],
10.68 : ['stained_glass', 1],
11.31 : ['stained_glass', 2],
0.0 : ['glass', 0]
}
#向查理平致敬!!!!!
'''
Blocks = {
0.074: 'barrel',
0.0787: 'beacon',
0.083: 'bedrock',
0.088: 'black_glazed_terracotta',
0.094: 'blast_furnace',
0.1: 'blue_glazed_terracotta',
0.105: 'blue_ice',
0.11: 'bone_block',
0.12: 'bookshelf',
0.125: 'brick_block',
0.13: 'brown_glazed_terracotta',
0.14: 'cartography_table',
0.15: 'carved_pumpkin',
0.16: 'clay',
0.17: 'coal_block',
0.18: 'coal_ore',
0.19: 'cobblestone',
0.2: 'concrete',
0.21: 'crafting_table',
0.22: 'cyan_glazed_terracotta',
0.235: 'diamond_block',
0.25: 'diamond_ore',
0.26: 'white_glazed_terracotta',
0.28: 'dispenser',
0.3: 'dried_kelp_block',
0.31: 'dropper',
0.33: 'emerald_block',
0.35: 'emerald_ore',
0.37: 'end_bricks',
0.4: 'end_stone',
0.42: 'fletching_table',
0.44: 'furnace',
0.47: 'glass',
0.5: 'glowingobsidian',
0.53: 'glowstone',
0.56: 'gold_block',
0.6: 'gold_ore',
0.63: 'grass',
0.67: 'gray_glazed_terracotta',
0.7: 'green_glazed_terracotta',
0.75: 'hardened_clay',
0.8: 'hay_block',
0.84: 'iron_block',
0.9: 'iron_ore',
0.94: 'jukebox',
1.0: 'lapis_block',
1.05: 'lapis_ore',
1.12: 'light_blue_glazed_terracotta',
1.2: 'lime_glazed_terracotta',
1.25: 'lit_pumpkin',
1.33: 'log',
1.4: 'loom',
1.5: 'magenta_glazed_terracotta',
1.6: 'magma',
1.7: 'melon_block',
1.8: 'web',
1.9: 'mossy_cobblestone',
2.0: 'nether_brick',
2.1: 'nether_wart_block',
2.24: 'netherrack',
2.4: 'noteblock',
2.5: 'observer',
2.67: 'obsidian',
2.83: 'orange_glazed_terracotta',
3.0: 'pink_glazed_terracotta',
3.17: 'piston',
3.36: 'planks',
3.56: 'prismarine',
3.78: 'pumpkin',
4.0: 'purple_glazed_terracotta',
4.24: 'purpur_block',
4.5: 'quartz_block',
4.76: 'quartz_ore',
5.04: 'red_glazed_terracotta',
5.34: 'red_nether_brick',
5.66: 'red_sandstone',
6.0: 'redstone_block',
6.35: 'yellow_glazed_terracotta',
6.73: 'sandstone',
7.13: 'stonebrick',
7.55: 'silver_glazed_terracotta',
8.0: 'slime',
8.47: 'smithing_table',
8.98: 'smoker',
9.51: 'smooth_stone',
10.08: 'snow',
10.68: 'soul_sand',
11.31: 'sponge',
0.0: 'stone'
}
'''频率对照表\n
MC音调:方块名称'''
# 乐器
Instuments = {
'note.banjo': '班卓',
'note.bass': '低音',
'note.bassattack': '贝斯',
'note.bd': '鼓声',
'note.bell': '铃声',
'note.bit': '比特',
'note.cow_bell': '牛铃',
'note.didgeridoo': '迪吉',
'note.flute': '长笛',
'note.guitar': '吉他',
'note.harp': '竖琴',
'note.hat': '架鼓',
'note.chime': '钟声',
'note.iron_xylophone': '铁琴',
'note.pling': '叮叮',
'note.snare': '响弦',
'note.xylophone': '木琴'
}
'''乐器对照表\n
乐器英文:中文
翻译雪莹工坊Fun-Fer'''
pitch = {
'0': '0.0220970869120796',
'1': '0.0234110480761981',
'2': '0.0248031414370031',
'3': '0.0262780129766786',
'4': '0.0278405849418856',
'5': '0.0294960722713029',
'6': '0.03125',
'7': '0.033108221698728',
'8': '0.0350769390096679',
'9': '0.037162722343835',
'10': '0.0393725328092148',
'11': '0.0417137454428136',
'12': '0.0441941738241592',
'13': '0.0468220961523963',
'14': '0.0496062828740062',
'15': '0.0525560259533572',
'16': '0.0556811698837712',
'17': '0.0589921445426059',
'18': '0.0625',
'19': '0.066216443397456',
'20': '0.0701538780193358',
'21': '0.0743254446876701',
'22': '0.0787450656184296',
'23': '0.0834274908856271',
'24': '0.0883883476483184',
'25': '0.0936441923047926',
'26': '0.0992125657480125',
'27': '0.105112051906714',
'28': '0.111362339767542',
'29': '0.117984289085212',
'30': '0.125',
'31': '0.132432886794912',
'32': '0.140307756038672',
'33': '0.14865088937534',
'34': '0.157490131236859',
'35': '0.166854981771254',
'36': '0.176776695296637',
'37': '0.187288384609585',
'38': '0.198425131496025',
'39': '0.210224103813429',
'40': '0.222724679535085',
'41': '0.235968578170423',
'42': '0.25',
'43': '0.264865773589824',
'44': '0.280615512077343',
'45': '0.29730177875068',
'46': '0.314980262473718',
'47': '0.333709963542509',
'48': '0.353553390593274',
'49': '0.37457676921917',
'50': '0.39685026299205',
'51': '0.420448207626857',
'52': '0.44544935907017',
'53': '0.471937156340847',
'54': '0.5',
'55': '0.529731547179648',
'56': '0.561231024154687',
'57': '0.594603557501361',
'58': '0.629960524947437',
'59': '0.667419927085017',
'60': '0.707106781186548',
'61': '0.749153538438341',
'62': '0.7937005259841',
'63': '0.840896415253715',
'64': '0.890898718140339',
'65': '0.943874312681694',
'66': '1',
'67': '1.0594630943593',
'68': '1.12246204830937',
'69': '1.18920711500272',
'70': '1.25992104989487',
'71': '1.33483985417003',
'72': '1.4142135623731',
'73': '1.49830707687668',
'74': '1.5874010519682',
'75': '1.68179283050743',
'76': '1.78179743628068',
'77': '1.88774862536339',
'78': '2',
'79': '2.11892618871859',
'80': '2.24492409661875',
'81': '2.37841423000544',
'82': '2.51984209978975',
'83': '2.66967970834007',
'84': '2.82842712474619',
'85': '2.99661415375336',
'86': '3.1748021039364',
'87': '3.36358566101486',
'88': '3.56359487256136',
'89': '3.77549725072677',
'90': '4',
'91': '4.23785237743718',
'92': '4.48984819323749',
'93': '4.75682846001088',
'94': '5.03968419957949',
'95': '5.33935941668014',
'96': '5.65685424949238',
'97': '5.99322830750673',
'98': '6.3496042078728',
'99': '6.72717132202972',
'100': '7.12718974512272',
'101': '7.55099450145355',
'102': '8',
'103': '8.47570475487436',
'104': '8.97969638647498',
'105': '9.51365692002177',
'106': '10.079368399159',
'107': '10.6787188333603',
'108': '11.3137084989848',
'109': '11.9864566150135',
'110': '12.6992084157456',
'111': '13.4543426440594',
'112': '14.2543794902454',
'113': '15.1019890029071',
'114': '16',
'115': '16.9514095097487',
'116': '17.95939277295',
'117': '19.0273138400435',
'118': '20.158736798318',
'119': '21.3574376667206',
'120': '22.6274169979695',
'121': '23.9729132300269',
'122': '25.3984168314912',
'123': '26.9086852881189',
'124': '28.5087589804909',
'125': '30.2039780058142',
'126': '32',
'127': '33.9028190194974',
'128': '35.9187855458999',
'129': '38.0546276800871',
'130': '40.3174735966359',
'131': '42.7148753334411'
}