Home » ABC tutorial for PocketPipes

ABC tutorial for PocketPipes

Page under construction (about 70% completion)

Here is a guide, based on file examples, to understand the general ABC notation, and how PocketPipes applies the notation to bagpipe tunes.

The header

Usual command lines at the beginning of the file, before the lines containing the music notes.

Respect this order

C:TextComposer (optional)
R:TextRhythm (optional)

Key for Bagpipe tunes with C# and F#
PocketPipes supports alternate keys (HP, Hp-Ab, Hp-Db,Eb,Ab,Db)

The meter value (mandatory) – May change within a tune
Defines the default note length if there is no L: line
If x/y < 0.75 the default note length is 1/16th else 1/8th

n is the numerical value of the beat (mandatory)
Relative to the default note
May change within a tune
To specify the default note length (optional) otherwise the default note length comes from M: line


% …….General comment line for ABC
%{ Text }Displayed comment ( it appears on the pdf score)
%! ……….Special lines for PocketPipes ABC extensions, does’nt interfear with standard ABC syntax

Keys & Notes

Keys (the K: command)

HP or Hp scale for bagpipes tunes, the most common

Hp-Ab scale with C natural

Hp-Db scale with C natural and D natural

Eb, Ab,Db scales (breton notation)


To obtain c or f natural without using the special keys above, ABC allows to force a note to natural with the = sign just before, as shown here

Notes and multipliers

The notes are defined by the Hp scale. To obtain the whole range (whole note to 1/64 th note) the standard uses multipliers.

For instance if the 1/8 note is the default note, c2 represents a c quater note, c8 a c whole note. The multiplier is just after the letter that identifies the note.

This example shows the different multipliers.

Two double dotted notes length are allowed. Triple dotted notes length are not supported.

Reminder: dotted note (note length x 1.5) and double dotted (note length x 1.75)


The notes are displayed on the staves.

Usually a new line in the file corresponds to a new staff in ABC format. However if you use non standard extensions (non standard repeats, highlighting …), they appear on new lines with %! heading. So in this case simply use the ! character to identify the end of a staff.

Meters – Time signatures – Bars

The M:x/y command gives the time signature x/y. It specifies:

  • the duration of the bars (aka measures) -> x notes of 1/y length
  • the implicit default note length of the score. The rule fixed by the ABC standard is: If x/y < 0.75 the default note is 1/16th else 1/8th. Most of meters have 1/8th note for default note length. So keep in mind that the default note length is often different of 1/y length. If you want or need to specify another default note length you have to add a L: 1/y command line.

New M: commands may appear during the musical flow.

Usual simple meters

Usual compound meters


The beat of the tune is in relation with the bar.

Simple time signatures

The beat is given for the 1/y note with M:x/y meter. For instance 1/4 note with a 3/4 signature.

The value n of the beat is given by Q:n

Compound time signatures

For 6/8, 9/8 or 12/8 meters (ternary beats) the beat is relative to the dotted quarter note.

For 6/16, 9/16 or 12/16 meters (ternary beats) the beat is relative to the dotted 1/8 note.

The value of the beat is n/3, given by Q:n. This is due to the fact that n is the « beat for the 1/8 or 1/16 note ».

Defining a specific note for the beat

If you want to set the beat to a specific note, the Q: command can take other forms:

Q:1/2=n, or Q:1/4=n or Q:1/8=n or Q:1/16=n, that set the reference note for the beat and the value of the beat

Repeats and endings

ABC standard repeats using repeat bars and [1 [2 or |1 |2

Non standard ABC repeat – PocketPipes extension (2 of 2 repeat)


Note equivalent rests and multi-measure rests

Beams and ties


From Wickipedia « a beam is a horizontal or diagonal line used to connect multiple consecutive notes to indicate rhythmic grouping »

Only notes shorter than 1/4 note can be beamed.

PocketPipes draws diagonal beams. Any bar line breaks the beam. To indicate beamed notes just group them ie cd/2e/2 . A space breaks the beam. A secondary or third beam may exist depending on the length of the notes. If the lengths differ, beams are interrupted.


Bagpipe notes are implicitly tied, due to the constant blowing. Grace notes and embellishment act as separators. However in some cases tying has to be explicit:

  • To play long note
  • To indicate clearly that a note spans beyond a bar line

In these cases tying applies to the same note. The character « – » is used to tie notes ie « c-c » (simple example)


A tuplet is a group of notes that is played with a different time subdivision than expected from the current time signature. PocketPipes interprets 3 different tuplets, displaying a bow over the group with a number:

  • duplet: Two notes in the time of three – Binary rhythm inside ternary beat « (2 »
  • triplet: Three notes in the time of two – Ternary rhythm inside binary beat « (3 »
  • quadruplet: Four notes in the time of three – Binary rhythm inside ternary beat « (4 »

Grace notes and embellishments

To add simple or complex embellishments the syntax is: « { ..Note_list..} » just before the note in all cases.

Few examples:

Simple grace notes

Broken rhythms

Specific extensions