Duplex stream wrapper around 'midi' module with browser fallback to web-midi