新年第一次更新

This commit is contained in:
bgArray
2022-02-01 00:07:22 +08:00
parent 81272a1166
commit 9f8694ef14
22 changed files with 499 additions and 342 deletions

View File

@ -1,16 +1,10 @@
# -*- 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
@ -28,7 +22,7 @@ class Note:
self.CD = "d"
def midi_conversion(midfile: str):
def midiNewReader(midfile: str):
import mido
# from msctspt.threadOpera import NewThread
from bgArrayLib.bpm import get
@ -129,6 +123,7 @@ def midiClassReader(midfile: str):
def Time(mt, tpb_a, bpm_a):
return round(mt / tpb_a / bpm_a * 60 * 20)
Notes = []
tracks = []
try:
@ -150,13 +145,3 @@ def midiClassReader(midfile: str):
Notes.append(tracks)
print(Notes.__len__())
return Notes