BassoonTracker icon indicating copy to clipboard operation
BassoonTracker copied to clipboard

standalone player build

Open coderofsalvation opened this issue 6 months ago • 4 comments

perhaps its time for a fresh build again? (with latest fixes e.g.)?

https://github.com/steffest/BassoonTracker/tree/master/player

It's a really cool lightweight lib, which I prefer over the more bulky openmpt emscripten build.

coderofsalvation avatar May 06 '25 18:05 coderofsalvation

Yeah... I'm a bit wary, though, that a new build would increase the size of the lib with quite a few kb. Next to obvious reasons as additional features (playlist support, etc) I've move to ES6 modules since the last build and I have the impression that the automated tree-shaking is not as effective as the manual optimisations we did last time for the player lib.

steffest avatar May 18 '25 11:05 steffest

ah ok, so it's not a matter of 'just do a build'. thanks for clarifying.

coderofsalvation avatar May 19 '25 09:05 coderofsalvation

I've setup a new "player only" build today. Without manual optimisation, it comes in at 68k (22k gzipped). That's only slightly bigger than the current player lib, so that's not too shabby. With some further tweaks it might even turn out to be smaller. Stay tuned.

steffest avatar May 22 '25 12:05 steffest

oh that's great news! ♥ Even a smaller build sounds crazy (kudos). Usually software grows bigger, not smaller :)

coderofsalvation avatar May 22 '25 12:05 coderofsalvation

That's done. I landed on 48kb (16.6 when gzipped) Quite pleased with the size.

Examples and docs are updated -> https://www.stef.be/bassoontracker/docs/?player

There are 3 changes compared to the previous version:

  • it's now a JavaScript Module (that still exposes "BassoonTracker" as global var)
  • calling BassoonTracker.init() is no longer needed
  • BassoonTracker.load now returns a promise instead of using callbacks.

steffest avatar Jun 23 '25 12:06 steffest