Johan Vromans > App-Music-PlayTab > App::Music::PlayTab



Annotate this POD

View/Report Bugs
Module Version: 2.025   Source  


App::Music::PlayTab - Print chords of songs in a tabular fashion.



playtab [options] [file ...]

   --transpose +/-N     transpose all songs
   --output XXX         set outout file
   --lilypond N         accept chords in LilyPond syntax, N = bpm
   --syntax             print chord syntax
   --ident              show identification
   --help               brief help message
   --verbose            verbose information


 use App::Music::PlayTab;
 run();                 # arguments in @ARGV
 run(@args);            # explicit arguments

 perl -MApp::Music::PlayTab -e run ...arguments...


This utility program is intended for musicians. It produces tabular chord diagrams that are very handy for playing rhythm guitar or bass in jazz, blues, and popular music.

I wrote it since in official (and unofficial) sheet music, I find it often hard to stick to the structure of the piece. Also, as a guitar player, I do not need all the detailed notes and such that are only important for melody instruments. And usually I cannot turn over the pages while playing.

For more info and examples, see .

playtab is just a trivial wrapper around the App::Music::PlayTab module.


--transpose amount

Transposes all songs by amount. This can be + or - 11 semitones.

When transposing up, chords will be represented sharp if necessary; when transposing down, chords will be represented flat if necessary. For example, chord A transposed +1 will become A-sharp, but when transposed -11 it will become B-flat.

--output file

Designates file as the output file for the program.


Interpet chord names according to LilyPond syntax.


Print a brief help message and exits.


Prints program identification.


More verbose information.


Input file(s).


The input for playtab is plain ASCII. It contains the chords, the division in bars, with optional annotations.

An example:

    !t Blue Bossa

    | c-9 ... | f-9 ... | d% . g7 . | c-9 ... |
    | es-9 . as6 . | desmaj7 ... | d% . g7 . | c-9 . d% g7 |

The first line, '!t' denotes the title of the song. Each song must start with a title line.

The title line may be followed by one or more '!s', subtitles, for example to indicate the composer.

The text "Bossanova" is printed below the title and subtitle.

The "=" indicates some vertical space. Likewise, you can use '-' and '+' as '=', but with a different vertical spacing.

The next lines show the bars of the song. In the first bar is the c-9 chord (Cminor9), followed by three dots. The dots indicate that this chord is repeated for all 4 beats of this bar. In the 3rd bar each chord take two beats: d5% (d half dim), a dot, g7 and another dot.

Run playtab with -h or --help for the syntax of chords.

If you use "=" followed by some text, the printout is indented and the text sticks out to the left. With this you can tag groups of bars, for example the parts of a song that must be played in a certain order. For example:

    !t Donna Lee
    !s Charlie Parker

    Order: A B A B

    = A
    | as . | f7 . | bes7 . | bes7 . |
    | bes-7 . | es7 . | as . | es-7 D7 |
    | des . | des-7 . | as . | f7 . |
    | bes7 . | bes7 . | bes-7 . | es7 . |

    = B
    | as . | f7 . | bes7 . | bes7 . |
    | c7 . | c7 . | f- . | c7#9 . |
    | f- . | c7 . | f- . | aso . |
    | as f7 | bes-7 es7 | as - | bes-7 es7 |

To see how this looks, see .

You can modify the width of the bars with a '!w' control. Standard width of a beat is 30. '!w +5' increases the width to 35. '!w 25' sets it to 25. You get the idea. You can also change the height with '!h' (default is 15) and margin with '!m' (default width is 40).

You can transpose an individual song with '!x amount', where amount can range from -11 to +11, inclusive. A positive transpose value will make sharps, a negative value will make flats.

'!n' enables bar numbering. '!n 0' disables numbering, '!n n' starts numbering at n. n may be negative, e.g., to skip numbering an intro.

'!ly' or '!lilypond' enables LilyPond chord name recognition. If followed by a '0', switches to classical chord name syntax.

Look at the examples, that is (currently) the best way to get grip on what the program does.

Oh, I almost forgot: it can print guitar chord diagrams as well. See "bluebossa", "sophisticatedlady" and some others.

Have fun, and let me know your ideas!


  Notes: C, D, E, F, G, A, B.
  Raised with '#' or suffix 'is', e.g. A#, Ais.
  Lowered with 'b' or suffix 's' or 'es', e.g. Bes, As, Eb.

  Chords: note + optional modifiers.
  Chord modifiers Meaning                 [examples]
  nothing         major triad             [C]
  - or min or m   minor triad             [Cm Fmin Gb-]
  + or aug        augmented triad         [Caug B+]
  o or 0 or dim   diminished triad        [Co D0 Fdim]
  maj7            major 7th chord         [Cmaj7]
  %               half-diminished 7 chord [C%]
  6,7,9,11,13     chord additions         [C69]
  sus sus4, sus2  suspended 4th, 2nd      [Csus]
  #               raise the pitch of the note to a sharp [C11#9]
  b               lower the pitch of the note to a flat [C11b9]
  no              substract a note from a chord [C9no11]
  _ may be used to avoid ambiguity, e.g. C_#9 <-> C#9 <-> C#_9

  Other:          Meaning
  .               Chord space
  -               Rest
  :               Repeats previous chord
  %               Repeat
  /               Powerchord constructor   [D/G D/E-]


  Notes: c, d, e, f, g, a, b.
  Raised with suffix 'is', e.g. ais.
  Lowered with suffix 'es', e.g. bes, ees.

  Chords: note + optional duration + optional modifiers.

  Duration = 1, 2, 4, 8, with possible dots, e.g., "2.".
  No duration means: use the duration of the previous chord.

  Modifiers are preceeded with a ":".

  Modifiers       Meaning                 [examples]
  nothing         major triad             c4
  m               minor triad             c4:m
  aug             augmented triad         c4:aug
  dim             diminished triad        c4:dim
  maj             major 7th chord         c4:maj
  6,7,9,11,13     chord additions         c4:7  c4:6.9 (dot required)
  sus sus4, sus2  suspended 4th, 2nd      c4:sus
  +               raise the pitch of an added note   c4:11.9+
  -               lower the pitch of an added note   c4:11.9-
  ^               substract a note from a chord      c4:9.^11

  Other:          Meaning
  r               Rest                    r2
  s               Rest                    s4
  /               Powerchord constructor  d/g   d/e:m

See also:



Johan Vromans, Squirrel Consultancy <>


This program is Copyright 1990,2013 by Johan Vromans.

This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself.

syntax highlighting: