mirror of
https://github.com/TriM-Organization/Musicreater.git
synced 2025-02-19 00:58:07 +08:00
Merge branch 'master' of https://gitee.com/EillesWan/Musicreater
This commit is contained in:
commit
073ae827ab
3
.idea/.gitignore
generated
vendored
3
.idea/.gitignore
generated
vendored
@ -1,3 +0,0 @@
|
|||||||
# Default ignored files
|
|
||||||
/shelf/
|
|
||||||
/workspace.xml
|
|
12
.idea/Musicreater.iml
generated
12
.idea/Musicreater.iml
generated
@ -1,12 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<module type="PYTHON_MODULE" version="4">
|
|
||||||
<component name="NewModuleRootManager">
|
|
||||||
<content url="file://$MODULE_DIR$" />
|
|
||||||
<orderEntry type="inheritedJdk" />
|
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
|
||||||
</component>
|
|
||||||
<component name="PyDocumentationSettings">
|
|
||||||
<option name="format" value="PLAIN" />
|
|
||||||
<option name="myDocStringFormat" value="Plain" />
|
|
||||||
</component>
|
|
||||||
</module>
|
|
46
.idea/inspectionProfiles/Project_Default.xml
generated
46
.idea/inspectionProfiles/Project_Default.xml
generated
@ -1,46 +0,0 @@
|
|||||||
<component name="InspectionProjectProfileManager">
|
|
||||||
<profile version="1.0">
|
|
||||||
<option name="myName" value="Project Default" />
|
|
||||||
<inspection_tool class="LongLine" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="PyArgumentEqualDefaultInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="PyAugmentAssignmentInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="PyClassicStyleClassInspection" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="PyCompatibilityInspection" enabled="false" level="WARNING" enabled_by_default="false">
|
|
||||||
<option name="ourVersions">
|
|
||||||
<value>
|
|
||||||
<list size="1">
|
|
||||||
<item index="0" class="java.lang.String" itemvalue="3.10" />
|
|
||||||
</list>
|
|
||||||
</value>
|
|
||||||
</option>
|
|
||||||
</inspection_tool>
|
|
||||||
<inspection_tool class="PyMandatoryEncodingInspection" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="PyMissingTypeHintsInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="PyPep8Inspection" enabled="true" level="WEAK WARNING" enabled_by_default="true">
|
|
||||||
<option name="ignoredErrors">
|
|
||||||
<list>
|
|
||||||
<option value="E501" />
|
|
||||||
</list>
|
|
||||||
</option>
|
|
||||||
</inspection_tool>
|
|
||||||
<inspection_tool class="PyPep8NamingInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true">
|
|
||||||
<option name="ignoredErrors">
|
|
||||||
<list>
|
|
||||||
<option value="N802" />
|
|
||||||
<option value="N803" />
|
|
||||||
<option value="N806" />
|
|
||||||
<option value="N813" />
|
|
||||||
<option value="N801" />
|
|
||||||
</list>
|
|
||||||
</option>
|
|
||||||
</inspection_tool>
|
|
||||||
<inspection_tool class="PyUnresolvedReferencesInspection" enabled="true" level="WARNING" enabled_by_default="true">
|
|
||||||
<option name="ignoredIdentifiers">
|
|
||||||
<list>
|
|
||||||
<option value="list.__getitem__" />
|
|
||||||
<option value="list.split" />
|
|
||||||
</list>
|
|
||||||
</option>
|
|
||||||
</inspection_tool>
|
|
||||||
</profile>
|
|
||||||
</component>
|
|
6
.idea/inspectionProfiles/profiles_settings.xml
generated
6
.idea/inspectionProfiles/profiles_settings.xml
generated
@ -1,6 +0,0 @@
|
|||||||
<component name="InspectionProjectProfileManager">
|
|
||||||
<settings>
|
|
||||||
<option name="USE_PROJECT_PROFILE" value="false" />
|
|
||||||
<version value="1.0" />
|
|
||||||
</settings>
|
|
||||||
</component>
|
|
4
.idea/misc.xml
generated
4
.idea/misc.xml
generated
@ -1,4 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.9" project-jdk-type="Python SDK" />
|
|
||||||
</project>
|
|
8
.idea/modules.xml
generated
8
.idea/modules.xml
generated
@ -1,8 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="ProjectModuleManager">
|
|
||||||
<modules>
|
|
||||||
<module fileurl="file://$PROJECT_DIR$/.idea/Musicreater.iml" filepath="$PROJECT_DIR$/.idea/Musicreater.iml" />
|
|
||||||
</modules>
|
|
||||||
</component>
|
|
||||||
</project>
|
|
6
.idea/vcs.xml
generated
6
.idea/vcs.xml
generated
@ -1,6 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="VcsDirectoryMappings">
|
|
||||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
@ -1468,7 +1468,7 @@ def __main__():
|
|||||||
|
|
||||||
root.title(READABLETEXT[41].format(__version__))
|
root.title(READABLETEXT[41].format(__version__))
|
||||||
root.geometry('900x900') # 像素
|
root.geometry('900x900') # 像素
|
||||||
root.iconbitmap('./resources/musicreater.ico','./resources/musicreater.ico')
|
root.iconbitmap('./resources/musicreater.ico', './resources/musicreater.ico')
|
||||||
|
|
||||||
print('完成!')
|
print('完成!')
|
||||||
|
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
bgArrayLib/__pycache__/instrumentConstant.cpython-39.pyc
Normal file
BIN
bgArrayLib/__pycache__/instrumentConstant.cpython-39.pyc
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
24
bgArrayLib/instrumentConstant.py
Normal file
24
bgArrayLib/instrumentConstant.py
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
instrument_list = {'0': 'harp', '1': 'harp', '2': 'pling', '3': 'harp', '4': 'pling', '5': 'pling', '6': 'harp',
|
||||||
|
'7': 'harp',
|
||||||
|
'8': 'share', '9': 'harp', '10': 'didgeridoo', '11': 'harp', '12': 'xylophone', '13': 'chime',
|
||||||
|
'14': 'harp', '15': 'harp', '16': 'bass', '17': 'harp', '18': 'harp', '19': 'harp', '20': 'harp',
|
||||||
|
'21': 'harp', '22': 'harp', '23': 'guitar', '24': 'guitar', '25': 'guitar', '26': 'guitar',
|
||||||
|
'27': 'guitar', '28': 'guitar', '29': 'guitar', '30': 'guitar', '31': 'bass', '32': 'bass',
|
||||||
|
'33': 'bass',
|
||||||
|
'34': 'bass', '35': 'bass', '36': 'bass', '37': 'bass', '38': 'bass', '39': 'bass', '40': 'harp',
|
||||||
|
'41': 'harp', '42': 'harp', '43': 'harp', '44': 'iron_xylophone', '45': 'guitar', '46': 'harp',
|
||||||
|
'47': 'harp', '48': 'guitar', '49': 'guitar', '50': 'bit', '51': 'bit', '52': 'harp', '53': 'harp',
|
||||||
|
'54': 'bit', '55': 'flute', '56': 'flute', '57': 'flute', '58': 'flute', '59': 'flute',
|
||||||
|
'60': 'flute',
|
||||||
|
'61': 'flute', '62': 'flute', '63': 'flute', '64': 'bit', '65': 'bit', '66': 'bit', '67': 'bit',
|
||||||
|
'68': 'flute', '69': 'harp', '70': 'harp', '71': 'flute', '72': 'flute', '73': 'flute', '74': 'harp',
|
||||||
|
'75': 'flute', '76': 'harp', '77': 'harp', '78': 'harp', '79': 'harp', '80': 'bit', '81': 'bit',
|
||||||
|
'82': 'bit', '83': 'bit', '84': 'bit', '85': 'bit', '86': 'bit', '87': 'bit', '88': 'bit',
|
||||||
|
'89': 'bit',
|
||||||
|
'90': 'bit', '91': 'bit', '92': 'bit', '93': 'bit', '94': 'bit', '95': 'bit', '96': 'bit',
|
||||||
|
'97': 'bit',
|
||||||
|
'98': 'bit', '99': 'bit', '100': 'bit', '101': 'bit', '102': 'bit', '103': 'bit', '104': 'harp',
|
||||||
|
'105': 'banjo', '106': 'harp', '107': 'harp', '108': 'harp', '109': 'harp', '110': 'harp',
|
||||||
|
'111': 'guitar', '112': 'harp', '113': 'bell', '114': 'harp', '115': 'cow_bell', '116': 'basedrum',
|
||||||
|
'117': 'bass', '118': 'bit', '119': 'basedrum', '120': 'guitar', '121': 'harp', '122': 'harp',
|
||||||
|
'123': 'harp', '124': 'harp', '125': 'hat', '126': 'basedrum', '127': 'snare'}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -92,7 +92,6 @@ def funSplit(bigFile, maxCmdLen: int = 10000):
|
|||||||
return parts
|
return parts
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def makeFuncFiles(musicset, path='./'):
|
def makeFuncFiles(musicset, path='./'):
|
||||||
"""在指定目录下生成函数文件"""
|
"""在指定目录下生成函数文件"""
|
||||||
from nmcsup.trans import Note2Cmd
|
from nmcsup.trans import Note2Cmd
|
||||||
@ -327,7 +326,6 @@ def makeClassFuncFiles(musicset, path='./'):
|
|||||||
encoding='UTF-8') as f:
|
encoding='UTF-8') as f:
|
||||||
f.writelines(classList_conversion_SinglePlayer(musicset['musics'][i]['notes'],
|
f.writelines(classList_conversion_SinglePlayer(musicset['musics'][i]['notes'],
|
||||||
musicset['musics'][i]['set']['ScoreboardName'],
|
musicset['musics'][i]['set']['ScoreboardName'],
|
||||||
musicset['musics'][i]['set']['Instrument'],
|
|
||||||
musicset['mainset']['PlayerSelect'],
|
musicset['mainset']['PlayerSelect'],
|
||||||
True))
|
True))
|
||||||
if musicset['mainset']['IsRepeat']:
|
if musicset['mainset']['IsRepeat']:
|
||||||
|
@ -29,6 +29,7 @@ def classList_conversion_SinglePlayer(List: list, ScoreboardName: str, playerSel
|
|||||||
isProsess: bool = False) -> list:
|
isProsess: bool = False) -> list:
|
||||||
from bgArrayLib.compute import round_up
|
from bgArrayLib.compute import round_up
|
||||||
from bgArrayLib.pitchStrConstant import pitch
|
from bgArrayLib.pitchStrConstant import pitch
|
||||||
|
from bgArrayLib.instrumentConstant import instrument_list
|
||||||
commands = []
|
commands = []
|
||||||
length = len(List)
|
length = len(List)
|
||||||
j = 1
|
j = 1
|
||||||
@ -38,20 +39,18 @@ def classList_conversion_SinglePlayer(List: list, ScoreboardName: str, playerSel
|
|||||||
print(i)
|
print(i)
|
||||||
print(type(i))
|
print(type(i))
|
||||||
try:
|
try:
|
||||||
if i.instrument > 119:
|
|
||||||
pass
|
|
||||||
else:
|
|
||||||
commands.append(
|
commands.append(
|
||||||
f"execute @a{playerSelection} ~ ~ ~ execute @s[scores={{{ScoreboardName}="
|
f"execute @a{playerSelection} ~ ~ ~ execute @s[scores={{{ScoreboardName}="
|
||||||
f"{str(round_up(i.time_position)).replace('.0', '')}}}] ~ ~{127 - i.velocity} "
|
f"{str(round_up(i.time_position)).replace('.0', '')}}}] ~ ~{127 - i.velocity} "
|
||||||
f"~ playsound {i.instrument} @s ~ ~ ~ 1000 {pitch.get(str(i.pitch))} 1000\n")
|
f"~ playsound note.{instrument_list.get(str(i.instrument))} @s ~ ~ ~ "
|
||||||
|
f"1000 {pitch.get(str(i.pitch))} 1000\n")
|
||||||
if isProsess:
|
if isProsess:
|
||||||
commands.append(
|
commands.append(
|
||||||
f"execute @a{playerSelection} ~ ~ ~ execute @s[scores={{{ScoreboardName}="
|
f"execute @a{playerSelection} ~ ~ ~ execute @s[scores={{{ScoreboardName}="
|
||||||
f"{str(round_up(i.time_position)).replace('.0', '')}}}] ~ ~ ~ "
|
f"{str(round_up(i.time_position)).replace('.0', '')}}}] ~ ~ ~ "
|
||||||
f"title @s actionbar §e▶ 播放中: §a{j}/{length} || {int(j / length * 1000) / 10}\n")
|
f"title @s actionbar §e▶ 播放中: §a{j}/{length} || {int(j / length * 1000) / 10}\n")
|
||||||
j += 1
|
j += 1
|
||||||
except:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
# a += List[i][1]
|
# a += List[i][1]
|
||||||
# commands.append("\n\n# 凌云我的世界开发团队 x 凌云软件开发团队 : W-YI(金羿)\n")
|
# commands.append("\n\n# 凌云我的世界开发团队 x 凌云软件开发团队 : W-YI(金羿)\n")
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
铭刻时间的歌.mid
Normal file
BIN
铭刻时间的歌.mid
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user