@goplayerjuggler/abc-tools
v1.1.7
Published
contour-sort and other sorting algorithms implementation for ABC tunes; and other tools for parsing and manipulating ABC tunes
Maintainers
Readme
abc-tools
A JavaScript library with utility functions for tunes written in ABC format. Particularly applicable to Irish, and other, traditional music.
features
- ABC (v2.1) parsing – a partial implementation.
- multi-level sorting of a list of tunes, with a contour sort algorithm.
The algorithm used for sorting is new/original, as far as I know, and is described here. - contours are independent of key and mode.
- contour visualisations as SVGs.
- Extracting initial bars and incipits.
- Doubling/halving bar length - e.g. going from 4/4 to 4/2 and vice versa.
This is work in progress; I'm aware of a few small bugs and there are probably many others.
where is it used
AFAIK at present this is only used by one other repo; a project of mine, tuneTable, which builds on this repo. There’s a live demo featuring the contour sort - the default list is sorted first by rhythm, then by contour, then by name.
AI
A lot of the implementation was done with the help of AI, notably with Anthropic’s Claude.ai / Sonnet 4.6.
license
This project is licensed under the GNU General Public License v3.0.
This means you are free to use, modify, and distribute this software, but any derivative works must also be distributed under the GPL-3.0 license. See the LICENSE file for full details.
installation
npm i @goplayerjuggler/abc-toolscontributing
Issues and pull requests welcome at https://github.com/goplayerjuggler/abc-tools
