Fix autodetect of midicontroller

Fix #999