Skip to content

Instantly share code, notes, and snippets.

View weibangtuo's full-sized avatar
🙃
eeeeee

weibt weibangtuo

🙃
eeeeee
  • Scutech
  • Guangzhou, China
View GitHub Profile
@weibangtuo
weibangtuo / midi_convert_type_0_to_1.py
Last active May 25, 2022 09:16
MIDI file type convert
import mido
import os
def convert_type0_type1(midi_type0_file):
type_0 = mido.MidiFile(midi_type0_file)
if mid.type != 0:
return
type_1 = mido.MidiFile(
type=1,
ticks_per_beat=type_0.ticks_per_beat)