AnkiWeb
- Rating
- 0 (π 0 Β· π 0)
- Updated
- 2021-09-28
- Anki versions
- 2.1.43~
- Description language
- en
AnkiWeb addon 1080109152
Renders LilyPond sheet music in Anki cards using [lilypond] tags or -lilypond fields, with customizable templates and a -lilypondimg workaround for mobile/web.
Open on AnkiWeb GitHub Ask about alternatives
abandoned
| Min Anki | Max Anki | Updated |
|---|---|---|
| 2.1.35 | 2.1.43+ | 2021-09-28 |
Loadingβ¦
Renders LilyPond code in [lilypond] tags or lilypond fields as sheet music images, with customizable templates and mobile image-field support.
Converts ABC music notation in [abc] tags or abc fields to MP3 via abc2midi, timidity, and lame, with templates and mobile sound-field support.
Synchronizes Anki decks from published Google Sheets CSV, creating Basic or Cloze cards, assigning tags, and removing deleted sheet cards without reverse sync.
Synchronizes Google Sheets spreadsheets into Anki decks, creating, updating, and deleting notes by stable row IDs, with cloze, reverse cards, AI help, rich media, and hierarchical tags.
Syncs vocabulary decks bidirectionally with Google Sheets, writing intervals, lapses, ease, and suspension states while gating reverse cards and supporting multiple tabs.
Exports selected Anki Browser notes one-way to a specific Google Sheets sheet, with customizable fields, append/replace modes, HTML stripping, and optional Anki CSV headers.
Add sheet music snippets to your Anki deck, wrapped in [lilypond][/lilypond] tags.
This addon requires LilyPond in order to work.
Wrap inline LilyPond code in tags:
[lilypond]c d e[/lilypond]
Create fields for LilyPond code with -lilypond at the end of the field's name,
e.g. front-lilypond or back-lilypond. The entire contents of which will be
rendered, tags not required:
c d e
Create fields for LilyPond code and put [lilypond][/lilypond] tags around them
in the card template. This is not recommended as music will be re-rendered every
time the card is shown.
Please refer to the LilyPond homepage and documentation for details on how to write LilyPond code.
The styling of LilyPond output is controlled by templates. The default template looks like this:
\paper{
indent=0\mm
line-width=120\mm
oddFooterMarkup=##f
oddHeaderMarkup=##f
bookTitleMarkup = ##f
scoreTitleMarkup = ##f
}
{ %ANKI% }
Where %ANKI% will be replaced with the code to be rendered.
You can add your own templates to the user_files directory in the addon's files
(see Tools -> Addons -> LilyPond Integration -> View Files). You'll need to restart
Anki after making any changes.
Also note that if you want to use LilyPond's \include directive you'll need to
provide to full path to the file.
To use a template called exampleTemplate:
[lilypond=exampleTemplate]c d e[/lilypond]
-exampleTemplate to the end of the field's name, e.g.
front-lilypond-exampleTemplate.You can create a template with multiple occurrences of %ANKI%, then separate sections
of code with %%% which will then be substituted in to the corresponding occurrences.
For example with the LilyPond code
c d e
%%%
f g a
the first occurrence of %ANKI% in the template will be replaced with c d e, and
the second occurrence of %ANKI% with will be replaced with f g a.
Surplus occurrences of %ANKI% in the template will be left as-is (which will cause
errors in LilyPond). Surplus sections of code will be ignored.
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.
As a workaround you can use LilyPond fields and for each field create another field
with the same name but ending with -lilypondimg. The desktop addon will replace
the contents of this field with the rendered image. You can then use this field in
your notes.
For example, if your field is front-lilypond, with content c d e, create the field
front-lilypondimg and use the front-lilypondimg field in your card template
wherever you want the rendered music to appear. As long as you create your cards on
desktop so that the plugin can generate the image this image will then be visable on
all platforms.
Note that the contents of the -lilypondimg field will be overwritten so don't put
anything important in there.