Converts tablature notation to a JSON beat-map for use in rhythm games.
This parser is not robust. Format your tab correctly or it will fail to give you accurate JSON.
example.tab
VERSE
A|-----x-3-4---x-6-----x-1-2---x-4-----x-3-4---x-6-----x-1-2-------|
E|-2---x-------x---4---x-------x---2---x-------x---4---x-------9\--|
C|-----x-------x-------x-------x-------x-------x-------x-----------|
g|-----x-------x-------x-------x-------x-------x-------x-----------|
A|-----x-3-4---x-6-----x-1-2---x-4-----x-3-4---x-6-----x-1-2-------|
E|-2---x-------x---4---x-------x---2---x-------x---4---x-------9\--|
C|-----x-------x-------x-------x-------x-------x-------x-----------|
g|-----x-------x-------x-------x-------x-------x-------x-----------|
Run the file using node. Be sure to include the arguments needed to find the tab and embed the basic song info in the json.
example usage
node tabparser.js example.tab "Example" "The Band"
example.json
{
"name": "Example",
"artist": "A Band",
"seconds": 200,
"units": 65,
"notes": [
{
"note": 0,
"position": 7,
"length": 3
},
...
]
}