         # change to new size
         App.TOGGLE_MENU.dispatch { width: AppData.SUBMENU_PANNEL + AppData.MENU_PANNEL + AppData.MENU_PANNEL_BORDER }
         null
+
+    onMidiStateChange: (e) =>
+        # only shows menu if user has midi device, if midi device is disconnected, closes menu
+        if e.state is 'disconnected' and e.connection is 'closed'
+            @midi.visible = false
+            AppData.SHOW_MENU_PANNEL = false
+            App.TOGGLE_MENU.dispatch { width: 0 }
+        else if e.state is 'connected'
+            @midi.visible = true
+        null

        @select.alpha = 0
        @addChild @select

        @build()

    build: ->

        @buttons.push @add
        @addChild @add

        @patches = new MenuButton AppData.ASSETS.sprite.textures['ic-presets-48.png'], 'patches'
        @patches.buttonClick = =>
            @openSubmenu 2
            null
        @buttons.push @patches
        @addChild @patches

        @presets = new MenuButton AppData.ASSETS.sprite.textures['ic-presets-48.png'], 'presets'
        @presets.buttonClick = =>
            @openSubmenu 3
            null
        @buttons.push @presets
        @addChild @presets

        @midi = new MenuButton AppData.ASSETS.sprite.textures['ic-midi.png'], 'midi'
        @midi.visible = false
        @midi.buttonClick = =>
            @openSubmenu 4
            null
        @buttons.push @midi
        @addChild @midi
