Package Exports
- cotone
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (cotone) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
cotone.js
MIDI tick converter library for rhythm action game development.
Install
npm i cotone
Usage
Basic example
import { Converter } from 'cotone'
const converter = new Converter()
// converter.setTimebase(480) // Set ticks-per-quarter-note(TPQN) : default is 480
converter.setTempo([ {tick: 0, value: 120} ]) // Tempo(BPM) set to 120
console.log(converter.convertSecToTick(2))) // -> 1920
console.log(converter.convertTickToSec(1920))) // -> 2
console.log(converter.getProgressByMS(1000))) // -> 120000
console.log(converter.getTempoByMS(1000))) // -> 120Traditional browser style
<script src="path/to/cotone.js"></script>
<script type="text/javascript">
const converter = new cotone.Converter()
// ...
</script>Advanced example
TODO
Documentation
TODO
Development
TODO
Test
npm run test