New Hampshire Country Dance Fiddle Tunes Website

Fiddle Tunes in abc & Standard Notation

The Header Page

This page has the Document Header code which should go at the beginning of any abc document created from the tunes on this website. It's easy to use; instructions are below.


On This Page

The purpose of this page is to help you to copy abc code for a tune and display it on a screen or print it out, preserving the formatting so it looks like the tunes in the PDF documents on this web site.

Important Note #1: There is some explanatory material on this page. You can probably skip the first part and still use the header, but if you read it you'll know better what you're doing and why.

Important Note #2: If you don’t know much about how abc notation works, you might find this material easier to understand if you read the Introduction to abc Notation page. It explains the workings of the different parts of the abc document, and provides links to web sites with further information.

  • The Document File Header for All Tunes on This Website. This tab contains the Header code used to format all the tunes on this website. To use it, paste it at the beginning of an abc document.
  • Structure of an abc Document: Quick Review. As it says, a quick review of how an abc document is set up..
  • How to Copy a Tune and Preserve Formatting. This tab goes through the practical details of setting up an abc document from material on this website and keeping the formatting intact.
Use the Tunes by Type menu above to go to the Tune Set of Interest

Questions about abc notation, working with the code, and how to use it? Check out the

Introduction to abc Notation

Downloads Page (with links to all Tune Pages)

The Document File Header for All Tunes on This Website

You might find it useful to read the other tabs on this page if you have any questions about the document header.

To Use: Copy everything in this tab below the horizontal line and paste it at the beginning of an abc document.

Important: Text may appear to be cut off or poorly formatted on small/medium sized screens but it will look fine after being pasted into an abc document.

%abc-2.2                                   % Interpret abc code using abc standard version 2.2
I:abc-charset utf-8
% File Header (including top two lines).    This includes information to be used
%                                           in all the tunes (fonts, spacing, etc.)
% Note: If you take the abc code for a tune and omit this Header, many things will look
% very different.
% A single percent sign makes everything after it a comment, not used by the software.
% Two percent signs causes what's after it to be a parameter description.
% The following defines the fonts to be used in these tunes.
%%font            Palatino-Roman
%%font            Palatino-Bold
%%font            Palatino-Italic
%%font            Palatino-BoldItalic
%%font            Courier
%%font            AppleSymbols
% Here we say how much space to use and other related stuff 
%%pageheight     10.93in                   % Page height defined for abc2svg
%%footer "$P"                              % Page number
%%shiftunison 0                            % One note head for unison drones
%%topmargin     .2in                       % Space at top of page
%%topspace      .2in                       % Space above tune
%%composerspace 0.2cm
%%musicspace     .2cm
%%staffsep        50                       % Separation between staffs
%%maxstaffsep     50                       % (minimum, maximum space allowed)
%%pagescale        1.0                     % Scales the page
%%stretchlast      0.25                    % Is the last staff a full or partial line
% Now we define which fonts are used for title, composer, chords, etc.
%%pango           0                        % Disables Pango (font utility); incompatibilities
%%titlefont       Palatino-Bold 20         % Font of title
%%subtitlefont    Palatino-Italic 16       % Font of second title
%%composerfont    Palatino-Italic 14       % As it says
%%tempofont       Palatino-Roman 14        % As it says
%%gchordfont      Palatino-Bold 14         % Chord font
%%historyfont     Palatino-Roman 16        % History (H:); also S:, N: & Z:
%%partsfont       Palatino-Bold 14         % Parts font (e.g. to label
%%partsbox 1                               %    A, B & C parts of a tune)
%%annotationfont  Palatino-Roman 14        % For annotations within the staff
%%textfont        Palatino-Roman 16        % For lines of text 
%%infofont        Palatino-Bold 16         % For info fields (e.g. T:, C:, I:)
                                           %    See abc standard 2.2, sec. 11.4.6
%%setfont-1       Palatino-Bold 16         % Allows changing font within a
%%setfont-2       Palatino-Italic 16       %    string. $1, $2 to change, $0 to
%%setfont-3       Palatino-Italic 20       %    change back to the default
%%setfont-4       Courier 16
% Adds page numbers, defines labels to be used and which fields will print
% %%oneperpage      true                    % One tune per page; false = more than one
%%infoname        S "$2Source: $0"          % Defines what label is 
%%infoname        H "$2Tune Notes: $0"           % used for each field
% %%writefields     P false                 % (Causes parts information not to print) 
%%writefields     HQS                       % Which fields to print
%%pdfmark         1                         % Adds marker for each tune to create tune list

Structure of an abc Document: Quick Review

In transcribing a tune we are concerned with two types of information: the actual tune (melody, chords, etc.), and how we want the resulting musical notation to look. This corresponds to the two parts of a tune in abc notation.

The Tune Body contains code for the music, and the Tune Header describes important qualities of the tune (title, composer, meter, key, etc.). From this the abc reader software can generate standard musical notation for the tune, and it can play the tune. But the notation may not look like you want it to look. The fonts might not seem right, the margins may not be as you want, etc.

This is where the File Headers come in. File headers contain formatting commands to specify aspects of the appearance of the tune notation: font and font size for the title, composer, chords and more. They may specify the size of the noteheads, space between staffs, margins, and nearly everything else you might want to format.

  • The Document File Header comes at the beginning of an abc document, and controls formatting for all abc tunes in the document. The Document File Header comes right before a tune, and contains formatting instructions for that tune only.

Here’s where we run into problems. Both the Document and Tune File Headers are part of an abc document but not part of any tune. These days one of the easiest ways to find a tune transcription is to use one of the abc search web sites (e.g. JC's ABC Tune Finder or the search page of The abc Home Page). But they only find the Tune Header and Tune Body. Because they aren’t part of any specific tune, the File Headers get lost. In addition to important formatting commands, these headers often contain information necessary for the tune to be processed correctly (e.g. abc version number, user-defined symbols).

  • For this reason I include any Tune File Headers inside the tune even though that’s not normal practice. But Document File Headers still get left out. Therefore I include the Document File Header below, along with instructions on how to use it; and I include a link to this page inside every tune.

How to Copy a Tune and Preserve Formatting

It's pretty easy. The Document File Header is reproduced in the next tab. To copy a tune, do the following. I'll assume you're using EasyABC on a Mac, but the steps will be very similar for most modern abc software on a Mac or Windows computer.

  • Copy the tune(s) you are interested in using.
    • Select the text from one of the Tune Category pages or from the abc Code Database, then from the Edit menu choose Copy.
  • In EasyABC, create a new blank document (File ➛ New).
  • Click in the ABC Code section of the document, and hit the Return key a couple times to create blank lines.
  • Now paste the tune you copied before (Edit ➛ Paste).
  • The File Header is reproduced in the next tab. Copy it, starting with the first percentage sign, and then paste it into one of the blank lines at the top of your abc file.
  • EasyABC for the Mac doesn't assign the file extension, so when you save a tune be sure to add ".abc" at the end of your file name.

That's it — you're done!

If you're planning on using a web-based application, you might find it easiest to create your abc document first and then paste the code into the appropriate place.

  • In that case create a plain text document and paste the abc code into it. Save it with an ".abc" extension; you'll probably have to change the extension manually. Don't worry if your computer complains about that.
  • On a Mac use TextEdit and choose Format ➛ Make Plain Text.
  • On a PC move the mouse pointer over an unused spot on your desktop, press the right mouse button, and in the contextual menu that appears choose New ➛ Text Document.