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:
- Use the name printed on the sheet music, without brackets.
- If a tune with the same name is already in the app, call yours
<Name> (version 2)(or 3, 4, …). All versions of a tune share one page, with a tab for each; aB:line (the book it's from) labels your tab. If you learnt it from a player instead, a%%version Bob Evansline in the header puts their name on the tab. A new version goes after the ones already there; if yours should be the one the page opens on, say so in the pull request. - Tempo lines (
Q:) are ignored: the app's tempo slider decides. If the composer gives a tempo, put it in a%%bpm 114line in the header to make it the starting tempo. - If the music is written in notes twice as long as usual (a polca in 2/4 that's mostly crotchets, felt as two minims to the bar, not two crotchets), add a
%%beat 1/2line to the header, so it starts at the right speed.
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-nogVerses 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
- Sign in to GitHub and open the Y Sesiwn repository.
- Click Add file → Create new file. GitHub will offer to make your own copy (a fork) first; accept.
- In the file name box, type the full path, e.g.
tunes/codi-r-hwyl/tune.abc. Typing/creates the folders. - Paste your ABC into the editor.
- 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…