moved NOTE_ON and NOTE_OFF in the device constructor