Giter Site home page Giter Site logo

bemuse-tools's Introduction

bemusepack — Packs BMS files into .bemuse archive

BMS files need to be converted into .bemuse file format before playing on BE☆MU☆SE. It is a simple file format to hold BMS files and keysound files together. A custom format is created to be easily consumed by web applications, both on desktop and mobile devices.

File Format Specification

A .bemuse file contains

  • an arbitrary metadata
  • an opaque payload

Usually, the metadata describes what's inside the payload.

File Format

  • 10 bytes magic string BEMUSEPACK
  • 4 bytes Uint32LE — metadata size N (may be 0 if no metadata)
  • N bytes — metadata
  • the rest of the file — payload

Metadata

An entry file should have a metadata of more than 0 bytes. It should be a valid JSON. It describe all files both internal and external. External packages should have metadata of 0 bytes.

{
  version: 2,
  song: { title, artist, genre, ... },
  refs: [
    { size, hash }, // the first ref (0) describes its own payload
    { path, size, hash }, // ref 1's payload metadata
    ...
  ],
  files: [
    {
      name, type, size, hash,
      refs: [
        [ ref, start, end ], // start, end relative to payload
        ...
      ]
    }
  ]
}

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.