src/App.js
/* handleSelect: loads modules when selected from dropdown menu.
     It also handles instantiating an AudioContext since it's likely the first user gesture.*/
loads modules when selected from dropdown menu.
It also handles instantiating an AudioContext since it's likely the first user gesture.
loads modules when selected from dropdown menu . It also handles instantiating an AudioContext since it ' s likely the first user gesture .
handleSelect(name, processor) {
    if(this.state.isPlaying) return;
    this.setState({ processor: {name, module: processor.name, cb: processor.cb}, moduleLoaded: false, status: 'Loading module, please wait...' }, () => {
      if(!this.actx) {
        try {
          console.log('New context instantiated')
          this.actx = new (window.AudioContext || window.webkitAudioContext)();
        } catch(e) {
            console.log(`Sorry, but your browser doesn't support the Web Audio API!`, e);
        }
      } 
      this.loadModule()
    });
  }
handleSelect ( name , processor ) { if ( this . state . isPlaying ) return ; this . setState ( { processor : { name , module : processor . name , cb : processor . cb } , moduleLoaded : false , status : 'Loading module, please wait...' } , ( ) => { if ( ! this . actx ) { try { console . log ( 'New context instantiated' ) this . actx = new ( window . AudioContext || window . webkitAudioContext ) ( ) ; } catch ( e ) { console . log ( ` ` , e ) ; } } this . loadModule ( ) } ) ; }
handleSelect: loads modules when selected from dropdown menu.
handleSelect : loads modules when selected from dropdown menu .