Markdown Music
Markdown Music is an editor for .mdm files: Markdown with equations, code and playable scores, drawn as you write. Scores are written in ABC notation inside a ```abc block, so the file stays plain Markdown. To try it, download example.mdm (or read it on GitHub), save it with the .mdm extension and open it in VS Code.

Writing a score
With a caret inside a score's block, the editor shows its ABC in the extension's colours and the score drawn under it, as below; the grey comments say what each line does.
Repeats, ties, lyrics, several voices and the rest of the notation are in the ABC standard. The headphones on a score open a player, whose piano comes with the extension and is the only instrument it has. Under them, a third button writes that score's audio beside the document as MIDI or as WAV: the WAV is the piano you hear, the MIDI the notes at the tempo the editor plays them at, and neither needs anything installed. A block fenced as ```{.abc .play} also gets a player on the exported page.
Writing Markdown

The text is the file, and the editor reads it as the export does: Pandoc's Markdown, with CommonMark's blank lines. Lists, quotes, callouts, tables, footnotes, numbered equations, figures, tables and sections are drawn in place, and a line shows its source while the caret is on it. With a bibliography in the header and Quarto installed, a citation reads as the page prints it, "Knuth (1984)". A pasted picture is saved in a folder beside the document. Ctrl+B and Ctrl+I mark words, Ctrl+1 to Ctrl+6 set a heading's level and Ctrl+F searches.
Score navigation

Score navigation, the first row of the Score menu, freezes the text and gives the keys to the scores: a cursor stands on a staff, and what is written there is written into the score's ABC. The row again gives the text back.
| Keys |
What they do |
← →, ↑ ↓ |
Walk the cursor along its part, and up and down the staff. A click puts it where it is made. |
Ctrl+↑ ↓, Ctrl+Shift+↑ ↓ |
The staff above or below; with nothing selected, the same part a line away. |
1 to 7, 0 |
Write a note where the cursor stands, from a whole note down to a sixty-fourth, or a rest. |
Ctrl or Alt with them |
Put it in before the cursor's note, or after it. |
Enter, Delete, Backspace |
Add a note to a chord, and take one or a rest out; Backspace steps back. |
Shift+← → |
Select in the cursor's part; with Ctrl, in every part. |
Ctrl+Shift+↑ ↓ Space |
With a selection: walk the parts, and leave one out or take it back. |
Ctrl+A, Ctrl+C, Ctrl+X, Ctrl+V, Ctrl+Z |
Select all, copy, cut, paste, undo. |
Space |
Play from the cursor, or the selection alone. |
Ctrl+← → |
Add a bar beside the cursor's, or beside a selection in its parts. |
With the pointer on a score, two arrows at the end of each line send its last bar down or bring the next one up, or drag to any barline, and a + under a barline adds a bar.
One row. The button at its left opens the outline of the headings, and seven words each open a menu. A row of a menu names its key where it has one, and a row that is a switch is ticked while it is on.
- Edit: undo and redo, find and replace, the carets and the lines.
Ctrl+D adds the next match of the selection, whole words only unless Match inside words is ticked. Alt+click adds a caret.
- Format: the marks on words, from bold to a link and inline code.
- Paragraph: the heading levels, the code block, the lists and the quote.
- Insert: an equation, a table, a picture, a footnote, a rule, a music symbol.
- Page: settings shared by every document, except the hyphenation, which each file keeps.
- Theme: follows VS Code by default; MDM Light, MDM Dark and MDM White are the editor's own.
- LaTeX font: Latin Modern Roman, the face of a LaTeX document, which comes with the extension; turned off, the system's sans. Code keeps its monospace.
- Justified text: paragraphs justified, or ragged on the right. The lines break on the same words either way.
- Hyphenation: words stay whole until a language is chosen here. It is written into the YAML header as
lang:, in a new, hidden header if the file had none; the hyphen is only drawn, never saved.
- YAML header: a header with a title, an author or an abstract is drawn as the page's title block, and a click on the block opens its YAML, as a table opens. This row shows the YAML in place of the block, in every document, until it is unticked.
- Score: the music.
- Score navigation (above), and Side panel, on unless you turn it off, which keeps the mode in sight down the right edge while it is on, with both switches at its head, on one of two faces: Buttons, the note lengths and what the keys do as buttons, or Keys, the keys of the mode, to read beside the score as you write.
- Notes, Bars, Move and select: what the keys of Score navigation do, each beside its key.
- Follow the playhead: the page scrolls to keep the sounding system in view while a tune plays; turned off, it stays where you are reading.
- Score fill, Ink staff lines, Scores at the left: a paper, slate or brass ground under the scores, staff lines in ink rather than gray, and scores at the left rather than centred.
- Export: the document, and the audio of its scores (below).
Export
Document writes HTML or PDF with the editor's font, justification and hyphenation, and needs Quarto 1.4 or later. The PDF is the HTML page printed by Chrome, Chromium or Microsoft Edge, so it needs no TeX: its sheets are numbered, its headings are its bookmarks and it is printed on the header's papersize (Letter when none is named), with its notes at the end of the document. Set mdm.pdfEngine to latex to have LaTeX typeset it instead, which needs TeX. Audio writes every score beside the document as MIDI or WAV and needs nothing installed. The editor itself needs none of these.
Documentation and licence
The documentation is in the markdown_music repository. The extension is under the MIT licence, and the third-party work it includes is credited in THIRD-PARTY-NOTICES.md.
| |