Ok, after a little while of searching, there seems to be no easy way to do it in the programming language i am using to make this program. I did find an external program that will do it for you though if it helps a little bit http://downloads.fyxm.net/GN1:0-MIDI-66164.html or, for a web version, you can goto signal.vercel.app then import your midi and download it again.