Repository navigation
Conversation
Adds a "(NEW) ChordPro Lead Sheets" section describing the integrated chopro/chordpro code-block rendering, and credits jheddings' ChordPro Viewer plugin (https://github.com/jheddings/obsidian-chopro) — whose chopro/chordpro code-block convention the renderer follows — under "Additionally Used (With Many Thanks)". Contributed by jdhori.
Implements the feature the accompanying README section documents: a self-contained ChordPro renderer (src/chordpro/chordProBlock.ts, no dependencies) registered as `chopro`/`chordpro` code-block processors in main.ts, with lead-sheet styles in styles.css. Renders chord-and-lyric lead sheets independently of the Verovio engraving engine. Screen-reader-first: chord-then-syllable DOM order, aria-labelled chords, labelled verse/chorus groups, distinguished by weight + position (not colour alone). Independent reimplementation, inspired by jheddings' ChordPro Viewer (https://github.com/jheddings/obsidian-chopro) — credited in the README. Contributed by jdhori.
Bump the patch version because chord names were not reliably announced by screen readers and proportional/wrapping tablature lost column alignment. Use hidden readable chord text, monospace nonwrapping tablature, and keyboard-accessible horizontal scrolling. Add browser regressions and WCAG 2.1 A/AA axe checks in CI. Validation: both browser tests pass; lint passes with test-harness warnings; production build passes. Live Obsidian screen-reader and dictation validation remains outstanding.
|
Hi, thanks for the contribution! I'm not entirely sure whether ChordPro rendering fits the scope of this plugin. Since it works independently of Verovio, it wouldn't benefit from most of the existing functionality, such as score editing, MEI conversion, MIDI playback, or interactive notation. It would basically be a separate plugin wrapped together with this one. I'm wondering whether this functionality might be better suited to a dedicated ChordPro plugin, especially since those already exist for Obsidian. Could you share your thoughts on why you think this should be integrated this plugin? From a user's perspective, I think it would be quite confusing to suddenly have a different code block logic, especially when most of the features that make this plugin useful wouldn't be available with that format. Of course, one could consider expanding the plugin to support all kinds of other formats and rendering systems. But the whole idea behind its current state is that (since it's using Verovio) everything is internally converted to MEI and managed through that common representation. That's what allows the different formats to benefit from the same features and workflows. Introducing a separate rendering system that bypasses this architecture would basically break that and make the plugin less consistent overall. So while I appreciate the contribution, I'm not convinced that this approach fits the plugin's architecture and intended scope. |
Summary
Adds built-in ChordPro lead-sheet rendering to the plugin — chord-and-lyric sheets from
chopro/chordprocode blocks, alongside the existing engraved notation. Two commits:src/chordpro/chordProBlock.ts, no dependencies) registered aschopro/chordprocode-block processors inmain.ts, plus lead-sheet styling instyles.css. It renders independently of the Verovio engraving engine (ChordPro carries no pitch/rhythm to engrave).(NEW) ChordPro Lead SheetsREADME section (syntax + accessibility), and a credit under Additionally Used (With Many Thanks).What it renders
Supports inline
[chords], directives ({title:},{key:},{comment:}, arbitrarykey: value), and labelled{start_of_chorus}/ verse / bridge / tab sections.Accessibility
Screen-reader-first: DOM order is chord-then-syllable (a reader hears "G chord, Carry me home to see my, D chord, kin"), chords carry an
aria-labelsoAmisn't read as the word "am", the title is a heading, choruses/verses are labelled groups, and chords are set apart by weight + position — never colour alone (WCAG 1.4.1).Credit
The renderer is an independent reimplementation — seeing ChordPro Viewer by jheddings is what sparked the idea, and it's built in this plugin's own way (no code shared). Because both claim the
chopro/chordprocode-block languages, the README notes you'd disable one or the other. Credited in the README as a shout-out.Notes
tscerrors).main.jsbundle — those are the maintainer's call to rebuild/release.