Menu

Why I am doing this project

Web applications seem to become more and more popular, and games - based on HTML5 - are no exceptions. So, I was interested to give it a try: create a small game, based on HTML5+Canvas+JavaScript. My previous experiences were based on C++, PHP, Lua, HTML and some other languages, but barely JavaScript. So, one reason for me trying web development is learning JavaScript, especially based on browsers and using web APIs. So, I've got a small canvas-based Jump'n Run working quite quickly.
Then, I was thinking about sound. To be specific: music. There are various possibilities: Use an

  • Play and loop samples at a predefined time. It is also possible to loop that sample and give quite exact loop points.
  • Samples can be played at any pitch (playbackRate) - use a single sample, to generate various notes.
  • I can build complex structures with the various node types to support gain, panning and more; I can even connect nodes to audio params or set linear changing of an parameter supporting things like instruments' volume/panning envelopes or tone portamentos.

I've already seen some attempts on the web playing MOD files, and a few of them even seem quite good. But as far, as I could see, they all use ported rendering of the audio output in JavaScript, which could be quite CPU instensive. Even though, if there's already one really working with the nodes provided by the Web Audio API, I'll keep on this project for various reasons, one of them being the learning effect. And, a MOD player based on nodes, instead of rendering the output all in JavaScript has an advantage: although, it is not as accurate as rendering all by script, it is much, much less CPU intensive and should not slow down any CPU intensive application.

I hope a few people will find my project and find it useful. You may give me feedback to my project or use WebMod in your project for free. You are also allowed to modify WebMod for your personal needs, it's published under the zlib license.

Posted by Tenry 2014-11-10

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.