         # 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: ->


    openSubmenu: (index) =>
        @selectIndex = index
        console.log 'open submenu', index
        @highlightMenu()

        # hide all tabs and show only the current
