Closed albincorreya closed 4 years ago
Typescript, was chosen to generate JS API due to it's flexibity in generating JS for various targets and considering maintainability. https://github.com/MTG/essentia.js/blob/dev/src/typescript/essentia.js.core.ts
Issue
In current embind JS bindings for essentia algorithms, the user needs to specify all the required value for all the parameters. This can be irritating since a lot of essentia Algorithms has more than 10 parameters such as PredominantPitchMelodia, MultiPitchKlapurietc. The current way of binding the class EssentiaJS using embind is not binding the default parameter values specified in the class.
Proposed Fix
A possible solution for this issue on CPP side is to overload every method inside the class
EssentiaJS
as detailed in the embind documentation. But, comes at the cost of redundancy and bad code readability.On the other hand, on JS side we could automatically generate a JS interface by extending the existing python code generation script. This could also benefit in generating automated documentation for essentia.js using tools such as jsdoc.