LilyPond Integration (Sheet Music Typesetter) for Anki 2.1.x

AnkiWeb addon 123418104

Renders LilyPond sheet music from [lilypond] tags or lilypond-named fields, supports customizable templates, and auto-generates image fields for mobile/web display.
AI-generated summary; may contain mistakes.

card-creationfork-or-reuploadmobile-compatible

Open on AnkiWeb GitHub Find alternatives

AnkiWeb

Votes
3 (πŸ‘ 1 Β· πŸ‘Ž 2)
Updated
2023-01-04
Anki versions
2.1.55~
License
AGPL-3.0 (from the headers of the Python files)
Virus scan
No ClamAV match A match does not prove malware. No match does not prove that the code is safe.
Languages
Python, JSON
Description language
en

Maintenance

abandoned

  • Last update or commit: 2023-01-04 (1397 days before the snapshot).
  • Commits in the last year: 0.
  • Issues: 1 open, 0 closed.
  • Pull requests: 0 open, 0 merged.
  • Median first response: 7 hours (1 answered issues and pull requests).

Will it work on my Anki?

Version branches
Min AnkiMax AnkiUpdated
2.1.542.1.55+2023-01-04
History across monthly snapshots

Loading…

Similar addons

Spreadsheet Import Plus

Imports XLSX spreadsheets directly into Anki, auto-matching field names and letting each field be processed as text, HTML, or Markdown.

card-creationimport

10 votes 60% approval πŸ‘ 9 Β· πŸ‘Ž 1 ⭐ 10 Anki 2.1.49~ Updated 2022-01-19
Card to Image Exporter

Exports selected Anki cards' answer sides as high-quality PNG images in bulk, organized by deck, rendering HTML, CSS, embedded images and MathJax formulas with customizable output settings.

export

1 votes 21% approval πŸ‘ 1 Β· πŸ‘Ž 0 Anki 25.02.5~ Updated 2025-05-27
AnkiTunes

Stores traditional tunes as ABC notation, displays them as sheet music, automatically groups tunes into practice sets, and imports tune details directly from thesession.org URLs.

card-creationimportschedulingreview-flowcard-templates

1 votes 21% approval πŸ‘ 1 Β· πŸ‘Ž 0 ⭐ 1 Anki 2.1.49~ Updated 2022-03-26

Description

LilyPond - music notation for everyone - http://lilypond.org/ With this addon, you can add sheet music snippets to your deck, wrapped in [lilypond]c d e[/lilypond] tags. For this addon to work, you have to install LilyPond first. For Windows and Mac, please follow the installation instructions for running LilyPond on the command line. (lilypond executable needs to be in your PATH). This addon is hosted on GitHub: https://github.com/girasole123/LilyPond-Integration-Sheet-Music-Typesetter-for-Anki-2.1.x. Original addon for Anki 2.1.x on GitHub: https://github.com/GydeonMylls/Anki-LilyPond. Unlike the original module, this one has a menu to edit templates. How to use This addon understands [lilypond] tags: [lilypond]c d e[/lilypond] Alternatively, you can create fields dedicated to LilyPond, e.g. front-lilypond or back-lilypond, and omit the [lilypond] tags for them: c d e With lilypond in the field name, it will act as if the entire field content was wrapped in [lilypond][/lilypond] tags. This addon allows the creation of custom templates (see below), and specifying which template to use:[lilypond=default]c d e[/lilypond] [lilypond=yourtemplate]c d e[/lilypond] The name of the default template is default, so [lilypond=default] is identical to [lilypond]. You can also use templates in lilypond fields by giving them names like front-lilypond-yourtemplate, back-lilypond-yourtemplate. Mobile/Web support Anki addons are desktop only, so by default, LilyPond images won't appear on other platforms since those platforms won't know what to make of a [lilypond] tag or how to treat a lilypond field. However, if you are using lilypond fields, and for each field create another field called lilypondimg, the desktop plugin will autofill it with the [image] tag. For example, if your field is front-lilypond, with content c d e, and you have another field front-lilypondimg, and use only the front-lilypondimg field in your card template, the image will appear on all platforms (provided that the desktop plugin generated the image once and the images were synced to the other platforms as well). Note: Please do not add any other text to a lilypondimg field, as it will be overwritten and discarded by the addon. LilyPond Templates The addons21/123418104/lilypond directory holds template files for LilyPond. Templates can be created and edited from Anki, using the Tools->lilypond menu. An external editor is used. The default editor is xed, but you surely must adapt it for your specific setup: menu Tools->Addons, select this addon in the list, then click on Config. Modify the JSON config with the editor command (it may be necessary to include the path). Please restart Anki when you change templates. The default template is default.ly and used by: [lilypond]code[/lilypond] [lilypond=default]code[/lilypond] somefield-lilypond All other templates have to be specified by name: [lilypond=templatename]code[/lilypond] somefield-lilypond-templatename In the template, %ANKI% will be replaced with code. Multiple codes can be specified, by separating them with %%%: [lilypond] code1 %%% code2 [/lilypond] In the template, the first occurence of %ANKI% will be replaced with code1, the second occurence of %ANKI% with code2. The number of %ANKI% in the template has to match the number of codes used for this template always, otherwise the remaining occurences of %ANKI% will not be replaced, or the surplus specified codes will not be inserted. The default template looks like this: \paper{ indent=0\mm line-width=120\mm oddFooterMarkup=##f oddHeaderMarkup=##f bookTitleMarkup = ##f scoreTitleMarkup = ##f } \relative c'' { %ANKI% } Please refer to the LilyPond homepage and documentation for details on how to write LilyPond code.

