Frequently asked questions

What is Barmark?

Barmark is a plain-text notation for chord charts: the bar grid musicians already write on whiteboards and in notes apps (| D | A | Bm | G |), with rules precise enough that software reads a chart the same way a band does. A chart says which chords sound in which bars, in which sections, in what key, meter and tempo, and in what order the song plays.

It is also eleven npm packages: barmark reads and writes charts, @barmark/render draws them as a clean bar grid on any web page, @barmark/score shows the same chart as a full score beside the grid, @barmark/engraver is a smaller build of the Verovio that engraves it, @barmark/musicxml converts them to and from MusicXML, @barmark/midi plays them as MIDI files and reads MIDI files back, @barmark/sync builds a chart from a recording's detected chords and says when each bar plays, @barmark/listen finds the bars in a recording itself or reads them from a beat tracker's beats, @barmark/fretboard finds the guitar chord shapes the renderer draws, @barmark/lyricsheet writes a chart as a ChordPro lyric sheet, and @barmark/cli does the rest from the terminal.

What does a chart look like?

Like this. Sections start with ##, a repeat sign plays a line twice, and two chords in a bar split it in half:

key: D, time: 4/4

## Verse
|: D | A | Bm | G :|

## Chorus
| G D | A | Bm A | G |

The Syntax Guide shows every rule with an example, and Try It reads whatever you type.

What is Stem Shovel?

Stem Shovel is an open-source, web-based collaboration tool for musicians, songwriters, bands and producers. Its chart reader lines up a band's chord chart with the recording, so it can find each section in the audio. Barmark is that reader's rules, written down and published on their own, and @barmark/sync is the part that ties a chart to the recording.

Who is behind Barmark?

Barmark is made by Lightning Jar, a small web studio founded in 2002, and led by its principal, Kevin Peckham, who also built Stem Shovel. Introducing Barmark tells why we built it.

How is Barmark different from other chord notations?

Most chord notations hang chords on lyrics, or live inside one app. Barmark is anchored to bars, and it is plain text.

  • ChordPro is the established format for lyrics with chords, and the right choice for a songbook. It places chords over words; Barmark places them in bars, so it can say how long each one lasts.
  • iReal Pro is the best-known digital bar grid, but its charts live in its app. A Barmark chart is a text file you can keep, diff and share anywhere.
  • ChartDown writes charts in Nashville numbers. It is a neighbor rather than a rival: Barmark writes chord names, and its renderer can show them as numbers.
  • Harte labels are the academic standard for naming chords in music research. Barmark converts every chord to and from a Harte label, so its output fits that work.

And unlike the informal charts it grew from, Barmark settles the ambiguous cases. An empty bar, the reach of x2 at the end of a line, and a slash inside a bar each have one meaning.

What is Barmark a good fit for?

  • Bands and session players who want charts everyone reads the same way, kept in plain files that last.
  • Music apps that store, transpose, display or play back chord progressions, and want a format that is easy for people to write and exact for code to read.
  • Websites, blogs and docs that show chord charts: one element, no image to export, readable by screen readers.
  • Practice and teaching tools that switch a chart between chord names, Nashville numbers and Roman numerals.
  • Readers who read staff notation more easily than a chord grid: <barmark-score> switches the same chart to a score.
  • Music research and audio tools that align chords with recordings, where every bar has to be accounted for: @barmark/sync writes the chart and the bar times.

What isn't it for?

Barmark is a chord chart first: it says which chords sound in which bars. A chart can also carry a singer's melody, its lyrics and several parts, and the score view draws them, but it is not a format for engraving an arrangement note for note with every marking; that is the job of standard notation programs and formats such as MusicXML. For lyrics with chords above the words, ChordPro is the better fit.

Is Barmark open source?

Yes. The code is MIT-licensed (LICENSE) and on GitHub, and the packages are free on npm. The grammar is licensed under CC BY 4.0 (licence): anyone may copy it, adapt it or write their own reader for it, as long as they credit it. The Syntax Guide is licensed the same way.

Is the notation finished?

