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

Fixes issue #78: replace broken code links and improve UX #79

Closed jmarcosfer closed 2 years ago

jmarcosfer commented 2 years ago

Demos affected:

Changes:

netlify[bot] commented 2 years ago

✔️ Deploy Preview for essentiajs-melspectrogram ready!

🔨 Explore the source changes: 00ded536725780b9baad2d871b9af10f7fad5534

🔍 Inspect the deploy log: https://app.netlify.com/sites/essentiajs-melspectrogram/deploys/6196d3f72f0ce300072e0c95

😎 Browse the preview: https://deploy-preview-79--essentiajs-melspectrogram.netlify.app

netlify[bot] commented 2 years ago

✔️ Deploy Preview for essentiajs-pitchmelodia ready!

🔨 Explore the source changes: 00ded536725780b9baad2d871b9af10f7fad5534

🔍 Inspect the deploy log: https://app.netlify.com/sites/essentiajs-pitchmelodia/deploys/6196d3f7bdd55b00084bec7b

😎 Browse the preview: https://deploy-preview-79--essentiajs-pitchmelodia.netlify.app

jmarcosfer commented 2 years ago

@albincorreya We should perhaps first merge dev to master with all the CI migration stuff before closing this, so each merge to master is somewhat self-contained. What do you reckon? Or should we close this first, then do a bigger merge dev -> master?

albincorreya commented 2 years ago

We should perhaps first merge dev to master with all the CI migration stuff before closing this, so each merge to master is somewhat self-contained. What do you reckon? Or should we close this first, then do a bigger merge dev -> master?

I think we can merge this first. And then do a common dev->master merge after since these changes are not related to source code.

jmarcosfer commented 2 years ago

@jmarcosfer One thing not very important, but it would nice to have coherence with our latest documentation. i see the melscpetrogram and some other demos using an old version like here. Also using latest release means we don't have to do this manual hack.

I've bumped up the essentia.js version. The manual hack, however, is still necessary if we want the demos to work in Firefox (and possibly Safari). I can use ES6 imports inside the AudioWorklet on Chrome, but that won't work in Firefox. As it is currenly, injecting the code from the main thread to avoid ES6 imports, the WASM and extractor code files get concatenated with the worklet processor code and I can't use the exported values on the ES version (which is why we were using Module), and the UMD version requires exports to be defined. What I've done to make it look a bit less hacky is use UMD versions and hide the added definition of exports. It looks cleaner, and we avoid having to use the cryptic Module that we'd have to use with ES versions.