Replaced old fromMidi implementation.