[request] Module music without WebAudio API?

  • 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.

    I will have to for now (convert to ogg), unfortunately, I'd like to know if it's possible to process module files without webaudio? Since the only bit that's really important to the listener is the output, couldn't the rest of the work be done without webaudio?

  • Sure it's possible. The simple overview of a mod player is it takes the file and generates sound as it goes, a chunk at a time. Without webaudio it does this by creating a wav file that is then loaded and played. The issue is to make one chunk match the other precisely. Webaudio allows you to buffer sounds to be played seamlessly, as well as eliminating the the overhead of creating/loading the sound files by instead letting you write sound data directly. Of course the nitty gritty of it takes a lot more than that and some specific knowledge, not to mention a lot of time to make and optimize. Using an existing js library is dependent on if one can be found and devising a way to use from C2, which is a time consuming task in and of itself.

    Converting to ogg is the fastest solution and gives the best performance since sound doesn't need to be generated.

  • I agree with our loveable hound. I use to have some problem then I used Adobe Audio to convert OGG

  • Sure it's possible. The simple overview of a mod player is it takes the file and generates sound as it goes, a chunk at a time. Without webaudio it does this by creating a wav file that is then loaded and played. The issue is to make one chunk match the other precisely. Webaudio allows you to buffer sounds to be played seamlessly, as well as eliminating the the overhead of creating/loading the sound files by instead letting you write sound data directly. Of course the nitty gritty of it takes a lot more than that and some specific knowledge, not to mention a lot of time to make and optimize. Using an existing js library is dependent on if one can be found and devising a way to use from C2, which is a time consuming task in and of itself.

    Converting to ogg is the fastest solution and gives the best performance since sound doesn't need to be generated.

    Ah, so you can't process the mod in realtime without webaudio? The reason I ask is the purpose for using mods is to adjust the speed of playback dynamically throughout the game (and to minimise filesize, but that's irrelevant), are you saying without webaudio, the module would have to be processed offline by the javascript library and then played back as a wav? Or could it still playback the module whilst being able to adjust the playback speed of the module in realtime by just playing a raw audio output, all without webaudio?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Well, either let you generate sound. Webaudio by letting you set the sound data directly and normal html5 audio by creating a wav file data URL to load and play. So both would work in my mind, however all over the net those that have actually made mod players cite normal html5 audio as tricky to precisely align one chunk to another. That isn't my expertise so I can only go by what I read. It doesn't mean they aren't wrong though.

    So I'd say it's fully possible. Of course getting that possibility to something usable will take work.

  • I'm an old tracker myself and found this topic interesting. I found this.

    http://mod.haxor.fi/Mantronix_and_Tip/mod.overload,

    http://www.cyrilpereira.com/modplayer/#DEMO.MOD

    i dont know if its useful, but i cool none the less.

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