import serial
import time
ser = serial.Serial('COM3', 115200, timeout=5)
time.sleep(5)

#<Timestamp, track number, MIDI channel, type, key, value>
ser.write('<0,0,0,8,0,0>')
ser.write('<1000,0,0,1,50,195>')
ser.readline()
ser.write('<1005,0,0,1,50,127>')
ser.readline()
ser.write('<1839,0,0,0,50,127>')
ser.readline()
ser.write('<2000,0,0,1,50,195>')
ser.readline()
ser.write('<2005,0,0,1,50,127>')
ser.readline()
ser.write('<2999,0,0,0,50,127>')
ser.readline()
ser.write('<4000,0,0,1,50,195>')
ser.readline()
ser.write('<4005,0,0,1,50,127>')
ser.readline()
ser.write('<4339,0,0,0,50,127>')
ser.readline()
ser.write('<4500,0,0,1,50,195>')
ser.readline()
ser.write('<4505,0,0,1,50,127>')
ser.readline()
ser.write('<4839,0,0,0,50,127>')
ser.readline()
ser.write('<5000,0,0,1,50,195>')
ser.readline()
ser.write('<5005,0,0,1,50,127>')
ser.readline()
ser.write('<5499,0,0,0,50,127>')
ser.readline()
ser.write('<6000,0,0,1,50,195>')
ser.readline()
ser.write('<6005,0,0,1,50,127>')
ser.readline()
ser.write('<6840,0,0,0,50,127>')
ser.readline()
ser.write('<7000,0,0,1,50,195>')
ser.readline()
ser.write('<7005,0,0,1,50,127>')
ser.readline()
ser.write('<7840,0,0,0,50,127>')
ser.readline()
ser.write('<8000,0,0,1,50,195>')
ser.readline()
ser.write('<8005,0,0,1,50,127>')
ser.readline()
ser.write('<9000,0,0,0,50,127>')
ser.readline()
ser.write('<10000,0,0,1,50,195>')
ser.readline()
ser.write('<10005,0,0,1,50,124>')
ser.readline()
ser.write('<10066,0,0,0,50,124>')
ser.readline()
ser.write('<10176,0,0,1,50,195>')
ser.readline()
ser.write('<10181,0,0,1,50,124>')
ser.readline()
ser.write('<10246,0,0,0,50,124>')
ser.readline()
ser.write('<10362,0,0,1,50,195>')
ser.readline()
ser.write('<10367,0,0,1,50,124>')
ser.readline()
ser.write('<10566,0,0,0,50,124>')
ser.readline()
ser.write('<11000,0,0,1,50,195>')
ser.readline()
ser.write('<11005,0,0,1,50,124>')
ser.readline()
ser.write('<11038,0,0,0,50,124>')
ser.readline()
ser.write('<11101,0,0,1,50,195>')
ser.readline()
ser.write('<11106,0,0,1,50,124>')
ser.readline()
ser.write('<11139,0,0,0,50,124>')
ser.readline()
ser.write('<11202,0,0,1,50,195>')
ser.readline()
ser.write('<11207,0,0,1,50,124>')
ser.readline()
ser.write('<11406,0,0,0,50,124>')
ser.readline()
ser.write('<12000,0,0,1,50,195>')
ser.readline()
ser.write('<12005,0,0,1,50,127>')
ser.readline()
ser.write('<12021,0,0,0,50,127>')
ser.readline()
ser.write('<12061,0,0,1,50,195>')
ser.readline()
ser.write('<12066,0,0,1,50,127>')
ser.readline()
ser.write('<12082,0,0,0,50,127>')
ser.readline()
ser.write('<12122,0,0,1,50,195>')
ser.readline()
ser.write('<12127,0,0,1,50,127>')
ser.readline()
ser.write('<12326,0,0,0,50,127>')
ser.readline()
ser.write('<12991,0,0,0,50,127>')
ser.readline()
ser.write('<13000,0,0,1,50,195>')
ser.readline()
ser.write('<13022,0,0,0,50,127>')
ser.readline()
ser.write('<13031,0,0,1,50,195>')
ser.readline()
ser.write('<13062,0,0,1,50,195>')
ser.readline()
ser.write('<13067,0,0,1,50,127>')
ser.readline()
ser.write('<13266,0,0,0,50,127>')
ser.readline()
ser.write('<14000,0,0,1,50,195>')
ser.readline()
ser.write('<14005,0,0,1,50,124>')
ser.readline()
ser.write('<14114,0,0,0,50,124>')
ser.readline()
ser.write('<14300,0,0,1,50,195>')
ser.readline()
ser.write('<14305,0,0,1,50,124>')
ser.readline()
ser.write('<14414,0,0,0,50,124>')
ser.readline()
ser.write('<14600,0,0,1,50,195>')
ser.readline()
ser.write('<14605,0,0,1,50,124>')
ser.readline()
ser.write('<14804,0,0,0,50,124>')
ser.readline()
ser.write('<15000,0,0,1,50,195>')
ser.readline()
ser.write('<15005,0,0,1,50,124>')
ser.readline()
ser.write('<15114,0,0,0,50,124>')
ser.readline()
ser.write('<15300,0,0,1,50,195>')
ser.readline()
ser.write('<15305,0,0,1,50,124>')
ser.readline()
ser.write('<15414,0,0,0,50,124>')
ser.readline()
ser.write('<15600,0,0,1,50,195>')
ser.readline()
ser.write('<15605,0,0,1,50,124>')
ser.readline()
ser.write('<15804,0,0,0,50,124>')
ser.readline()
ser.write('<16000,0,0,1,50,195>')
ser.readline()
ser.write('<16005,0,0,1,50,124>')
ser.readline()
ser.write('<16057,0,0,0,50,124>')
ser.readline()
ser.write('<16150,0,0,1,50,195>')
ser.readline()
ser.write('<16155,0,0,1,50,124>')
ser.readline()
ser.write('<16207,0,0,0,50,124>')
ser.readline()
ser.write('<16300,0,0,1,50,195>')
ser.readline()
ser.write('<16305,0,0,1,50,124>')
ser.readline()
ser.write('<16504,0,0,0,50,124>')
ser.readline()
ser.write('<17000,0,0,1,50,195>')
ser.readline()
ser.write('<17005,0,0,1,50,124>')
ser.readline()
ser.write('<17012,0,0,0,50,124>')
ser.readline()
ser.write('<17052,0,0,1,50,195>')
ser.readline()
ser.write('<17057,0,0,1,50,124>')
ser.readline()
ser.write('<17064,0,0,0,50,124>')
ser.readline()
ser.write('<17104,0,0,1,50,195>')
ser.readline()
ser.write('<17109,0,0,1,50,124>')
ser.readline()
ser.write('<17130,0,0,0,50,124>')
ser.readline()
ser.write('<0,0,0,7,0,0>')
