By now, you probably know that it is very simple to enter a note in STL e.g.
This is the note on course 2 fret 4.
Frets are always specified in STL by a number where 0 is the open string, 1 is fret 1, 2 is fret 2 etc.
Notes may also have an adornment. This is extra information after the fret e.g.
This is course 3 fret 1 with a T (trill in Sanz’s notation) after it.
Of course, you can also place an adornment without a fret:
This places the T symbol on course 4.
Whilst you can only logically place a fret on a course, you can also place adornments above or below the stave.
A compiler can process an adornment, ignore it, or render it “as is” to the output file. The gaspar Postscript compiler tends to render it “as is”, giving you the ability to put completely arbitrary text on any course.
In many historic tablatures frets are designated by letters. For example, in Sanz’s notation, fret 10 is always designated by an X. This is because placing a 10 on the stave could be confusing e.g. fret 10 on course 2 could be misread as fret 1 on course 2 followed by fret 0 on course 2.
In order to deal with non-numeric fret notation, or numeric notation that designates the open string as 1 rather than 0, STL introduces the concept of fret mapping.
Take a look at the STL example below:
P-1 S-1 T-3 Q 1-1 1-2 1-3 1-4 1-5 1-6 As you might expect, this gives you the following Postscript output:
Now let’s add a fret map to the file:
FRETMAP 1-a 2-b 3-c 4-d 5-e 6-f P-1 S-1 T-3 Q 1-1 1-2 1-3 1-4 1-5 1-6 I think you can guess what this is going to do...
This FRETMAP command simply tells the compiler to replace fret 1 with a, 2 with b, 3 with c etc. in the output file. The mapping is completely unconstrained, so you could, if you really wanted to, replace fret 5 with fret5 or with an emoji for example.
You can map as many or as few frets as you need. For example:
FRETMAP 10-x will map fret 10 to a lowercase x.
In fact, the gaspar Postscript compiler has a default fret map for Sanz’s notation where fret 10 is automatically mapped to X etc.
If you don’t want the default fret mapping, then you can either replace the mapping with your own map (as above), or turn off fret mapping completely:
NOFRETMAP P-1 S-1 T-3 Q 1-1 1-2 1-3 1-4 1-5 1-6 The above STL makes all frets numeric.