diff --git a/.idea/.gitignore b/.idea/.gitignore
deleted file mode 100644
index eaf91e2..0000000
--- a/.idea/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-# Default ignored files
-/shelf/
-/workspace.xml
diff --git a/.idea/Musicreater.iml b/.idea/Musicreater.iml
deleted file mode 100644
index 2946dc0..0000000
--- a/.idea/Musicreater.iml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
deleted file mode 100644
index a2a5d19..0000000
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml
deleted file mode 100644
index 105ce2d..0000000
--- a/.idea/inspectionProfiles/profiles_settings.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
deleted file mode 100644
index 8d93904..0000000
--- a/.idea/misc.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
deleted file mode 100644
index b125bed..0000000
--- a/.idea/modules.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
deleted file mode 100644
index 9661ac7..0000000
--- a/.idea/vcs.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Musicreater.py b/Musicreater.py
index baaceb3..9f2bb46 100644
--- a/Musicreater.py
+++ b/Musicreater.py
@@ -1468,7 +1468,7 @@ def __main__():
root.title(READABLETEXT[41].format(__version__))
root.geometry('900x900') # 像素
- root.iconbitmap('./resources/musicreater.ico','./resources/musicreater.ico')
+ root.iconbitmap('./resources/musicreater.ico', './resources/musicreater.ico')
print('完成!')
diff --git a/bgArrayLib/__pycache__/__init__.cpython-39.pyc b/bgArrayLib/__pycache__/__init__.cpython-39.pyc
index 6924caa..a1ce7c6 100644
Binary files a/bgArrayLib/__pycache__/__init__.cpython-39.pyc and b/bgArrayLib/__pycache__/__init__.cpython-39.pyc differ
diff --git a/bgArrayLib/__pycache__/bpm.cpython-39.pyc b/bgArrayLib/__pycache__/bpm.cpython-39.pyc
index 41edf6b..7905da2 100644
Binary files a/bgArrayLib/__pycache__/bpm.cpython-39.pyc and b/bgArrayLib/__pycache__/bpm.cpython-39.pyc differ
diff --git a/bgArrayLib/__pycache__/compute.cpython-39.pyc b/bgArrayLib/__pycache__/compute.cpython-39.pyc
index 4f4ed67..d7ff321 100644
Binary files a/bgArrayLib/__pycache__/compute.cpython-39.pyc and b/bgArrayLib/__pycache__/compute.cpython-39.pyc differ
diff --git a/bgArrayLib/__pycache__/instrumentConstant.cpython-39.pyc b/bgArrayLib/__pycache__/instrumentConstant.cpython-39.pyc
new file mode 100644
index 0000000..aef6de6
Binary files /dev/null and b/bgArrayLib/__pycache__/instrumentConstant.cpython-39.pyc differ
diff --git a/bgArrayLib/__pycache__/pitchStrConstant.cpython-39.pyc b/bgArrayLib/__pycache__/pitchStrConstant.cpython-39.pyc
index 44745f8..1c762fe 100644
Binary files a/bgArrayLib/__pycache__/pitchStrConstant.cpython-39.pyc and b/bgArrayLib/__pycache__/pitchStrConstant.cpython-39.pyc differ
diff --git a/bgArrayLib/__pycache__/reader.cpython-39.pyc b/bgArrayLib/__pycache__/reader.cpython-39.pyc
index 2960de2..13359ec 100644
Binary files a/bgArrayLib/__pycache__/reader.cpython-39.pyc and b/bgArrayLib/__pycache__/reader.cpython-39.pyc differ
diff --git a/bgArrayLib/instrumentConstant.py b/bgArrayLib/instrumentConstant.py
new file mode 100644
index 0000000..924b4e2
--- /dev/null
+++ b/bgArrayLib/instrumentConstant.py
@@ -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'}
diff --git a/bgArrayLib/reader.py b/bgArrayLib/reader.py
index 514fbf6..094db70 100644
--- a/bgArrayLib/reader.py
+++ b/bgArrayLib/reader.py
@@ -1,148 +1,148 @@
-# -*- coding: utf-8 -*-
-
-
-from nmcsup.log import log
-import pickle
-
-
-class Note:
- def __init__(self, channel, pitch, velocity, time, time_position, instrument):
- self.channel = channel
- self.pitch = pitch
- self.velocity = velocity
- self.delay = time
- self.time_position = time_position
- self.instrument = instrument
- self.CD = "d"
-
- def get_CD(self, start, end):
- if end - start > 1.00:
- self.CD = "c"
- else:
- self.CD = "d"
-
-
-def midiNewReader(midfile: str):
- import mido
- # from msctspt.threadOpera import NewThread
- from bgArrayLib.bpm import get
-
- def Time(mt, tpb_a, bpm_a):
- return round(mt / tpb_a / bpm_a * 60 * 20)
-
- Notes = []
- tracks = []
- note_list = []
- close = []
- on = []
- off = []
- instruments = []
- isPercussion = False
- try:
- mid = mido.MidiFile(midfile)
- except Exception:
- log("找不到文件或无法读取文件" + midfile)
- return False
- tpb = mid.ticks_per_beat
- bpm = get(mid)
- # 解析
- # def loadMidi(track1):
- for track in mid.tracks:
- overallTime = 0.0
- instrument = 0
- for i in track:
- overallTime += i.time
- try:
- if i.channel != 9:
- # try:
- # log("event_type(事件): " + str(i.type) + " channel(音轨): " + str(i.channel) +
- # " note/pitch(音高): " +
- # str(i[2]) +
- # " velocity(力度): " + str(i.velocity) + " time(间隔时间): " + str(i.time) +
- # " overallTime/globalTime/timePosition: " + str(overallTime) + " \n")
- # except AttributeError:
- # log("event_type(事件): " + str(i.type) + " thing(内容):" + str(i) + " \n")
- if 'program_change' in str(i):
- instrument = i.program
- if instrument > 119: # 音色不够
- pass
- else:
- instruments.append(i.program)
- if 'note_on' in str(i) and i.velocity > 0:
- print(i)
- # print(i.note)
- # print([Note(i.channel, i.note, i.velocity, i.time, Time(overallTime, tpb, bpm), instrument)])
- tracks.append(
- [Note(i.channel, i.note, i.velocity, i.time, Time(overallTime, tpb, bpm), instrument)])
- note_list.append(
- [i.channel, i.note, i.velocity, i.time, Time(overallTime, tpb, bpm), instrument])
- on.append([i.note, Time(overallTime, tpb, bpm)])
- # return [Note(i.channel, i, i.velocity, i.time, Time(overallTime, tpb, bpm))]
- if 'note_off' in str(i) or 'note_on' in str(i) and i.velocity == 0:
- # print(i)
- # print([Note(i.channel, i.note, i.velocity, i.time, Time(overallTime, tpb, bpm))])
- close.append(
- [Note(i.channel, i.note, i.velocity, i.time, Time(overallTime, tpb, bpm), instrument)])
- off.append([i.note, Time(overallTime, tpb, bpm)])
- # return [Note(i.channel, i, i.velocity, i.time, Time(overallTime, tpb, bpm))]
- except AttributeError:
- pass
- if 'note_on' in str(i) and i.channel == 9:
- if 'note_on' in str(i) and i.velocity > 0:
- print(i)
- # print(i.note)
- # print([Note(i.channel, i.note, i.velocity, i.time, Time(overallTime, tpb, bpm), -1)])
- tracks.append([Note(i.channel, i.note, i.velocity, i.time, Time(overallTime, tpb, bpm), -1)])
- note_list.append([i.channel, i.note, i.velocity, i.time, Time(overallTime, tpb, bpm), -1])
- on.append([i.note, Time(overallTime, tpb, bpm)])
- isPercussion = True
- # return [Note(i.channel, i, i.velocity, i.time, Time(overallTime, tpb, bpm))]
- Notes.append(tracks)
- if instruments is []:
- instruments.append(0)
- instruments = list(set(instruments))
- with open("1.pkl", 'wb') as b:
- pickle.dump([instruments, isPercussion], b)
-
- # for j, track in enumerate(mid.tracks):
- # th = NewThread(loadMidi, (track,))
- # th.start()
- # Notes.append(th.getResult())
-
- # print(Notes)
- print(Notes.__len__())
- # print(note_list)
- print(instruments)
- return Notes
- # return [Notes, note_list]
-
-
-def midiClassReader(midfile: str):
- import mido
- from bgArrayLib.bpm import get
-
- def Time(mt, tpb_a, bpm_a):
- return round(mt / tpb_a / bpm_a * 60 * 20)
-
- Notes = []
- tracks = []
- try:
- mid = mido.MidiFile(filename=midfile,clip=True)
- except Exception:
- log("找不到文件或无法读取文件" + midfile)
- return False
- log("midi已经载入了。")
- tpb = mid.ticks_per_beat
- bpm = get(mid)
- for track in mid.tracks:
- overallTime = 0.0
- instrument = 0
- for i in track:
- overallTime += i.time
- if 'note_on' in str(i) and i.velocity > 0:
- print(i)
- tracks.append(
- [Note(i.channel, i.note, i.velocity, i.time, Time(overallTime, tpb, bpm), instrument)])
- Notes.append(tracks)
- print(Notes.__len__())
- return Notes
+# -*- coding: utf-8 -*-
+
+
+from nmcsup.log import log
+import pickle
+
+
+class Note:
+ def __init__(self, channel, pitch, velocity, time, time_position, instrument):
+ self.channel = channel
+ self.pitch = pitch
+ self.velocity = velocity
+ self.delay = time
+ self.time_position = time_position
+ self.instrument = instrument
+ self.CD = "d"
+
+ def get_CD(self, start, end):
+ if end - start > 1.00:
+ self.CD = "c"
+ else:
+ self.CD = "d"
+
+
+def midiNewReader(midfile: str):
+ import mido
+ # from msctspt.threadOpera import NewThread
+ from bgArrayLib.bpm import get
+
+ def Time(mt, tpb_a, bpm_a):
+ return round(mt / tpb_a / bpm_a * 60 * 20)
+
+ Notes = []
+ tracks = []
+ note_list = []
+ close = []
+ on = []
+ off = []
+ instruments = []
+ isPercussion = False
+ try:
+ mid = mido.MidiFile(midfile)
+ except Exception:
+ log("找不到文件或无法读取文件" + midfile)
+ return False
+ tpb = mid.ticks_per_beat
+ bpm = get(mid)
+ # 解析
+ # def loadMidi(track1):
+ for track in mid.tracks:
+ overallTime = 0.0
+ instrument = 0
+ for i in track:
+ overallTime += i.time
+ try:
+ if i.channel != 9:
+ # try:
+ # log("event_type(事件): " + str(i.type) + " channel(音轨): " + str(i.channel) +
+ # " note/pitch(音高): " +
+ # str(i[2]) +
+ # " velocity(力度): " + str(i.velocity) + " time(间隔时间): " + str(i.time) +
+ # " overallTime/globalTime/timePosition: " + str(overallTime) + " \n")
+ # except AttributeError:
+ # log("event_type(事件): " + str(i.type) + " thing(内容):" + str(i) + " \n")
+ if 'program_change' in str(i):
+ instrument = i.program
+ if instrument > 119: # 音色不够
+ pass
+ else:
+ instruments.append(i.program)
+ if 'note_on' in str(i) and i.velocity > 0:
+ print(i)
+ # print(i.note)
+ # print([Note(i.channel, i.note, i.velocity, i.time, Time(overallTime, tpb, bpm), instrument)])
+ tracks.append(
+ [Note(i.channel, i.note, i.velocity, i.time, Time(overallTime, tpb, bpm), instrument)])
+ note_list.append(
+ [i.channel, i.note, i.velocity, i.time, Time(overallTime, tpb, bpm), instrument])
+ on.append([i.note, Time(overallTime, tpb, bpm)])
+ # return [Note(i.channel, i, i.velocity, i.time, Time(overallTime, tpb, bpm))]
+ if 'note_off' in str(i) or 'note_on' in str(i) and i.velocity == 0:
+ # print(i)
+ # print([Note(i.channel, i.note, i.velocity, i.time, Time(overallTime, tpb, bpm))])
+ close.append(
+ [Note(i.channel, i.note, i.velocity, i.time, Time(overallTime, tpb, bpm), instrument)])
+ off.append([i.note, Time(overallTime, tpb, bpm)])
+ # return [Note(i.channel, i, i.velocity, i.time, Time(overallTime, tpb, bpm))]
+ except AttributeError:
+ pass
+ if 'note_on' in str(i) and i.channel == 9:
+ if 'note_on' in str(i) and i.velocity > 0:
+ print(i)
+ # print(i.note)
+ # print([Note(i.channel, i.note, i.velocity, i.time, Time(overallTime, tpb, bpm), -1)])
+ tracks.append([Note(i.channel, i.note, i.velocity, i.time, Time(overallTime, tpb, bpm), -1)])
+ note_list.append([i.channel, i.note, i.velocity, i.time, Time(overallTime, tpb, bpm), -1])
+ on.append([i.note, Time(overallTime, tpb, bpm)])
+ isPercussion = True
+ # return [Note(i.channel, i, i.velocity, i.time, Time(overallTime, tpb, bpm))]
+ Notes.append(tracks)
+ if instruments is []:
+ instruments.append(0)
+ instruments = list(set(instruments))
+ with open("1.pkl", 'wb') as b:
+ pickle.dump([instruments, isPercussion], b)
+
+ # for j, track in enumerate(mid.tracks):
+ # th = NewThread(loadMidi, (track,))
+ # th.start()
+ # Notes.append(th.getResult())
+
+ # print(Notes)
+ print(Notes.__len__())
+ # print(note_list)
+ print(instruments)
+ return Notes
+ # return [Notes, note_list]
+
+
+def midiClassReader(midfile: str):
+ import mido
+ from bgArrayLib.bpm import get
+
+ def Time(mt, tpb_a, bpm_a):
+ return round(mt / tpb_a / bpm_a * 60 * 20)
+
+ Notes = []
+ tracks = []
+ try:
+ mid = mido.MidiFile(filename=midfile,clip=True)
+ except Exception:
+ log("找不到文件或无法读取文件" + midfile)
+ return False
+ log("midi已经载入了。")
+ tpb = mid.ticks_per_beat
+ bpm = get(mid)
+ for track in mid.tracks:
+ overallTime = 0.0
+ instrument = 0
+ for i in track:
+ overallTime += i.time
+ if 'note_on' in str(i) and i.velocity > 0:
+ print(i)
+ tracks.append(
+ [Note(i.channel, i.note, i.velocity, i.time, Time(overallTime, tpb, bpm), instrument)])
+ Notes.append(tracks)
+ print(Notes.__len__())
+ return Notes
diff --git a/languages/__pycache__/__init__.cpython-39.pyc b/languages/__pycache__/__init__.cpython-39.pyc
index 8dd1ba5..8b056f0 100644
Binary files a/languages/__pycache__/__init__.cpython-39.pyc and b/languages/__pycache__/__init__.cpython-39.pyc differ
diff --git a/languages/__pycache__/lang.cpython-39.pyc b/languages/__pycache__/lang.cpython-39.pyc
index decf559..fa65b1c 100644
Binary files a/languages/__pycache__/lang.cpython-39.pyc and b/languages/__pycache__/lang.cpython-39.pyc differ
diff --git a/languages/__pycache__/zhCN.cpython-39.pyc b/languages/__pycache__/zhCN.cpython-39.pyc
index d334df4..a545850 100644
Binary files a/languages/__pycache__/zhCN.cpython-39.pyc and b/languages/__pycache__/zhCN.cpython-39.pyc differ
diff --git a/msctspt/__pycache__/__init__.cpython-39.pyc b/msctspt/__pycache__/__init__.cpython-39.pyc
index fa7cd6a..bcc1f74 100644
Binary files a/msctspt/__pycache__/__init__.cpython-39.pyc and b/msctspt/__pycache__/__init__.cpython-39.pyc differ
diff --git a/msctspt/__pycache__/bugReporter.cpython-39.pyc b/msctspt/__pycache__/bugReporter.cpython-39.pyc
index b1b0d2e..746c2af 100644
Binary files a/msctspt/__pycache__/bugReporter.cpython-39.pyc and b/msctspt/__pycache__/bugReporter.cpython-39.pyc differ
diff --git a/msctspt/__pycache__/funcOpera.cpython-39.pyc b/msctspt/__pycache__/funcOpera.cpython-39.pyc
index 6f4caf2..6ac59d7 100644
Binary files a/msctspt/__pycache__/funcOpera.cpython-39.pyc and b/msctspt/__pycache__/funcOpera.cpython-39.pyc differ
diff --git a/msctspt/__pycache__/threadOpera.cpython-39.pyc b/msctspt/__pycache__/threadOpera.cpython-39.pyc
index 809bb9f..ffda7b0 100644
Binary files a/msctspt/__pycache__/threadOpera.cpython-39.pyc and b/msctspt/__pycache__/threadOpera.cpython-39.pyc differ
diff --git a/msctspt/__pycache__/transfer.cpython-39.pyc b/msctspt/__pycache__/transfer.cpython-39.pyc
index 42bea61..fabe34b 100644
Binary files a/msctspt/__pycache__/transfer.cpython-39.pyc and b/msctspt/__pycache__/transfer.cpython-39.pyc differ
diff --git a/msctspt/funcOpera.py b/msctspt/funcOpera.py
index 50d7d5b..ef71f6b 100644
--- a/msctspt/funcOpera.py
+++ b/msctspt/funcOpera.py
@@ -92,7 +92,6 @@ def funSplit(bigFile, maxCmdLen: int = 10000):
return parts
-
def makeFuncFiles(musicset, path='./'):
"""在指定目录下生成函数文件"""
from nmcsup.trans import Note2Cmd
@@ -327,7 +326,6 @@ def makeClassFuncFiles(musicset, path='./'):
encoding='UTF-8') as f:
f.writelines(classList_conversion_SinglePlayer(musicset['musics'][i]['notes'],
musicset['musics'][i]['set']['ScoreboardName'],
- musicset['musics'][i]['set']['Instrument'],
musicset['mainset']['PlayerSelect'],
True))
if musicset['mainset']['IsRepeat']:
diff --git a/msctspt/settings.py b/msctspt/settings.py
index 59f6adf..e758f09 100644
--- a/msctspt/settings.py
+++ b/msctspt/settings.py
@@ -1,18 +1,18 @@
-# -*- coding:utf-8 -*-
-
-
-
-
-settings = {
- 'language' : 'zh-CN',
- 'theme' : {
- '' : '',
- },
-}
-
-class msctSetting:
- def __init__(self,**settings) -> None:
- pass
-
- def __call__(self, **kwds):
+# -*- coding:utf-8 -*-
+
+
+
+
+settings = {
+ 'language' : 'zh-CN',
+ 'theme' : {
+ '' : '',
+ },
+}
+
+class msctSetting:
+ def __init__(self,**settings) -> None:
+ pass
+
+ def __call__(self, **kwds):
pass
\ No newline at end of file
diff --git a/msctspt/transfer.py b/msctspt/transfer.py
index 2ad789d..d508c91 100644
--- a/msctspt/transfer.py
+++ b/msctspt/transfer.py
@@ -29,6 +29,7 @@ def classList_conversion_SinglePlayer(List: list, ScoreboardName: str, playerSel
isProsess: bool = False) -> list:
from bgArrayLib.compute import round_up
from bgArrayLib.pitchStrConstant import pitch
+ from bgArrayLib.instrumentConstant import instrument_list
commands = []
length = len(List)
j = 1
@@ -38,20 +39,18 @@ def classList_conversion_SinglePlayer(List: list, ScoreboardName: str, playerSel
print(i)
print(type(i))
try:
- if i.instrument > 119:
- pass
- else:
+ commands.append(
+ f"execute @a{playerSelection} ~ ~ ~ execute @s[scores={{{ScoreboardName}="
+ f"{str(round_up(i.time_position)).replace('.0', '')}}}] ~ ~{127 - i.velocity} "
+ f"~ playsound note.{instrument_list.get(str(i.instrument))} @s ~ ~ ~ "
+ f"1000 {pitch.get(str(i.pitch))} 1000\n")
+ if isProsess:
commands.append(
f"execute @a{playerSelection} ~ ~ ~ execute @s[scores={{{ScoreboardName}="
- 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")
- if isProsess:
- commands.append(
- f"execute @a{playerSelection} ~ ~ ~ execute @s[scores={{{ScoreboardName}="
- f"{str(round_up(i.time_position)).replace('.0', '')}}}] ~ ~ ~ "
- f"title @s actionbar §e▶ 播放中: §a{j}/{length} || {int(j / length * 1000) / 10}\n")
- j += 1
- except:
+ f"{str(round_up(i.time_position)).replace('.0', '')}}}] ~ ~ ~ "
+ f"title @s actionbar §e▶ 播放中: §a{j}/{length} || {int(j / length * 1000) / 10}\n")
+ j += 1
+ except Exception:
pass
# a += List[i][1]
# commands.append("\n\n# 凌云我的世界开发团队 x 凌云软件开发团队 : W-YI(金羿)\n")
diff --git a/nmcsup/__pycache__/__init__.cpython-39.pyc b/nmcsup/__pycache__/__init__.cpython-39.pyc
index 5cbf01d..4cd082f 100644
Binary files a/nmcsup/__pycache__/__init__.cpython-39.pyc and b/nmcsup/__pycache__/__init__.cpython-39.pyc differ
diff --git a/nmcsup/__pycache__/log.cpython-39.pyc b/nmcsup/__pycache__/log.cpython-39.pyc
index 982af98..bab3350 100644
Binary files a/nmcsup/__pycache__/log.cpython-39.pyc and b/nmcsup/__pycache__/log.cpython-39.pyc differ
diff --git a/nmcsup/__pycache__/vers.cpython-39.pyc b/nmcsup/__pycache__/vers.cpython-39.pyc
index c73361a..7b200d9 100644
Binary files a/nmcsup/__pycache__/vers.cpython-39.pyc and b/nmcsup/__pycache__/vers.cpython-39.pyc differ
diff --git a/resources/MSCT Dev Log.txt b/resources/MSCT Dev Log.txt
index d9dcd72..f8c64c1 100644
--- a/resources/MSCT Dev Log.txt
+++ b/resources/MSCT Dev Log.txt
@@ -1,233 +1,233 @@
-音·创(Musicreater)是由金羿(W-YI)开发的一款《我的世界》基岩版音乐生成辅助软件
-本软件源代码依照Apache软件协议公开。
-
-Copyright © W-YI 2022
-
-本软件是金羿前作函数音创和世界音创的集合版本,同时增加了大量功能更新。
-
-
- To-Do
-1.可以导出自定义的结构文件用于存储要导入地图中的结构
-2.进度条
-3.可以将音乐写入音符盒(红乐)
-
-5.支持自动给音符盒绑定更多的音色
-6.可以由.schematic文件导入地图,亦可反向处理
-
-8.支持自定义创建websockeet服务器播放音乐(感谢由 Fuckcraft “鸣凤鸽子”等 带来的我的世界websocket服务器功能)
-9.支持使用红石播放音乐
-10.支持采用延时的播放器
-11.支持使用bdx导出结构
-12.支持采用tp的方法播放
-13.支持识别曲谱图片解析音乐
-14.支持使用瀑布流的方式播放音乐
-
-
-17.支持自动搜寻地图目录位置(网易&微软)
-++++++
-4.修改UI界面使之适应当前功能
-7.制作软件下载器使用户更直观地操作
-15.
-16.
-
-
-
-
- 新更新日志
-
- Delta 0.2.0
-2022 2 1 - 2022 x(TO-DO)
-1.程序图标完善
-2.修改窗口样式,可显示诸多信息
-3.修复生成bug
-4.全部变量皆使用类存储
-
- Delta 0.1.5.1
-2022 2 1 农历大年初一
-1.修复了部分midi文件无法读取的错误
-
- Delta 0.1.5
-2022 2 1 农历大年初一
-1.修复所有用户在使用过程中可遇到的bug
-
- Delta 0.1.1
-2022 1 30
-1.新增设置调用方案,但未使用
-2.新增整个音乐生成单个BDX的功能,但必须用新方法解析
-3.发现陈年旧bug:在msctspt.funcOpera中makeFuncFiles生成的指令格式不对
-4.在nmcsup.trans中新增classList_conversion_SinglePlayer使用对于每个玩家的独立播放器
-
- Delta 0.1.0
-2022 1 27
-1.完成了多音色的支持,但仍需修改
-
- Delta 0.0.2
-2022 1 19
-1.纠正几乎所有语法
-
- Delta 0.0.1
-2022 1 3
-1.新增对翻译字符串的支持
-2.把所有需要翻译的字符串用双引号字符串表示,其余全是单引号字符串
-2.2.累死我了,我错了我错了,饶了我吧,以后一定遵守代码规范
-3.新增多语言支持。
-
-
- Delta 0.0.0
-2022 1 2
-1.重新采用Tk作为窗口库
-2.优化界面布局
-3.修改部分按钮无响应的bug
-4.新增启动时的Saying
-5.删除命令行模式
-6.更新README文件,并增添英文README
-
-
- Gamma 0.0.0
-2021 12 26~2021 12 31
-1.使用BeeWare作为窗口库
-2.兼容安卓,但是安卓上无法运行
-3.兼容窗口化系统,但是无法实现正常功能
-4.引申大量bug
-
-
- Beta 0.0.4.3
-2021 11 3~2021 12 26
-1.不断改进包以及代码可读性
-2.修正部分源码错误
-3.修正部分格式错误
-4.加强对Linux系统的支持
-5.新增命令行模式
-6.代码中新增大量注释
-
-
- Beta 0.0.4 ~ Beta 0.0.4.2
-2021 11 20 ~ 2021 11 21
-1.完全支持Linux系统
-2.支持以.RyStruct导出结构
-3.修复大量bug
-4.支持拖拽打开(参数1为.msct文件)
-
-
- Beta 0.0.3.1~0.0.3.5
-2021 11 1~2021 11 2
-1.更新部分提示信息使之更加科学
-2.强制性限制不得使用非Win32平台打开此程序
-3.支持在Windwos7上使用此程序(发现错误并解决:DLL缺失MSVCP140.dll)
-4.开始对结构导出进行部分支持
-5.发现红乐写入的错误,正在排查修复
-
-
-
-
- Beta 0.0.3
-2021 10 29 ~ 2021 10 31
-1.修改部分窗口排版
-2.修复指令载入地图的结构的错误
-3.修复指令生成出现的指令错误(感谢 昀梦 找出bug并指正)
-4.支持生成红石音乐(以音符盒存储的音乐),并写入地图
-5.修复了生成指令音乐导致的错误
-6.修复bdx文件y轴过长导致无法生成完毕的错误,现在bdx的y轴为200格
-
-
-
-
-
- Beta 0.0.2
-2021 10 25
-1.修复了邮件发送错误报告无法生成压缩包的问题
-2.修复了导入音轨时无法获得进程返回值的问题
-3.修复了.bdx文件生成时无法选择文件的问题
-4.修复了生成指令音乐(计分板)没有起始方块的问题
-5.新增了创建Websocket的功能,可以在localhost:8080创建websocket服务器播放音乐(感谢由 Fuckcraft “鸣凤鸽子”等 带来的我的世界websocket服务器功能(fcwslib) )
-6.解决了打包成可执行文件时无法正常退出的问题
-
-
-
- Beta 0.0.1
-2021 10月
-1.支持生成.bdx文件(感谢由 Charlie_Ping “查理平” 带来的bdx转换功能)
-2.逐步增强对安卓系统的支持
-3.逐步放弃对Windows的强行要求
-4.逐步提升性能,增加多线程
-
-
-
-
-
-
-
-
-
-
- Alpha部分更新日志
-
- Alpha 0.0.0
-2021 8 20
-1.集合了 函数音创0.1.4.1 与 世界音创Beta0.0.1 的功能于本应用
-2.新增了可以生成 .mcpack 包的方法
-
- Alpha 0.0.1
-2021 8 25
-1.新增两个彩蛋(就是函数音创命令行模式的彩蛋
-
- Alpha 0.0.1.1
-2021 8 25
-1.修复大量已知问题
-2.修复了部分彩蛋bug,但是程序仍然不会正常退出
-3.菜单界面优化
-
- Alpha 0.0.1.2
-2021.8.29
-1.修复大量已知问题
-2.现在可以操作指令文件了
-3.窗口界面优化
-
- Alpha 0.0.2
-2021 9 5
-1.修复部分已知问题
-2.指令链导入之时仅生成链式方块且允许折转
-3.[Dev]正在逐步支持结构导出
-
- Alpha 0.0.3
-2021 9 7
-1.修复指令链转入世界的摆放错误
-2.指令存储的音乐(包括函数)支持不同玩家不同的播放
-3.支持播放进度条
-4.删除彩蛋任务栏图标
-4.[Dev]已确定导出结构格式
-
- Alpha 0.0.3.1
-2021 9 11
-1.取消输入玩家选择器时不会出现bug了
-2.删除日志文件修改为删除临时文件
-3.可以删除用于确认档案存在的文件了
-
- Alpha 0.0.4
-2021 10 4-5
-1.可以将大函数导入世界(以一条链执行多个函数的方式)
-2.关闭了试听音乐的功能,但是保留其函数于funOpera.py中
-3.修改部分代码,减少更多bug
-4.发现指令链转入世界的摆放错误,但是没改正
-
- 1.0.3
-2021 10 5-6
-1.解决一些已知问题
-2.解决了文件读取造成的字符编码问题
-3.使用PyPinyin库将汉字转化为拼音首字母
-
- Alpha 0.0.4.1
-2021 10 9
-1.将清除日志功能设置为结束后统一清除,避免了清除过程中文件占用导致的问题
-
- Alpha 0.0.5
-2021 10 10
-1.支持使用邮件方式发送错误报告(日志)
-
- Alpha 0.0.5.1
-1.修复了邮件发送错误报告无法发送的问题
-2.修复了打包成.exe文件之后无法正常退出的问题
-
-
-
-
+音·创(Musicreater)是由金羿(W-YI)开发的一款《我的世界》基岩版音乐生成辅助软件
+本软件源代码依照Apache软件协议公开。
+
+Copyright © W-YI 2022
+
+本软件是金羿前作函数音创和世界音创的集合版本,同时增加了大量功能更新。
+
+
+ To-Do
+1.可以导出自定义的结构文件用于存储要导入地图中的结构
+2.进度条
+3.可以将音乐写入音符盒(红乐)
+
+5.支持自动给音符盒绑定更多的音色
+6.可以由.schematic文件导入地图,亦可反向处理
+
+8.支持自定义创建websockeet服务器播放音乐(感谢由 Fuckcraft “鸣凤鸽子”等 带来的我的世界websocket服务器功能)
+9.支持使用红石播放音乐
+10.支持采用延时的播放器
+11.支持使用bdx导出结构
+12.支持采用tp的方法播放
+13.支持识别曲谱图片解析音乐
+14.支持使用瀑布流的方式播放音乐
+
+
+17.支持自动搜寻地图目录位置(网易&微软)
+++++++
+4.修改UI界面使之适应当前功能
+7.制作软件下载器使用户更直观地操作
+15.
+16.
+
+
+
+
+ 新更新日志
+
+ Delta 0.2.0
+2022 2 1 - 2022 x(TO-DO)
+1.程序图标完善
+2.修改窗口样式,可显示诸多信息
+3.修复生成bug
+4.全部变量皆使用类存储
+
+ Delta 0.1.5.1
+2022 2 1 农历大年初一
+1.修复了部分midi文件无法读取的错误
+
+ Delta 0.1.5
+2022 2 1 农历大年初一
+1.修复所有用户在使用过程中可遇到的bug
+
+ Delta 0.1.1
+2022 1 30
+1.新增设置调用方案,但未使用
+2.新增整个音乐生成单个BDX的功能,但必须用新方法解析
+3.发现陈年旧bug:在msctspt.funcOpera中makeFuncFiles生成的指令格式不对
+4.在nmcsup.trans中新增classList_conversion_SinglePlayer使用对于每个玩家的独立播放器
+
+ Delta 0.1.0
+2022 1 27
+1.完成了多音色的支持,但仍需修改
+
+ Delta 0.0.2
+2022 1 19
+1.纠正几乎所有语法
+
+ Delta 0.0.1
+2022 1 3
+1.新增对翻译字符串的支持
+2.把所有需要翻译的字符串用双引号字符串表示,其余全是单引号字符串
+2.2.累死我了,我错了我错了,饶了我吧,以后一定遵守代码规范
+3.新增多语言支持。
+
+
+ Delta 0.0.0
+2022 1 2
+1.重新采用Tk作为窗口库
+2.优化界面布局
+3.修改部分按钮无响应的bug
+4.新增启动时的Saying
+5.删除命令行模式
+6.更新README文件,并增添英文README
+
+
+ Gamma 0.0.0
+2021 12 26~2021 12 31
+1.使用BeeWare作为窗口库
+2.兼容安卓,但是安卓上无法运行
+3.兼容窗口化系统,但是无法实现正常功能
+4.引申大量bug
+
+
+ Beta 0.0.4.3
+2021 11 3~2021 12 26
+1.不断改进包以及代码可读性
+2.修正部分源码错误
+3.修正部分格式错误
+4.加强对Linux系统的支持
+5.新增命令行模式
+6.代码中新增大量注释
+
+
+ Beta 0.0.4 ~ Beta 0.0.4.2
+2021 11 20 ~ 2021 11 21
+1.完全支持Linux系统
+2.支持以.RyStruct导出结构
+3.修复大量bug
+4.支持拖拽打开(参数1为.msct文件)
+
+
+ Beta 0.0.3.1~0.0.3.5
+2021 11 1~2021 11 2
+1.更新部分提示信息使之更加科学
+2.强制性限制不得使用非Win32平台打开此程序
+3.支持在Windwos7上使用此程序(发现错误并解决:DLL缺失MSVCP140.dll)
+4.开始对结构导出进行部分支持
+5.发现红乐写入的错误,正在排查修复
+
+
+
+
+ Beta 0.0.3
+2021 10 29 ~ 2021 10 31
+1.修改部分窗口排版
+2.修复指令载入地图的结构的错误
+3.修复指令生成出现的指令错误(感谢 昀梦 找出bug并指正)
+4.支持生成红石音乐(以音符盒存储的音乐),并写入地图
+5.修复了生成指令音乐导致的错误
+6.修复bdx文件y轴过长导致无法生成完毕的错误,现在bdx的y轴为200格
+
+
+
+
+
+ Beta 0.0.2
+2021 10 25
+1.修复了邮件发送错误报告无法生成压缩包的问题
+2.修复了导入音轨时无法获得进程返回值的问题
+3.修复了.bdx文件生成时无法选择文件的问题
+4.修复了生成指令音乐(计分板)没有起始方块的问题
+5.新增了创建Websocket的功能,可以在localhost:8080创建websocket服务器播放音乐(感谢由 Fuckcraft “鸣凤鸽子”等 带来的我的世界websocket服务器功能(fcwslib) )
+6.解决了打包成可执行文件时无法正常退出的问题
+
+
+
+ Beta 0.0.1
+2021 10月
+1.支持生成.bdx文件(感谢由 Charlie_Ping “查理平” 带来的bdx转换功能)
+2.逐步增强对安卓系统的支持
+3.逐步放弃对Windows的强行要求
+4.逐步提升性能,增加多线程
+
+
+
+
+
+
+
+
+
+
+ Alpha部分更新日志
+
+ Alpha 0.0.0
+2021 8 20
+1.集合了 函数音创0.1.4.1 与 世界音创Beta0.0.1 的功能于本应用
+2.新增了可以生成 .mcpack 包的方法
+
+ Alpha 0.0.1
+2021 8 25
+1.新增两个彩蛋(就是函数音创命令行模式的彩蛋
+
+ Alpha 0.0.1.1
+2021 8 25
+1.修复大量已知问题
+2.修复了部分彩蛋bug,但是程序仍然不会正常退出
+3.菜单界面优化
+
+ Alpha 0.0.1.2
+2021.8.29
+1.修复大量已知问题
+2.现在可以操作指令文件了
+3.窗口界面优化
+
+ Alpha 0.0.2
+2021 9 5
+1.修复部分已知问题
+2.指令链导入之时仅生成链式方块且允许折转
+3.[Dev]正在逐步支持结构导出
+
+ Alpha 0.0.3
+2021 9 7
+1.修复指令链转入世界的摆放错误
+2.指令存储的音乐(包括函数)支持不同玩家不同的播放
+3.支持播放进度条
+4.删除彩蛋任务栏图标
+4.[Dev]已确定导出结构格式
+
+ Alpha 0.0.3.1
+2021 9 11
+1.取消输入玩家选择器时不会出现bug了
+2.删除日志文件修改为删除临时文件
+3.可以删除用于确认档案存在的文件了
+
+ Alpha 0.0.4
+2021 10 4-5
+1.可以将大函数导入世界(以一条链执行多个函数的方式)
+2.关闭了试听音乐的功能,但是保留其函数于funOpera.py中
+3.修改部分代码,减少更多bug
+4.发现指令链转入世界的摆放错误,但是没改正
+
+ 1.0.3
+2021 10 5-6
+1.解决一些已知问题
+2.解决了文件读取造成的字符编码问题
+3.使用PyPinyin库将汉字转化为拼音首字母
+
+ Alpha 0.0.4.1
+2021 10 9
+1.将清除日志功能设置为结束后统一清除,避免了清除过程中文件占用导致的问题
+
+ Alpha 0.0.5
+2021 10 10
+1.支持使用邮件方式发送错误报告(日志)
+
+ Alpha 0.0.5.1
+1.修复了邮件发送错误报告无法发送的问题
+2.修复了打包成.exe文件之后无法正常退出的问题
+
+
+
+
diff --git a/resources/myWords.txt b/resources/myWords.txt
index 9eaf79f..454feca 100644
--- a/resources/myWords.txt
+++ b/resources/myWords.txt
@@ -1,43 +1,43 @@
-生命灵动 当用激情跃起奋发之力
-奇偶数阵
-学海无涯 应用爱意徜徉
-在生命的起源寻找灵魂的慰藉
-纪念那一段辉煌灿烂的青春年华
-以梦想为驱使 创造属于自己的未来
-集青春之力 绽放爱意之花
-那个曾与我相伴的人 依稀在我的心头留恋
-你是我灵魂中绽放出最艳丽的花朵
-心之所向 意之所属
-一个蛋从外面被敲开,注定被吃掉\n但从里面啄开,没准是只鹰 ——长津湖
-音·创
-辉煌的、璀璨的、无边无际、铺天盖地的晚霞\n洒下斑驳的金光,染红了整片山河
-《赫兰圣殿》
-风,摇曳着,轻抚着他的脸颊\n半壁残阳正留恋着人世最后一抹温暖
-清晨的阳光将吹散人间的雾霭 照亮每一寸土壤
-远方的山川 总会踏着白雾前来
-梦中的世界 总被现实相依存
-敌人都是自己树立的\n生存的道路上想要披荆斩棘,那就得学会化敌为友
-有光之处必有影 有影之处必有光
-一生所恋 相伴相随
-你的眼眸是剔透的晶灯 散发着醉人心扉的清光
-海波激出透人心脾的欢呼
-英雄何必要站在光中?\n深入黑暗,我自发光。
-如果我们有三生三世的时间\n那我们将渡过三百乘以三百六十个潮涨潮落
-善善不能用 恶恶不能去
-知行合一,格物致知;远沂博索,夕惕若厉;\n蕙心执质,嘉言懿行;怀瑾握瑜,心若芷萱。
-纪念 追忆 那段不平凡的青春
-守望黑夜的人,切莫忘记黎明的光彩 ——原神
-与邪佞战斗的人,切莫失掉正直的心 ——原神
-我的心 时刻系着祖国的山河
-生命 灵动
-坚如寒冰 烈似骄阳
-上了战场就是英雄 ——长津湖
-冰与火 恨与爱 静与情
-有些枪必须开,有些可以不开 ——长津湖
-夕阳西下,余辉将尽,夜幕降临,寒风凛冽 ——原神
-愿风擦拭你的双眼,让你看清真相 ——原神
-心愿之结晶 而何能之宝贵
-神明,正倾诉着他辉煌的过去……
-一切过程与结果都不重要 重要的是热爱与真情
-给大家带来笑容 这就是我存在的使命
-不忘本源 牢记故地
+生命灵动 当用激情跃起奋发之力
+奇偶数阵
+学海无涯 应用爱意徜徉
+在生命的起源寻找灵魂的慰藉
+纪念那一段辉煌灿烂的青春年华
+以梦想为驱使 创造属于自己的未来
+集青春之力 绽放爱意之花
+那个曾与我相伴的人 依稀在我的心头留恋
+你是我灵魂中绽放出最艳丽的花朵
+心之所向 意之所属
+一个蛋从外面被敲开,注定被吃掉\n但从里面啄开,没准是只鹰 ——长津湖
+音·创
+辉煌的、璀璨的、无边无际、铺天盖地的晚霞\n洒下斑驳的金光,染红了整片山河
+《赫兰圣殿》
+风,摇曳着,轻抚着他的脸颊\n半壁残阳正留恋着人世最后一抹温暖
+清晨的阳光将吹散人间的雾霭 照亮每一寸土壤
+远方的山川 总会踏着白雾前来
+梦中的世界 总被现实相依存
+敌人都是自己树立的\n生存的道路上想要披荆斩棘,那就得学会化敌为友
+有光之处必有影 有影之处必有光
+一生所恋 相伴相随
+你的眼眸是剔透的晶灯 散发着醉人心扉的清光
+海波激出透人心脾的欢呼
+英雄何必要站在光中?\n深入黑暗,我自发光。
+如果我们有三生三世的时间\n那我们将渡过三百乘以三百六十个潮涨潮落
+善善不能用 恶恶不能去
+知行合一,格物致知;远沂博索,夕惕若厉;\n蕙心执质,嘉言懿行;怀瑾握瑜,心若芷萱。
+纪念 追忆 那段不平凡的青春
+守望黑夜的人,切莫忘记黎明的光彩 ——原神
+与邪佞战斗的人,切莫失掉正直的心 ——原神
+我的心 时刻系着祖国的山河
+生命 灵动
+坚如寒冰 烈似骄阳
+上了战场就是英雄 ——长津湖
+冰与火 恨与爱 静与情
+有些枪必须开,有些可以不开 ——长津湖
+夕阳西下,余辉将尽,夜幕降临,寒风凛冽 ——原神
+愿风擦拭你的双眼,让你看清真相 ——原神
+心愿之结晶 而何能之宝贵
+神明,正倾诉着他辉煌的过去……
+一切过程与结果都不重要 重要的是热爱与真情
+给大家带来笑容 这就是我存在的使命
+不忘本源 牢记故地
diff --git a/铭刻时间的歌.mid b/铭刻时间的歌.mid
new file mode 100644
index 0000000..ff8d124
Binary files /dev/null and b/铭刻时间的歌.mid differ