keyjockey
Reads guitar tablature and gives you notes: eight tunings, capo offsets, MIDI numbers and frequencies. The same reader Key-J runs in the browser, as a package.
What it does
Reads guitar tablature and converts notes. Eight tunings, capo offsets, MIDI and frequency.
npm install keyjockey
keyjockey.parseTab(tab, "Standard (EADGBe)", 0).notes;
keyjockey.parseTab(tab, "Drop D", 2).notes; // capo 2
keyjockey.midiToName(60); // "C4"
keyjockey.nameToFreq("A4"); // 440
Lifted, not rewritten
This is the same reader Key-J runs in the browser, and
the Python half is on PyPI as keyj. The npm package is generated
from app.html at build time rather than written a third time, and
the build fails if the app moves and the package does not.
Key-J has already shipped three defects that existed only because two copies of one thing drifted. A third copy would have been a third chance.
Errors come back, they are not thrown
A tab in a tuning that does not exist returns .error and no
notes. Text that is not tablature returns zero notes rather than guessing at
one.
How it works
- Install it
npm install keyjockey. - Give it a tab and a tuning
parseTab(tab, "Drop D", 2). Tuning by name, capo as an offset. - Take the notesNote names, MIDI numbers or frequencies, whichever your program needs.
What it does
midiToName(60) and nameToFreq("A4") for the conversions everything else needs..error and no notes. Text that is not tablature returns zero notes rather than guessing at one.keyjockey on npm, keyj on PyPI.Specifications
| Install | npm install keyjockey |
|---|---|
| License | MIT |
| Tunings | 8, with capo offsets |
| Source | vince-gonzalez/f-keys |
Questions
- Is this the same as the keyj package?
- Same reader, different registry. npm gets keyjockey, PyPI gets keyj.
- Does it play audio?
- No. It converts tablature to notes; what you do with them is yours.
- What happens with a malformed tab?
- Zero notes rather than invented ones.