src/zMIDI.js
function( aPortNumber )
        {
            var listener = zMIDI._listenerMap[ aPortNumber], inChannel;

            if ( listener )
            {
                inChannel = zMIDI.getInChannels()[ aPortNumber ];
                inChannel.close();
                inChannel.removeEventListener( "midimessage", listener, true );
                delete zMIDI._listenerMap[ aPortNumber ];
            }
        }
function( aPortNumber )
        {
            var listener = zMIDI._listenerMap[ aPortNumber], inChannel;

            if ( listener )
            {
                inChannel = zMIDI.getInChannels()[ aPortNumber ];
                inChannel.close();
                inChannel.removeEventListener( "midimessage", listener, true );
                delete zMIDI._listenerMap[ aPortNumber ];
            }
        }
function ( aPortNumber ) { var listener = zMIDI . _listenerMap [ aPortNumber ] , inChannel ; if ( listener ) { inChannel = zMIDI . getInChannels ( ) [ aPortNumber ] ; inChannel . close ( ) ; inChannel . removeEventListener ( "midimessage" , listener , true ) ; delete zMIDI . _listenerMap [ aPortNumber ] ; } }
detach a method to listen to MIDI message in events

@public

@param {number} aPortNumber index of the MIDI port stop listening on
detach a method to listen to MIDI message in events