[request] Module music without WebAudio API?

0 favourites
From the Asset Store
Instantly Create Rogue-like Adventures with just 1 Layout! Include this IGM into any existing games.
  • Since cocoon doesn't support audiocontext/webaudio api it currently seems impossible to play xm/mod files in any canvas+ builds. I know html5audio is fairly limited to just playing back oggs, wavs and mp3s, but is there any way that module music could be played back via a plugin without relying on webaudio? They've recommended howler.js but I believe that is only useful for falling back to ogg/MP3 where webaudio isn't present, unless I'm wrong. If anyone has any suggestions as to how to go about this I'd be most grateful.

  • Does this help you with your goal? https://www.a1k0n.net/2015/11/09/javasc ... layer.html

  • tulamide I use to use this software on Amiga 500, 1200. I am very impressed, amazed to see you have vast knowledge and understanding of it. There was software like that on Amiga and Atari ST I used to do my recording in Zella Studio in Birmingham somewhere around 1985 and 1993. What an wonderful time we had with band Call Red Rose and Azaad.

  • Although I do know a lot about it, and once programmed my own tracker software back in the days on an Atari ST (which never got any attention though), the linked blog is not by me. It is by Andy Sloane.

    I have zero skills in javascript, so I looked for something that could help the op. That's all

  • tulamide Bless you for being honest and thank you

  • I am interesting in this solution provided by tulamide

    https://www.a1k0n.net/2015/11/09/javasc ... layer.html

    This solution is using "AudioContext/webkitAudioContext", which is one kind of Web Audio API, imo.

    But the title of this thread is "without WebAudio API"...

  • Yes, unfortunately that uses WebAudio API, and I'm not even sure if it's possible at all to playback modules without it, which is a shame as Cocoon doesn't use it, which seriously limits the audio possibilities with Canvas+ builds. If it CAN be done, I'd be interested in knowing how.

  • I had made a MidiParser plugin, which only trigger note events, designer need play notes by sounds using official audio plugin.

    Official audio plugin could be used in Cocoon, I guess.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Oh, sorry if I confused things! I was intrigued by this part of the blog post:

    "The webkitAudioContext element was introduced to HTML a while back, and is now available in the standard as AudioContext. The API is fairly flexible, and one of the things you can do with it is get a Javascript callback which writes samples more or less directly to the output device, just like we used to do with DMA loop interrupts back in the day. It’s called createScriptProcessor." I just read HTML standard. So "createScriptProcessor" is already part of WebAudio? Sorry then. Damn, And it looked so easy to implement...

  • It's a shame, I'd love to use mods with cocoon, but they only support basic html5 audio. Since html5 audio supports basic playback of samples, is there no way a module playback plugin couldn't do all of it's work without webaudio and just output the playback of the mod file to html5?

  • This corner of the internet has a way:

    http://acko.net/blog/javascript-audio-s ... th-html-5/

    But that's just the basics.

    There also may be some older js mod players that don't use webaudio. Anyway I guess it's in the realm of possible, but unless someone makes it usable from C2 I guess this info isn't useful.

  • cool.. I second this.. so basically a synthesis plugin...

  • There is already a synthesis plugin here:

  • This corner of the internet has a way:

    http://acko.net/blog/javascript-audio-s ... th-html-5/

    But that's just the basics.

    There also may be some older js mod players that don't use webaudio. Anyway I guess it's in the realm of possible, but unless someone makes it usable from C2 I guess this info isn't useful.

    Well, Gigatron is our module genius, but his implementations all use webaudio, like you say, it seems possible, R0J0hound but I'm totally (as you'd imagine) useless with proper code, so I haven't a clue how to implement such a thing. Maybe it would be possible to take Protracker https://www.scirra.com/forum/plugin-protracker_t129409?&start=40&hilit=MOD or something, and convert the webaudio parts to javascript and just send the output to html5 or something?

  • Well if a javascript library that doesn't use webaudio can be found, then maybe that can be used. Or you could just convert your mod files to ogg files with some other software perhaps.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)