How to add a tune

Every tune in Y Sesiwn is a single text file in ABC notation: tunes/<folder>/tune.abc in the GitHub repository. The sheet music, playback and key changes are all made from that file. To add a tune, you write its ABC file and propose it with a pull request. Once it's accepted, the app updates by itself.

Not on GitHub, or don't know ABC? Use the form on the website's version of this page instead: it sends the tune (or a photo or recording of it) to us by email.

1. Write the tune in ABC

Here is a complete example:

X:1
T:Llancesau Trefaldwyn
R:jig
M:6/8
L:1/8
K:D
AG |: F2 F GFG | AFD DFA | B2 c dcB | ABG FGE |
F2 F GFG | AFD DFA | Bgf edc |1 d3 dAG :|
[2 d3 dcd || e2 c Ace | f2 d Adf | gfe fed |
ecA Acd | e2 c Ace | f2 d Adf | efd cdB
|: ABG FGE | F2 F GFG | AFD DFA |1 B2 c dcB :|
[2 Bgf edc || d3 d |]

The lines at the top are the header:

| Line | Needed? | What it is | |---|---|---| | X:1 | yes | Always X:1. | | T: | yes | The title, as printed on the sheet music. | | R: | recommended | Tune type, e.g. jig (6/8), jig naid (slip jig, 9/8), rîl, polca, walts, pibddawns. It sets the default tempo: jigs 112, reels 90, polcas 100, airs and songs (alaw, cân) slow at crotchet 66, anything else 100 bpm. | | M: | yes | Time signature, e.g. 6/8, 4/4, 3/4. | | L: | yes | Default note length, usually 1/8. | | K: | yes, last | Key, e.g. D, Em, ADor. The notes start on the next line. | | C: | optional | Composer or arranger. | | more T: lines | optional | Other names for the tune; they're searchable too. | | B:, N:, O:, S: | optional | Book, notes, place of origin, source. Shown under Details. |

About titles:

Chords are optional. Put each one in double quotes just before the note it starts on ("G"B2 G GFG | "D7"A2 A ABc |), and say where they come from in a %%chords line in the header, e.g. %%chords From the Alawon Cymru score. The tune's page shows them as a chart for accompanists, in whichever key is chosen.

A song can have its words. Put the first verse under the notes with a w: line after each line of music, a hyphen between the syllables of a word, _ to hold a syllable over the next note and * to skip a note; another w: line under the same music is another verse:

D D3 D2 A A | G2 F F E2 D2 |
w: Dac-w nghar-iad i lawr yn y ber-llan,
w: Dac-w'r dder-wen _ wych gang-* hen-nog

Verses that are easier to read on their own go after the music, a W: line each, as in tunes/pontypridd/tune.abc. Only add words that are traditional, by a writer who died more than 70 years ago, or that you have permission to share.

If you're new to ABC, the ABC notation primer explains the notes and bar lines.

2. Check that it looks and sounds right

Paste your ABC into the abcjs Quick Editor. It uses the same library as Y Sesiwn, so if the sheet music looks right and plays right there, it will in the app too.

3. Choose the folder name

The folder is named after the title: lowercase, accents removed, and anything that isn't a letter or number turned into a hyphen.

| Title | Folder | |---|---| | Llancesau Trefaldwyn | tunes/llancesau-trefaldwyn/ | | Codi'r Hwyl | tunes/codi-r-hwyl/ | | Tŷ Coch Caerdydd (version 2) | tunes/ty-coch-caerdydd-version-2/ |

4. Open a pull request

  1. Sign in to GitHub and open the Y Sesiwn repository.
  2. Click Add file → Create new file. GitHub will offer to make your own copy (a fork) first; accept.
  3. In the file name box, type the full path, e.g. tunes/codi-r-hwyl/tune.abc. Typing / creates the folders.
  4. Paste your ABC into the editor.
  5. Click Commit changes…, then Propose changes, then Create pull request. Say in the description where the tune comes from.

(Using git instead? See the README.)

What happens next

Your pull request is tested automatically: GitHub checks that every tune (yours included) still draws and plays, and that the site works. If a check fails, the pull request says which one and why.

The maintainer reviews the pull request and may suggest changes. Once it's merged, the live app redeploys and the tune appears in search.

Only tune.abc is needed: no score image or MIDI file.

Loading…