tja
v0.1.3
Published
JavaScript parser for the TJA (Taikojiro) chart format.
Downloads
3
Maintainers
Readme
TJA parser for JavaScript and Node.js
tja.js
is a parsing library for the TJA (Taikojiro) file format. This format
is used by Taiko simulators. It contains the metadata and the notation for all
of the song's difficulty levels.
Disclaimer: The library is in early development and may undergo several breaking changes after receiving community feedback.
Getting Started
1. Install the library:
npm install tja
# or
yarn add tja
2. Import the parser:
import { TJAParser } from 'tja';
// or
const { TJAParser } = require('tja');
...or if you're in a browser environment:
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/browser/tja.min.js"></script>
<script>
const { TJAParser } = window.TJA;
</script>
3. Parse a TJA file:
const contents = fs.readFileSync('Saitama2000.tja', 'utf8');
try {
const song = TJAParser.parse(contents);
console.log(song);
} catch (e) {
console.error(e);
}
Please refer to the documentation for more information about the models, properties, and methods that are at your disposal.
TODO
- Support for
#SENOTECHANGE
- Unit tests
Attributions
Thanks to bui for providing a comprehensive specification for the TJA format. The documentation was also mostly based on this their guide.
Here are some additional sources they've linked in their guide:
- ".tja フォーマット" (.tja format) - AioiLight.space. (dead link)
- "仕様" (Specifications) - 太鼓さん次郎交流 Wiki (Taiko Jiro Kouryuu Wiki).
- "譜面追加 自分で作る" (Adding charts, creating one yourself) - 太鼓さん次郎解説 (Taiko Jiro Kaisetsu).
- "CDTX.cs" - AioiLight/TJAPlayer3 repository.
License
MIT.