Giter Site home page Giter Site logo

datee / webaudio-mod-player Goto Github PK

View Code? Open in Web Editor NEW

This project forked from electronoora/webaudio-mod-player

0.0 0.0 0.0 725 KB

MOD/S3M/XM module player for Web Audio

Home Page: https://mod.haxor.fi/

License: MIT License

CSS 1.92% PHP 4.79% JavaScript 93.29%

webaudio-mod-player's Introduction

webaudio-mod-player

Screenshot

This is a MOD/S3M/XM module player implemented in Javascript using the Web Audio API and runs fully within the browser. It has been tested and confirmed to work on Chrome 14+, Firefox 24+, Safari 6+ and Edge 20+. The Javascript performance of the browsers varies significantly, so some modules may stutter on one browser while the same module can play flawlessly on other ones. YMMV.

Although internally each file format is handled by a format specific player class, a front-end wrapper class is used to provide a common programming interface for the player.

All player classes use 32-bit floating point arithmetic in the channel mixing code, as well as a wide dynamic range. The output is scaled down to [-1, 1] domain using a "soft clipping" algorithm to roll off any audio peaks without harsh-sounding limiting. This should - in most cases - produce a reasonably constant audio volume for all modules.

Additionally, S3M and XM player classes use linear sample interpolation and volume ramping to produce a smooth Gravis Ultrasound -like sound quality. The MOD player class attempts to sound more like an Amiga by allowing audio aliasing and applying a low pass filter.

None of the player classes fully implement all the features and effects in each file format, but all the major ones should be implemented. In addition, there most certainly will be some playback bugs in each player class - let me know if you run into some bad ones.

You can test the player here:

https://mod.haxor.fi/

To install on your own server, clone the repo to the document root and edit+rename example.htaccess to match your domain. Then create a directory 'mods' alongside index.php and structure is like this (note that both PC-style and Amiga-style filenames are supported but extension must always be in lowercase):

/mods
/mods/Mantronix_and_Tip
/mods/Mantronix_and_Tip/mod.overload
/mods/Necros
/mods/Necros/point.s3m
/mods/mod.saf

Copyrights:

  • MOD/S3M/XM module player for Web Audio (c) 2012-2017 Jani Halme
  • Topaz TTF font (c) 2009 dMG of Trueschool and Divine Stylers
  • "overload" (c) 1991 by Mantronix and Tip of Phenomena
  • "Point of Departure" (c) 1995 Necros / FM

webaudio-mod-player's People

Contributors

jhalme avatar jhnsnc avatar lyzzard avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.