gfl - (Guitar Fingering Labeller)


[ Back HOME ] [ The Program ] [ REAL EXAMPLES ]

What is gfl?

gfl is a program that determines the chords represented by guitar fingerings and formats fingering charts into rows and columns. By reading ASCII based grids that represent the fingerings, it determines the pitches that are used, internally puts them in a canonical form and then does table lookups against known canonical chord types to find matches. It labels the fingering with its best guess as to what the chord name is.

Chord Labelling

As an example of chord labelling, given this row of guitar chords as input:
+-+-+-+-+-+     +-+-+-+-+-+     +-+-+-+-+-+     +-+-+-+-+-+     +-+-+-+-+-+
| | o | | | 2   | o | o | o 2   | | o | o | 6   | | o o o | 5   | | o | o | 4
+-+-+-+-+-+     +-+-+-+-+-+     +-+-+-+-+-+     +-+-+-+-+-+     +-+-+-+-+-+
o | | | o |     | | | | o |     | | | o | |     | | | | | |     | | | o | |
+-+-+-+-+-+     +-+-+-+-+-+     +-+-+-+-+-+     +-+-+-+-+-+     +-+-+-+-+-+
| | | o | |     | | | | | |     | | | | | o     | | | | | o     | | | | | |
+-+-+-+-+-+     +-+-+-+-+-+     +-+-+-+-+-+     +-+-+-+-+-+     +-+-+-+-+-+
| | | | | |     | | | | | |     | | | | | |     | | | | | |     | | | | | o
+-+-+-+-+-+     +-+-+-+-+-+     +-+-+-+-+-+     +-+-+-+-+-+     +-+-+-+-+-+
  x       O     x   x           O x             x O             x O
You can just type:
gfl foo.tab
and trust it to pick the right chord name (which it will most of the time):
    G6              Bm7          E7 +5 b9           Am9           B7 b9/A
+-+-+-+-+-+     +-+-+-+-+-+     +-+-+-+-+-+     +-+-+-+-+-+     +-+-+-+-+-+
| | o | | | 2   | o | o | o 2   | | o | o | 6   | | o o o | 5   | | o | o | 4
+-+-+-+-+-+     +-+-+-+-+-+     +-+-+-+-+-+     +-+-+-+-+-+     +-+-+-+-+-+
o | | | o |     | | | | o |     | | | o | |     | | | | | |     | | | o | |
+-+-+-+-+-+     +-+-+-+-+-+     +-+-+-+-+-+     +-+-+-+-+-+     +-+-+-+-+-+
| | | o | |     | | | | | |     | | | | | o     | | | | | o     | | | | | |
+-+-+-+-+-+     +-+-+-+-+-+     +-+-+-+-+-+     +-+-+-+-+-+     +-+-+-+-+-+
| | | | | |     | | | | | |     | | | | | |     | | | | | |     | | | | | o
+-+-+-+-+-+     +-+-+-+-+-+     +-+-+-+-+-+     +-+-+-+-+-+     +-+-+-+-+-+
  x       O     x   x           O x             x O             x O
If you want to have some say in which names it picks, then you can type:
gfl -a foo.tab
And it will list the chords, one per row, giving the pitches that are used and its guesses for the possible ways to name the chord:
	# pitches: [G(4),-1,E(5),B(5),D(6),E(6)]
	#
	# G6
	# Em7/G
	#
	    G6
	+-+-+-+-+-+
	| | o | | | 2
	+-+-+-+-+-+
	o | | | o |
	+-+-+-+-+-+
	| | | o | |
	+-+-+-+-+-+
	| | | | | |
	+-+-+-+-+-+
	  x       x
You can then uncomment the chord name you want to keep, and rerun gfl with the "keep names" flag:
gfl -k foo.tab

Pretty Printing

A secondary function of this program is to format these guitar chords in rows and columns using the (possibly newly determined) names. For example, you could specify that you only wanted 3 grids per row instead of 5, and the program would reshape the example above like this:
gfl -c 3
    G6                         Bm7                     E7 +5 b9
+-+-+-+-+-+                +-+-+-+-+-+                +-+-+-+-+-+
| | o | | | 2              | o | o | o 2              | | o | o | 6
+-+-+-+-+-+                +-+-+-+-+-+                +-+-+-+-+-+
o | | | o |                | | | | o |                | | | o | |
+-+-+-+-+-+                +-+-+-+-+-+                +-+-+-+-+-+
| | | o | |                | | | | | |                | | | | | o
+-+-+-+-+-+                +-+-+-+-+-+                +-+-+-+-+-+
| | | | | |                | | | | | |                | | | | | |
+-+-+-+-+-+                +-+-+-+-+-+                +-+-+-+-+-+
  x       O                x   x                      O x

    Am9                      B7 b9/A
+-+-+-+-+-+                +-+-+-+-+-+
| | o o o | 5              | | o | o | 4
+-+-+-+-+-+                +-+-+-+-+-+
| | | | | |                | | | o | |
+-+-+-+-+-+                +-+-+-+-+-+
| | | | | o                | | | | | |
+-+-+-+-+-+                +-+-+-+-+-+
| | | | | |                | | | | | o
+-+-+-+-+-+                +-+-+-+-+-+
x O                        x O

This is a handy feature when you want to add or remove a chord. You just add the new chord to the next line or extend that column by one chord and gfl will reshape and readjust it.

The most unusual feature of gfl is that you can specify the tuning. For example, you should be able to do mandolin fingerings like this:

gfl -t 55:62:69:76 foo.tab

This feature hasn't really been tested though.

Usage

Here is the usage message you get when you run gfl with no arguments:

        sunra(jason): gfl
        You must give at least one input filename
        usage: ./gfl [-a] [-c columns] [-k] [-l linewidth] [-r]
                                                [-t tuning] [file1 ...]
        Description:
                -a              analyze
                -c columns      number of chord columns in output
                -k              keep original chord names
                -l linewidth    number of characters per line in output
                -r              reshape (reformat) only
                -t tuning       tuning of instrument

                Note: Tuning is specified by colon separated midi note numbers
                        e.g. standard tuning is "-t 52:57:62:67:71:76"

Rules

There are some rules you must follow in making these chord grids:
  1. Each row of chords must be separated by either 1 or 2 blank lines.
  2. You can put stuff before and after the chord grid section, but there needs to be at least 3 blank lines separating the chord grid section and the stuff that goes after it.
  3. You can put lyrics underneath the grids, but don't extend beyond the width of each grid. Also don't forget the 1 or 2 blank line rule.

Last updated: February 19, 1998
Email me with comments?