README

LilyPond-Integration-Sheet-Music-Typesetter-for-Anki-2.1.x

LilyPond Integration (Sheet Music Typesetter) for Anki 2.1.x (tested on versions >=2.1.54)

LilyPond - music notation for everyone - http://lilypond.org/ With this addon, you can add sheet music snippets to your deck, wrapped in [lilypond]c d e[/lilypond] tags. For this addon to work, you have to install LilyPond first. For Windows and Mac, please follow the installation instructions for running LilyPond on the command line. (lilypond executable needs to be in your PATH).

This addon is hosted on GitHub: https://github.com/girasole123/LilyPond-Integration-Sheet-Music-Typesetter-for-Anki-2.1.x. Original addon for Anki 2.1.x on GitHub: https://github.com/GydeonMylls/Anki-LilyPond. Unlike the original module, this one has a menu to edit templates.

How to use This addon understands [lilypond] tags: [lilypond]c d e[/lilypond] Alternatively, you can create fields dedicated to LilyPond, e.g. front-lilypond or back-lilypond, and omit the [lilypond] tags for them: c d e With lilypond in the field name, it will act as if the entire field content was wrapped in [lilypond][/lilypond] tags. This addon allows the creation of custom templates (see below), and specifying which template to use:[lilypond=default]c d e[/lilypond] [lilypond=yourtemplate]c d e[/lilypond] The name of the default template is default, so [lilypond=default] is identical to [lilypond]. You can also use templates in lilypond fields by giving them names like front-lilypond-yourtemplate, back-lilypond-yourtemplate.

Mobile/Web support Anki addons are desktop only, so by default, LilyPond images won't appear on other platforms since those platforms won't know what to make of a [lilypond] tag or how to treat a lilypond field. However, if you are using lilypond fields, and for each field create another field called lilypondimg, the desktop plugin will autofill it with the [image] tag. For example, if your field is front-lilypond, with content c d e, and you have another field front-lilypondimg, and use only the front-lilypondimg field in your card template, the image will appear on all platforms (provided that the desktop plugin generated the image once and the images were synced to the other platforms as well). Note: Please do not add any other text to a lilypondimg field, as it will be overwritten and discarded by the addon.

LilyPond Templates The addons21/123418104/lilypond directory holds template files for LilyPond. Templates can be created and edited from Anki, using the Tools->lilypond menu. An external editor is used. The default editor is xed, but you surely must adapt it for your specific setup: menu Tools->Addons, select this addon in the list, then click on Config. Modify the JSON config with the editor command (it may be necessary to include the path). Please restart Anki when you change templates. The default template is default.ly and used by: [lilypond]code[/lilypond] [lilypond=default]code[/lilypond] somefield-lilypond All other templates have to be specified by name: [lilypond=templatename]code[/lilypond] somefield-lilypond-templatename In the template, %ANKI% will be replaced with code. Multiple codes can be specified, by separating them with %%%: [lilypond] code1 %%% code2 [/lilypond] In the template, the first occurence of %ANKI% will be replaced with code1, the second occurence of %ANKI% with code2. The number of %ANKI% in the template has to match the number of codes used for this template always, otherwise the remaining occurences of %ANKI% will not be replaced, or the surplus specified codes will not be inserted. The default template looks like this: \paper{ indent=0\mm line-width=120\mm oddFooterMarkup=##f oddHeaderMarkup=##f bookTitleMarkup = ##f scoreTitleMarkup = ##f } \relative c'' { %ANKI% } Please refer to the LilyPond homepage and documentation for details on how to write LilyPond code.