ABC Music Notation

by Til Blechschmidt
5
4
3
2
1
Score: 61/100

Description

Category: Creative & Writing Tools

The ABC Music Notation plugin lets you render ABC music notation directly from code blocks using the music-abc language tag. Powered by the abcjs library, it supports full-feature music rendering, including multiple voices, chords, clefs, and custom tablatures. You can also pass rendering options via an inline JSON configuration at the top of the code block, allowing for fine-tuned control over how the music is displayed. If the configuration has errors, the plugin provides clear visual feedback so you can easily fix issues. It's ideal for musicians, educators, or composers looking to embed musical scores directly into their notes without needing external tools.

Reviews

No reviews yet.

Stats

246
stars
28,208
downloads
26
forks
1,993
days
42
days
47
days
21
total PRs
0
open PRs
5
closed PRs
16
merged PRs
46
total issues
19
open issues
27
closed issues
4
commits

README file from

Github

Obsidian ABC.JS plugin

Obsidian plugin which renders ABC music notation from code blocks using the abc language specifier.

Under the hood it uses abcjs library and supports all the features that abcjs provides.

Examples

Simple song

Example music sheet

```abc
X:1
T:The Legacy Jig
M:6/8
L:1/8
R:jig
K:G
GFG BAB | gfg gab | GFG BAB | d2A AFD |
GFG BAB | gfg gab | age edB |1 dBA AFD :|2 dBA ABd |:
efe edB | dBA ABd | efe edB | gdB ABd |
efe edB | d2d def | gfe edB |1 dBA ABd :|2 dBA AFD |]
```

Chorus music

```abc
X: 1
T: Chorus
V: T1 clef=treble name="Soprano"
V: T2 clef=treble name="Alto"
V: B1 clef=bass name="Tenor"
V: B2 clef=bass name="Bass"
L:1/8
K:G
P:First Part
[V: T1]"C"ed"Am"ed "F"cd"G7"gf |
[V: T2]GGAA- A2BB |
[V: B1]C3D- DF,3 |
[V: B2]C,2A,,2 F,,2G,,2 |
```

Custom options

You can pass custom options to the renderAbc function by adding a JSON string at the top of the code block followed by ---. Note that there may not be any whitespaces before or after the JSON.

Custom options example music sheet with tablatures

```abc
{
  "tablature": [{"instrument": "violin"}]
}
---
X:1
T: Cooley's
M: 4/4
L: 1/8
R: reel
K: G
|:D2|EB{c}BA B2 EB|~B2 AB dBAG|FDAD BDAD|FDAD dAFD|
```

Add Swing to your 4/4 Tunes

{"swing": 70}
---
X:1
T:It Don't Mean A Thing
M:4/4 
L:1/8 
K:_B
V:Guitar clef=treble 
V:Bass clef=bass 
V:Drums clef=perc
[V:Guitar] 
%%MIDI program 24
G2 z2 G2 _B2|d2 z2 z2 z2| _d_d z2 c2 _b,2| G4 z4 |G2 z2 G2 _B2|d2 z2 z2 z2| _d_d _d_d c2 _b,2| G4 z4 | G,_B, d,g, _g,_b, dg|f_b d'g' e'2 z2 z_d|c_d c_d c_B | E2 z4|
[V:Bass] 
%%MIDI program 32
G,,4 _G,,4|F,,4 E,,4|_E,,4 D,,4|G,,4 z4 |G,,4 _G,,2 zE,,|F,,4 E,,4|_E,,4 D,,4|G,,4 z4 |G,,4 _G,,4|F,,4 E,,4|_E,,4 D,,4|:G,,2 _G,,2 F,,2 E,,F,, |_G,,2 F,,2 E,,2 D,,2|_E,,2 _E,2 ^F,,2 A,,,^F,,|G,,4 z4:|
[V:Drums] 
%%MIDI channel 10
B,,2 B,,B,, B,,2 B,,B,,|B,,2 B,,B,, B,,2 B,,B,,|B,,2 B,,B,, B,,2 B,,B,,|B,,2 B,,B,, B,,2 B,,B,,|B,,2 B,,B,, B,,2 B,,B,,|B,,2 B,,B,, B,,2 B,,B,,|B,,2 B,,B,, B,,2 B,,B,,|^D,^D,^D,^D,^D,^D,^D,^D,:| ^D,2  ^D,^D,  ^D,2  ^D,^D,| ^D,4

When the JSON is invalid, the plugin will still try to render the music block but shows a big red banner at the top with the error so you can't miss it.

For a full reference of all options you can use, have a look at the official abcjs documentation.

Maintenance & Contributions

The plugin is maintained by the abcjs-music organization of volunteers, including Til Blechschmidt, the original author. If you have any feedback, please feel free to open an issue. If you know your way around source code, please consider making a pull request. All contributions are welcome.

Development

  • clone the repository
  • npm i to install all the dependencies
  • npm run build to compile
  • copy main.js, manifest.json, and styles.css into your plugin directory (.obsidian/plugins/<plugin-name>)

License

Copyright (C) 2025 ABCJS Organization https://github.com/abcjs-music

Similar Plugins

info
• Similar plugins are suggested based on the common tags between the plugins.
Obsidian Columns
4 years ago by Trevor Nichols
Advanced Codeblock
4 years ago by Lijyze
An obsidian plugin that give additional features to code blocks.
Numerals
3 years ago by RyanC
An obsidian plugin which turns a math code block into a full featured calculator
ProgressBar
3 years ago by Wei Zhang
Code block plugin for Obsidian generating a progress bar
Vextab
3 years ago by Luis Guzman
Codeblock Customizer
3 years ago by mugiwara
Codeblock Customizer plugin for Obsidian
HK Code Block
3 years ago by Heekang Park
Obsidian plugin developed by Heekang Park; Make code block looking good on reading view
Lilypond
3 years ago by DOT-ASTERISK
Lilypond for Obsidian
Code Styler
3 years ago by Mayuran Visakan
A plugin for Obsidian.md for styling codeblocks and inline code
CodeBlock Tabs
3 years ago by Jemin Mau
Create tab group for contiguous codeblocks.
MLIR Syntax Highlight
3 years ago by Lewuathe
Codeblock Template
3 years ago by Super10
A template plugin that allows for the reuse of content within Code Blocks!一个可以把Code Block的内容重复利用模板插件!
Todo.txt Codeblocks
3 years ago by Benjamin Nguyen
Manage your tasks inside Obsidian codeblocks according to the Todo.txt specification.
CSV Codeblock
3 years ago by elrindir
Plugin for obsidian to render csv syntax in codeblocks.
Minitabs
2 years ago by ssjy1919
Obsidian tabs
Embedded Code Title
5 years ago by tadashi-aikawa
It is an Obsidian plugin which can embeds title to code blocks.
Scales and Chords
5 years ago by egradman
Verovio Music Renderer
2 years ago by Kornelius Paede
This is a plugin for Obsidian that renders, plays and edits musical notation in the formats MEI, abc, MusicXMLand PAE.
Collapsible Code Blocks
a year ago by Bradley Wyatt
Obsidian Plugin that makes code blocks collapsible in reading and edit view as well as enabling scroll-able code blocks.
Command Line
a year ago by Steven Stallion
Copy command lines from your notes to the clipboard.
YAML Table
a year ago by dainakai
Replace Pencil
10 months ago by penyt
🐧 An obsidian plugin that can easily replace the custom variable in the code block.
Code Blocks commands
8 months ago by dragonish
Provide commands to insert code blocks with markup, and support triggering commands with backticks.