src/App.js
/* loadModule: given a module's name, adds it to the audioWorklet */
given a module's name, adds it to the audioWorklet
given a module ' s name adds it to the audioWorklet
async loadModule() {
    const { state, actx } = this;   
    try {
      await actx.audioWorklet.addModule(`worklet/${state.processor.module}.js`);
      this.setState({moduleLoaded: true, status: null})
      console.log(`loaded module ${state.processor.module}`);
    } catch(e) {
      this.setState({moduleLoaded: false})
      console.log(`Failed to load module ${state.processor.module}`);
    }
  }
async loadModule ( ) { const { state , actx } = this ; try { await actx . audioWorklet . addModule ( ` ${ state . processor . module } ` ) ; this . setState ( { moduleLoaded : true , status : null } ) console . log ( ` ${ state . processor . module } ` ) ; } catch ( e ) { this . setState ( { moduleLoaded : false } ) console . log ( ` ${ state . processor . module } ` ) ; } }
loadModule: given a module's name, adds it to the audioWorklet
loadModule : given a module ' s name adds it to the audioWorklet