Giter Club home page Giter Club logo

bms-js's Introduction

bms-js

BMS Parser for JavaScript

Waffles Travis CI Code Climate Coveralls david-dm Dependency Status david-dm Development Depedency Status


A Be-Music Source file-format parser. It is made primarily for usage in Bemuse.

Usage

Documentation has been lacking. For now, please see issue 26 for preliminary usage notes.

BMS Parsing Stages

BMS will be parsed in three stages:

  1. Use bms.Reader to turn a Buffer with BMS file content into a String.
    • Performs character set detection. Since BMS file encoding varies.
      • This part is done by bemusepack to convert BMS file into UTF-8.
  2. Use bms.Compiler to compile the String into a BMSChart.
    • Syntax-level processing is done here, such as:
      • #RANDOM
      • #SETRANDOM
      • #SWITCH
    • Results in three primary data structures:
      • headers contains all BMS headers
      • objects contains all BMS objects on the timeline.
      • timeSignature contains the time signature information.
        • also allows converting from measure+fraction to beat
  3. BMSChart contains all information needed to further process the song. These modules can then be used to extract information from BMSChart.
    • SongInfo allows looking up title, subtitle, artist, maker, and genre.
      • Implicit/multiplex subtitles taken into account here.
    • Timing allows conversion from beat to seconds.
      • BPM, BPM changes, STOP objects, and STP commands taken into account here.
    • Positioning allows conversion from beat to in-game position.
    • Notes parses the notechart, resulting in in-game notes.
      • Channel mapping is taken into consideration here.
      • Normal notes and long notes taken into account here.
      • Also emits list of notes to autoplay.

Other Utility Classes

  • Speedcore allows calculation of position and velocity over a linear graph.

bms-js's People

Contributors

dtinth avatar mugabe 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.