Not yet. The grammar is a v0.1 draft, and the packages are at 0.x, so a minor release can still change the notation or the API. Every change is recorded in the packages' changelogs.

Can I check my charts without writing code?

Yes. With Node installed, npx @barmark/cli check songs reads every chart in a folder and names each problem by file and line, and format --write puts them in standard form. Run in GitHub Actions, it fails a pull request that breaks a chart and marks the line; kevinpeckham/songs works this way. There are also standalone binaries that need no Node. Get Started shows the commands.

Can I write Nashville numbers or Roman numerals?

You write chord names, and the renderer can show them as numbers. Set numerals="nashville" or numerals="roman" on the chart and each chord appears as its degree in the key: Bm in D is 6m, or vi. The home page's chart has a switch for it.

Can it show guitar chord diagrams?

Yes. Set chord-diagrams="guitar" on the chart and the renderer draws a strip of guitar chord diagrams under the title, above the first section: one for each distinct chord, in the order the chart first writes them. diagram-hand="left" mirrors them for a left hand, and from the terminal npx @barmark/cli render song.chart.md --diagrams guitar draws the same strip. The home page's chart has a switch for it, and Try It draws the diagram for any chord you type.

The shapes come from @barmark/fretboard, in standard tuning. A voicing the chart writes, such as Am7{G3 C4 E4}, is drawn exactly as written when it fits the guitar; when it doesn't, the diagram shows the chord's own shape and says so. A chord no hand can play in standard tuning says that instead of a drawing.

Can a chart hold lyrics?

Yes. Any line that isn't bars, a heading or a directive is text, so lyrics, cues and notes go on lines of their own between the rows of bars, and the renderer shows them there. To put words on the beats, a lyrics: row under a bar line places each syllable in its bar, and a melody line can carry a syllable on each note. The Syntax Guide shows both, and the score view draws them under the staff.

Can Barmark show a chart as sheet music?

Yes. @barmark/score draws a chart as a full score: chord symbols over rhythm slashes, a singer's melody and its lyrics as notes, each part on a staff of its own (a piano on two), with the chart's sections, repeats, endings, key, meter and tempo. Its <barmark-score> element shows the bar grid with a Grid / Score switch above it; the home page's chart and Try It have one. From the terminal, npx @barmark/cli render --score song.chart.md --out song.html writes the score as a page to open in a browser and print to PDF.

The score adds no music of its own. A chart of chord names stays chord names over slashes: no voicing is guessed, because on a page a guessed voicing would read as the arrangement.

Why is the score view a separate package?

Size. The engraver behind the score is megabytes (the smaller build this site serves is under half the download of stock Verovio), and most pages that show a chart need only the grid. So <barmark-chart> stays as light as it was, with no score code, and <barmark-score> loads the engraver only the first time a reader presses Score, in a background worker so the page doesn't freeze. A reader who stays on the grid never downloads it, and one copy serves every score on a page.

What engraves the score?

Verovio, an open-source music engraver, licensed under the LGPL-3.0. @barmark/score uses it as an ordinary npm dependency, and this site loads a smaller build of the same Verovio made by Barmark, @barmark/engraver (its notice, its source), which draws the same score in under half the download. None of Verovio's code is copied into Barmark's packages, which stay MIT. The CLI's standalone binaries carry Verovio unmodified, with its licence in the release.

Does the score match Dorico or MuseScore?

It is drawn from the same file they open. The score is engraved from the MusicXML that @barmark/musicxml exports, the file barmark export --musicxml writes, so Dorico, MuseScore or Sibelius read the same notes, chords, parts and structure. How the page is laid out, its line breaks, spacing and fonts, is each program's own.

How do you know it reads charts correctly?

The rules come from software that already worked: Stem Shovel's chart reader, checked against real recordings with the band's own section markings as the answer key. The parser's tests include real charts exactly as a band wrote them, every example in the grammar, and randomly generated charts that must print and read back with the same meaning.

How do I report a problem or suggest a change?

Open an issue on GitHub: a chart that reads wrongly, a rule that is unclear, or notation you need that Barmark lacks.