The *Ultimate* guide to reading and writing advanced Tablature (TAB)

Written by Howard Wright
Howard.Wright@ed.ac.uk
Last update : 26th May 1998

 

This guide was originally written by Howard Wright. The reason I posted it on this site is because it’s a great resource, but it can be hard to find on the net. It was used with permission. Thanks Howard!
– Tommy Merry

CONTENTS
———–

1.0 What is TAB

1.1 What TAB will tell you

1.2 What TAB won’t tell you.

Reading Tab :
————–

2.0 TAB notation – The Basics

2.1 Other symbols used in TAB

2.2 Hammer ons and pull offs

2.3 Bends

2.4 Slides

2.5 Note length information

Writing Tab :
————-

3.0 Getting Started

3.1 To Tab or not to tab

3.2 Things to do when writing TAB

3.3 Things to avoid

———————————————————-

*****************************
*** 1.0 WHAT IS TAB ***
*****************************

TAB or tablature is a method of writing down music played
on guitar or bass. Instead of using symbols like in standard
musical notation, it uses ordinary ASCII characters and numbers,
making it ideal for places like the internet where anybody with
any computer can link up, copy a TAB file, and read it.

****************************************
*** 1.1 WHAT TAB WILL TELL YOU ***
****************************************

TAB will tell you what notes to play – it will tell you which
string to hit and which fret to fret it at.

TAB will tell you where hammer-ons, pull-offs, bends, slides,
harmonics and vibrato are used.

TAB will tell you what tuning the piece is in. If this isn’t
given explicitly, assume normal tuning. TAB should also give
you information on use of capos etc.

TAB will give you an indication of the ryhthm of the piece –
i.e it will tell you which are the long notes and which are
the short notes.

However it will not tell you exactly how long or how short
they are.

This leads me on to …

******************************************
*** 1.2 WHAT TAB WILL NOT TELL YOU ***
******************************************

TAB will (usually) not tell you the note lengths of the notes
– so in most cases you will *have* to listen to the song
yourself, with the TAB in front of you to work out the ryhthm
of the notes.

TAB will not tell you which fingers you use to fret which
note.

TAB will (usually) not tell you anything about picking and
strumming – you will have to decide for yourself where to use
upstrokes/downstrokes and so on.

*******************************************
*** 2.0 TAB NOTATION – THE BASICS ***
*******************************************

TAB is simple to read, and should be simple to write if you
want to submit a song you have worked out yourself. The
idea is this :

You start out with 6 lines (or four for bass). These
correspond to the strings of the instrument. The top line
is the highest pitch string, and the bottom line is the
lowest pitch string. Below is a blank bit of TAB with the
string names at the left.

E—————————————————————-
B—————————————————————-
G—————————————————————-
D—————————————————————-
A—————————————————————-
E—————————————————————-

