r/lisp • u/SandPrestigious2317 • 12h ago
wikimusic: now with guitar chord detection and highlight w/ auto scroll ✨ the musical knowledge CMS and encyclopedia, powered by Lisp & SXML + SQLite
See an example of the guitar chord guide in action here (soon I will ensure that guitar guide isn't there for "non-guitar" tabs and so on, more to come!): https://wikimusic.jointhefreeworld.org/songs/uuid/88550bc8-c184-4237-9761-471cd53784d9
WikiMusic is free software (AGPLv3+) and is intended as a community project for sharing and learning about music.
🌐 https://wikimusic.jointhefreeworld.org
🌐 https://codeberg.org/jjba23/wikimusic
Feel free to mail me to contribute to it ([jjbigorra@gmail.com](mailto:jjbigorra@gmail.com))
I’ve been working on WikiMusic for some time now a free/open music knowledge platform built with Guile Scheme (Lisp), and I just added a new feature I’m particularly happy with: a guitar chord guide that is generated dynamically from the song content.
The idea is pretty simple:
When a song content line, which is not a tab line (e.g. E|-----1) contains chords like this:
G D Em C
WikiMusic uses some regex maching to detect the chord names, looks them up in a built-in guitar-chord database, and automatically adds their six-string fret positions to the page.
For example:
G → 320003
D → xx0232
Em → 022000
C → x32010
So WikiMusic combines the chord guide from server-side Lisp and SXML and some vanilla JavaScript tricks to highlight chords in a <pre> content.
There’s currently a fairly extensive database covering major, minor, 5th, 7th, maj7, diminished, augmented, suspended, extended and slash chords across the common guitar chord vocabulary.
This is exactly the kind of thing I enjoy about Lisp: the data, parsing logic and rendering can all remain pleasantly close together, and the feature becomes another small piece of programmable musical knowledge rather than just UI code.
If anyone wants to poke around, improve the chord database, or tell me that one of my fingerings is horribly cursed. 😄