STL Tutorial – the basics

This is a short tutorial on the Simple Tablature Language.

Format

An STL file is a simple text file. You can give it any extension you like, but I usually use .sanz in honour of Gaspar Sanz.

Structure

Every STL file comprises a series of lines where each line specifies an element of the tablature. This means that each note or chord must be placed on a separate line. Whilst this makes the files quite long, it also makes them very easy to edit!

Let’s consider typesetting the first few bars of Sanz’s Rujero:

Rujero

I have added bar numbers (in red) to the facsimile to help with the typesetting process.

Here is the Postscript output from the Gaspar compiler for the whole of the piece:

Rujero

Here is the STL syntax for the first (incomplete) bar and the 2nd (complete) bar:

P-1
    TITLE Rujero
    COMPOSER Gaspar Sanz IMSGE 2.4.1
    S-1
            T-C
            Q 2-3 4-0 5-T
            2-2
            2-3
            1-0
        B-2
            1-2 4-0
            1-3
            1-2
            1-0
            C 2-3
            1-0

Let’s walk this through:

P-1 creates a new page numbered 1 (you can replace 1 with any number or symbol)
TITLE specifies the title of the piece
COMPOSER specifies the composer

Next, we start to enter the music itself:

S-1 creates a new stave, in this case numbered 1. Staves default to 5 courses.
T-C adds the time signature to the stave (in this case, common time)
Q sets the current note duration to be a quaver

On the same line as Q, we have 2 notes and an ornament (a trill):

Q 2-3 4-0 5-T

2-3 course 2 fret 3
4-0 course 4 fret 0
5-T the symbol T (for trill) placed on course 5

Next we add a single barline and some more notes:

B-2 barline numbered 2
1-2 4-0 two notes, course 1 fret 2 and course 4 fret 0
1-3 single note, course 1 fret 3
1-2 single note, course 1 fret 2
1-0 single note, course 1 fret 0
C 2-3 change the note duration to crotchet then single note, course 2 fret 3
1-0 single  note, course 1 fret 0

We keep adding barlines until the stave is full. Then we introduce a new stave with S-2 etc.

Below is the complete STL for Rujero. By comparing this with the output, you should be able to see how the typesetting works. Note that a blank line within a stave creates a space in the output Postscript, otherwise blank lines are ignored. The indentation of the lines is optional and is just to make the file easier to read. It has no effect on the output Postscript.

P-1
    TITLE Rujero
    COMPOSER Gaspar Sanz IMSGE 2.4.1
    S-1
            T-C
            Q 2-3 4-0 5-T
            2-2
            2-3
            1-0
        B-2
            1-2 4-0
            1-3
            1-2
            1-0
            C 2-3
            1-0
        B-3
            1-2 4-0 1-{
            2-3
            1-5 4-4
            1-3 4-2
        B-4
            Q 1-2 4-0
            1-3
            1-2
            1-0
            M 2-3 1-#

        SB-1
    S-2

            C. 2-3 4-0 5-T
            Q 2-2
            C 2-3
            1-0
        B-5
            Q 1-2 4-0
            1-3
            1-2
            1-0
            C 2-3
            1-0
        B-6
            C. 1-2 4-0
            Q 4-2
            C 4-4
            3-1
        B-7
            M 1-0 2-2 3-2

            5-0
        B-8
            SECTION
            C. 3-2
            Q 3-1
            C 3-2
            2-0
    S-3
        B-9
            Q 2-2 5-0
            2-3
            2-2
            2-0
            C 3-2
            2-0
        B-10
            2-2 5-0
            3-2
            1-0 2-0 4-2
            2-3
        B-11
            Q 1-0 2-2 5-0
            2-3
            2-2
            2-0
            M 3-2

        B-12
            C 1-5 2-3 4-4
            1-5
            1-3 2-0 4-2
            2-2
    S-4
        B-13
            Q 1-2 2-3 4-0
            1-3
            1-2
            1-0
            C 2-3
            1-0
        B-14
            C. 2-2 5-0 3-T
            Q 2-3
            C 1-0
            1-2
        B-15
            SECTION
            M 2-3 4-0

            2-3

        EB-1

The output

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s