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
645 stars 42 forks source link

Expose add-on modules to npm entrypoint #50

Closed albincorreya closed 3 years ago

albincorreya commented 3 years ago

Currently, the npm index.js only exposes an instance of the core essentia.js. It would be nice to bundle all the essentia.js related modules into a common namespace and let the user create the instances as they prefer.

A node.js example would be ,


let esPkg = require("essentia.js");

// core essentia.js API
esPkg.Essentia
// essentia WASM backend
esPkg.EssentiaWASM
// add-on modules
esPkg.EssentiaModel
esPkg.EssentiaExtractor
esPkg.EssentiaPlot