lib/cracked/cracked.js
/**
 * find nodes in a macro with a selector updates the _selectedNodes array
 * @function
 * @private
 */
find nodes in a macro with a selector updates the _selectedNodes array
@function
@private
find nodes in a macro with a selector updates the _selectedNodes array @function @private
function findInMacro() {
    if (arguments && arguments.length) {
        if(__.isStr(arguments[0])) {
            var macroUUID = getCurrentMacro().getUUID();
            _currentSelector = processSelectorForMacro(arguments[0]);
            _selectedNodes = getNodesWithSelector(_currentSelector);
            _selectedNodes.forEach(function (el, i, arr) {
                if (el && getNodeWithUUID(el).getMacroContainerUUID() !== macroUUID) {
                    arr.splice(i, 1);
                }
            });
        } else if(__.isObj(arguments[0]) && arguments[0].constructor.name === "AudioNode") {
            _currentSelector = getCurrentMacroNamespace()+" "+arguments[0].getType();
            _selectedNodes = [arguments[0].getUUID()];
        }
    }
}
function findInMacro ( ) { if ( arguments && arguments . length ) { if ( __ . isStr ( arguments [ 0 ] ) ) { var macroUUID = getCurrentMacro ( ) . getUUID ( ) ; _currentSelector = processSelectorForMacro ( arguments [ 0 ] ) ; _selectedNodes = getNodesWithSelector ( _currentSelector ) ; _selectedNodes . forEach ( function ( el , i , arr ) { if ( el && getNodeWithUUID ( el ) . getMacroContainerUUID ( ) !== macroUUID ) { arr . splice ( i , 1 ) ; } } ) ; } else if ( __ . isObj ( arguments [ 0 ] ) && arguments [ 0 ] . constructor . name === "AudioNode" ) { _currentSelector = getCurrentMacroNamespace ( ) + " " + arguments [ 0 ] . getType ( ) ; _selectedNodes = [ arguments [ 0 ] . getUUID ( ) ] ; } } }
find nodes in a macro with a selector updates the _selectedNodes array
 @function
 @private
find nodes in a macro with a selector updates the _selectedNodes array @function @private
//update the shared _currentSelector variable //then find the nodes //update selectedNodes //strip out anything we found that's not part of this //container macro