Numbers are written on the lines to show you where to fret the
string with the left hand. If a zero appears , this means play
the open string. Like standard musical notation, you read from
left to right to find out what order to play the notes. The
following piece of TAB would mean play the sequence of notes
(E F F# G G# A) on the bottom E string by moving up a fret at a
time, starting with the open string.

E—————————————————————-
B—————————————————————-
G—————————————————————-
D—————————————————————-
A—————————————————————-
E—0–1–2–3–4–5———————————————

OK so far ?

Here we have notes being played one at a time. If two or more
notes are to be played together, they are written on top of one
another, again just like standard notation.

In the next example we have a G bar chord.

E—-3————————————————————
B—-3————————————————————
G—-4————————————————————
D—-5————————————————————
A—-5————————————————————
E—-3————————————————————

So this means play all these notes together as a chord.

You might see the same chord written like this :

E——–3——————————————————–
B——-3———————————————————
G——4———————————————————-
D—–5———————————————————–
A—-5————————————————————
E—3————————————————————-

Which would mean strum the same shape starting at the bottom
string, so that each string is hit slightly later than the last
string, but all notes will ring together. Below is am example of
the same shape again, but now the gaps between the notes are
bigger – so you would probably pick the strings separately instead
of slowly strumming the shape.

E——————3———————————————-
B—————3—–3——————————————–
G————4———–4—————————————–
D———5—————–5————————————–
A——5———————–5———————————-
E—3—————————–3——————————–

You might ask – How do I know how fast or slow to play this ?
Are all the notes supposed to be the same length ?

This is where TAB differs from standard notation. Most often TAB
will *not* give you any information on the note lengths. It is
usually left up to you to listen to the song to pick up the
rhythm.

However – don’t despair. TAB should give you some indications of
timing. In the example above all the notes are evenly spaced
so you can reasonably assume that the notes are the same length
(maybe all eighth notes or quavers) but this may not always be
true – it depends on who wrote the TAB.

As a general rule, the spacing of the notes on the TAB should tell
you which notes are the long ones, and which are the short and fast
ones, but obviously it won’t tell you if a note is a triplet or
anything like that. Again, this will depend strongly on the
person who wrote the TAB.

As an example, here are the first few notes of the American
National Anthem in TAB. You should see fairly clearly that the
different spacing corresponds to the different note lengths.

E———————–0——–4–2-0————————–
B—0————–0———————————0———–
G——1——1—————————-1—-3—————-
D——–2——————————————————-
A—————————————————————-
E—————————————————————-

Obviously it will be a lot easier to play the TAB for a song you
know well than for a song you’ve never heard of because you will
already be familiar with the ryhthms of the familiar song.

*****************************************
*** 2.1 OTHER SYMBOLS USED IN TAB ***
*****************************************

So far I’ve looked at what notes to play : which string to hit, and
where to fret it. I’ve mentioned how to get an idea of note lengths
by looking at the spaces between notes on the TAB, but this can only
be a rough guide. You will always have to check with the original
track to work out details of the rhythm.

A lot of other imprtant information can be included in a piece of TAB.
This includes hammer-ons, pull offs, slides, bends, vibrato and so on.

The standard practice is to write extra letters or symbols between
notes to indicate how to play them. Here are the letters/symbols most
often used :

h – hammer on
p – pull off
b – bend string up
r – release bend
/ – slide up
\ – slide down
v – vibrato (sometimes written as ~)
t – right hand tap
x – play ‘note’ with heavy damping

For slides, s is sometimes used to indicate either an up or down slide.
Symbols for harmonics are explained below in Section 3.2

That last one, the x, is used to get a choppy, percussive sound.
You usually use your fretting hand to lightly damp the strings so
that when you pick the note it sounds dead.

Note that the use of ‘x’ is *totally* different from the use of
an ‘x’ when giving chord shapes.

For example if you wrote the chord of D, you would see :

EADGBE
xx0232

where the ‘x’s mean do not play this string.

In tab it is implicitly assumed that a string is not played if it is
not marked. So the same chord in TAB would be :

E—–2———————————————————–
B—–3———————————————————–
G—–2———————————————————–
D—–0———————————————————–
A—————————————————————-
E—————————————————————-

with no ‘x’. The x is is only used in TAB to represent a heavily
muted string which is picked/strummed to give a percussive sound.

There are a number of other symbols for things like whammy bar bends,
pick scrapes and so on. There seems to be no particular standard
way of writing these – details should be given in the TAB to explain
what the symbols mean.

Bass TAB will probably need a few extra symbols to cope with the
different techniques used in bass playing – for example slapping
and ‘popping’ the string with thumb or middle finger.
You could use ‘s’ for slap and ‘p’ for pop as long as you wrote
them *underneath* the lines of tab to distinguish them from slide
and pull off which would be written *on* the lines of tab.

****************************************
*** 2.2 HAMMER ONS AND PULL OFFS ***
****************************************

With hammer-ons and pull-offs you might find things like these :

E—————————————————————-
B—————————————————————-
G—————————————————————-
D—————————————————————-
A———5h7———–5h7————————————–
E—0–0———-0–0——————————————-

which would mean play the open E twice, then hit the A string at the
5th fret and hammer on to the 7th fret.

Pull offs look very similar :

E—-3p0————————————————————
B———3p0——————————————————-
G————–2p0————————————————–
D——————-2———————————————
A—————————————————————-
E—————————————————————-

Here we have a descending blues scale using pull-offs to the open
strings. For each pull off you only pick the first note of the pair
with the right hand – so in this example you would pick all the
notes on the 3rd and 2nd frets, and the open strings would be
sounded by pulling off.

Because you give the string an extra bit of energy when you hammer
on and pull off, you only need to hit the first note with the picking
hand. You could even have a long string of hammer-ons and pull-offs
like this :

E—————————————————————-
B—————————————————————-
G—2h4p2h4p2h4p2h4p2h4p2—————————————-
D—————————————————————-
A—————————————————————-
E—————————————————————-

In this case you only pick the first note.

Note – you might see other symbols used to mean hammer on or pull off,
for
example ^ can be use to mean hammer-on and pull-off.

e.g :

G—2^4^2—-

It would make things easier if everyone used the same symbols, so
unless you have a strong objection to ‘h’ and `p` please use those.
In any case, for any tab you send you should always explain what your
symbols mean so if you use anything ‘unconventional’ make sure you
explain what it means.

**********************
*** 2.3 BENDS ***
**********************

When bends are involved you need to know how much to bend the note
up. This is indicated by writing a number after the ‘b’.
For example, if you see this :

E—————————————————————-
B——7b9——————————————————-
G—————————————————————-
D—————————————————————-
A—————————————————————-
E—————————————————————-

it means strike the B string at the 7th fret, then bend the note up
two semitones (one whole step) so that it sounds the same pitch as
a note fretted at the 9th fret would do. (Sometimes the bend is
written with the second part in brackets, like this —7b(9)— )

Something like this :

E—————————————————————-
B——7b9–9r7————————————————–
G—————————————————————-
D—————————————————————-
A—————————————————————-
E—————————————————————-

means play the note at the 7th fret, bend up two semitones, strike the
note again whilst it is still bent, then release the bend so that the
note has it’s normal pitch.

Sometimes a pre-bend is used – this is where the string is bent up
*before* the note is struck. After striking the note, the bend is
released. Pre-bends are usually written like this:

E—————————————————————-
B——(7)b9r7—————————————————
G—————————————————————-
D—————————————————————-
A—————————————————————-
E—————————————————————-

This means: fret the note at the 7th fret and bend the string up two
semitones (without actually playing the note). Now strike the string
and release the bend.

You sometimes get a note which is bent up only a quarter of a tone or
so. In this case it would look a bit strange to write :

B——–7b7.5——–

if you have to bend it up half a fret’s worth.
Instead it’s written as :

bend up 1/4 tone
E—————————————————————-
B——7b——————————————————–
G—————————————————————-
D—————————————————————-
A—————————————————————-
E—————————————————————-

with instructions on how much to bend written above the note.

**********************
*** 2.4 SLIDES ***
**********************

The most common symbols used for slides are / for a slide
up and \ for a slide down.

You might also see ‘s’ used to mean slide.

You don’t always need separate symbols for ‘up’ and ‘down’ slides
since a line of TAB reading :

E—————————————————————-
B——7/9——————————————————-
G—————————————————————-
D—————————————————————-
A—————————————————————-
E—————————————————————-

is clearly a slide *up* from 7th to 9th fret. However you might
also see things like these :

E—————————————————————-
B——/7-9-7\—————————————————
G—————————————————————-
D—————————————————————-
A—————————————————————-
E—————————————————————-

where the exact start or finish of a slide is not given. Here you
have to know whether you’re sliding up or down. In these cases use
your judgement to choose the starting or finishing fret. The effect
usually desired is to have a note ‘swooping in’ from a lower pitch
or dropping suddenly in pitch as the note fades.

You could have a whole series of slides running together, like this

E—————————————————————-
B——7/9/11\9\7\6\7——————————————–
G—————————————————————-
D—————————————————————-
A—————————————————————-
E—————————————————————-

which would mean you only strike the first note with the pick using
the sustain to produce the other notes.

***************************************
*** 2.5 NOTE LENGTH INFORMATION ***
***************************************

Occasionally you will find TAB which includes information on all
of the note lengths. There seems to be no particular ‘standard’
way of doing this, but it usually involves a line of letters or
symbols above the TAB.

See below (Section 3.2 part 6) for more details.

If the explanation of the timing symbols is not given in the TAB
then you’ve got a problem !
In this case a quick email to the author to ask for enlightenment
is the only way forward.

*********************************************
*** 3.0 WRITING TAB – GETTING STARTED ***
*********************************************

Perhaps one of the most important things to do before you start
typing up a piece of TAB is to decide exactly how much information
to include in it. The trick is to convey the right amount of
information in a clear, easily readable form.

Questions you can ask yourself are :

– Is the song played using mostly chords ?

– Are there a number of riffs which appear throughout the song ?

– Is there a clear verse/chorus/middle bit structure ?

By planning ahead a little you should be able to produce a clearly
structured TAB which will not only be easier for others to read, but
also easier for you to type in.

There are also choices to be made when deciding what package to use
when typing the TAB in. All you really need is a simple text editor,
however a mouse-driven editor will probably make things easier.

When you start typing in it saves time if you draw out one blank
stave and then make 8 or 10 copies of these before you start typing in
the fret numbers etc.

If you use a more complicated package like Microsoft Word then
make sure that the characters you use are all the same length.
If an ‘m’ character is wider than an ‘i’ character then your TAB
is going to look very strange on another text editor. Choose a font
where all charcters get the same width – Courier usually does the
job.

There are also a number of programs available by ftp which were
written specifically to make TAB writing easier. Details of these
programs including ftp addresses are in the ‘TABBING MADE EASY’
FAQ by John Kean, along with other useful hints for writing TAB.
You can obtain this FAQ from OLGA (www.olga.net\software.html).

*************************************
*** 3.1 TO TAB OR NOT TO TAB ***
*************************************

If a song can be described well with just chords, then it will be
a lot easier to read and write if you just use the chord shapes,
rather than tab out the chords.

BUT – if you do just send in the chords it makes things *much*
clearer if you give the chord shapes as well.
For example, if you wanted to send in Led Zeps ‘Gallows Pole’
you could write:

Intro : A7 G/A A7 Am7 Dadd4/A A7 G/A A7 Am7 Dadd4/A

Verse : A7 G/A A7 Am7 Dadd4/A A7 G/A A7 Am7 Dadd4/A
A7 G/A A7 Am7 Dadd4/A G D
A7 G/A A7 Am7 Dadd4/A A7 G/A A7 Am7 Dadd4/A

(You should really have the words underneath as well, but I can’t
remember them at the moment !)

Now this is OK, but how many people actually know how to play Dadd4/A
off the top of their heads ?

What you need to do is include some chord shapes like this :

EADGBE EADGBE EADGBE EADGBE EADGBE EADGBE
x02020 x02010 x04035 320033 xx0232 x0000x

A7 Am7 Dadd4/A G D G/A

To TAB out these chords will take a lot longer to type in, and
will probably take people a lot longer to read and understand.
Where a song is based around chords like this, it makes things
much easier if you just give chord shapes and names, then show
where the chords go in relation to the words.

**********************************************
*** 3.2 THINGS TO DO WHEN WRITING TABS ***
**********************************************

One of the most important considerations when typing in TAB is to make
it clear and easily readable.

There are a few simple things you can do to make things work.

— 1 — Use spaces !

It’s amazing the difference it can make if you insert a few blank
lines in the right place. If you are used to writing the words above
or below the lines of TAB make sure you leave a few lines free so that
it’s clear whether the words belong to the line of TAB above or below.
Space out the individual lines of TAB and the whole thing will be a
lot easier for others to understand.

— 2 — Define the symbols you use.

It would make everybody’s life a lot easier if everyone used the same
symbols for hammer ons, bends etc.

BUT – if you are convinced that your particular way of writing bends
and slides makes much more sense than anyone else’s, that’s OK as
long as you tell everybody what system you use. It makes very good
sense to start your TAB file with a list of symbols used.

The list of most commonly used symbols is below :

h – hammer on
p – pull off
b – bend string up
r – release bend
/ – slide up
\ – slide down
v – vibrato (sometimes written as ~)
t – tap (with strumming hand)
x – muted, struck string

When you get on to harmonics , you might see a variety of symbols
used. Even in standard music notation, an accepted way of writing
natural and artificial harmonics has neverbeen agreed !
However, using brackets is the standard way of writing harmonics,
so a natural harmonic at the 12th fret would be :

E—————————————————————-
B—————————————————————-
G—————————————————————-
D—————————————————————-
A—————————————————————-
E——<12>——————————————————

Normal brackets () are sometimes used for grace notes or optional
notes so ‘pointy’ brackets <> are the usual choice for harmonics.
Because there are no standards (in written music or tablature) to
distinguish between natural and artificial harmonics, some confusion
sometimes arises. If you are writing out some tab with harmonics, it’s
best to add a note to say whether they are natural harmonics (most
commonly at the 5th, 7th and 12th frets) or artificial (pinched)
harmonics. With artificial harmonics, you have to fret a note with
the left hand (say at the 2nd fret) and pinch the harmonic an octave
above (at the 14th fret) so you should make it clear whether the
number you write in the tab is the fretted or pinched note. It is
more common to tab out the pinched notes, so if you see tab like this :

E—————————————————————-
B—————————————————————-
G—————————————————————-
D—————————————————————-
A—————————————————————-
E——<14>—<16>—<17>—<16>—<14>——————————

It will usually mean fret notes at the 2nd, 4th and 5th frets, and
play the artificial harmonics at the frets shown in the tab.

— 3 — Label bits of the TAB

It makes things a lot easier if you can see where the ‘verse’ and
‘chorus’ parts of a song are, so put a few labels in certain places
to guide people through it.

Many songs will have clear ‘verse’ and ‘chorus’ structures – so you
can tab out the riffs/chords or whatever for these just once, and
then indicate where these are repeated. Or there maybe a couple of
important riffs which are used – so TAB these out and label them
‘Riff One’ and ‘Riff Two’ – then when they come up later in the song
you can just say ‘repeat Riff One four times’ instead of tabbing
the whole thing again.

As long as it’s clear which bits of TAB go with which label, you
will save yourself time this way as well as making it easier to
read for others.

— 4 — Include Artist/album

It’s useful for others to know where to find the original song,
so at the beginning of each TAB include some information on
the artists who recorded the original, and the album on which
the song can be found.

— 5 — General comments

It’s also useful to include a few lines at the beginning of the
TAB to explain the style of the song, or to point out important
features such as alternative tunings, use of capos etc.

A few words along the lines of “use a staccato, funky kind
of strumming style for the chords, then change to a sustained
feel for the lead line” will help people to get an idea of
how to approach the playing style.

Information on the type of guitar (electric/acoustic,
6 string/12 string) and effects used would be useful.

One point on the use of capos and alternative tunings :

It’s a lot easier for people to understand chord names etc if
they are written as though played *without* a capo.
For example, if you have a D shape chord played with a capo at
the 2nd fret you should write it as D major even though you will
actually be fretting notes at the 4th and 5th frets.

Also – for TAB using a capo, it’s standard practice to write the
numbers of the frets *relative* to the position of the capo.
So again, if you had a D major chord with a capo at the 2nd fret
the TAB would be :

E—-2———————————————————–
B—-3———————————————————–
G—-2———————————————————–
D—-0———————————————————–
A—————————————————————-
E—————————————————————-

even though you actually fret the notes at the 4th and 5th frets.

It’s similar with TAB for guitars tuned a semitone or tone
lower than usual. If a song should be played with the guitar
tuned to Eb Ab Db Gb Bb Eb, and it has this chord :

Eb—–0——————————————————–
Bb—–0——————————————————–
Gb—–1——————————————————–
Db—–2——————————————————–
Ab—–2——————————————————–
Eb—–0——————————————————–

it makes things a lot easier to understand if the you call the chord
‘E’ rather than Eb.

That way, if you decide to play in standard tuning, you don’t get
confused.

— 6 — Timing information

You may want to get really serious and include details
giving the precise rhythm of the piece. This will involve
a lot more typing, but it means all the information
necessary to play the piece is given explicitly.

One way to approach this is to write a line of dashes
interspersed with numbers which count the beats.
So in 4-4 time, you would have :

1—2—3—4—1—2—3—4— etc

Under this you can write a line of d’s and u’s to represent
down and upstrokes.
Here is a simple example where the rhythm is 2 crotchets
(quarter notes) followed by 4 quavers (8th notes)

1—2—3—4—1—2—3—4— etc
d—d—d-u-d-u-d—d—d-u-d-u-

You could expand on this to use upper and lower case letters
to indicate accents and so on.
If you use this method make sure that you clearly separate the
2 lines of rhythm information from the 6 lines of TAB !!!

One other way of including timing information is to use one
letter/symbol for each note type.

For example use e for 8th note (quaver), s for 16th note (semi-
quaver) and so on. The letters you use may well differ depending
on whether you’re used to the american system of quarter notes,
8th notes etc or the english system of crotchets and quavers ,
but the method is the same.

(If you’re not sure of the ‘translations’ here they are :

whole note – semibreve
half note – minim
quarter note – crotchet
8th note – quaver
16th note – semiquaver
32nd note – demisemiquaver
64th note – hemidemisemiquaver )

Simply write the letters above the corresponding note in the
TAB. (Make sure you define which letters/symbols you use)

Here’s an example of what this looks like :

This is the opening riff from the Beatles’ Ticket To Ride

q e e t t t q e e t t t

E——–0———–0——–0———–0———————-
B———–2—–0————–2—–0————————-
G—2———-2———-2———2—————————-
D—————————————————————-
A—————————————————————-
E—————————————————————-

Here I’ve used q for quarter note, e for 8th note
and t for triplet quarter note.

If you want to send in a TAB with rhythm information like this
then it’s *essential* to explain the system you use. I’ve seen
a lot of different systems of letters and numbers of varying
degrees of simplicity and readability. Whichever you choose to
use, you’ll have to explain all your symbols to make sure others
can work out what the hell you’re on about.

If you want to give a few clues as to the rhythm of the TAB, but
don’t want to get too involved, use of bar lines is an effective
way of conveying timing information.

Simply insert a vertical line of |’s to indicate the end of a
bar. So using the national anthem example I had before, with bar
lines it looks like this :

E——–|—————|0——–4–2-|0————–|——–
B—0—-|———-0—-|————–|—————|0——-
G——1-|—–1———|————–|—–1—-3—-|——–
D——–|2————–|————–|—————|——–
A——–|—————|————–|—————|——–
E——–|—————|————–|—————|——–

— 7 — Lyrics

It’s a lot easier to follow a piece of TAB when you’ve got at least
some of the lyrics to follow, and you can match up the notes/riffs
in the TAB to the lyrics.

Try to include lyrics for at least the first verse and chorus. If
you’re not sure of the words you can go to www.lyrics.ch – there is
a large collection of song lyrics held there.

Failing that a request to the newsgroups along the lines of

” Please mail me the lyrics to such and such so that I can make
a proper job of the TAB I’m working on”

will usually get a sympathetic response.

As a final note on writing TAB I should say that whenever you post
to the newsgroups ALWAYS cross post to both guitar groups, and also
mail a copy to guitar@nevada.edu so that it can be included in OLGA.

For more information on posting to the guitar newsgroups and OLGA
see the other FAQs regularly posted to the guitar newsgroups.

********************************
*** 3.3 THINGS TO AVOID ***
********************************

— 1 — Tab Wraparound

One of the most common problems in writing TAB is text wraparound.
This makes the TAB almost impossible to read but is very easily
avoided.

The problem occurs when you write a line of TAB which is maybe 80
or 90 characters long. For a lot of people this is too wide for
their screen, so what should be a single line of tab ends up being
split onto two lines.

All you have to do is be careful when you type in TAB so that you
the maximum width of line is say 60 characters.

I’ve tried to do that in this FAQ so that the maximum width is about

<<<---------------------------------------------------->>>

this much. If you limit your TABs in the same way, you should be OK.

Of course, if TAB *does* get wrapped around the author might not
realise because it looked fine on his/her screen when they wrote it.
It might be worth letting them know of the problem, so they can be
careful in the future.

(This includes me ! If parts of this FAQ are too wide for your screen,
please let me know !)

— 2 — Very squashed TAB

It’s amazing how easy it is to ruin an otherwise good piece of TAB
by not spacing it out so that the end result is a mass of cramped TAB,
explanations, labels etc.

When you finish typing up, go back through the TAB and see if you can
insert a few blank lines here and there to separate verse from chorus
or whatever. It really does make it a lot easier for others to read.

It might also be worth considering if you’ve included too much detail
in the TAB. Usually this will not be the case, but I have seen a few
TABs which go into great details, but are extremely off-putting to
try to read because of the sheer quantity of information.

— 3 — Unnecessary repetition

If a line of TAB or a particular riff is repeated a number of times
then save yourself the effort, TAB it once.

It’s also easier to read like this.

That’s all I *think* you need to know about reading and writing TAB.
If there’s anything important you think I’ve left out or if there
are bits of the FAQ which you can’t understand then let me know.

You can contact the author of this guide at: Howard.Wright@ed.ac.uk