title: Preview Score from MIDI file in python
body: <p>I would like to be able to get png of a score from a MIDI file from within a python program.</p>
  <p>Separately, I know MuseScore is able to open MIDI files and convert them into a score, so this should theoretically be possible.</p>
  <p>My current solution is to just use the lilypond functions !midi2ly and !lilypond -fpng, but midi2ly struggles a bit with the midis I use due to the number of voices present.</p>
  <pre><code>!midi2ly &quot;sample from g.midi&quot;
  !lilypond -fpng &quot;sample from g-midi.ly&quot;
  </code></pre>
  <p>Here is the ideal output (from MuseScore) and lilypond's attempt output
  <a href="https://imgur.com/a/9fqJLSA" rel="nofollow noreferrer">https://imgur.com/a/9fqJLSA</a></p>