MTG / essentia.js

JavaScript library for music/audio analysis and processing powered by Essentia WebAssembly
https://essentia.upf.edu/essentiajs
GNU Affero General Public License v3.0
632 stars 41 forks source link

Rename global namespace title of Essentia WASM builds and JS wrappers #29

Closed albincorreya closed 4 years ago

albincorreya commented 4 years ago

Rename the Essentia WASM builds' global namespace title from EssentiaModule to EssentiaWASM in the JS wrappers for better coherence with the terminologies used in the Essentia.js ISMIR paper.

import Essentia from 'essentia.js-core.es.js';
// import essentia-wasm backend
import { EssentiaWASM } from 'essentia-wasm.module.js';

const essentia = new Essentia(EssentiaWASM);
<html lang="en">
  <head>
    <script src="essentia-wasm.web.js"></script>
    <script src="essentia.js-core.js"></script>
    <script>
      let essentia;

      EssentiaWASM().then( function(essentiaWasm) {
        essentia = new Essentia(essentiaWasm);
        // prints version of the essentia wasm backend
        console.log(essentia.version)
        // prints all the available algorithms in essentia.js
        console.log(essentia.algorithmNames);

        // add your custom audio feature extraction callbacks here
      });
    </script>
  </head>
</html>